summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxengineering <me@xengineering.eu>2024-08-29 17:56:25 +0200
committerxengineering <me@xengineering.eu>2024-08-29 18:01:53 +0200
commit0ff8c7370ad87ac450b32955210a1ec366413d61 (patch)
tree43b49b2ec802bc96596cffb3722b3d253a41b14b
parentf60daa445ff4daf4aa40d2d5b35197b4e5eadd0d (diff)
downloadiot-contact-0ff8c7370ad87ac450b32955210a1ec366413d61.tar
iot-contact-0ff8c7370ad87ac450b32955210a1ec366413d61.tar.zst
iot-contact-0ff8c7370ad87ac450b32955210a1ec366413d61.zip
firmware: Add minimal README
This adds instructions for: - Python environment setup - building the firmware - flashing the firmware - get output from the Zephyr shell - removing the firmware from the device
-rw-r--r--firmware/README.md39
1 files changed, 39 insertions, 0 deletions
diff --git a/firmware/README.md b/firmware/README.md
new file mode 100644
index 0000000..b0d2c46
--- /dev/null
+++ b/firmware/README.md
@@ -0,0 +1,39 @@
+# iot-contact Firmware
+
+This is the firmware for iot-contact. It is based on the Zephyr real time
+operating system [1].
+
+## Setup Python environment
+
+```
+python -m venv zephyrproject/.venv
+source zephyrproject/.venv/bin/activate
+pip install -r zephyrproject/requirements.txt
+```
+
+## Build
+
+```
+cmake -Bbuild -GNinja
+ninja -C build
+```
+
+## Flash
+
+```
+st-flash --connect-under-reset write build/zephyr/zephyr.bin 0x8000000
+```
+
+## Get shell output
+
+```
+picocom -b 115200 /dev/ttyACM0
+```
+
+## Remove firmware from device
+
+```
+st-flash --connect-under-reset erase
+```
+
+[1]: https://zephyrproject.org