This repo contains the firmware and bootloader for the SensorBoard Device v3.1
PLEASE STOP USING CRLF LINE ENDING : use LF as normal people do
Git can handle this for you correctly!
If you want it configured for this project only use --local
otherwise for your whole system use --global
.
- On windows:
git config --local core.autocrlf=true
- On Linux/OSX:
git config --local core.autocrlf=input
Checkout out either this or this for more information.
Don't use .gitattributes
it gets messy very quickly.
arm-none-eabi-gdb
,arm-none-eabi-gcc
,arm-none-eabi-newlib
,arm-none-eabi-binutils
: ARM toolchain necessary to compile and debug the firmwaremake
: or similaropenocd
: to flash the firmware on the target via a debug probe (STLINK)bootcommander
,libopenblt
: to flash the firmware via can-bus
If all the software dependencies are available through $PATH
make
otherwise specify them via:
make GCC_PATH=/<path_to_compiler>
This will build the firmware to be flashed via openocd
and a debug probe (STLINK)
All software dependencies must be available in $PATH
cd ./openblt_f446re
make
cd ..
This will build the Bootloader firmware to be flashed via openocd
and a debug probe (STLINK)
Two approaches for flashing:
- Baremetal no bootloader
- Bootloader + flash via can
Make sure the debug probe is attached to the target and they see each other. To verify this run this command from the project rootdir:
openocd -f openocd.cfg
It should look something like this:
TODO add openocd status
Make sure you have openocd
dependency in $PATH
.
make flash
otherwise specify the path via:
make flash OPENOCD_PATH=/<openocd_path>
First flash the bootloader on the device (all dependencies must be in $PATH
, the debugger probe must be able to talk to the target see )
cd ./openblt_f446re
make flash
cd ..
Then connect the sensorboard device on a CAN bus network where you can send and receive data.
make can_flash
If bootcommander
dependency is not in $PATH
specify it like this:
make can_flash BOOTCOMMANDER_PATH=/<path_to_bootcomamnder_dir>