From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: ANN: Cortex GNAT RTS 2018-07-15 Date: Fri, 27 Jul 2018 21:20:20 +0100 Organization: A noiseless patient Spider Message-ID: References: <87in5gf9nt.fsf@nightsong.com> <87wothrqrs.fsf@nightsong.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: reader02.eternal-september.org; posting-host="03d70a6cc5267c3c00a0ba934e1fa44a"; logging-data="10691"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/FhGjLMziSyBoae4aJXbDvSYr7ysGxc9s=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.3 (darwin) Cancel-Lock: sha1:YMcNEqXjREIIVfStjze3Zw4VIEA= sha1:eX9E/B6jfgfcRygSBbEz4UvoHyY= Xref: reader02.eternal-september.org comp.lang.ada:53985 Date: 2018-07-27T21:20:20+01:00 List-Id: Paul Rubin writes: > Simon Wright writes: >> freertos... > > I took a look at the freertos source code: the common kernel is 3 > files total around 10 KLOC of C, though a lot of it is conditionally > compiled based on feature flags. It's about what you'd expect in an > RTOS, i.e. very low level, lots of pointer banging, critical > sections, etc. > > I wonder whether it's feasible to write something like that in Ada, with > just a few calls to intrinsics for stuff like interrupts. Any thoughts? > It seems like a shame to have that much C code at the bottom of an Ada > application. FreeRTOS has the advantage of existing, with many targets, with the possibility of support, with options such as file systems & networking, and being libre. At the time I started with Cortex GNAT RTS, aside from it being an interesting project, there was quite a lot of chat about the fact that GNAT GPL (now CE) was pure GPL. I was also familiar with GNAT's VxWorks(5.3) target, also running over an RTOS, so running over an RTOS was quite natural. I agree that a considerable chunk of FreeRTOS could probably be replaced by straightforward Ada code, but that'd be someone else's project! The RTOS part of AdaCore's embedded Ravenscar RTOSs (s-bb*.ad?) is about 5500 lines (1250 semicolons) of Ada.