diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2016-09-11 11:46:21 +0200 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2016-09-11 11:46:21 +0200 |
commit | 82ca0c1af744cb2b4b7f5680f3866f5ed7ee0270 (patch) | |
tree | f44588f0c9a59fb0bac7dbfb44dabefa301eb205 /examples/ble_app_buttonless_dfu/CMakeLists.txt | |
download | nrf-playground-82ca0c1af744cb2b4b7f5680f3866f5ed7ee0270.tar.gz nrf-playground-82ca0c1af744cb2b4b7f5680f3866f5ed7ee0270.tar.bz2 nrf-playground-82ca0c1af744cb2b4b7f5680f3866f5ed7ee0270.tar.xz nrf-playground-82ca0c1af744cb2b4b7f5680f3866f5ed7ee0270.zip |
o Almost working version, not quite. Probably not the right way to do stuff.
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) +]] |