diff options
author | xengineering <me@xengineering.eu> | 2025-03-22 21:21:44 +0100 |
---|---|---|
committer | xengineering <me@xengineering.eu> | 2025-03-22 21:21:44 +0100 |
commit | 0c771fb52f864c867d2fcff795e4d3ebd8de1c7c (patch) | |
tree | ac6bf864270be669b73997e5a3e14edf6708de12 | |
parent | 9f2ce4cc9ba9ad45a7e88247f8c1fb0953717b0e (diff) | |
download | iot-contact-0c771fb52f864c867d2fcff795e4d3ebd8de1c7c.tar iot-contact-0c771fb52f864c867d2fcff795e4d3ebd8de1c7c.tar.zst iot-contact-0c771fb52f864c867d2fcff795e4d3ebd8de1c7c.zip |
fw: firmware: Add app build version output
-rw-r--r-- | RELEASE.md | 3 | ||||
-rw-r--r-- | VERSION.txt | 5 | ||||
-rw-r--r-- | fw/CMakeLists.txt | 1 | ||||
l--------- | fw/VERSION | 1 | ||||
-rw-r--r-- | fw/src/firmware.c | 19 |
5 files changed, 29 insertions, 0 deletions
diff --git a/RELEASE.md b/RELEASE.md new file mode 100644 index 0000000..7444a8c --- /dev/null +++ b/RELEASE.md @@ -0,0 +1,3 @@ +# Release checklist + +- update values in VERSION.txt diff --git a/VERSION.txt b/VERSION.txt new file mode 100644 index 0000000..82edf85 --- /dev/null +++ b/VERSION.txt @@ -0,0 +1,5 @@ +VERSION_MAJOR = 0 +VERSION_MINOR = 0 +PATCHLEVEL = 99 +VERSION_TWEAK = 0 +EXTRAVERSION = diff --git a/fw/CMakeLists.txt b/fw/CMakeLists.txt index 1b978b7..0541836 100644 --- a/fw/CMakeLists.txt +++ b/fw/CMakeLists.txt @@ -43,6 +43,7 @@ target_sources(app "${CMAKE_CURRENT_SOURCE_DIR}/src/http.c" "${CMAKE_CURRENT_SOURCE_DIR}/src/ws.c" "${CMAKE_CURRENT_SOURCE_DIR}/src/heart.c" + "${CMAKE_CURRENT_SOURCE_DIR}/src/firmware.c" ) zephyr_linker_sources(SECTIONS sections-rom.ld) diff --git a/fw/VERSION b/fw/VERSION new file mode 120000 index 0000000..c892f30 --- /dev/null +++ b/fw/VERSION @@ -0,0 +1 @@ +../VERSION.txt
\ No newline at end of file diff --git a/fw/src/firmware.c b/fw/src/firmware.c new file mode 100644 index 0000000..9c0fa16 --- /dev/null +++ b/fw/src/firmware.c @@ -0,0 +1,19 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public License, + * v. 2.0. If a copy of the MPL was not distributed with this file, You can + * obtain one at https://mozilla.org/MPL/2.0/. + */ + +#include <zephyr/app_version.h> +#include <zephyr/init.h> +#include <zephyr/logging/log.h> + +LOG_MODULE_REGISTER(firmware); + +int firmware_log_metadata(void) +{ + LOG_INF("App build version: %s", STRINGIFY(APP_BUILD_VERSION)); + + return 0; +} +SYS_INIT(firmware_log_metadata, APPLICATION, 0); |