eclipse-threadx / threadx

Eclipse ThreadX is an advanced real-time operating system (RTOS) designed specifically for deeply embedded applications.
https://github.com/eclipse-threadx/rtos-docs/blob/main/rtos-docs/threadx/index.md
MIT License
2.91k stars 789 forks source link

how to switch sp to _tx_thread_system_stack_ptr in ports_smp for arm-v7? #240

Open carll00226 opened 1 year ago

carll00226 commented 1 year ago

hi scott: I notice that there are some notes in ports_smp which describe the switch between system stack and task stack for SP, but the related codes are deleted. I want to add the switch to system stack with _tx_thread_system_stack_ptr, can you please tell me where and how to add the switch codes? Thanks.

goldscott commented 1 year ago

Hi @carll00226, I'm no longer on the Azure RTOS team, so I may not be able to answer all the issues that come up here. Can you show me the notes you are referencing?

carll00226 commented 1 year ago

image tx_thread_context_save.S 1681278572410 tx_thread_system_return.S

carll00226 commented 1 year ago

hi, scott: So you go to PX5 RTOS ?

goldscott commented 1 year ago

Hi @carll00226 - I'm still at Microsoft, just in a completely different organization.

That comment may have been a copy-paste error or may be from an old implementation. Shouldn't the IRQ stack be used (at least in interrupts where _tx_thread_context_save is called)?