comp.lang.ada
 help / color / mirror / Atom feed
From: Adam Jensen <hanzer@riseup.net>
Subject: Re: How to configure GNAT GPL on x86-64 Linux for ARM ELF development
Date: Thu, 24 May 2018 07:35:46 -0000 (UTC)
Date: 2018-05-24T07:35:46+00:00	[thread overview]
Message-ID: <pe5q0h$617$1@dont-email.me> (raw)
In-Reply-To: ly7enuhk14.fsf@pushface.org

On Wed, 23 May 2018 09:07:51 +0100, Simon Wright wrote:

> Adam Jensen <hanzer@riseup.net> writes:
> 
>> $ arm-eabi-gcc -c -mcpu=cortex-m4 -mthumb program.adb fatal error,
>> run-time library not installed correctly cannot locate file system.ads
>> compilation abandoned
> 
>> Any advice on how to proceed would be very much appreciated!
> 
> I think that the reason why the tutorial works and your attempt doesn't
> is that the tutorial was developed on a Raspberry Pi, which is already
> an ARM-based machine, so the native compiler actually has a runtime
> (i.e. system.ads etc etc) visible to it.
> 
> Yours doesn't, and gcc-for-ada must see an RTS.
> 
> I managed to get a compilation using this over-the-top incantation:
> 
>    $ gprbuild -c -u -f program.adb --target=arm-eabi --RTS=zfp-stm32f4
> 

Many thanks, this works! I do not yet know why it works - what it is 
doing - but the hint is a valuable. It occurred to me that I should be 
looking for Adacore documentation. I have yet to find a "getting started" 
tutorial for embedded development aimed at scientists, engineers and 
other technically mature people (ideally, such a tutorial would be 
comprehensive, to the point, and regularly tested), but I did find:

GPRbuild and GPR Companion Tools User’s Guide
<https://docs.adacore.com/gprbuild-docs/html/gprbuild_ug.html>

and

GNAT User’s Guide Supplement for Cross Platforms
<http://docs.adacore.com/live/wave/gnat_ugx/html/gnat_ugx/gnat_ugx.html>

By mining these two documents it might be possible to extract a basic 
explanation for these very first steps of the embedded development 
process.

It is curious that the Ada technology's utilization of the system 
engineering approach has not [yet] been extended into the pedagogical 
component. After all, software development is a very human-centric 
process.

But I digress. Thanks again for the guidance! After extracting the basics 
of project management from the core documentation, I hope to find a build 
process that enables the use of a Ravenscar profile. And after that I 
hope to configure the development environment to include Spark process 
components in the real-time embedded system. Does this seem reasonable? 
 

> but a simpler (more memorable!) procedure might be to construct your
> own:
> 
> 1. Create directories adainclude/, adalib/
> 
> 2. Copy $prefix/arm-eabi/lib/gnat/zfp-stm32f4/gnat/system.ads to your
>    adainclude/ ($prefix is the root of your compiler installation, I
>    think ~/.local/gnat-arm)
> 
> The zfp- (zero footprint) runtime is the closest to what you need, and
> the fact that the -stm32f4 part isn't quite right shouldn't matter; I
> suspect that system.ads is the same for all the zfp runtimes.
> 
> Now,
> 
>    $ arm-eabi-gcc --RTS=. -c program.adb

  reply	other threads:[~2018-05-24  7:35 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-23  6:37 How to configure GNAT GPL on x86-64 Linux for ARM ELF development Adam Jensen
2018-05-23  8:07 ` Simon Wright
2018-05-24  7:35   ` Adam Jensen [this message]
2018-05-24 12:12     ` Brian Drummond
2018-05-25  4:45       ` Adam Jensen
2018-05-25 10:50         ` Brian Drummond
2018-05-26  5:06           ` Adam Jensen
2018-05-26 23:58             ` Brian Drummond
2018-05-27  8:26               ` Jacob Sparre Andersen
2018-05-30 19:52             ` JLotty
2018-05-30 21:58               ` Simon Wright
2018-06-03 23:21                 ` JLotty
2018-06-04  7:11                   ` Simon Wright
2018-05-25  3:29   ` Adam Jensen
2018-05-25  7:55     ` Simon Wright
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox