From b073db4017008ceb638a9c23c8cc93e60a3a7fdb Mon Sep 17 00:00:00 2001 From: xengineering Date: Sun, 23 Mar 2025 17:53:24 +0100 Subject: fw: app: Move application firmware code here This makes the structure of the `fw` folder more clear and separates application-related code from bootloader- or rtos-related code. --- fw/CMakeLists.txt | 37 ++----------------------------------- 1 file changed, 2 insertions(+), 35 deletions(-) (limited to 'fw/CMakeLists.txt') diff --git a/fw/CMakeLists.txt b/fw/CMakeLists.txt index ce16b10..6f2ea60 100644 --- a/fw/CMakeLists.txt +++ b/fw/CMakeLists.txt @@ -11,6 +11,7 @@ set(ZEPHYR_MODULES "${CMAKE_CURRENT_SOURCE_DIR}/rtos/modules/mbedtls" "${CMAKE_CURRENT_SOURCE_DIR}/btl/mcuboot" ) +set(ZEPHYR_BASE "${CMAKE_CURRENT_SOURCE_DIR}/rtos/zephyr") string(REPLACE ";" "," ZEPHYR_MODULES_COMMA "${ZEPHYR_MODULES}") include(ExternalProject) @@ -28,38 +29,4 @@ ExternalProject_Add( -DCONFIG_BOOT_SIGNATURE_KEY_FILE="${KEY}" ) -find_package(Zephyr - REQUIRED - HINTS - "${CMAKE_CURRENT_SOURCE_DIR}/rtos/zephyr" -) - -project(iot-contact-fw) - -target_sources(app - PRIVATE - "${CMAKE_CURRENT_SOURCE_DIR}/src/syslog.c" - "${CMAKE_CURRENT_SOURCE_DIR}/src/network.c" - "${CMAKE_CURRENT_SOURCE_DIR}/src/http.c" - "${CMAKE_CURRENT_SOURCE_DIR}/src/ws.c" - "${CMAKE_CURRENT_SOURCE_DIR}/src/heart.c" -) - -zephyr_linker_sources(SECTIONS sections-rom.ld) -zephyr_linker_section(NAME http_resource_desc_http_service - KVMA RAM_REGION GROUP RODATA_REGION - SUBALIGN ${CONFIG_LINKER_ITERABLE_SUBALIGN}) - -generate_inc_file_for_target( - app - src/index.html - ${ZEPHYR_BINARY_DIR}/include/generated/index.html.gz.inc - --gzip -) - -generate_inc_file_for_target( - app - src/iot-contact.js - ${ZEPHYR_BINARY_DIR}/include/generated/iot-contact.js.gz.inc - --gzip -) +add_subdirectory(app) -- cgit v1.2.3-70-g09d2