Hi,
I'm wondering if there is anyone that can help me with the follwoing issue; I have a question about subfolders and source files within the nRF Connect SDK. I've read that zephyr prefers that all source and header files should be in the same 'src' folder, however by doing this my project is becoming a big mess. To organize the project, it would be nice to be able to create subfolders within the project holding header- and source files which also can be seen in the nRF Connect view under 'Source files --> Application --> src'.
It looks like this is a bit too much to ask. I would expect an option when right-clicking on the 'Source Files', 'Add source/header files'. But no, I have to go back to the Explorer to create subfolder and files and add someting like...
add_subdirectory(src/common)
Or is it...
zephyr_include_directories(src/common)
Or maybe even...
target_include_directories(app PRIVATE src/common)
to the CmakeLists.txt? Who knows, I cannot find any proper documentation on how to add subfolders/files to a project which then become visible under the nRF Connect view 'Source files'-view. I also tried to add a CmakeLists.txt file in each subfolder with zero effect.
zephyr_include_directories(.) FILE(GLOB ${CMAKE_CURRENT_SOURCE_DIR}/*.c) target_sources(app PRIVATE ${app_sources} )
Question; is there any step-by-step documentation available on how to organize a project in a neat way instead of throwing all source- and header files in the same folder making it one big garbage bin?
Thank again!