How to port to the Arduino Due with C++ exception support etc.

R. Diez rdiezmail-rtems at yahoo.de
Wed Jul 24 13:19:45 UTC 2013


Hi all:


[2nd attempt at posting this message]


I am tired of old-style C code and their accompanying 
decade-old excuses in embedded environments, so I have set up an 
open-source, bare-metal environment for the Arduino Due with support for
 "modern" C++ features like C++ exceptions. For more information, see 
here:

https://github.com/rdiez/JtagDue

The
 next step would be upgrading to a proper OS with POSIX threads etc., 
while still keeping C++ exception support and the like. I hope RTEMS 
does not disappoint me.

The Arduino Due has an AT91SAM3X8E 
microcontroller with an ARM Cortex-M3 core, 512 KiB Flash and 96 KiB 
SRAM. However, RTEMS does not have a Board Support Package for this 
board. What would be the best way to write a new one, in order to 
prevent as much duplication as possible?

I had a quick look around, and I found the following candidate Board Support Packages:

- stm32f4: Cortex-M4, looks simple and small, probably a good template.

- lm3s69xx: Supports some Cortex-M? CPU.

- csb337: Supports an Atmel CPU with a full ARM core.

This
 is an ARM920T -> ARM9TDMI -> 32-bit ARM instruction set, MMU, 
etc. I don't know whether the peripherals (like UARTs) are similar to 
the AT91SAM3X8E microcontroller.

- lpc24xx: There is support for an NXP LPC17XX (ARM Cortex-M3 core), look at the lpc17xx_*.cfg files.


In
 the new Board Support Package, I would like to use the CMSIS library 
(from ARM) and the ASF library (from Atmel), so that I don't have to 
write all the start-up and I/O code by hand. I never build or install 
anything as root, and I have often different versions of the libraries 
installed under different paths. Therefore, the path to those libraries 
(include files and the like) should be passed somehow to RTEMS' 
configuration script. What's the best place to do that?

Thanks,
  rdiez





More information about the devel mailing list