Skip to content

Gcc detailed tutorial

Pekka Nikander edited this page May 18, 2013 · 2 revisions

This tutorial explains the [Gcc astronaut tutorial] step by step, and offers some variety as feed for thought. We recommend sticking to the recommended tool choices, though. Of course, we'd love to hear of any success stories using alternative development tools in a non-breaking way.

Satisfying the software requirements:

GCC

GCC is at the moment the only free to use unlimited C-compiler that compiles for the ARM Cortex M0. Strictly speaking, any Cortex M0 capable way of producing runnable machine code is okay. The software supplied by Ell-i and third parties is in C/C++. Do try to forget anything related to libc as it is way too big and expects a very Unixlike system.

GNU Make

GNU Make is a build automation system much like a project file on a GUI IDE compiler platform. Using make the builder can specify targets, which in turn are basically automatically generated shell scripts. Other make programs are good too but expect most of the Makefiles to follow GNU syntax.

OpenOCD

OpenOCD seems to be the tool of choice for JTAG/SWD debugging.

FTDI programming cable

Connect the FTDI programmuing cable to USB on computer and SWD connector on Elduino board. The SWD interface is basically an ARM Cortex version of JTAG, providing the same functionality using fewer pins. Test the connection as per the OpenOCD documentation.

Demo software and functional test

Download the demo software from github, compile and transfer it to the Elduino development board:

git get package
untar package
cd package
make install

TADAAAAAA

The led should blink a message to you. If you cannot read the message, you can take a peek at the source. This might be a good idea anyhow, as the demo software example files are commented a bit more elaborately than normal.

Clone this wiki locally