From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!nntp-feed.chiark.greenend.org.uk!ewrotcd!reality.xs3.de!news.jacob-sparre.dk!loke.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: Tero Koskinen Newsgroups: comp.lang.ada Subject: Re: Arduino Due Date: Thu, 21 Nov 2013 17:58:09 +0200 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: <20131121175809.ac0685f8f5d9596814f081c3@iki.fi> References: <85eh6aus2x.fsf@stephe-leake.org> NNTP-Posting-Host: dsl-trebrasgw2-54f941-244.dhcp.inet.fi Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: loke.gir.dk 1385049489 19274 84.249.65.244 (21 Nov 2013 15:58:09 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Thu, 21 Nov 2013 15:58:09 +0000 (UTC) X-Newsreader: Sylpheed 3.4.0beta5 (GTK+ 2.24.22; x86_64-redhat-linux-gnu) Xref: news.eternal-september.org comp.lang.ada:17754 Date: 2013-11-21T17:58:09+02:00 List-Id: On Thu, 21 Nov 2013 01:33:42 -0600 Stephen Leake 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