summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorxengineering <me@xengineering.eu>2025-02-14 08:37:08 +0100
committerxengineering <me@xengineering.eu>2025-02-14 09:03:18 +0100
commit298cb131149f583ab986ee69901765c3dbcce674 (patch)
tree83e93b0429b8d6d5919fe049fc9262db9735ed74 /README.md
parentee9106047c2128e8be07e754157c71c92a77a442 (diff)
downloadiot-contact-298cb131149f583ab986ee69901765c3dbcce674.tar
iot-contact-298cb131149f583ab986ee69901765c3dbcce674.tar.zst
iot-contact-298cb131149f583ab986ee69901765c3dbcce674.zip
Switch to a global CMake build
This allows to easily build everything from the repository root. For now this only covers firmware but later electrical PCB and mechanical case files can be added.
Diffstat (limited to 'README.md')
-rw-r--r--README.md27
1 files changed, 27 insertions, 0 deletions
diff --git a/README.md b/README.md
index 72b2b57..c2db017 100644
--- a/README.md
+++ b/README.md
@@ -2,4 +2,31 @@
iot-contact is an IoT device to check if doors and windows are closed or open.
+## Usage
+
+The content of this repository can be build with CMake and Ninja.
+
+```
+cmake -Bbuild -GNinja
+ninja -C build
+```
+
+The resulting firmware can be flashed via an ST-LINK debugger / programmer.
+
+```
+st-flash --connect-under-reset write build/fw/zephyr/zephyr.bin 0x8000000
+```
+
+UART shell output can be retrieved with `picocom`.
+
+```
+picocom -b 115200 /dev/ttyACM0
+```
+
+Finally the firmware can be erased from the device with the ST-LINK.
+
+```
+st-flash --connect-under-reset erase
+```
+
[1]: https://docs.kicad.org/