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: Adam Jensen Newsgroups: comp.lang.ada Subject: Re: How to configure GNAT GPL on x86-64 Linux for ARM ELF development Date: Fri, 25 May 2018 04:45:16 -0000 (UTC) Organization: A noiseless patient Spider Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Fri, 25 May 2018 04:45:16 -0000 (UTC) Injection-Info: h2725194.stratoserver.net; posting-host="ae072277fe39e8be4e367dedd6651a12"; logging-data="30167"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+boPGrs387nfceW81fZKQ5" User-Agent: Pan/0.144 (Time is the enemy; 28ab3ba git.gnome.org/pan2) Cancel-Lock: sha1:dFq8uXxfMWzZjvjyOAiK7N54J40= Xref: reader02.eternal-september.org comp.lang.ada:52664 Date: 2018-05-25T04:45:16+00:00 List-Id: On Thu, 24 May 2018 12:12:26 +0000, Brian Drummond wrote: > The error you saw "Cannot find system.ads" and Simon's answer arise > because, targeting small embedded CPUs, you are looking below the full > Ada environment (supplied by the runtime system (RTS) on the host > machine, to targets which may require unique runtimes supplying the > facilities you need and nothing more (thanks to potential space > limitations). > > As such I would suggest a ZFP RTS as a good short-term study,for several > reasons: > > it can be a pretty small codebase, but revealing in terms of how things > are done and how to adapt them. > > there are a plethora of targets out there, un- or semi-supported by Ada, > from the AVR and MSP430 to ARM cores from ST, NXP, TI and others. > Starting with the STM4 as you are is good, but you may want to port to > other platforms for cost, power, security or other reasons ... the TI > Hercules which runs dual ARM cores in lockstep for safety, has obvious > attractions as an Ada target, for example. > > Nice price too ... https://store.ti.com/LAUNCHXL-TMS57004.aspx > Adacore's Gnat GPL seems to include a full Ravenscar RTS for Xilinx's zynq7000 ARM/FPGA SoC: One of those development kits might be my next target platform, but successfully configuring tools from two different vendors for hardware/ software co-design - simulation, emulation, and cross-compilation - on a third-party OS (Ubuntu or RHEL) seems like a long way off. Right now, configuring a Ravenscar/Spark development environment that can produce a binary for the Nucleo-144 board that will flash an LED is the [surprisingly challenging] goal :) > And porting to these builds on understanding the RTS, starting with the > simplest - ZFP - as in Simon's suggestion - or AVR-Ada or my MSP430-Ada > adaptation. I finally got round to machining the case and bezel, so I am > wearing a wristwatch running Ada, telling the time 1970's style, in > under 1 kilobyte including RTS. > > (the current version still has 200 bytes of C startup code which the > linker insists on inserting by default; one TODO is to persuade the > linker to let me replace that with pure Ada and strip out the > unnecessary stuff) > That seems [to me] like a curiously superfluous application of the technology but rock on, dude. > > You suggest going in 2 more interesting directions: > > building up to a Ravenscar profile : I believe Simon's work so far > builds on FreeRTOS, but a "native" Ravenscar RTOS would be nice too... > > SPARK qualification would be excellent ... again, especially for the > Hercules. And again, a SPARK proven ZFP RTS would be a good base to > build on, and a relatively simple place to start. Is it common for developers to create their own run-time system for embedded platforms? My inclination would be to look for hardware based on 1) RTS availability/quality and 2) toolkit complexity/completeness (completeness implies useful documentation). Given that, which seems like an obvious thing to do, I am surprised that Adacore does not have more apparent associations with hardware vendors where dev-kits and SBC products are promoted. I bought the Nucleo-144 board because I thought there was a BSP, RTS, and a tool-chain configuration tutorial. That turned out to be a bit of a mistake and generally a poor choice. If Adacore, or some other enterprising entrepreneur, offered well-developed BSP, RTS, tool-chain configuration and programming tutorials for several MCU dev-kits and SBC (single board computer) products, that would make the choice easy and actually enable people to get started with the technology in a reasonable way. It seems so bizarre to me that this isn't a front-page item for Adacore. I guess there are hidden obstacles in their business model and the way the incentives are arranged in their social organization. I suppose it could have something to do with European culture. In France, does pedagogy have the demeanor of a wood- chipper (e.g., is it based in punishment, toil, and obscurity)?