AnsweredAssumed Answered

remaping stack from internal to external RAM

Question asked by Hartmut Meyer on Aug 29, 2016
Latest reply on Sep 3, 2016 by Hartmut Meyer

I am using the LPC4357 with 32 MB SDRAM.

This extenal SDRAM needs to be initialized before it can be used,

doing this there is internal RAM required for startup.s and system.c

as well the default stack is located in internal RAM.

 

The board actualy in use has only 136 KB internal RAM,

splitted into different regions, so the max usable is only 64 KB ( 72 KB ).

My application requires more stack as is available after longer runtime

and a crash occures of course  if running out of stack.

 

Are there any examples how to use a stack in external SDRAM,

after initialization has completed ? Is this possible at all ?

I am using already a scatter-load-description file where stack and heap is

already defined there as regions.

I am also using "__user_setup_stackheap" what results in using the allocated heap,

but the stack will still be used from internal RAM.

 

Basicaly, the application is working but quite useless if stack-overflow occures...

Outcomes