Move stack to RamAHB32

Showing results for 
Search instead for 
Did you mean: 

Move stack to RamAHB32

Contributor II

I have a problem, my local variables change value without any reason. So i think my stack and heap are overlapping each other. Is it possible to move my stack to my second ram location (RamAHB32)? On the internet i only found a way to move the stack and the heap to the second location. EnhancedManagedLinkScripts - ** Code Red Support Site ** .

I'm using the lpc1766 processor.

Thank you in advance,

2 Replies

NXP Employee
NXP Employee

In LPCXpresso IDE - the simplest way to to do this would be to add the linker option:


to MCU Linker - Miscellaneous - Other Options box in Project Properties. You can move the heap in the same way if required, as described in 

Alternatively, you can do this by making a minor modification to a Freemarker Linker Script : Freemarker Linker Script Templates 

Note that in MCUXpresso IDE, you can do this more directly via a new entry in the Managed Linker script page of the Linker Settings. Please see the MCUXpresso IDE User Guide for more details (downloadable from the Documentation tab of


LPCXpresso Support

NXP Employee
NXP Employee

Hi Mark,

Please take a look to the following link: 

Hope it helps!

Best Regards,
Carlos Mendoza
Technical Support Engineer

0 Kudos