We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
The manual says: "Stack size used by RTX kernel is configured in STARTUP.S. Minimum size is 128 bytes, however 256 bytes is recommended when interrupts are used." However the map file says: " 144 26 32 8 2128 2829 rtx_config.o 64 26 288 0 2128 720 startup_stm32f10x_md_vl.o" This shows that stack size is assigned twice: 1. 2128 by rtx_config.o 2. 2128 by startup_stm32f10x_md_vl.o What is wrong? donald
Thanks for your patience. However my questions don't touch stack space in general, as you answered. I'm only concerned about initial stack defined in startup.s: Stack_Size EQU 0x0000100
AREA STACK, NOINIT, READWRITE, ALIGN=3 Stack_Mem SPACE Stack_Size
Where is Stack_Mem located? Could You please point me a reference to the manual, where API explains how to get the address (from C/C++ perspective) to assembly allocated initial stack ( in startup.s)? All other questions which I've asked are side effects of this main issue. donald
I haven't seen any feedback to my comment earlier that the normal way is to make the initial stack very small, and perform the majority of initialization within an RTX thread. Do you really need to reclaim these 128 bytes?
Well I have 8kB RAM part and my code need app. 800 bytes more. I'm looking anywhere for savings, but this seems to be painless. However looks impossible. donald
Make your own symbol in the startup file, representing the C variable name you want to use to reclaim stack space.