2023-02-24 10:30 AM
Hello,
so in this video: https://www.youtube.com/watch?v=GZrfZNrA2ro
It is stated that the main thing is that with CMSIS 0S2 wrapper I can call the RTOS api of Arm and beyond that I can use either FreeRTOS or ThreadX. So it is very useful for to switch from a current implementation with for example FreeRTOS to a new implementation with ThreadX.
But I am not sure how does it work. I have a project where I used in the Cube MX the FreeRTOS middleware and added FreeRTOS functions in my main.c
Now when I want to switch to ThreadX how do I benefit from the wrapper?
I assumed I need to initialize a new project and write the implementation with ThreadX from scratch?
Solved! Go to Solution.
2023-02-27 01:07 AM
Hello @MStew.1
First let me thank you for posting.
The CMSIS-RTOS2 wrapper is a software layer that abstracts the underlying real-time operating system (RTOS) and provides a standardized API for accessing RTOS services. It enables developers to write portable code that can run on different RTOS kernels without modification, including FreeRTOS and ThreadX.
To switch from FreeRTOS to ThreadX using the CMSIS-RTOS2 wrapper, you would need to modify your existing project to use the CMSIS-RTOS2 API instead of the FreeRTOS API. This would involve replacing your calls to FreeRTOS functions with equivalent calls to the CMSIS-RTOS2 API.
The specific steps required to make this switch will depend on the details of your project, but in general, the process might look something like this:
Note that ThreadX and FreeRTOS have different APIs, so there may be some differences in how you use the RTOS services between the two kernels. However, by using the CMSIS-RTOS2 wrapper, you can minimize the amount of code that needs to be changed to switch between different RTOS kernels.
Thx
Ghofrane
2023-02-27 01:07 AM
Hello @MStew.1
First let me thank you for posting.
The CMSIS-RTOS2 wrapper is a software layer that abstracts the underlying real-time operating system (RTOS) and provides a standardized API for accessing RTOS services. It enables developers to write portable code that can run on different RTOS kernels without modification, including FreeRTOS and ThreadX.
To switch from FreeRTOS to ThreadX using the CMSIS-RTOS2 wrapper, you would need to modify your existing project to use the CMSIS-RTOS2 API instead of the FreeRTOS API. This would involve replacing your calls to FreeRTOS functions with equivalent calls to the CMSIS-RTOS2 API.
The specific steps required to make this switch will depend on the details of your project, but in general, the process might look something like this:
Note that ThreadX and FreeRTOS have different APIs, so there may be some differences in how you use the RTOS services between the two kernels. However, by using the CMSIS-RTOS2 wrapper, you can minimize the amount of code that needs to be changed to switch between different RTOS kernels.
Thx
Ghofrane
2023-09-25 01:31 AM
Hi,
In addition to CMSIS-RTOS wrapper, there is a FreeRTOS wrapper that can help you to switch from FreeRTOS to ThreadX:
source code:
Example:
wiki:
https://wiki.st.com/stm32mcu/wiki/Introduction_to_THREADX#FreeRTOS_API_Support
Regards