Hi @Sulav Lal Shrestha - yes, you can remove the stack setup from the tx_low_level_initialize function. The _tx_thread_system_stack_ptr variable should be set to the SVC stack.
How to set up stacks for ThreadX in LP-AM243X platform?
I am trying to integrate ThreadX to Cortex-R5 based LP-AM243x microcontroller. I have started with a hello world project which just prints to serial terminal. My question is as follows:
In the hello-world project, it already sets up stacks for different modes like SYSTEM, SUPERVISOR, IRQ,FIQ, etc. A similar stuff is done in tx_low_level_initialize function. Can we just remove the stack setup code from the tx_low_level_initialize function and do the stack set up during boot time before it hits main(). And if we can do that, which stack should the _tx_thread_system_stack_ptr variable point to in tx_low_level_initialize ? Currently there's stack for main(), irq, fiq, svc, abort, and undefined.
Thank you.
Regards,
Sulav