circuitdojo / nrf9160-feather-examples-and-drivers

Zephyr examples and drivers for the nRF9160 Feather
Apache License 2.0
43 stars 19 forks source link

CmakeLists.txt assumes app is in ncs/nfed/samples/... tree - build fails if it is not #2

Closed davidahoward closed 2 years ago

davidahoward commented 3 years ago

if app isn't in the ncs/nfed/samples/xyz tree e.g.:

=== child image mcuboot - begin === ... cc1: fatal error: /Users/dhoward/feather/lwm2m_client1/../../shared/conf/mcuboot/circuitdojo_feather_nrf9160ns.overlay: No such file or directory compilation terminated. CMake Error at /opt/nordic/ncs/v1.6.0/zephyr/cmake/dts.cmake:157 (message):

Reason: CMakeLists.txt:

# Adding custom overlay to add settings that aren't included in the SDK (yet) for the nRF9160 Feather if(${BOARD} STREQUAL circuitdojo_feather_nrf9160ns) message(STATUS "Adding .overlay for mcuboot.") list(APPEND mcuboot_DTC_OVERLAY_FILE "${CMAKE_CURRENT_LIST_DIR}/../../shared/conf/mcuboot/circuitdojo_feather_nrf9160ns.overlay" ) endif()

instead use something like:

# Adding custom overlay to add settings that aren't included in the SDK (yet) for the nRF9160 Feather if(${BOARD} STREQUAL circuitdojo_feather_nrf9160ns) message(STATUS "Adding .overlay for mcuboot.") list(APPEND mcuboot_DTC_OVERLAY_FILE "$ENV{ZEPHYR_BASE}/../nfed/shared/conf/mcuboot/circuitdojo_feather_nrf9160ns.overlay" ) endif()