Tinycortex, part 3. Offline compiling

The MBED IDE is an online IDE, which is less pleasant if you want to work without internet or prefer your own editor. Luckily it is possible to export an MBED project and use an offline compiler. It can export to KEIL, GCC and a few others.

KEIL is a well known IDE now owned by ARM. They offer a free 32KB limited version and with the Tinycortex having 32KB of flash memory that limit is no issue. KEIL is Windows only and the unlimited version is quite expensive. A guide on exporting to KEIL can be found here. Because KEIL just works it’s the recommended way for offline compiling.

It is also possible to export to a GCC makefile which is especially nice for people using Linux or OS X.  An ARM compiler is required, the most used and free one being GCC ARM Embedded, which is being maintained by ARM employees. On a Linux system with make and the ARM compiler installed compiling the code is just typing “make” in the terminal. After a few seconds the output for the Blinkaled project you can find on my github is:
Selection_020

Sadly enough it’s not possible to just copy the generated .bin file on the tinycortex. With just the makefile the binary file isn’t checksummed. A small script in the “Tools” folder called checksum is used to checksum the file. Place it in the folder with the binary and run it with the command “./checksum filename.bin”. The checksum script is compiled for Linux, OS-X or Windows users need to recompile it using the command “gcc -o checksum checksum.c”.

Linux and OS-X users have to use the dd command to place the binary on the Tinycortex.


So, what do you think ?