Creation of a GNAT Ada Runtime for Zephyr RTOS

Creation of a GNAT Ada Runtime for Zephyr RTOS

The Ada Awards Committee has nominated for an award the development of an Ada/GNAT RTS for the Real-Time Zephyr Operating System.

Previous work

Motivation

The Zephyr RTOS has seen a lot of growth in the past few years and has received substantial support from major software and hardware vendors. In recent years it has also placed substantial efforts into stability with LTS (Long Term Support) releases, higher software quality and is now aiming to receive major certifications for its use in Ada-relevant fields (safety critical systems). The majority of hobby and industrial hardware is nowadays supported by Zephyr. But Zephyr is not just a bare-bones OS, it also bring a lot of optional useful extras such as a full communication stack (Bluetooth, USB…), update system, peripherals, etc.

Bringing Ada support to this platform would unlock a growing, strong and versatile RTOS environment that can benefit both hobbyists as well as large industrial users. In the future, additional bindings for Zephyr libraries could be developed, expanding the reach of Ada into embedded systems.

Goals

The final deliverable is a Ravenscar/Jorvik capable tasking profile. A full RTS is desirable, but won’t be required. Ideally, in the future, bindings to some of the extra Zephyr modules would be desired too. The RTS should be available in an easily installable way such as an Alire crate, or better, included within the Zephyr build system. After all, the less friction and more integration that the RTS has with Zephyr, the better user experience will be.

Non-exhaustive list of resources

Milestones

Part 1, work and approach review, initial implementation (Award: 200 EUR)

  • Do a full review and assessment on the work already carried out by @jgrivera67, see resources above.
    • The goal is to assess any missing parts, blockers or issues that may require work in order to reuse his work on this task. Watching the AEiC 2025 presentation is highly recommended.
  • Assess the feasibility of integrating the GNAT RTS into the Zephyr build system and its ecosystem.
  • Implement an RTS for non-tasking operations. The RTS shall leverage Zephyr’s internals as much as possible.
  • Create a guide or a blog post in Ada-Lang that documents how to get the setup ready with some simple examples.
  • Cooperate with the other proposal to create documentation about the Ada/GNAT RTS and add any relevant points to it about the work carried out.

Part 2 (Award: 100 EUR)

  • Further extend the runtime to allow for the majority of the non-tasking Ada standard library to run on Zephyr (Vectors, Maps, Hash, Time, etc;).
  • Implement the Jorvik tasking profile.
    • If there are multiple possibilites to implement the profile (threads, scheduling, etc), implement it at least as threads and as cooperative scheduling.
  • Extend the guide or blog post in Ada-Lang on how to use the more advance features.

Guidelines and further indications

The general Ada Awards Guidelines apply to this proposal for those who want to participate. For open, technical discussions on this topic or project, feel free to open topics under the Active Projects forum category.

Best regards,
The Ada Awards Committee.