lpcware

cpp lpc1549 default stack pointer

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by efiLabs on Sun Jun 22 23:25:43 MST 2014
friends :

a question arises for the lpc1549 : lpcxpresso 7.2.0 cpp (C++ lpcopen proj)

the default stack pointer seems to be assigned at the end of xxx_Debug.ld linker script

       PROVIDE(_pvHeapStart = .);
    PROVIDE(_vStackTop = __top_Ram0_16 - 0);
}

the location of __top_Ram0_16 is at 0x02004000 which is at the end +1 of the 1st 16 k sram "Ram0"

the lpc1549 has 2 x 16 k + 4k sram

one would assume that it should by default be placed at the end of sram +1 which is 0x02009000

i did a quick and dirty hack of hard coding this void (*)() function pointer in cr_startup_lpc15xx.cpp and my pgm works now since i use at least 32 k sram ... it took a while to figure it out since i 1st assumed my pgm is somehow at fault

this can't be the intended fix for it i assume.

what's the appropriate solution for it ... i can't just start hacking happily away, right from the start

thanks, cheers efiLabs


Outcomes