Skip to content

Firmware compilation and hardware flashing

Robert edited this page Oct 22, 2020 · 4 revisions

Initial configuration

Configure project using cmake, this step is needed only once.

In Software directory create build directory and go into it:

mkdir build
cd build

Run cmake:

cmake -DCMAKE_SYSTEM_NAME=Generic -DCMAKE_C_COMPILER=sdcc ../

Compilation

Compilation is done using make in the directory where cmake files were generated (Software/Build)

make

Binary will be stored directory where makefile is.

Flashing

stm8flash -c stlink -p stm8s003f3  -w IonizationChamber.ihx