Does FreeRTOS works on Linux?
Hello, I am having an embedded linux system and wanted to use any RTOS on it. Can I use Free RTOS? My project has 2 tasks , one is producer and another is consumer working parallely. I have seen Free RTOS used in microcontrollers handling this , how can this be done in Linux(which such APIs if not Free RTOS). Regards, R
On Wed, May 5, 2021 at 8:07 PM Raul Piper <raulpblooper@gmail.com> wrote:
Hello,
Hi
I am having an embedded linux system and wanted to use any RTOS on it. Can I use Free RTOS? My project has 2 tasks , one is producer and another is consumer working parallely. I'm afraid I don't understand what you are requesting and I hope that someone else understand more clearly. But I'll still explain my understanding. You want to run a RTOS upon Linux OS, doesn't make it too much OSes? Then I have several questions: Do you really need a Real Time Operating System, can't you run your project in Linux userspace? Have you tried Linux RTOS extension (again I'm no expert and haven't tried them but you can look at Xenomai)? FreeRTOS is a standalone OS and depending on your system there may be an example running on your architecture in parallel of your embedded Linux. For example, on one of my project with have an ARM Cortex-A7 with a Linux running in Normal World and FreeRTOS running in Trusted world.
I have seen Free RTOS used in microcontrollers handling this , how can this be done in Linux(which such APIs if not Free RTOS).
HTH
Regards, R
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
On Thu, May 6, 2021 at 1:01 AM loïc tourlonias <loic.tourlonias@gmail.com> wrote:
On Wed, May 5, 2021 at 8:07 PM Raul Piper <raulpblooper@gmail.com> wrote:
Hello,
Hi
I am having an embedded linux system and wanted to use any RTOS on it. Can I use Free RTOS? My project has 2 tasks , one is producer and another is consumer working parallely. I'm afraid I don't understand what you are requesting and I hope that someone else understand more clearly. But I'll still explain my understanding. You want to run a RTOS upon Linux OS, doesn't make it too much OSes? Then I have several questions: Do you really need a Real Time Operating System, can't you run your project in Linux userspace?
I can do that but Linux is not an ROS afaik. Even though i dont have strict timing requirements , its like a sensor on i2c(producer) and then another consumer tasks which not only feeds on this data but also tell the i2c sensor by sending some commands to it.
Have you tried Linux RTOS extension (again I'm no expert and haven't tried them but you can look at Xenomai)? I will explore this.I was thinking if i can use Posix thread to have two tasks one reading sensors and another sending commands to it.But then again i am confused if using a posix thread full fills the requirement of RTOS. The reason I want to use RTOS is , I am porting a Microcontroller code using RTOS (free RTOS) to Linux and afaik FreeRTOS doesnt work on Linux. FreeRTOS is a standalone OS and depending on your system there may be an example running on your architecture in parallel of your embedded Linux. For example, on one of my project with have an ARM Cortex-A7 with Linux running in Normal World and FreeRTOS running in Trusted world. This is interesting , do you have something to share?
I have seen Free RTOS used in microcontrollers handling this , how can this be done in Linux(which such APIs if not Free RTOS).
HTH
Regards, R
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@kernelnewbies.org https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
if using a posix thread full fills the requirement of RTOS. The reason I want to use RTOS is , I am porting a Microcontroller code using RTOS (free RTOS) to Linux and afaik FreeRTOS doesnt work on Linux.
FreeRTOS is a standalone OS and depending on your system there may be an example running on your architecture in parallel of your embedded Linux. For example, on one of my project with have an ARM Cortex-A7 with Linux running in Normal World and FreeRTOS running in Trusted world. This is interesting , do you have something to share? Sorry, this is intellectual property from my company so I can't share source code but we have started from the FreeRTOS porting sample related to our architecture. We are working on a ARM Cortex-A7 which have an isolation between a normal world and a secure world. Linux is working on the normal world for the UI and FreeRTOS is running on the secure world. Communication between the two worlds is made by SMC.
Regards Loïc
On Sun, May 9, 2021 at 12:41 AM loïc tourlonias <loic.tourlonias@gmail.com> wrote:
if using a posix thread full fills the requirement of RTOS. The reason I want to use RTOS is , I am porting a Microcontroller code using RTOS (free RTOS) to Linux and afaik FreeRTOS doesnt work on Linux.
FreeRTOS is a standalone OS and depending on your system there may be an example running on your architecture in parallel of your embedded Linux. For example, on one of my project with have an ARM Cortex-A7 with Linux running in Normal World and FreeRTOS running in Trusted world. This is interesting , do you have something to share? Sorry, this is intellectual property from my company so I can't share source code but we have started from the FreeRTOS porting sample related to our architecture. We are working on a ARM Cortex-A7 which have an isolation between a normal world and a secure world. Linux is working on the normal world for the UI and FreeRTOS is running on the secure world. Communication between the two worlds is made by SMC.
Regards Loïc
You should look at Xenomai it uses the Adeos interrupt pipeline to pick off and handle certain interrupts and events in real-time, and pass the rest off to the linux kernel that does all setup and housekeeping they have API interfaces for VXworks, and other commercial RTOSs one of those APIs is probably your path of least portage.
On Sun, 09 May 2021 08:40:56 +0200, lo�c tourlonias said:
related to our architecture. We are working on a ARM Cortex-A7 which have an isolation between a normal world and a secure world. Linux is working on the normal world for the UI and FreeRTOS is running on the secure world.
Is there a easily comprehensible explanation of how that whole ARM normal/secure stuff is supposed to work?
On Tue, May 11, 2021 at 5:44 AM Valdis Klētnieks <valdis.kletnieks@vt.edu> wrote:
On Sun, 09 May 2021 08:40:56 +0200, loïc tourlonias said:
related to our architecture. We are working on a ARM Cortex-A7 which have an isolation between a normal world and a secure world. Linux is working on the normal world for the UI and FreeRTOS is running on the secure world.
Is there an easily comprehensible explanation of how that whole ARM normal/secure stuff is supposed to work?
I'll try to explain shortly. On ARM Cortex-A family, the core has two isolated worlds (normal/secure). The two worlds have their own context (register, stack ...) and the normal world have less privileges than the secure world. The core starts in the secure world and the secure software configures the context of the normal world before giving the execution to the normal world with a specific ARM instruction SMC 0. The communication between normal and secure worlds is done through SMC. When the normal world requires privileged access (secure clock configuration for example), it askes the secure world the access by calling a SMC instruction (with a specific ID), then a SMC exception is triggered in the secure context. The secure monitor catches this exception and handles it before returning to the normal world. I haven't found any block diagram or data flow to explain this. I've only found some useful links from ARM community: https://www.microcontrollertips.com/embedded-security-brief-arm-trustzone-ex... https://community.arm.com/developer/ip-products/processors/b/processors-ip-b... HTH
participants (4)
-
jim.cromie@gmail.com -
loïc tourlonias -
Raul Piper -
Valdis Klētnieks