2010-05-05 04:45 AM
Stack outside of range
2011-05-17 04:49 AM
Your routines exceed the stack memory reserved by linker. You can (either)
1 - configure linker to increase the stack size (i.e. for IAR the stack limit is written into stm32f10x_flash.icf) 2 - create global variables to store big data 3 - reserve heap memory chunk with malloc I would prefer 2. Best regards, Filippo2011-05-17 04:49 AM
You current stack only has 0x200 bytes, your usage is exceeding 0x4000 (16 KB). You definitely need to make your stack much bigger, or curb your use of local variables.
2011-05-17 04:49 AM
Hi,
The 12 buffers of 512 elements were already global. If now, I add the 4 buffers of 1024 my linker says:
Error[Lp011]: section placement failed: unable to allocate space for sections/blocks with a total estimated minimum size of 0x7240 bytes in <[0x20000000-0x20004fff]> (total uncommitted space 0x5000).
Which would be the correct value of my stack?
/*-Memory Regions-*/
define symbol __ICFEDIT_region_ROM_start__ = 0x080000EC ;
define symbol __ICFEDIT_region_ROM_end__ = 0x0801FFFF;
define symbol __ICFEDIT_region_RAM_start__ = 0x20000000;
define symbol __ICFEDIT_region_RAM_end__ = 0x20004FFF;
Thanks!!
2011-05-17 04:49 AM
Ok, that's what I finally did: I set the RAM end in 0x2000FFFF which is, according to STM32 documentation, the end of SRAM section. Now seems the program links perfect and works. Now, at least, I can debug it.
Thanks for all folks!!