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.8k stars 768 forks source link

on riscv arch, does the user creat thread code run on machine mode #342

Open jmx-wqz opened 6 months ago

jmx-wqz commented 6 months ago

Describe the bug thread code will be called in the function tx_thread_shell_entry() which is in file tx_thread_sheel_entry.c , in function tx_thread_shell_entry() there is store/restore interrupt which can be configure only in m-mode , so __tx_thread_shell_entry() run in m-mode, user creat thread code will run machine mode too.

Please also mention any information which could help others to understand the problem you're facing:

To Reproduce Steps to reproduce the behavior:

  1. Build my project in IAR Workbench.
  2. See error

Expected behavior A clear and concise description of what you expected to happen.

Impact What impact does this issue have on your progress (e.g., annoyance, showstopper)

Logs and console output If applicable, add console logs or other types of debug information like Wireshark capture as .zip file.

Additional context Add any other context about the problem here.