comp.lang.ada
 help / color / mirror / Atom feed
From: Tero Koskinen <tero.koskinen@iki.fi>
Subject: Re: Arduino Due
Date: Thu, 21 Nov 2013 17:58:09 +0200
Date: 2013-11-21T17:58:09+02:00	[thread overview]
Message-ID: <20131121175809.ac0685f8f5d9596814f081c3@iki.fi> (raw)
In-Reply-To: 85eh6aus2x.fsf@stephe-leake.org

On Thu, 21 Nov 2013 01:33:42 -0600
Stephen Leake <stephen_leake@stephe-leake.org> wrote:

> I've recently purchased an Arduino Due
> (http://arduino.cc/en/Main/arduinoBoardDue), to build a home robot. The
> processor is an AT91SAM3X8E, which according to Atmel
> http://www.atmel.com/devices/SAM3X8E.aspx is an ARM Cortex-M3 84 MHz 32
> bit processor, no floating point hardware, along with a bunch of IO
> stuff.
> 
> Has anyone ported GNAT to this?

I have also Due, actually has been almost a year already[1], but I
haven't had time to port GNAT on it yet. But it is on my todo list
along with N+1 other things. :)

> It appears I can use gcc targeted to
> arm, and specify -mcpu=cortex-m3.

Yes, Due has Atmel's Cortex-m3 class ARM microcontroller and it is
supported by gcc.

> I'm guessing the runtime from AVR-Ada could be useful, depending on how
> much is in assembler.

You can probably get the runtime skeleton from AVR-Ada, but most of
AVR.* packages are useless. They control peripherals of
attiny/atmega/at90 AVR microcontrollers (done mostly in Ada, but
most of the register addresses and stuff should be specific to AVRs).

Currently, the best place to start is Lucretia's work at
https://github.com/Lucretia/ , especially TAMP:
https://github.com/Lucretia/tamp

> The Atmel website provides a C/C++ IDE and a download tool, so I can at
> least write hello_world.c and try things out, but I'd like to write real
> code in Ada.

I haven't checked AT91SAM3X8E datasheet in detail, but unless Atmel has
recycled their UART/I2C/SPI/etc peripheral logic from AVRs to ARM,
you have pretty hard road a head. (You need to either create bindings
to C functions or implement all peripheral handling from scratch.)

Btw, if you would use Arduino Uno and AVR-Ada, you could have robot
coded in about 30 lines of code[2]. ;)

-- 
Tero Koskinen - http://iki.fi/tero.koskinen/

[1] http://arduino.ada-language.com/arduino-due.html
[2] http://arduino.ada-language.com/remote-controlled-robot-using-xbees-and-ada.html

  reply	other threads:[~2013-11-21 15:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-21  7:33 Arduino Due Stephen Leake
2013-11-21 15:58 ` Tero Koskinen [this message]
2013-11-24 13:12 ` MatthiasR
2018-03-11 23:48   ` john
2018-03-12  8:42     ` Simon Wright
2018-05-01 23:05       ` john
2018-05-02  7:58         ` Simon Wright
2018-05-03  6:46           ` john
replies disabled

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