* GNAT ARM on Mac OS X? @ 2014-11-05 7:53 Maciej Sobczak 2014-11-05 13:57 ` Simon Wright 0 siblings, 1 reply; 14+ messages in thread From: Maciej Sobczak @ 2014-11-05 7:53 UTC (permalink / raw) Hi, 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? -- Maciej Sobczak * http://www.inspirel.com ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: GNAT ARM on Mac OS X? 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 0 siblings, 2 replies; 14+ messages in thread From: Simon Wright @ 2014-11-05 13:57 UTC (permalink / raw) 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. ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: GNAT ARM on Mac OS X? 2014-11-05 13:57 ` Simon Wright @ 2014-11-05 15:41 ` Luke A. Guest 2014-11-05 18:52 ` Jerry Petrey 1 sibling, 0 replies; 14+ messages in thread From: Luke A. Guest @ 2014-11-05 15:41 UTC (permalink / raw) Simon Wright <simon@pushface.org> 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. If you want arm-elf then you should be able to use the older tamp scripts to a point, I've not tried it yet but there will require some changes and this I in my todo list. As is ios. ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: GNAT ARM on Mac OS X? 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 ` (2 more replies) 1 sibling, 3 replies; 14+ messages in thread From: Jerry Petrey @ 2014-11-05 18:52 UTC (permalink / raw) 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. Jerry ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: GNAT ARM on Mac OS X? 2014-11-05 18:52 ` Jerry Petrey @ 2014-11-05 19:30 ` Simon Wright 2014-11-08 14:49 ` Simon Wright 2014-11-19 9:58 ` Simon Wright 2 siblings, 0 replies; 14+ messages in thread From: Simon Wright @ 2014-11-05 19:30 UTC (permalink / raw) Jerry Petrey <gpetrey@earthlink.net> writes: > The STMF429DISCOVERY board is an exceptional deal and has a graphics > LCD. That's somewhat more expensive - £17.23 + p&p for a STM32F429I-DISCO. Looks interesting, and thanks for the pointer. ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: GNAT ARM on Mac OS X? 2014-11-05 18:52 ` Jerry Petrey 2014-11-05 19:30 ` Simon Wright @ 2014-11-08 14:49 ` Simon Wright 2014-11-08 16:12 ` Simon Wright ` (3 more replies) 2014-11-19 9:58 ` Simon Wright 2 siblings, 4 replies; 14+ messages in thread From: Simon Wright @ 2014-11-08 14:49 UTC (permalink / raw) 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 ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: GNAT ARM on Mac OS X? 2014-11-08 14:49 ` Simon Wright @ 2014-11-08 16:12 ` Simon Wright 2014-11-08 17:52 ` Simon Wright ` (2 subsequent siblings) 3 siblings, 0 replies; 14+ messages in thread From: Simon Wright @ 2014-11-08 16:12 UTC (permalink / raw) Simon Wright <simon@pushface.org> writes: > (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. There has to be some sort of RTS installed that gnatls can recognise. I removed the symlinks, then the output of gprconfig -v -v --target-arm-eabi includes GNAT is candidate: filename=arm-eabi-gnatmake target: executing "arm-eabi-gcc -dumpmachine" output="arm-eabi" target: grep matched="arm-eabi" version: executing "arm-eabi-gnatls -v" output="fatal error, run-time library not installed correctly cannot locate file system.ads raised TYPES.UNRECOVERABLE_ERROR : targparm.adb:184" version: grep no match Ignore compiler, since couldn't guess its version Hmm. I can't work out what paths gnatls uses when looking for system.ads (deep in the depths of namet.adb???), but $ arm-eabi-gnatls -v --RTS=zfp GNATLS GPL 2014 (20140331) Copyright (C) 1997-2014, Free Software Foundation, Inc. Source Search Path: <Current_Directory> /Users/simon/local-arm/lib/gcc/arm-eabi/4.7.4/rts-zfp/adainclude shows part of the setup. I'm going to revert to the symlinks. ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: GNAT ARM on Mac OS X? 2014-11-08 14:49 ` Simon Wright 2014-11-08 16:12 ` Simon Wright @ 2014-11-08 17:52 ` Simon Wright 2014-11-08 19:51 ` Jerry Petrey 2014-11-09 13:05 ` Stephen Leake 3 siblings, 0 replies; 14+ messages in thread From: Simon Wright @ 2014-11-08 17:52 UTC (permalink / raw) Simon Wright <simon@pushface.org> writes: > (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. More on this: if you put the RTS in lib/gcc/arm-eabi/4.7.4/ravenscar-sfp-stm32f4 then gnatls can see it (arm-eabi-gnatls --RTS=ravenscar-sfp-stm32f4) but gprbuild --target=arm-eabi can't. Instead, you have to put the RTS in lib/gcc/arm-eabi/4.7.4/rts-ravenscar-sfp-stm32f4 when both are happy. ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: GNAT ARM on Mac OS X? 2014-11-08 14:49 ` Simon Wright 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 13:05 ` Stephen Leake 3 siblings, 1 reply; 14+ messages in thread From: Jerry Petrey @ 2014-11-08 19:51 UTC (permalink / raw) On 11/8/2014 7:49 AM, Simon Wright wrote: > 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 > Great work Simon! It takes a while to get everything correct for a different board but it is a lot of fun and you learn a few things in the process. Ada and the ARM Cortex makes a powerful combination. Jerry ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: GNAT ARM on Mac OS X? 2014-11-08 19:51 ` Jerry Petrey @ 2014-11-08 20:17 ` Jeffrey Carter 2014-11-09 1:57 ` Jerry Petrey 0 siblings, 1 reply; 14+ messages in thread From: Jeffrey Carter @ 2014-11-08 20:17 UTC (permalink / raw) On 11/08/2014 12:51 PM, Jerry Petrey wrote: > > Great work Simon! It takes a while to get everything correct for a different > board but it is a lot of fun and you learn a few things in the process. Ada and > the ARM Cortex makes a powerful combination. Just out of curiosity, what do you people use these ARM boards for? -- Jeff Carter "Well, a gala day is enough for me. I don't think I can handle any more." Duck Soup 93 ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: GNAT ARM on Mac OS X? 2014-11-08 20:17 ` Jeffrey Carter @ 2014-11-09 1:57 ` Jerry Petrey 0 siblings, 0 replies; 14+ messages in thread From: Jerry Petrey @ 2014-11-09 1:57 UTC (permalink / raw) On 11/8/2014 1:17 PM, Jeffrey Carter wrote: > On 11/08/2014 12:51 PM, Jerry Petrey wrote: >> >> Great work Simon! It takes a while to get everything correct for a different >> board but it is a lot of fun and you learn a few things in the process. Ada and >> the ARM Cortex makes a powerful combination. > > Just out of curiosity, what do you people use these ARM boards for? > Hi Jeff, I am mostly interested in using the ARM boards for robotics projects but they are well suited for any type of control applications. They have a lot of processing power and lots of on-chip peripherals and teamed up with a powerful language like Ada they offer a ton of potential. Right now I am just having fun getting Ada running on many different M3/M4 processor boards and learning more about the ARM architecture in the process. There is a lot of support for the peripherals in C but not in Ada so I am implementing what I need in Ada. It is a great way to really understand the details rather than just use some existing library. There are billions of these processors in use already and ARM predicts there will be 50 billion by 2020. I think Ada needs to be on that bandwagon! Jerry ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: GNAT ARM on Mac OS X? 2014-11-08 14:49 ` Simon Wright ` (2 preceding siblings ...) 2014-11-08 19:51 ` Jerry Petrey @ 2014-11-09 13:05 ` Stephen Leake 2014-11-09 18:15 ` Simon Wright 3 siblings, 1 reply; 14+ messages in thread From: Stephen Leake @ 2014-11-09 13:05 UTC (permalink / raw) Simon Wright <simon@pushface.org> writes: > (2) There has to be an RTS or gprbuild won't see the compiler. I don't > know how this is determined. This should be configurable in the gprbuild meta-config file gnat-gpl-2014/share/gprconfig/gnat.xml However, the syntax for that file is undocumented, and changes from version to version, so it may be better to stick with your work-around. Hmm. I see a Runtime_Library_Dir there, but I was hoping there would be a way to simply delete the check for the runtime. -- -- Stephe ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: GNAT ARM on Mac OS X? 2014-11-09 13:05 ` Stephen Leake @ 2014-11-09 18:15 ` Simon Wright 0 siblings, 0 replies; 14+ messages in thread From: Simon Wright @ 2014-11-09 18:15 UTC (permalink / raw) Stephen Leake <stephen_leake@stephe-leake.org> writes: > This should be configurable in the gprbuild meta-config file > gnat-gpl-2014/share/gprconfig/gnat.xml I think it's compilers.xml. In the version supplied with GPRBUILD GPL 2014, at line 663 there's a section <runtimes/> which, AFAICT, looks in $prefix/lib/gcc/$target/$version/for: (a) a directory adalib/; or (b) a file ada_object_path containing a line beginning rts-; or (c) a directory rts-*/adalib. Unfortunately, a few lines above there's a section <version/> which runs gnatls -v to find the version. gnatls seems only to recognise option (a) above (it will handles the other choices when you supply --RTS=, but gprconfig doesn't). ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: GNAT ARM on Mac OS X? 2014-11-05 18:52 ` Jerry Petrey 2014-11-05 19:30 ` Simon Wright 2014-11-08 14:49 ` Simon Wright @ 2014-11-19 9:58 ` Simon Wright 2 siblings, 0 replies; 14+ messages in thread From: Simon Wright @ 2014-11-19 9:58 UTC (permalink / raw) 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. Thanks for your postings on this! You'll have seen my separate announcement. 'How I did it' at http://forward-in-code.blogspot.co.uk/2014/11/building-gnat-gpl-2014-for-arm-eabi.html ^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2014-11-19 9:58 UTC | newest] Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 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 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
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox