2019-04-08 10:22 AM
In #[STM32 MCUs] - #Cortex-m0 . In *.icf we can define the size and location of stack in the RAM area.
Is there any process to define the size and start location of Main stack and program stack separate in the stack section?
2019-04-08 12:09 PM
startup.s you can presumably program it with any mode/settings you like.
Assume IAR just gives you very basic pedestrian settings, if you want to do advanced stuff, you can create your own variables and sections in the .ICF (linker script, or equivalent), and put the implementation details in your own source.
2019-04-08 11:45 PM
I am curious, how controller will know that CSTACK is the place where Stack data should be stored.
Is it, due to loading DCD sfe(CSTACK) in vector table?
2019-04-08 11:56 PM
First, unless I'm wrong, the core has a PC Program counter.
This one is fetched from the interrupt vector table once the reset is released.
Then the statup() function which typically is toolchain's compiler business (IAR) will initialize the registers and any global C variable prior to starting the user code.
The linker config file makes you define segments of memories and properties.
2019-04-08 11:57 PM
If create my own sections for main stack and Process Stack in the .ICF.
How compiler will know , that the place to store main stack data and process stack data?
2019-04-09 12:47 AM
The linker config file makes you define segments of memories and properties.
Yes, i can define the separate section to place my various data and give the location where it should be in RAM.
How to define at what location process stack to be initialized ?