Minimalistic developing on Linux (C, C++) ; what do I need?

Hi all,

I recently got an Arduino Due that I want to play around with.

I am an experienced C/C++ programmer with a preference for Linux based development; this means the standard Arduino software is too simplistic, and Atmel Studio is not really an option (Windows-based, and frankly I abhor the heavyweight IDE).

Ideally, I would just like to write embedded C code the old-fashioned way: using a text editor and, for the kind of smallish projects I'd like to do, I am perfectly okay with writing my own makefiles. In terms of documentation, I am fine with reading the big ATSAM3X83 reference manual. But I would like a basic C standard library.

In essence, I just need the following things:

(1) A compiler toolchain
(2) An upload program
(3) Header files describing the Arduino pinout, memory-mapped data structures, etc.
(4) A basic implementation of libc / libm / libstdc++

Item (1) and (2) are covered by a GCC ARM cross-compiler toolchain and "bossa", respectively (although I'd be interested if there are alternatives to Bossa). This leaves items (3) and (4).

I have downloaded the "Atmel Software Framework", a humongous ZIP file (295 MB compressed) that is also distributed as part of Atmel Studio. It does contain some things I need (Arduino DUE and SAM3X8E specific header files) but it also contains an amazing array of stuff that I do not need or want. At the same time it seems to be lacking the basic libc/libm/libstdc++ libraries that I'd like to use.

I was wondering if there is a more lightweight / stripped-down set of header files available, and perhaps something like a libc (perhaps based on newlib)?

Are there other people who do Arduino development in the way I like it, and is there perhaps a place/forum where they gather? I am very new to the Arduino community, so any pointers would be greatly appreciated.

Your best bet is probably to still download the Arduino IDE and just snag the arduino core library and assorted libraries that come with it. I have compiled Due programs this way. You get the best of both worlds: You don’t have to use the IDE that you don’t like but you do get all the libraries you need including custom headers and such to tailor everything directly to the Due.

I do command line ARM stuff on Windows/Linux. I have been using Codesourcery Lite, now I am using the ARM GNU embedded distro. I have just started working on porting my code to Due/SAM3X8E.

(1) A compiler toolchain
(2) An upload program
(3) Header files describing the Arduino pinout, memory-mapped data structures, etc.
(4) A basic implementation of libc / libm / libstdc++

The ARM toolchain provides the standard libs as well. You can get header files from the standalone ASF distro, but as you say there is a whole load of other stuff in there.

newlib is a bit more tricky. The standard newlib is too big for smaller MCUs. Various people have rolled their own version with varying levels of features, including Atmel in the ASF, but there is no common/portable newlib light/embedded. It would be difficult to do since embedded environments vary so widely.

I just started playing with this today. I found that an easy way to get started is to use the ino Python package: ino · PyPI Gets you going quickly!

Some useful links I missed:

GNU Tools for ARM Embedded Processors the toolchain maintained by ARM Ltd

Atmel Software Framework standalone ASF.

Atmel appear to use a git repository internally but only seem to be publish the latest version.

Once installed, you should be able to cd to "... \asf-3.9.1\sam\applications\getting-started\sam3x8e_arduino_due_x\gcc" and run "make". That generates .bin and .hex files which you can download to flash with a tool of your choice.

I have only tried this with windows. For windows you will need some additional unix utilities such as make, uname etc which I think are provided by cygwin/mingw, or I use standalone versions downloaded from :


Well, I am also looking at this

I’m developing on a Ubuntu machine also Raspberry PI

I’ve downloaded/installed the stuff above (“aptitude install gcc-arm-none-eabi” seems to pull the gcc stuff).

Will update when I have a working system.

I’ll post the files, but no guarantees how long it will take.