Refactor slave_node application to use Zephyr modules

This commit is contained in:
2025-07-02 20:47:16 +02:00
parent a5da0a61dd
commit 711341f362
13 changed files with 41 additions and 14 deletions

View File

@@ -6,14 +6,10 @@ list(APPEND BOARD_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/../..)
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(slave_node)
# Define a variable for the lib directory
set(LIB_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../lib)
# Add the include directories for the libraries
target_include_directories(app PRIVATE
${LIB_DIR}/valve
${LIB_DIR}/modbus_server
${LIB_DIR}/fwu
${CMAKE_CURRENT_SOURCE_DIR}/../../modules/valve/include
${CMAKE_CURRENT_SOURCE_DIR}/../../modules/modbus_server/include
${CMAKE_CURRENT_SOURCE_DIR}/../../lib/fwu
)
# Add the source files from the app and the libraries
@@ -21,7 +17,7 @@ target_sources(app PRIVATE
src/main.c
src/shell_modbus.c
src/shell_system.c
${LIB_DIR}/valve/valve.c
${LIB_DIR}/modbus_server/modbus_server.c
${LIB_DIR}/fwu/fwu.c
${CMAKE_CURRENT_SOURCE_DIR}/../../modules/valve/src/valve.c
${CMAKE_CURRENT_SOURCE_DIR}/../../modules/modbus_server/src/modbus_server.c
${CMAKE_CURRENT_SOURCE_DIR}/../../lib/fwu/fwu.c
)