LPC40xx using peripheral SRAM0 and SRAM1

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

LPC40xx using peripheral SRAM0 and SRAM1

1,836 次查看
Sahil_Bhat
Contributor II

Hi,

I am using lpc4078 with total 96kb RAM (60k CPU RAM + 36k peripharal RAM), code using c++.
I am /developing/adding new code so I have a problem about memory not enough .

My question is how can I use that 36k peripheral RAM for my code (stack memory or heap) so that my code does not crash?

Kindly advice

Thanks

标签 (1)
0 项奖励
回复
3 回复数

1,806 次查看
Sahil_Bhat
Contributor II

Thanks for your reply.

Unfortunately, we've inherited a system that was from command line in linux.  Can we make these (above suggested) changes from the linker script ".ld" file? All of our code and development stuff is on linux based system.

Thanks 

0 项奖励
回复

1,783 次查看
DanielRuvalcaba
NXP TechSupport
NXP TechSupport

Hi,

My previous response can be seen as a way to modify the linker script directly from MCUXpresso. So, you can try to manually modify the linker to do the same heap and stack configurations. But, you have to make sure that there are no other files that needs to be modified (besides the linker script) in your system to apply these configurations.

Please take a look the this article, might be helpful for you:

https://mcuoneclipse.com/2014/10/06/putting-code-of-files-into-special-section-with-the-gnu-linker/

Best regards, Daniel.

0 项奖励
回复

1,814 次查看
DanielRuvalcaba
NXP TechSupport
NXP TechSupport

Hi,

You can try by modifying the Managed Linker Script.

In your project, please go to Properties -> C/C++ Build -> Settings -> MCU C++ Linker -> Managed Linker Script.

Where it says “Heap and Stack placement”, change it to MCUXpresso Style.

Here you’ll be able to change the heap and stack configuration.

DanielRuvalcaba_0-1651777301675.png

I can also recommend you to make use of this file that allows you to place data into different memory banks cr_section_macros.h.

You can take a look to this post to get more information about memory allocations.

I hope this helps, Daniel.

0 项奖励
回复