EASY MBED OFFLINE COMPILER WITH ECLIPSE
This HOWTO is specially dedicated to all my friends who studying Computer Engineering at University of Sherbrooke. YESSSS for you guys!
So, here are the steps:
1- The most important step, get WINDOWS
2- Download gcc4med at https://github.com/adamgreen/gcc4mbed/zipball/master (this is a GCC ARM mbed + libraries port for win/mac/*nix.) Before I discovered it I did the tutorial here: http://mbed.org/cookbook/Using-mbed-with-gcc-and-eclipse but these steps are not anymore required since someone did this great and useful portable package. Thanks Adam Green.
3- Extract it in C:\mbed-dev
4- Run as admin C:\mbed-dev\win_install.cmd (this gonna build the required dev env)
5- Copy C:\mbed-dev\samples\HelloWorld to C:\mbed-dev\samples\default-ide
6- Download, extract, and run Eclipse C/C++ IDE Indigo SR2 (32-bit) http://www.eclipse.org/downloads/packages/eclipse-ide-cc-developers-includes-incubating-components/indigosr2
7- File/New/Makefile Project with Existing Code, Browse to C:\mbed-dev\samples\default-ide, Finish
8- Right click on default-ide projet and Properties, C/C++ Build, Environment, Add Name: PATH VALUE: C:\mbed-dev\gcc-arm-none-eabi\bin\;C:\mbed-dev\gcc-arm-none-eabi\bin\..\..\external\win32 Add to all configs, Done
9- In the same Properties window, C/C++ General, Paths and Symbols, GNU C++, Add these directories Directory: C:\mbed-dev\external\mbed Directory: C:\mbed-dev\external\mbed\LPC1768 Add to all configs, Done, Yes rebuild.
10- Open makefile in the project, rename PROJECT=HelloWorld to PROJECT=default-ide , under it add one line MBED_DRIVE=E (E is the drive of your mbed device)
11- Edit (with a unix compatible editor) c:\mbed-dev\build\ gcc4mbed.mk Under line 261 add: $(Q) $(OBJCOPY) -O binary $(PROJECT).elf $(MBED_DRIVE):\$(PROJECT).bin
12- Edit your main.cpp, save and build. You gonna have your new soft into your mbed. Reset it!
13- Have fun!