CompilingFirmware » History » Version 2
peteruithoven, 2013-08-11 13:29
| 1 | 2 | peteruithoven | h1. Compiling from source |
|---|---|---|---|
| 2 | 1 | peteruithoven | It is possible to compile the software from source and make a binary image that runs on the mbed. |
| 3 | # MBED online compiler (at http://mbed.org): You need an account on mbed.org and a Internet connection. |
||
| 4 | # GCC4MBED offline compiler, using GCC. Download at (https://github.com/adamgreen/gcc4mbed) |
||
| 5 | |||
| 6 | You can use GCC4MBED on your platform, or use a linux virtual machine to compile the sources. See: |
||
| 7 | http://jeelabs.net/projects/tosca/wiki/ARM_toolchain_setup_GCC4ARM |
||
| 8 | |||
| 9 | Installation of gcc4mbed on linux: |
||
| 10 | <pre> |
||
| 11 | wget https://github.com/adamgreen/gcc4mbed/zipball/master |
||
| 12 | mv master adamgreen-gcc4mbed.zip |
||
| 13 | unzip adamgreen-gcc4mbed.zip |
||
| 14 | mv adamgreen-gcc4mbed-* gcc4mbed |
||
| 15 | cd gcc4mbed |
||
| 16 | ./linux_install</pre> |
||
| 17 | Check the "Github gcc4mbed page":https://github.com/adamgreen/gcc4mbed when you run into problems. |
||
| 18 | Then download / clone the firmware |
||
| 19 | <pre>git clone https://github.com/LaosLaser/Firmware.git</pre> |
||
| 20 | Place laser folder in gcc4mbed folder |
||
| 21 | Run the following command in that folder |
||
| 22 | <pre>make</pre> |
||
| 23 | And copy the resulting bin file to your MBED or LPC. |
||
| 24 | |||
| 25 | The compiler (currently) creates two .bin files. (laos.bin and laos-lpc.bin) laos-LPC is (experimental) for the lpcexpresso (not mbed). |