Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

GNAT GPL Edition for 8Bit AVR microcontrollers

323 views
Skip to first unread message

jordanl...@gmail.com

unread,
Sep 6, 2016, 5:30:50 PM9/6/16
to
Hi All,

I am currently working on a Project that involves programming a device (using ATmega328P) using the Ada programming language as well as SPARK Tools or Ravenscar profiles if possible to verify and validate the software.

Here is my question:

What version of GNAT must be used for full compatibility of AVR, what other tools are required for a smooth Achievement?

Thanks

fabien....@gmail.com

unread,
Sep 7, 2016, 6:00:47 AM9/7/16
to
Hi,
I don't think there is a binary release of GNAT for AVR. The only option I know is the community project AVR-Ada [1]. I've never tried it myself, but it's on my TODO list :)

[1] https://sourceforge.net/projects/avr-ada/

--
Fabien Chouteau

rrr.e...@gmail.com

unread,
Sep 7, 2016, 6:28:37 AM9/7/16
to
On Tuesday, September 6, 2016 at 11:30:50 PM UTC+2, jordanl...@gmail.com wrote:
The last published version of AVR-Ada was for gcc-4.7. I updated the GIT repository for gcc-4.9 and I have a half baked version for gcc-5.3 on my computer. I am not sure if I find the energy to update AVR-Ada for gcc-6, there must be some demand and it could be yours.

Already gcc-4.7 had some Ada2012 feature. If you stick to Ada2005 that version is fully Ada compatibel and works reasonably well. The Atmega328 is used on the Arduinos, that means it is probably the most tested MCU among the AVR chips.

Please send me or (preferred) the avr-ada-devel mailing list direct messages if you need assistance in building the toolchain.

best regards
RE

Simon Wright

unread,
Sep 7, 2016, 7:03:58 AM9/7/16
to
fabien....@gmail.com writes:

> Hi,
> On Tuesday, September 6, 2016 at 11:30:50 PM UTC+2, jordanl...@gmail.com wrote:
>> Hi All,
>>
>> I am currently working on a Project that involves programming a
>> device (using ATmega328P) using the Ada programming language as well
>> as SPARK Tools or Ravenscar profiles if possible to verify and
>> validate the software.

Provided you can get a compiler (as Fabien suggested, or, if you're able
to run on Windows, try GNAT GPL 2012 from libre.adacore.com) you will be able
to use the SPARK tools; see [1], especially chapter 19. The natural way
of handling SPARK uses aspects, and you'd need a recent compiler to
support that (FSF GCC 6, GNAT GPL 2016).

FSF GCC 6 appears to have AVR support, so you could build your own
cross-compiler.

But the ATmega328P has 32kB flash, 2kB sram, so your chances of getting
Ravenscar to fit are, practically, zero.

[1] http://www.inspirel.com/articles/Ada_On_Cortex.html

Tero Koskinen

unread,
Sep 7, 2016, 12:51:13 PM9/7/16
to
7.9.2016, 13.28, rrr.e...@gmail.com wrote:
> On Tuesday, September 6, 2016 at 11:30:50 PM UTC+2,
> jordanl...@gmail.com wrote:
>> Hi All,
>>
>> I am currently working on a Project that involves programming a
>> device (using ATmega328P) using the Ada programming language as
>> well as SPARK Tools or Ravenscar profiles if possible to verify
>> and validate the software.
>>
>> Here is my question:
>>
>> What version of GNAT must be used for full compatibility of AVR,
>> what other tools are required for a smooth Achievement?
>>
>> Thanks
>
> The last published version of AVR-Ada was for gcc-4.7. I updated the
> GIT repository for gcc-4.9 and I have a half baked version for
> gcc-5.3 on my computer. I am not sure if I find the energy to update
> AVR-Ada for gcc-6, there must be some demand and it could be yours.
...
> best regards RE

Getting back to AVR-Ada development has been my plan also. I have just
been on a sidetrack and played with Arduino Zero (it has ARM-based MCU,
Atmel SAMD21) and C code [1,2].

Meanwhile, you can find some AVR-Ada tips from my Arduino blog at
http://arduino.ada-language.com/

Yours,
Tero

[1] https://bitbucket.org/tkoskine/samd2x-peripheral-library/
[2] https://bitbucket.org/tkoskine/samd-ada/

jordanl...@gmail.com

unread,
Sep 9, 2016, 4:14:12 PM9/9/16
to
On Tuesday, September 6, 2016 at 11:30:50 PM UTC+2, jordanl...@gmail.com wrote:
Hi guys,

Thank you for all your tips, support and interest.

I am still very lost on how to build the tool chain. It is very challenging, does any one have any idea on how to build the tool chain as well as, what to watch out for when building this tool chain(what not to do)...

I am not new with Ada, but i am new with linux. I currently have gnat 4.9 installed, is this version of GNAT a problem for the support of avr-ada?

Ps. not using an arduino, but a simple ATmega328p on a breadboard.

0 new messages