LPC40xx using peripheral SRAM0 and SRAM1

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LPC40xx using peripheral SRAM0 and SRAM1

924 Views
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

Labels (1)
0 Kudos
3 Replies

894 Views
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 Kudos

871 Views
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 Kudos

902 Views
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 Kudos