From: Simon Wright <simon@pushface.org>
Subject: Re: GNAT ARM on Mac OS X?
Date: Sat, 08 Nov 2014 14:49:49 +0000
Date: 2014-11-08T14:49:49+00:00 [thread overview]
Message-ID: <ly8ujliw6q.fsf@pushface.org> (raw)
In-Reply-To: 545a71ed$0$56557$c3e8da3$38634283@news.astraweb.com
Jerry Petrey <gpetrey@earthlink.net> writes:
> On 11/5/2014 6:57 AM, Simon Wright wrote:
>> Maciej Sobczak <see.my.homepage@gmail.com> writes:
>>
>>> I have just checked the libre.adacore.com site and noticed that
>>> there is no GNAT package for the ARM targets, hosted on Mac OS
>>> X. Only Windows and Linux hosts are supported.
>>>
>>> Do you have any information on the possible plans for such a
>>> package?
>>
>> It looks as though it might be an interesting project.
>>
>> The GNAT GPL 2014 package (I looked at the Linux version) is
>> configured for arm-eabi and has zfp (zero footprint) and Ravenscar
>> RTS's.
>>
>> I see that Farnell have the STM32F4DISCOVERY for £11.71 + p&p, looks
>> like an inexpensive way to start.
>>
>
> It is a very interesting project. I have Ada running on about a dozen
> different ARM M4/M3 boards now and it is very nice. You can see my
> article in Electronic Design magazine
> (http://electronicdesign.com/dev-tools/armed-and-ready) for some help
> in getting things set up. Unfortunately it is only available for
> Windows and Linux - I have only used the Windows version. The
> STMF429DISCOVERY board is an exceptional deal and has a graphics
> LCD. I recently completed a basic driver in Ada for the LCD display
> which makes this a very useful platform for development as I can catch
> and display exceptions on the display.
OK, getting there! I now have an STM32F429I Discovery board, and am
getting to grips with it.
I have an arm-eabi GNAT GPL 2014 toolchain running on Mac OS X
Mavericks, produced by cobbling together AdaCore's linux-elf distro and
various build tips from around the web (the best was [1]).
There are various oddities:
(1) during the second build, you have to configure with --disable-libada
(because you don't want the full RTS), which makes you run
make # build the base compiler, gnatmake, gnatbind
make cross-gnattools # build the other gnat* tools
make # rename the gnat* tools to gnat*-cross (!!!)
make install # renames gnat*-cross to arm-eabi-gnat*
This may change in newer base GCCs (GNAT GPL 2014 is based on 4.7.4).
(2) There has to be an RTS or gprbuild won't see the compiler. I don't
know how this is determined.
I started out copying the Linux distro's rts-zfp RTS to
lib/gcc/arm-eabi/4.7.4/, but that didn't work, so I made symlinks from
lib/gcc/arm-eabi/4.7.4/rts-zfp/adalib,adainclude to the level above. OK!
I see that the Linux distro has the Ravenscar RTS in
lib/gnat/arm-eabi/ravenscar-sfp-stm32f4, perhaps that's the clue.
(3) The stlink utilities work just fine, I had a problem misreading the
flash load address as 0x80000000 rather than 0x8000000 and would have
expected some error message instead of an immediate failure!
st-flash requires a bin format rather than hex or elf, so I used
hex2bin[2] for the former (good for getting the demo back on the card!)
and
arm-eabi-objcopy -O binary demo demo.bin
for the latter.
(4) Thanks for your pointer to [3] for the updated Ravenscar BSP for
the STM32F429I Discovery!
I now have the LEDs demo twinkling away beside me. This lot needs a
writeup ..
[1]
http://istarc.wordpress.com/2014/07/21/stm32f4-build-your-toolchain-from-scratch/
[2] https://sourceforge.net/projects/hex2bin/
[3] https://github.com/gnlnops/gnat-stm32f429i-disco
next prev parent reply other threads:[~2014-11-08 14:49 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-05 7:53 GNAT ARM on Mac OS X? Maciej Sobczak
2014-11-05 13:57 ` Simon Wright
2014-11-05 15:41 ` Luke A. Guest
2014-11-05 18:52 ` Jerry Petrey
2014-11-05 19:30 ` Simon Wright
2014-11-08 14:49 ` Simon Wright [this message]
2014-11-08 16:12 ` Simon Wright
2014-11-08 17:52 ` Simon Wright
2014-11-08 19:51 ` Jerry Petrey
2014-11-08 20:17 ` Jeffrey Carter
2014-11-09 1:57 ` Jerry Petrey
2014-11-09 13:05 ` Stephen Leake
2014-11-09 18:15 ` Simon Wright
2014-11-19 9:58 ` 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