Appearance
Getting Started: Building & Signing
Preparing the signature process
cd into the coldwave-os directory and run the python script imgtool.py to times: the first time to generate a private key file and then a second time to export the public key for building the bootloader:
bash
./imgtool.py keygen -k ../keys.pem -t ecdsa-p256
./imgtool.py getpub -k ../keys.pem > keys.cDANGER
make sure to not share or commit the file keys.pem to a VCS, as it contains your private signature key. This key should never be used for another application than the one you created it for and be stored in a secure location, as without it you can't sign the firmware anymore and therefore not deploy any over-the-air updates
Building
- cd into the
cmake-build-debugfolder and runcmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=<path-to-arm-toolchain>/bin/arm-none-eabi-gcc -DCMAKE_CXX_COMPILER=<path-to-arm-toolchain->/bin/arm-none-eabi-g++ .. - run
ninja [AppName]-dist
The build artifacts, which will then be created in the /dist folder are:
- [AppName]-[version].signed.bin - this file is the full firmware as binary 'dump', i.e. no absolute addressing, it is used for update deployments
- [AppName]-[version].hex - this is the full firmware as an intel hex file, containing addresses and used for local deployment with a debug probe
- [AppName]-[version].src.zip - these are the project sources at the time of the build as a zip file
- [AppName]-[version].dsym - these are the build's debug infos, in case you want to strip the binary off all debug info and still be able to debug
- [AppName]-[version]-boot.hex -