From 298cb131149f583ab986ee69901765c3dbcce674 Mon Sep 17 00:00:00 2001 From: xengineering Date: Fri, 14 Feb 2025 08:37:08 +0100 Subject: 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. --- fw/.gitignore | 3 --- fw/CMakeLists.txt | 4 ++-- fw/README.md | 25 ------------------------- 3 files changed, 2 insertions(+), 30 deletions(-) delete mode 100644 fw/.gitignore (limited to 'fw') diff --git a/fw/.gitignore b/fw/.gitignore deleted file mode 100644 index 06f39a9..0000000 --- a/fw/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -build -.cache -log.txt diff --git a/fw/CMakeLists.txt b/fw/CMakeLists.txt index 5cd52ce..000039e 100644 --- a/fw/CMakeLists.txt +++ b/fw/CMakeLists.txt @@ -15,9 +15,9 @@ find_package(Zephyr "${CMAKE_CURRENT_SOURCE_DIR}/zephyrproject/zephyr" ) -project(iot-contact) +project(iot-contact-fw) target_sources(app PRIVATE - src/main.c + "${CMAKE_CURRENT_SOURCE_DIR}/src/main.c" ) diff --git a/fw/README.md b/fw/README.md index 8287fab..9883b2d 100644 --- a/fw/README.md +++ b/fw/README.md @@ -3,29 +3,4 @@ This is the firmware for iot-contact. It is based on the Zephyr real time operating system [1]. -## 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 -- cgit v1.2.3-70-g09d2