Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
6 years, 11 months ago.
Setting heap and stack size for ST MCU
Does anyone know how to change the heap and stack size for the ST MCUs within MBED? When using the standard peripheral Libraries or the HAL Libraries, you could change it in the stm startup file, but there's no sign of the file within the MBED stuff.
1 Answer
6 years, 11 months ago.
The heap size is dynamic with ARM/GCC compilers. It is hard coded in startup files for IAR.
As for stack size, please see this document - https://os.mbed.com/docs/v5.6/reference/configuration.html
What's the best way to make use of the configuration stuff when writing code in an external IDE (in my case CoIDE?)
posted by 05 Dec 2017You would make the configuration file then run "mbed export." Here is the documentation for exporting - https://os.mbed.com/docs/v5.6/tools/exporting.html. Just be aware that if you change the configuration file, you'll need to run export again to get the new symbols.
posted by 05 Dec 2017
I've just come across this section in my linker script. Maybe I need to use of the HeapLimit somehow?
- It defines following symbols, which code can use without definition:
- exidx_start
- exidx_end
- etext
- data_start
- preinit_array_start
- preinit_array_end
- init_array_start
- init_array_end
- fini_array_start
- fini_array_end
- data_end
- bss_start
- bss_end
- end
- end
- HeapLimit
- StackLimit
- StackTop
- stack
- _estack
- /
posted by Joshua Cowpland 30 Nov 2017