diff options
author | xengineering <me@xengineering.eu> | 2025-04-06 20:02:56 +0200 |
---|---|---|
committer | xengineering <me@xengineering.eu> | 2025-04-06 20:02:56 +0200 |
commit | ee1dea051b0a43c02cf56dfc6a812c1a32910bc6 (patch) | |
tree | 6f555191efc74f7ada207990a233466e953175b8 /README.md | |
parent | d19fc7e34f783b343e77b757c4f37aaadb5b66ca (diff) | |
parent | da27d61588202d6b460e36d29a8789d206495bd6 (diff) | |
download | iot-contact-ee1dea051b0a43c02cf56dfc6a812c1a32910bc6.tar iot-contact-ee1dea051b0a43c02cf56dfc6a812c1a32910bc6.tar.zst iot-contact-ee1dea051b0a43c02cf56dfc6a812c1a32910bc6.zip |
Merge website and CMake to Meson transition
Building a website to structure and deploy the artifacts was planned and
requires a well set-up build system to handle all the file paths targets
and dependencies.
Since multiple CMake Zephyr builds are required for the application
firmware, bootloader firmware and the native_sim application firmware
simulation CMake external project was used.
Since this generates a build tree with a confusing structure Meson was
evaluated.
Finally the Meson build system was a good fit as top-level build system
and allows external projects as an experimental feature if they can
configure a Make-based build system which is given for Zephyr.
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 53 |
1 files changed, 16 insertions, 37 deletions
@@ -3,61 +3,40 @@ iot-contact is an IoT device to check if doors and windows are closed or open. Furthermore roller shutter motors should be controlled. -Currently two boards are supported: - -- `native_sim/native/64` without bootloader -- `nucleo_f767zi` with bootloader - ## Usage -To build the device repository a firmware signing key is required. It is -generated with the `imgtool.py`. - -``` -mkdir ~/mcuboot -./imgtool.py keygen --key ~/mcuboot/key.pem --type ed25519 -``` - -The content of this repository can be build with CMake and Ninja. The -application firmware will be built for the simulation board to easily use it -without special hardware. - -The bootloader is built for `nucleo_f767zi` since the simulation board is -currently not supported. +The source code can be retrieved with `git`. ``` -cmake -Bbuild -GNinja -ninja -C build +git clone https://cgit.xengineering.eu/iot-contact +cd iot-contact +git submodule update --init ``` -A custom key location can be set by providing `-DKEY=/path/to/key` to the CMake -call. - -To run the simulated firmware a virtual network interface `zeth` and a router -advertisement daemon have to be provided with an embedded script. Root rights -are required for that (prefix e.g. with `sudo`). +To sign the application firmware and thus to build the project a cryptographic +signing key is required. It can be generated with `imgtool.py`. ``` -./fw/simulate-network.sh +mkdir ~/mcuboot +./imgtool.py keygen --key ~/mcuboot/key.pem --type ed25519 ``` -With the firmware built and the network being prepared the simulated firmware -can be run. +The project is built with the Meson build system. ``` -./build/fw/app/zephyr/zephyr.exe +meson setup build +meson compile -C build +meson install -C build --destdir artifacts ``` -To build the firmware in a clean `nucleo` build folder, flash it and open a -serial interface another script can be used for convenience. +The resulting artifacts can be listed with `tree`. ``` -./fw/nucleo.sh +tree build/artifacts ``` -Next to the firmware artifacts the exported files related to the printed -circuit board (PCB) can be found in the build folder. +These artifacts are organized as static website. It can be opened with Firefox. ``` -tree build/pcb +find build/artifacts -name 'index.html' -exec firefox {} \; ``` |