Any way to migrate old ADA RT programs under x86 to FreeRTOS?


I have a several old industrial machines under x86 hardware platforms and MaRTE RTOS that I would like to update. The machines control software is coded in ADA.

My plan is to keep the same hardware platform (x86 or x64) but update the RTOS. The point is that I would like to move to FreeRTOS but using the same ADA code we already have in order to recode all in other language.

I have been for a while searching the web and I couldn’t find any compiler which supports the combination ADA-FreeRTOS. I’m not sure if I definitely explore all the options so if you have any suggestion/confirmation I would appreciate.

Thanks a lot.


I’m afraid I really don’t know the answer, but suggest first looking to see if FreeRTOS provides the functionality required by your application. For example, FreeRTOS only supports a flat memory model on the x86 architecture (no MMU support).

It looks like an interesting project though - Googling interfacing ADA to C brings up lots of results (none of which I have read yet!).

Hi Fernando,

It would be possible to do.
First check what functionality MaRTE provides for your application and how that functionality maps against FreeRTOS. Then, if suitable, you will need to create the ADA interfaces for FreeRTOS (see a generic example of how to do that). This isn’t a complex task, just a tedious one.
Finally you’d have to do a lot of testing.

Hope this helps.

Hi Fernando,

You could look at my Cortex GNAT RTS, which is based on FreeRTOS - I know it says Cortex, but really only the startup code is processor-specific, the rest is FreeRTOS.

The tasking profile is (nearly!) Ravenscar, I don’t know how that compares to MaRTE. A big issue might be that it doesn’t support exception propagation, which is a real PITA to implement in Ada of any flavour. I’ve done some work on finalization, not up-to-date.

As an alternative, AdaCore’s compiler (GNAT) will, I believe, allow you to use the full compiler with pragma Profile (Ravenscar); (or GNAT_Extended_Ravenscar, which relaxes some of the more stringent restrictions).

1 Like

Hi guys,

Thank you very much for your replies.
I will look over it.