Examples written using the libopencm3 library.
- GCC build essentials.
- Mac: Run
xcode-select --install
in your terminal. - Linux: Install build-essential
- Windows: make or via cygwin
- Mac: Run
- The ARM gcc toolchain, 7.3.1 or above
- dfu-util
The LibOpenCM3 library is included as a git submodule and needs to be initialized and built before you can compile any of the examples. (These steps should only need to be run once)
cd ThunderPack/examples/libopencm3
git submodule init
git submodule update
make
- Be sure you've installed the prerequisite software and initialized the LibOpenCM3 library first. (see instructions above)
- Now go into one of the example directories and run
make
.
For Example:
cd examples/libopencm3
make
cd ./Blink
make
Put the board into bootloader (DFU) mode by pressing the user button while turning the board on. Now you can run the following command to flash the program to the board:
make flash
This command is a wrapper for the dfu-util
command. The full command would be:
dfu-util -d 0483:df11 -a 0 -s 0x08000000:leave -D build/program.bin