Sorry if my question is very simple... But is it possible to use microlib together with RTX (Cortex M0) ? I have read some of the doc about the microlib, but I'm not totally sure of the answer to my question.... Anyone ?
When I think of it, when/why is the stacksize in startup.s used (I know it is used when main runs until the RTX init takes over)
It is used before RTX takes control or if no RTOS like RTX is used.
Hi Jameel, yes, that is also my understanding. But if I lower the stacksize in startup.s too much, the system crashes! There must be something else ?
If that global stack overflows, then the startup code may overwrite global variables used by the C library, the OS or by any of the threads.
Next thing is that you have multiple stacks in the startup file. One stack is used during startup - before you start to use threadspecific stacks.
But the startup file also has stacks for other processor modes. Like interrupt processing.
Good catch. That fact had slipped my mind.
Thanks Per! That explains it perfectly!
Any input on using the microlib with RTX ?