summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxengineering <me@xengineering.eu>2025-03-21 22:49:00 +0100
committerxengineering <me@xengineering.eu>2025-03-21 22:49:16 +0100
commit76c2e5393edb38bc553fa1de05aed0a4f46ec325 (patch)
treee0d41d1a5ca0c0c6a82897a49f56be44a4cad7b7
parent013982f8774d620fffb9b063aeb7580dcf301dd0 (diff)
downloadiot-contact-76c2e5393edb38bc553fa1de05aed0a4f46ec325.tar
iot-contact-76c2e5393edb38bc553fa1de05aed0a4f46ec325.tar.zst
iot-contact-76c2e5393edb38bc553fa1de05aed0a4f46ec325.zip
Update README.md
Usage instructions were outdated.
-rw-r--r--README.md46
1 files changed, 33 insertions, 13 deletions
diff --git a/README.md b/README.md
index 1654143..c292eb5 100644
--- a/README.md
+++ b/README.md
@@ -3,38 +3,58 @@
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
-The content of this repository can be build with CMake and Ninja.
+To build the firmware a firmware signing key is required. It is generated with
+the `imgtool.py`.
```
-cmake -Bbuild -GNinja
-ninja -C build
+mkdir -p ~/mcuboot
+./imgtool.py keygen --key ~/mcuboot/key.pem --type ed25519
```
-Exported files related to the printed circuit board (PCB) can be found in the
-build folder.
+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.
```
-tree build/pcb
+cmake -Bbuild -GNinja -DKEY=~/mcuboot/key.pem
+ninja -C build
```
-The resulting firmware can be flashed via a ST-LINK debugger / programmer.
+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`).
```
-st-flash --connect-under-reset write build/fw/zephyr/zephyr.bin 0x8000000
+./fw/simulate-network.sh
```
-UART shell output can be retrieved with `picocom`.
+With the firmware built and the network being prepared the simulated firmware
+can be run.
```
-picocom -b 115200 /dev/ttyACM0
+./build/fw/zephyr/zephyr.exe
```
-Finally the firmware can be erased from the device with the ST-LINK.
+To build the firmware in a clean `nucleo` build folder, flash it and open a
+serial interface another script can be used for convenience.
```
-st-flash --connect-under-reset erase
+./fw/nucleo.sh
```
-[1]: https://docs.kicad.org/
+Next to the firmware artifacts the exported files related to the printed
+circuit board (PCB) can be found in the build folder.
+
+```
+tree build/pcb
+```