2015-01-12 02:39 AM
Hi STM8 master,
One quick question about the STM8 RAM size changeI checked the xxx.map file and used 86 Byte on stack.I did change the RAM size through in Project settings->Linker->Inputbut lkf file does not change with setting than show .text size overflow . --------------lkf file----------------# Segment Ram:+seg .data -b 0x100 -m 0x271 -n .data+seg .bss -a .data -n .bss+def __stack=0x3ff --------------lkf file---------------- why?Is any document talk about this?Thank youDavid Lee2015-01-12 04:27 AM
Hello,
I'm not sure what your question is and what you are actually trying to achieve, but in the linker file part that you have reported you are telling the linker that your variables will start at 0x100 and will not have to exceed 625 bytes (0x271). According to this, the linker will report an error only if your variables use more than 625 bytes (in page1, but no need to go into these details at this point..), regardless of the stack. The stack itself will start at 0x3FFF and grow backward: if it grows too much (note that the stack size prediction by the compiler is pretty accurate, but can be wrong is special cases, and thus is not guaranteed) it will overwrite some global variables, resulting in all kinds of strange behaviours (most likely an application crash) at run time (that's not something that you can check at compile/link time) Hope it helps. Luca2015-01-12 05:48 PM
Hi Luca,
I changed end value of the RAM to 0x300 but the lkf file always show 0x271Do you know how STM8 extend RAM to 0x300Many ThanksDavid Lee