8 years, 9 months ago.

Offline compiler

I'm trying to use offline compiler for my mbed project.

Fist I tried this: https://developer.mbed.org/cookbook/eclipse-for-building-and-debugging

But I have trouble installing CDT GNU Cross Development Tools

With this: https://developer.mbed.org/handbook/Exporting-to-Make

i get a .bin file wich does not work when copied on mBed LPC1768.

Now I'm trying to use: https://github.com/adamgreen/gcc4mbed#quick-start

Is ther here any one with more experience on offline compiling? Why there is not an ufficial free offline compiler?

2 Answers

8 years, 9 months ago.

Up till 32kB (iirc) you can use the ARM keil compiler for free. Why is there no complete official offline compiler? Because that would make selling the payed Keil compiler a bit hard for ARM, having via mbed access to the Keil compiler is already nice.

My code si a lot above 32 KB, but when I added ethernet library it grows over 100 KB. In past, I searched for Keil compiler price and it is very expensive. The problem with online compiler are mainly 2: 1) the editor, this could be a relative problem if there was the possibility to upload source with git/mercurial 2) until I'm at office it's ok, but if I'm to a custumer I could not have internet connectivity.

posted by Samuele Zanin 19 Feb 2016
8 years, 9 months ago.

This is very easy: - install a offline compiler; I use the gcc-arm found here =https://launchpad.net/gcc-arm-embedded .
I download a archive file for linux and extract this somewhere
On my computer this is at "/mnt/data/Software_laptop/gcc-arm-none-eabi-4_9-2015q3/"

-open your online compiler , right-click your project , choose export program -choose export target -choose export toolchain GCC ARM Embedded -click export....and get a .zip file; save this file and extract the file somewhere(your offline project)

-in your offline project there is a makefile. The first non-comment line is
GCC_BIN =
Now you add here the path to the "bin folder":
GCC_BIN =/mnt/data/Software_laptop/gcc-arm-none-eabi-4_9-2015q3/bin/

Use your favorite editor to edit the sources (I use Scite) , open a terminal and execute the command make You get a . bin file, ready to upload to your mbed

I