CMakeLists.txt problem with the file

I have project, the main,c in the src folder,
in the src folder - I open folder in the name sensor
and in this folder i have the sensor.c file, and the sensor.h file.

when I try to build and flash - it's build and flash, but i didn't see any message...

when I took the sensor.c code, and put in the main.c - it's working like a magic!!

what the problem with my CMakeLists.txt files?

in the sensor folder, in the CMakeLists.txt file:

target_include_directories(app PRIVATE .)
target_sources(app PRIVATE sensor.c  sensor.h)

in the CMakeLists.txt (in the project):

# SPDX-License-Identifier: Apache-2.0

cmake_minimum_required(VERSION 3.20.0)

find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(hello_world)
add_subdirectory(src/sensor)
target_sources(app PRIVATE ${app_sources})

Parents Reply Children
No Data
Related