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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.66.190.104 with SMTP id gp8mr2285931pac.15.1433924389027; Wed, 10 Jun 2015 01:19:49 -0700 (PDT) X-Received: by 10.140.98.138 with SMTP id o10mr21192qge.33.1433924388770; Wed, 10 Jun 2015 01:19:48 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!news.glorb.com!h15no1498567igd.0!news-out.google.com!4ni337qgh.1!nntp.google.com!z60no316776qgd.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 10 Jun 2015 01:19:48 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=105.210.1.171; posting-account=orbgeAkAAADzWCTlruxuX_Ts4lIq8C5J NNTP-Posting-Host: 105.210.1.171 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <38bb49a4-9b49-4dbc-859b-1501722951f4@googlegroups.com> Subject: Re: STM32F4 GNAT Run Time System - roadmap From: jan.de.kruyf@gmail.com Injection-Date: Wed, 10 Jun 2015 08:19:48 +0000 Content-Type: text/plain; charset=ISO-8859-1 Xref: news.eternal-september.org comp.lang.ada:26246 Date: 2015-06-10T01:19:48-07:00 List-Id: On Tuesday, June 9, 2015 at 2:02:25 PM UTC+2, Simon Wright wrote: > Looking for some input on priorities for work. > > * Standard library packages. > * Other MCUs. > * Finalization. > * ? > > Standard library packages > ------------------------- > > An obvious omission is the rest of the Ada.Containers.Bounded* packages: > Doubly_Linked_Lists > Ordered_Maps > Hashed_Sets > Ordered_Sets > Multiway_Trees > Synchronized_Queues > Priority_Queues > > Any other nice-to-haves? (I haven't looked at Annex G, might be > problematic!) > > Other MCUs > ---------- > > STM have just released a significant number of affordable Nucleo > development kits. The NUCLEO-F091RC has 48 MHz Cortex-M0 core, 256-KB > Flash, 32-KB SRAM, which would just-about take my current testbed > program; for the princely sum of UKP7.94 + p&p, 88 in stock in UK for > next day delivery from Farnell[0]. > > The problem with this is that different MCUs require different compiler > options, and building GCC for ARM with multilibs is only supported in > the ARM fork at [1]; so far there are only GCC 4.9-based releases. GCC > 4.9 is a perfectly competent compiler, of course. > > Finalization > ------------ > > It would be very nice to be able to use the generalized container > iterators of Ada 2012 (generalized array iterators are already OK). > > They require finalization: I've implemented finalization and generalized > iteration over Bounded_Vectors in the 'finalization' branch at [2]. > > Unfortunately, adding finalization to a restricted runtime triggers bugs > in GCC. > > I've raised two GCC PRs; "gnatbind generates invalid code when > finalization is enabled in restricted runtime"[3], and "Front-end error > if exception propagation disabled"[4]. > > ===================================================================== > [0] http://uk.farnell.com/stm32-mcu-nucleo-board-flexible-prototyping > [1] https://launchpad.net/gcc-arm-embedded > [2] > https://sourceforge.net/p/stm32f4-gnat-rts/code/ci/finalization/tree/ > [3] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66205 > [4] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66242 Good Morning Simon, Here is a b-xxx.adb with 'Suppress_Standard_Library_On' ----------------------- pragma Ada_95; pragma Source_File_Name (ada_main, Spec_File_Name => "b~demo.ads"); pragma Source_File_Name (ada_main, Body_File_Name => "b~demo.adb"); package body ada_main is pragma Warnings (Off); E03 : Short_Integer; pragma Import (Ada, E03, "last_chance_handler_E"); E05 : Short_Integer; pragma Import (Ada, E05, "linux_kernel_E"); E19 : Short_Integer; pragma Import (Ada, E19, "niniel_E"); E26 : Short_Integer; pragma Import (Ada, E26, "niniel__ioctl_E"); E30 : Short_Integer; pragma Import (Ada, E30, "secondary_stack_E"); procedure adainit is begin null; E05 := E05 + 1; E03 := E03 + 1; if E19 = 0 then Niniel'Elab_Body; end if; E19 := E19 + 1; if E26 = 0 then Niniel.Ioctl'Elab_Body; end if; E26 := E26 + 1; E30 := E30 + 1; end adainit; end ada_main; ------------------------------------- All the quoted strings are my own stuff. Since I cannot use any standard library in kernel programming. j.