Embedded software (firmware) for the laser system and components, including configuration files.
(No GCC4MBED required)
Download from: https://launchpad.net/gcc-arm-embedded
(or use the one that comes with your distribution: apt-get install gcc-arm-none-eabi ). On Ubuntu 14.04 64 bit, you need to install libc6:i386.
git clone --recursive https://github.com/LaosLaser/Firmware.git
cd Firmware/mbed/
patch -p1 < ../laser/mbed.patch
Set the path to the gcc compiler in a workspace_tools/private_settings.py
file. Make sure you end with the bin folder.
For example using:
echo 'GCC_ARM_PATH = "home/usr/gcc-arm-none-eabi-4_8-2014q1/bin/"' > workspace_tools/private_settings.py
python workspace_tools/build.py -m LPC1768 -t GCC_ARM -r -e -u -c
You might need to install the python-colorama package for this to work.
cd libraries/tests/net/protocols/
ln -s ../../../../../laser .
cd ../../../..
python workspace_tools/make.py -m LPC1768 -t GCC_ARM -n laser
cd libraries/tests/net/protocols/
ln -s ../../../../../iotest_board/ iotest
cd ../../../..
python workspace_tools/make.py -m LPC1768 -t GCC_ARM -n iotest
arm-none-eabi-gdb build/test/LPC1768/GCC_ARM/laser/laser.elf --eval-command \
'target remote | openocd -c "gdb_port pipe" --file /usr/share/openocd/scripts/interface/cmsis-dap.cfg --file /usr/share/openocd/scripts/target/lpc1768.cfg -cinit -chalt'
This starts gdb and lets gdb start openocd to connect to the board. It
seems you can only attach after startup. Normally, you can also use -c 'reset halt'
to reset the board and start debugging from the start, but
since the startup procedure uses "semihost" calls to read config.txt
from the flash, this generates dozens of SIGTRAP
interrupts, making
debugging effectively useless.