Skip to content

Latest commit

 

History

History

libopencm3

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

LibOpenCM3

Examples written using the libopencm3 library.

Prerequisites

Software

LibOpenCM3 Library

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

Compile

  1. Be sure you've installed the prerequisite software and initialized the LibOpenCM3 library first. (see instructions above)
  2. Now go into one of the example directories and run make.

For Example:

cd examples/libopencm3

make

cd ./Blink

make

Flash the program

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