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.224.73 with SMTP id ra9mr2471794pac.9.1433924694581; Wed, 10 Jun 2015 01:24:54 -0700 (PDT) X-Received: by 10.140.33.202 with SMTP id j68mr20358qgj.41.1433924694316; Wed, 10 Jun 2015 01:24:54 -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!peer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!h15no900981igd.0!news-out.google.com!4ni337qgh.1!nntp.google.com!z60no317276qgd.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 10 Jun 2015 01:24:54 -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: <55b493ea-4491-42e6-a6b5-ad4871f86617@googlegroups.com> Subject: Re: STM32F4 GNAT Run Time System - roadmap From: jan.de.kruyf@gmail.com Injection-Date: Wed, 10 Jun 2015 08:24:54 +0000 Content-Type: text/plain; charset=ISO-8859-1 X-Received-Bytes: 7639 X-Received-Body-CRC: 2482708498 Xref: news.eternal-september.org comp.lang.ada:26247 Date: 2015-06-10T01:24:54-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 And here is a b-demo.adb for use with a standard library -------------------- 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); E04 : Short_Integer; pragma Import (Ada, E04, "last_chance_handler_E"); E06 : Short_Integer; pragma Import (Ada, E06, "linux_kernel_E"); E20 : Short_Integer; pragma Import (Ada, E20, "niniel_E"); E27 : Short_Integer; pragma Import (Ada, E27, "niniel__ioctl_E"); E31 : Short_Integer; pragma Import (Ada, E31, "secondary_stack_E"); Local_Priority_Specific_Dispatching : constant String := ""; Local_Interrupt_States : constant String := ""; Is_Elaborated : Boolean := False; type No_Param_Proc is access procedure; procedure adainit is Main_Priority : Integer; pragma Import (C, Main_Priority, "__gl_main_priority"); Time_Slice_Value : Integer; pragma Import (C, Time_Slice_Value, "__gl_time_slice_val"); WC_Encoding : Character; pragma Import (C, WC_Encoding, "__gl_wc_encoding"); Locking_Policy : Character; pragma Import (C, Locking_Policy, "__gl_locking_policy"); Queuing_Policy : Character; pragma Import (C, Queuing_Policy, "__gl_queuing_policy"); Task_Dispatching_Policy : Character; pragma Import (C, Task_Dispatching_Policy, "__gl_task_dispatching_policy"); Priority_Specific_Dispatching : System.Address; pragma Import (C, Priority_Specific_Dispatching, "__gl_priority_specific_dispatching"); Num_Specific_Dispatching : Integer; pragma Import (C, Num_Specific_Dispatching, "__gl_num_specific_dispatching"); Main_CPU : Integer; pragma Import (C, Main_CPU, "__gl_main_cpu"); Interrupt_States : System.Address; pragma Import (C, Interrupt_States, "__gl_interrupt_states"); Num_Interrupt_States : Integer; pragma Import (C, Num_Interrupt_States, "__gl_num_interrupt_states"); Unreserve_All_Interrupts : Integer; pragma Import (C, Unreserve_All_Interrupts, "__gl_unreserve_all_interrupts"); Exception_Tracebacks : Integer; pragma Import (C, Exception_Tracebacks, "__gl_exception_tracebacks"); Detect_Blocking : Integer; pragma Import (C, Detect_Blocking, "__gl_detect_blocking"); Default_Stack_Size : Integer; pragma Import (C, Default_Stack_Size, "__gl_default_stack_size"); Leap_Seconds_Support : Integer; pragma Import (C, Leap_Seconds_Support, "__gl_leap_seconds_support"); procedure Install_Handler; pragma Import (C, Install_Handler, "__gnat_install_handler"); Handler_Installed : Integer; pragma Import (C, Handler_Installed, "__gnat_handler_installed"); Finalize_Library_Objects : No_Param_Proc; pragma Import (C, Finalize_Library_Objects, "__gnat_finalize_library_objects"); begin if Is_Elaborated then return; end if; Is_Elaborated := True; Main_Priority := -1; Time_Slice_Value := -1; WC_Encoding := 'b'; Locking_Policy := ' '; Queuing_Policy := ' '; Task_Dispatching_Policy := ' '; Priority_Specific_Dispatching := Local_Priority_Specific_Dispatching'Address; Num_Specific_Dispatching := 0; Main_CPU := -1; Interrupt_States := Local_Interrupt_States'Address; Num_Interrupt_States := 0; Unreserve_All_Interrupts := 0; Exception_Tracebacks := 1; Detect_Blocking := 0; Default_Stack_Size := -1; Leap_Seconds_Support := 0; if Handler_Installed = 0 then Install_Handler; end if; E06 := E06 + 1; E04 := E04 + 1; if E20 = 0 then Niniel'Elab_Body; end if; E20 := E20 + 1; if E27 = 0 then Niniel.Ioctl'Elab_Body; end if; E27 := E27 + 1; E31 := E31 + 1; end adainit; end ada_main; ------------------------------------- now al of a sudden there is a mass of symbols imported from somewhere. I am sure some diligent use of grep and/or nm will find them back in some library. These files are generated by binding with gnat (gcc 4.7.4) by the way, on a 64 bit linux system. j.