diff options
Diffstat (limited to 'examples/ble_app_buttonless_dfu/CMakeLists.txt')
-rw-r--r-- | examples/ble_app_buttonless_dfu/CMakeLists.txt | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/examples/ble_app_buttonless_dfu/CMakeLists.txt b/examples/ble_app_buttonless_dfu/CMakeLists.txt new file mode 100644 index 0000000..ba4d175 --- /dev/null +++ b/examples/ble_app_buttonless_dfu/CMakeLists.txt @@ -0,0 +1,38 @@ +set(D ${MCU_NRF51_SDK_PATH}/examples/ble_peripheral/experimental_ble_app_buttonless_dfu) + +if(NOT EXISTS ${D}) + message("Not available in this SDK version: ${D}") + return () +endif() + +set(T ble_app_buttonless_dfu) +add_executable(${T} ${D}/main.c ${D}/nrf_dfu_flash_buttonless.c) +mcu_add_executable(TARGET ${T} SDK_CONFIG sdk_config.h SOFTDEVICE 130) + +_nrf5_gen_lib(${T} log ADD_TO ${T}) +_nrf5_gen_lib(${T} fds ADD_TO ${T}) +_nrf5_gen_lib(${T} button ADD_TO ${T}) +_nrf5_gen_lib(${T} sensorsim ADD_TO ${T}) +_nrf5_gen_lib(${T} ble_dfu ADD_TO ${T}) + +target_compile_definitions(${T} PUBLIC BOARD_PCA10040) +target_include_directories(${T} PUBLIC ${MCU_NRF51_SDK_PATH}/examples/bsp) + +target_compile_definitions(${T}-bootloader PUBLIC BOARD_PCA10040) +target_include_directories(${T}-bootloader PUBLIC ${MCU_NRF51_SDK_PATH}/examples/bsp) + +#[[ +mcu_nrf51_create_lib(PREFIX ${T} LIB util SDK_CONFIG sdk_config.h) +mcu_nrf51_create_lib(PREFIX ${T} LIB ble SDK_CONFIG sdk_config.h) +mcu_nrf51_create_softdevice(TARGET ${T}-softdevice SOFTDEVICE s130 SDK_CONFIG sdk_config.h) + +target_link_libraries(${T}-ble ${T}-softdevice) +]] + +#[[ +target_sources(${T} PUBLIC + ${MCU_NRF51_SDK_PATH}/components/ble/ble_services/ble_dfu/ble_dfu.c) + +target_include_directories(${T} + PUBLIC ${MCU_NRF51_SDK_PATH}/components/libraries/util) +]] |