This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

cmake sample

Hi,

As of now we are using SEGGER Embedded Studio for compilation and Flashing.

Now we would like to copile using Cmake tool, can you please provide template Cmake for any of the existing any of the example project so that I can look into it and build for our project.

Thanks in advance

Parents
  • Hi again! Here is a template.

    cmake_minimum_required (VERSION 2.6)
    project(ble_app_template_pca10040_s132 C ASM)
    set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
    set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "")
    set(PROJECT_ROOT_FOLDER "~/sdk/16.0.0/examples/custom/cmake_template/pca10040/s132/armgcc")
    set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
    add_definitions(
    	-DAPP_TIMER_V2
    	-DAPP_TIMER_V2_RTC1_ENABLED
    	-DBOARD_PCA10040
    	-DCONFIG_GPIO_AS_PINRESET
    	-DFLOAT_ABI_HARD
    	-DNRF52
    	-DNRF52832_XXAA
    	-DNRF52_PAN_74
    	-DNRF_SD_BLE_API_VERSION=7
    	-DS132
    	-DSOFTDEVICE_PRESENT
    )
    include_directories(
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/nfc/ndef/generic/message
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/nfc/t2t_lib
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/nfc/t4t_parser/hl_detection_procedure
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/ble_services/ble_ancs_c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/ble_services/ble_ias_c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/pwm
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/softdevice/s132/headers/nrf52
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/usbd/class/cdc/acm
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/usbd/class/hid/generic
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/usbd/class/msc
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/usbd/class/hid
    	${PROJECT_ROOT_FOLDER}/../../../../../../modules/nrfx/hal
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/nfc/ndef/conn_hand_parser/le_oob_rec_parser
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/log
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/ble_services/ble_gls
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/fstorage
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/nfc/ndef/text
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/mutex
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/gpiote
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/bootloader/ble_dfu
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/nfc/ndef/connection_handover/common
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/boards
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/nfc/ndef/generic/record
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/nfc/t4t_parser/cc_file
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/ble_advertising
    	${PROJECT_ROOT_FOLDER}/../../../../../../external/utf_converter
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/ble_services/ble_bas_c
    	${PROJECT_ROOT_FOLDER}/../../../../../../modules/nrfx/drivers/include
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/experimental_task_manager
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/ble_services/ble_hrs_c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/nfc/ndef/connection_handover/le_oob_rec
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/queue
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/pwr_mgmt
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/ble_dtm
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/toolchain/cmsis/include
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/ble_services/ble_rscs_c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/common
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/ble_services/ble_lls
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/nfc/platform
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/bsp
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/nfc/ndef/connection_handover/ac_rec
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/ble_services/ble_bas
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/mpu
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/experimental_section_vars
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/softdevice/s132/headers
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/ble_services/ble_ans_c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/slip
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/delay
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/csense_drv
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/memobj
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/ble_services/ble_nus_c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/softdevice/common
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/ble_services/ble_ias
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/usbd/class/hid/mouse
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/low_power_pwm
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/nfc/ndef/conn_hand_parser/ble_oob_advdata_parser
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/ble_services/ble_dfu
    	${PROJECT_ROOT_FOLDER}/../../../../../../external/fprintf
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/svc
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/atomic
    	${PROJECT_ROOT_FOLDER}/../../../../../../components
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/scheduler
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/cli
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/ble_services/ble_lbs
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/ble_services/ble_hts
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/crc16
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/nfc/t4t_parser/apdu
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/util
    	${PROJECT_ROOT_FOLDER}/../config
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/usbd/class/cdc
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/csense
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/balloc
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/ecc
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/hardfault
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/ble_services/ble_cscs
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/hci
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/timer
    	${PROJECT_ROOT_FOLDER}/../../../../../../integration/nrfx
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/nfc/t4t_parser/tlv
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/sortlist
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/spi_mngr
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/led_softblink
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/nfc/ndef/conn_hand_parser
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/sdcard
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/nfc/ndef/parser/record
    	${PROJECT_ROOT_FOLDER}/../../../../../../modules/nrfx/mdk
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/ble_services/ble_cts_c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/ble_services/ble_nus
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/twi_mngr
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/ble_services/ble_hids
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/strerror
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/crc32
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/nfc/ndef/connection_handover/ble_oob_advdata
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/nfc/t2t_parser
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/nfc/ndef/connection_handover/ble_pair_msg
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/usbd/class/audio
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/sensorsim
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/nfc/t4t_lib
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/peer_manager
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/mem_manager
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/ringbuf
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/ble_services/ble_tps
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/nfc/ndef/parser/message
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/ble_services/ble_dis
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/nfc/ndef/uri
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/nrf_ble_gatt
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/nrf_ble_qwr
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/gfx
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/button
    	${PROJECT_ROOT_FOLDER}/../../../../../../modules/nrfx
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/twi_sensor
    	${PROJECT_ROOT_FOLDER}/../../../../../../integration/nrfx/legacy
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/usbd/class/hid/kbd
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/nfc/ndef/connection_handover/ep_oob_rec
    	${PROJECT_ROOT_FOLDER}/../../../../../../external/segger_rtt
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/atomic_fifo
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/ble_services/ble_lbs_c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/nfc/ndef/connection_handover/ble_pair_lib
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/crypto
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/ble_racp
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/fds
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/nfc/ndef/launchapp
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/atomic_flags
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/ble_services/ble_hrs
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/ble_services/ble_rscs
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/nfc/ndef/connection_handover/hs_rec
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/usbd
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/nfc/ndef/conn_hand_parser/ac_rec_parser
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/stack_guard
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/log/src
    )
    set(SOURCE_FILES
    	${PROJECT_ROOT_FOLDER}/../../../../../../modules/nrfx/mdk/gcc_startup_nrf52.S
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/log/src/nrf_log_backend_rtt.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/log/src/nrf_log_backend_serial.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/log/src/nrf_log_backend_uart.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/log/src/nrf_log_default_backends.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/log/src/nrf_log_frontend.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/log/src/nrf_log_str_formatter.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/button/app_button.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/util/app_error.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/util/app_error_handler_gcc.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/util/app_error_weak.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/scheduler/app_scheduler.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/timer/app_timer2.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/util/app_util_platform.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/crc16/crc16.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/timer/drv_rtc.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/fds/fds.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/hardfault/hardfault_implementation.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/util/nrf_assert.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/atomic_fifo/nrf_atfifo.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/atomic_flags/nrf_atflags.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/atomic/nrf_atomic.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/balloc/nrf_balloc.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../external/fprintf/nrf_fprintf.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../external/fprintf/nrf_fprintf_format.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/fstorage/nrf_fstorage.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/fstorage/nrf_fstorage_sd.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/memobj/nrf_memobj.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/pwr_mgmt/nrf_pwr_mgmt.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/ringbuf/nrf_ringbuf.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/experimental_section_vars/nrf_section_iter.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/sortlist/nrf_sortlist.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/strerror/nrf_strerror.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/sensorsim/sensorsim.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../modules/nrfx/mdk/system_nrf52.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/boards/boards.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../integration/nrfx/legacy/nrf_drv_clock.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../integration/nrfx/legacy/nrf_drv_uart.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../modules/nrfx/soc/nrfx_atomic.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../modules/nrfx/drivers/src/nrfx_clock.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../modules/nrfx/drivers/src/nrfx_gpiote.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../modules/nrfx/drivers/src/prs/nrfx_prs.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../modules/nrfx/drivers/src/nrfx_uart.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../modules/nrfx/drivers/src/nrfx_uarte.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/bsp/bsp.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/bsp/bsp_btn_ble.c
    	${PROJECT_ROOT_FOLDER}/../../../main.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../external/segger_rtt/SEGGER_RTT.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../external/segger_rtt/SEGGER_RTT_Syscalls_GCC.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../external/segger_rtt/SEGGER_RTT_printf.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/peer_manager/auth_status_tracker.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/common/ble_advdata.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/ble_advertising/ble_advertising.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/common/ble_conn_params.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/common/ble_conn_state.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/common/ble_srv_common.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/peer_manager/gatt_cache_manager.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/peer_manager/gatts_cache_manager.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/peer_manager/id_manager.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/nrf_ble_gatt/nrf_ble_gatt.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/nrf_ble_qwr/nrf_ble_qwr.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/peer_manager/peer_data_storage.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/peer_manager/peer_database.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/peer_manager/peer_id.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/peer_manager/peer_manager.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/peer_manager/peer_manager_handler.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/peer_manager/pm_buffer.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/peer_manager/security_dispatcher.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/peer_manager/security_manager.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../external/utf_converter/utf.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/softdevice/common/nrf_sdh.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/softdevice/common/nrf_sdh_ble.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/softdevice/common/nrf_sdh_soc.c
    )
    set(CMAKE_C_FLAGS " -O3 -g3 -mcpu=cortex-m4 -mthumb -mabi=aapcs -Wall -Werror -mfloat-abi=hard -mfpu=fpv4-sp-d16 -ffunction-sections -fdata-sections -fno-strict-aliasing -fno-builtin -fshort-enums")
    
    set(LINKER_SCRIPT ${PROJECT_ROOT_FOLDER}/ble_app_template_gcc_nrf52.ld)
    set(CMAKE_EXE_LINKER_FLAGS " -O3 -g3 -mthumb -mabi=aapcs -L${PROJECT_ROOT_FOLDER}/../../../../../../modules/nrfx/mdk -T../ble_app_template_gcc_nrf52.ld -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -Wl,--gc-sections --specs=nano.specs")
    
    set(CMAKE_ASM_FLAGS " -g3 -mcpu=cortex-m4 -mthumb -mabi=aapcs -mfloat-abi=hard -mfpu=fpv4-sp-d16")
    
    add_executable(${PROJECT_NAME}.elf ${SOURCE_FILES})
    
    set(HEX_FILE ${PROJECT_NAME}.hex)
    set(BIN_FILE ${PROJECT_NAME}.bin)
    
    add_custom_command(TARGET ${PROJECT_NAME}.elf POST_BUILD
    	COMMAND ${OBJCOPY} -Oihex $<TARGET_FILE:${PROJECT_NAME}.elf> ${HEX_FILE}
    	COMMAND ${OBJCOPY} -Obinary $<TARGET_FILE:${PROJECT_NAME}.elf> ${BIN_FILE}
    	COMMENT "Building ${HEX_FILE} \nBuilding ${BIN_FILE}"
    )
    

    Best regards,

    Heidi

Reply
  • Hi again! Here is a template.

    cmake_minimum_required (VERSION 2.6)
    project(ble_app_template_pca10040_s132 C ASM)
    set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
    set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "")
    set(PROJECT_ROOT_FOLDER "~/sdk/16.0.0/examples/custom/cmake_template/pca10040/s132/armgcc")
    set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
    add_definitions(
    	-DAPP_TIMER_V2
    	-DAPP_TIMER_V2_RTC1_ENABLED
    	-DBOARD_PCA10040
    	-DCONFIG_GPIO_AS_PINRESET
    	-DFLOAT_ABI_HARD
    	-DNRF52
    	-DNRF52832_XXAA
    	-DNRF52_PAN_74
    	-DNRF_SD_BLE_API_VERSION=7
    	-DS132
    	-DSOFTDEVICE_PRESENT
    )
    include_directories(
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/nfc/ndef/generic/message
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/nfc/t2t_lib
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/nfc/t4t_parser/hl_detection_procedure
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/ble_services/ble_ancs_c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/ble_services/ble_ias_c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/pwm
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/softdevice/s132/headers/nrf52
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/usbd/class/cdc/acm
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/usbd/class/hid/generic
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/usbd/class/msc
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/usbd/class/hid
    	${PROJECT_ROOT_FOLDER}/../../../../../../modules/nrfx/hal
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/nfc/ndef/conn_hand_parser/le_oob_rec_parser
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/log
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/ble_services/ble_gls
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/fstorage
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/nfc/ndef/text
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/mutex
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/gpiote
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/bootloader/ble_dfu
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/nfc/ndef/connection_handover/common
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/boards
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/nfc/ndef/generic/record
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/nfc/t4t_parser/cc_file
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/ble_advertising
    	${PROJECT_ROOT_FOLDER}/../../../../../../external/utf_converter
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/ble_services/ble_bas_c
    	${PROJECT_ROOT_FOLDER}/../../../../../../modules/nrfx/drivers/include
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/experimental_task_manager
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/ble_services/ble_hrs_c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/nfc/ndef/connection_handover/le_oob_rec
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/queue
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/pwr_mgmt
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/ble_dtm
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/toolchain/cmsis/include
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/ble_services/ble_rscs_c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/common
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/ble_services/ble_lls
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/nfc/platform
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/bsp
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/nfc/ndef/connection_handover/ac_rec
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/ble_services/ble_bas
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/mpu
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/experimental_section_vars
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/softdevice/s132/headers
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/ble_services/ble_ans_c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/slip
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/delay
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/csense_drv
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/memobj
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/ble_services/ble_nus_c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/softdevice/common
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/ble_services/ble_ias
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/usbd/class/hid/mouse
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/low_power_pwm
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/nfc/ndef/conn_hand_parser/ble_oob_advdata_parser
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/ble_services/ble_dfu
    	${PROJECT_ROOT_FOLDER}/../../../../../../external/fprintf
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/svc
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/atomic
    	${PROJECT_ROOT_FOLDER}/../../../../../../components
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/scheduler
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/cli
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/ble_services/ble_lbs
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/ble_services/ble_hts
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/crc16
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/nfc/t4t_parser/apdu
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/util
    	${PROJECT_ROOT_FOLDER}/../config
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/usbd/class/cdc
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/csense
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/balloc
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/ecc
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/hardfault
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/ble_services/ble_cscs
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/hci
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/timer
    	${PROJECT_ROOT_FOLDER}/../../../../../../integration/nrfx
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/nfc/t4t_parser/tlv
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/sortlist
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/spi_mngr
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/led_softblink
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/nfc/ndef/conn_hand_parser
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/sdcard
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/nfc/ndef/parser/record
    	${PROJECT_ROOT_FOLDER}/../../../../../../modules/nrfx/mdk
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/ble_services/ble_cts_c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/ble_services/ble_nus
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/twi_mngr
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/ble_services/ble_hids
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/strerror
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/crc32
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/nfc/ndef/connection_handover/ble_oob_advdata
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/nfc/t2t_parser
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/nfc/ndef/connection_handover/ble_pair_msg
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/usbd/class/audio
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/sensorsim
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/nfc/t4t_lib
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/peer_manager
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/mem_manager
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/ringbuf
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/ble_services/ble_tps
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/nfc/ndef/parser/message
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/ble_services/ble_dis
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/nfc/ndef/uri
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/nrf_ble_gatt
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/nrf_ble_qwr
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/gfx
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/button
    	${PROJECT_ROOT_FOLDER}/../../../../../../modules/nrfx
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/twi_sensor
    	${PROJECT_ROOT_FOLDER}/../../../../../../integration/nrfx/legacy
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/usbd/class/hid/kbd
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/nfc/ndef/connection_handover/ep_oob_rec
    	${PROJECT_ROOT_FOLDER}/../../../../../../external/segger_rtt
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/atomic_fifo
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/ble_services/ble_lbs_c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/nfc/ndef/connection_handover/ble_pair_lib
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/crypto
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/ble_racp
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/fds
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/nfc/ndef/launchapp
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/atomic_flags
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/ble_services/ble_hrs
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/ble_services/ble_rscs
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/nfc/ndef/connection_handover/hs_rec
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/usbd
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/nfc/ndef/conn_hand_parser/ac_rec_parser
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/stack_guard
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/log/src
    )
    set(SOURCE_FILES
    	${PROJECT_ROOT_FOLDER}/../../../../../../modules/nrfx/mdk/gcc_startup_nrf52.S
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/log/src/nrf_log_backend_rtt.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/log/src/nrf_log_backend_serial.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/log/src/nrf_log_backend_uart.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/log/src/nrf_log_default_backends.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/log/src/nrf_log_frontend.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/log/src/nrf_log_str_formatter.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/button/app_button.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/util/app_error.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/util/app_error_handler_gcc.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/util/app_error_weak.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/scheduler/app_scheduler.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/timer/app_timer2.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/util/app_util_platform.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/crc16/crc16.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/timer/drv_rtc.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/fds/fds.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/hardfault/hardfault_implementation.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/util/nrf_assert.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/atomic_fifo/nrf_atfifo.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/atomic_flags/nrf_atflags.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/atomic/nrf_atomic.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/balloc/nrf_balloc.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../external/fprintf/nrf_fprintf.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../external/fprintf/nrf_fprintf_format.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/fstorage/nrf_fstorage.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/fstorage/nrf_fstorage_sd.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/memobj/nrf_memobj.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/pwr_mgmt/nrf_pwr_mgmt.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/ringbuf/nrf_ringbuf.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/experimental_section_vars/nrf_section_iter.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/sortlist/nrf_sortlist.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/strerror/nrf_strerror.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/sensorsim/sensorsim.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../modules/nrfx/mdk/system_nrf52.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/boards/boards.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../integration/nrfx/legacy/nrf_drv_clock.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../integration/nrfx/legacy/nrf_drv_uart.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../modules/nrfx/soc/nrfx_atomic.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../modules/nrfx/drivers/src/nrfx_clock.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../modules/nrfx/drivers/src/nrfx_gpiote.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../modules/nrfx/drivers/src/prs/nrfx_prs.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../modules/nrfx/drivers/src/nrfx_uart.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../modules/nrfx/drivers/src/nrfx_uarte.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/bsp/bsp.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/bsp/bsp_btn_ble.c
    	${PROJECT_ROOT_FOLDER}/../../../main.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../external/segger_rtt/SEGGER_RTT.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../external/segger_rtt/SEGGER_RTT_Syscalls_GCC.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../external/segger_rtt/SEGGER_RTT_printf.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/peer_manager/auth_status_tracker.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/common/ble_advdata.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/ble_advertising/ble_advertising.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/common/ble_conn_params.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/common/ble_conn_state.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/common/ble_srv_common.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/peer_manager/gatt_cache_manager.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/peer_manager/gatts_cache_manager.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/peer_manager/id_manager.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/nrf_ble_gatt/nrf_ble_gatt.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/nrf_ble_qwr/nrf_ble_qwr.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/peer_manager/peer_data_storage.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/peer_manager/peer_database.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/peer_manager/peer_id.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/peer_manager/peer_manager.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/peer_manager/peer_manager_handler.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/peer_manager/pm_buffer.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/peer_manager/security_dispatcher.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/peer_manager/security_manager.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../external/utf_converter/utf.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/softdevice/common/nrf_sdh.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/softdevice/common/nrf_sdh_ble.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/softdevice/common/nrf_sdh_soc.c
    )
    set(CMAKE_C_FLAGS " -O3 -g3 -mcpu=cortex-m4 -mthumb -mabi=aapcs -Wall -Werror -mfloat-abi=hard -mfpu=fpv4-sp-d16 -ffunction-sections -fdata-sections -fno-strict-aliasing -fno-builtin -fshort-enums")
    
    set(LINKER_SCRIPT ${PROJECT_ROOT_FOLDER}/ble_app_template_gcc_nrf52.ld)
    set(CMAKE_EXE_LINKER_FLAGS " -O3 -g3 -mthumb -mabi=aapcs -L${PROJECT_ROOT_FOLDER}/../../../../../../modules/nrfx/mdk -T../ble_app_template_gcc_nrf52.ld -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -Wl,--gc-sections --specs=nano.specs")
    
    set(CMAKE_ASM_FLAGS " -g3 -mcpu=cortex-m4 -mthumb -mabi=aapcs -mfloat-abi=hard -mfpu=fpv4-sp-d16")
    
    add_executable(${PROJECT_NAME}.elf ${SOURCE_FILES})
    
    set(HEX_FILE ${PROJECT_NAME}.hex)
    set(BIN_FILE ${PROJECT_NAME}.bin)
    
    add_custom_command(TARGET ${PROJECT_NAME}.elf POST_BUILD
    	COMMAND ${OBJCOPY} -Oihex $<TARGET_FILE:${PROJECT_NAME}.elf> ${HEX_FILE}
    	COMMAND ${OBJCOPY} -Obinary $<TARGET_FILE:${PROJECT_NAME}.elf> ${BIN_FILE}
    	COMMENT "Building ${HEX_FILE} \nBuilding ${BIN_FILE}"
    )
    

    Best regards,

    Heidi

Children
  • Hi Heidi,

    Thank you for your response. I have modified the above temple for ble_app_blinky in SDK-15.3 version.

    I have installed arm-none-eabi on my laptop which is running on Windows 10 OS and below variable definitions  I have added in Environment variables.

    ARM_NONE_EABI_TOOLCHAIN_PATH = C:\Program Files (x86)\GNU Tools Arm Embedded\9 2019-q4-major

    CC = C:\Program Files (x86)\GNU Tools Arm Embedded\9 2019-q4-major\bin\arm-none-eabi-gcc.

    I am getting the below error 

    Here is my modified CMakeLists.txt file

    cmake_minimum_required (VERSION 3.14)
    project(ble_app_blinky_pca10040_s132 C ASM)
    set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
    set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "")
    set(PROJECT_ROOT_FOLDER "D:/SDK/15.3/nRF5_SDK_15.3/examples/ble_peripheral/ble_app_blinky/pca10040/s132/armgcc")
    set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
    add_definitions(
    	-DBOARD_PCA10040
    	-DCONFIG_GPIO_AS_PINRESET
    	-DFLOAT_ABI_HARD
    	-DINITIALIZE_USER_SECTIONS
    	-DNO_VTOR_CONFIG
    	-DNRF52
    	-DNRF52832_XXAA
    	-DNRF52_PAN_74
    	-DNRF_SD_BLE_API_VERSION=6
    	-DS132
    	-DSOFTDEVICE_PRESENT
    	-DSWI_DISABLE0
    )
    include_directories(
        ${PROJECT_ROOT_FOLDER}/../../../../../../components
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/ble_advertising
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/ble_dtm
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/ble_racp
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/ble_services/ble_ancs_c
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/ble_services/ble_ans_c
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/ble_services/ble_bas
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/ble_services/ble_bas_c
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/ble_services/ble_cscs
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/ble_services/ble_cts_c
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/ble_services/ble_dfu
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/ble_services/ble_dis
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/ble_services/ble_gls
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/ble_services/ble_hids
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/ble_services/ble_hrs
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/ble_services/ble_hrs_c
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/ble_services/ble_hts
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/ble_services/ble_ias
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/ble_services/ble_ias_c
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/ble_services/ble_lbs
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/ble_services/ble_lbs_c
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/ble_services/ble_lls
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/ble_services/ble_nus
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/ble_services/ble_nus_c
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/ble_services/ble_rscs
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/ble_services/ble_rscs_c
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/ble_services/ble_tps
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/common
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/nrf_ble_gatt
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/nrf_ble_qwr
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/peer_manager
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/boards
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/atomic
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/atomic_fifo
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/atomic_flags
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/balloc
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/bootloader/ble_dfu
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/button
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/cli
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/crc16
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/crc32
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/crypto
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/csense
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/csense_drv
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/delay
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/ecc
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/experimental_section_vars
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/experimental_task_manager
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/fds
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/fstorage
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/gfx
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/gpiote
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/hardfault
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/hci
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/led_softblink
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/log
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/log/src
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/low_power_pwm
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/mem_manager
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/memobj
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/mpu
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/mutex
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/pwm
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/pwr_mgmt
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/queue
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/ringbuf
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/scheduler
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/sdcard
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/slip
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/sortlist
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/spi_mngr
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/stack_guard
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/strerror
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/svc
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/timer
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/twi_mngr
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/twi_sensor
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/usbd
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/usbd/class/audio
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/usbd/class/cdc
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/usbd/class/cdc/acm
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/usbd/class/hid
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/usbd/class/hid/generic
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/usbd/class/hid/kbd
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/usbd/class/hid/mouse
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/usbd/class/msc
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/util
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/nfc/ndef/conn_hand_parser
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/nfc/ndef/conn_hand_parser/ac_rec_parser
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/nfc/ndef/conn_hand_parser/ble_oob_advdata_parser
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/nfc/ndef/conn_hand_parser/le_oob_rec_parser
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/nfc/ndef/connection_handover/ac_rec
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/nfc/ndef/connection_handover/ble_oob_advdata
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/nfc/ndef/connection_handover/ble_pair_lib
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/nfc/ndef/connection_handover/ble_pair_msg
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/nfc/ndef/connection_handover/common
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/nfc/ndef/connection_handover/ep_oob_rec
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/nfc/ndef/connection_handover/hs_rec
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/nfc/ndef/connection_handover/le_oob_rec
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/nfc/ndef/generic/message
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/nfc/ndef/generic/record
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/nfc/ndef/launchapp
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/nfc/ndef/parser/message
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/nfc/ndef/parser/record
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/nfc/ndef/text
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/nfc/ndef/uri
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/nfc/t2t_lib
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/nfc/t2t_parser
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/nfc/t4t_lib
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/nfc/t4t_parser/apdu
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/nfc/t4t_parser/cc_file
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/nfc/t4t_parser/hl_detection_procedure
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/nfc/t4t_parser/tlv
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/softdevice/common
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/softdevice/s132/headers
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/softdevice/s132/headers/nrf52
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/toolchain/cmsis/include
        ${PROJECT_ROOT_FOLDER}/../../../../../../external/fprintf
        ${PROJECT_ROOT_FOLDER}/../../../../../../external/segger_rtt
        ${PROJECT_ROOT_FOLDER}/../../../../../../external/utf_converter
        ${PROJECT_ROOT_FOLDER}/../../../../../../integration/nrfx
        ${PROJECT_ROOT_FOLDER}/../../../../../../integration/nrfx/legacy
        ${PROJECT_ROOT_FOLDER}/../../../../../../modules/nrfx
        ${PROJECT_ROOT_FOLDER}/../../../../../../modules/nrfx/drivers/include
        ${PROJECT_ROOT_FOLDER}/../../../../../../modules/nrfx/hal
        ${PROJECT_ROOT_FOLDER}/../../../../../../modules/nrfx/mdk
        ${PROJECT_ROOT_FOLDER}/../config
    )
    set(SOURCE_FILES
    	${PROJECT_ROOT_FOLDER}/../../../../../../modules/nrfx/mdk/gcc_startup_nrf52.S
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/log/src/nrf_log_backend_rtt.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/log/src/nrf_log_backend_serial.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/log/src/nrf_log_backend_uart.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/log/src/nrf_log_default_backends.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/log/src/nrf_log_frontend.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/log/src/nrf_log_str_formatter.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/button/app_button.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/util/app_error.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/util/app_error_handler_gcc.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/util/app_error_weak.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/scheduler/app_scheduler.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/timer/app_timer.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/util/app_util_platform.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/hardfault/hardfault_implementation.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/util/nrf_assert.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/atomic_fifo/nrf_atfifo.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/atomic_flags/nrf_atflags.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/atomic/nrf_atomic.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/balloc/nrf_balloc.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../external/fprintf/nrf_fprintf.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../external/fprintf/nrf_fprintf_format.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/memobj/nrf_memobj.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/pwr_mgmt/nrf_pwr_mgmt.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/ringbuf/nrf_ringbuf.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/experimental_section_vars/nrf_section_iter.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/libraries/strerror/nrf_strerror.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../modules/nrfx/mdk/system_nrf52.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/boards/boards.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../integration/nrfx/legacy/nrf_drv_clock.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../integration/nrfx/legacy/nrf_drv_uart.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../modules/nrfx/soc/nrfx_atomic.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../modules/nrfx/drivers/src/nrfx_clock.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../modules/nrfx/drivers/src/nrfx_gpiote.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../modules/nrfx/drivers/src/prs/nrfx_prs.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../modules/nrfx/drivers/src/nrfx_uart.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../modules/nrfx/drivers/src/nrfx_uarte.c
    	${PROJECT_ROOT_FOLDER}/../../../main.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../external/segger_rtt/SEGGER_RTT.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../external/segger_rtt/SEGGER_RTT_Syscalls_GCC.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../external/segger_rtt/SEGGER_RTT_printf.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/common/ble_advdata.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/ble_advertising/ble_advertising.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/common/ble_conn_params.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/common/ble_conn_state.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/common/ble_srv_common.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/nrf_ble_gatt/nrf_ble_gatt.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/nrf_ble_qwr/nrf_ble_qwr.c
        ${PROJECT_ROOT_FOLDER}/../../../../../../components/ble/ble_services/ble_lbs/ble_lbs.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../external/utf_converter/utf.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/softdevice/common/nrf_sdh.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/softdevice/common/nrf_sdh_ble.c
    	${PROJECT_ROOT_FOLDER}/../../../../../../components/softdevice/common/nrf_sdh_soc.c
    )
    set(CMAKE_C_FLAGS " -O3 -g3 -mcpu=cortex-m4 -mthumb -mabi=aapcs -Wall -Werror -mfloat-abi=hard -mfpu=fpv4-sp-d16 -ffunction-sections -fdata-sections -fno-strict-aliasing -fno-builtin -fshort-enums")
    
    set(LINKER_SCRIPT ${PROJECT_ROOT_FOLDER}/ble_app_blinky_gcc_nrf52.ld)
    set(CMAKE_EXE_LINKER_FLAGS " -O3 -g3 -mthumb -mabi=aapcs -L${PROJECT_ROOT_FOLDER}/../../../../../../modules/nrfx/mdk -T../ble_app_blinky_gcc_nrf52.ld -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -Wl,--gc-sections --specs=nano.specs")
    
    set(CMAKE_ASM_FLAGS " -g3 -mcpu=cortex-m4 -mthumb -mabi=aapcs -mfloat-abi=hard -mfpu=fpv4-sp-d16")
    
    add_executable(${PROJECT_NAME}.elf ${SOURCE_FILES})
    
    set(HEX_FILE ${PROJECT_NAME}.hex)
    set(BIN_FILE ${PROJECT_NAME}.bin)
    
    add_custom_command(TARGET ${PROJECT_NAME}.elf POST_BUILD
    	COMMAND ${OBJCOPY} -Oihex $<TARGET_FILE:${PROJECT_NAME}.elf> ${HEX_FILE}
    	COMMAND ${OBJCOPY} -Obinary $<TARGET_FILE:${PROJECT_NAME}.elf> ${BIN_FILE}
    	COMMENT "Building ${HEX_FILE} \nBuilding ${BIN_FILE}"
    )
    

    Log files

    Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
    Compiler: C:/Program Files (x86)/GNU Tools Arm Embedded/9 2019-q4-major/bin/arm-none-eabi-gcc.exe 
    Build flags: 
    Id flags:  
    
    The output was:
    1
    c:/program files (x86)/gnu tools arm embedded/9 2019-q4-major/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: c:/program files (x86)/gnu tools arm embedded/9 2019-q4-major/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/lib\libc.a(lib_a-exit.o): in function `exit':
    exit.c:(.text.exit+0x2c): undefined reference to `_exit'
    collect2.exe: error: ld returned 1 exit status
    
    
    Determining if the C compiler works failed with the following output:
    Change Dir: D:/SDK/15.3/nRF5_SDK_15.3/examples/ble_peripheral/ble_app_blinky/cmake-build/CMakeFiles/CMakeTmp
    
    Run Build Command(s):C:/MinGW/bin/mingw32-make.exe cmTC_f7474/fast 
    C:/MinGW/bin/mingw32-make.exe -f CMakeFiles\cmTC_f7474.dir\build.make CMakeFiles/cmTC_f7474.dir/build
    
    mingw32-make.exe[1]: Entering directory 'D:/SDK/15.3/nRF5_SDK_15.3/examples/ble_peripheral/ble_app_blinky/cmake-build/CMakeFiles/CMakeTmp'
    
    Building C object CMakeFiles/cmTC_f7474.dir/testCCompiler.c.obj
    
    C:\PROGRA~2\GNUTOO~1\92019-~1\bin\AR19DD~1.EXE    -o CMakeFiles\cmTC_f7474.dir\testCCompiler.c.obj   -c D:\SDK\15.3\nRF5_SDK_15.3\examples\ble_peripheral\ble_app_blinky\cmake-build\CMakeFiles\CMakeTmp\testCCompiler.c
    
    Linking C executable cmTC_f7474.exe
    
    "C:\Program Files\CMake\bin\cmake.exe" -E cmake_link_script CMakeFiles\cmTC_f7474.dir\link.txt --verbose=1
    
    "C:\Program Files\CMake\bin\cmake.exe" -E remove -f CMakeFiles\cmTC_f7474.dir/objects.a
    CMAKE_AR-NOTFOUND cr CMakeFiles\cmTC_f7474.dir/objects.a @CMakeFiles\cmTC_f7474.dir\objects1.rsp
    Error running link command: The system cannot find the file specified
    CMakeFiles\cmTC_f7474.dir\build.make:86: recipe for target 'cmTC_f7474.exe' failed
    
    mingw32-make.exe[1]: *** [cmTC_f7474.exe] Error 2
    
    mingw32-make.exe[1]: Leaving directory 'D:/SDK/15.3/nRF5_SDK_15.3/examples/ble_peripheral/ble_app_blinky/cmake-build/CMakeFiles/CMakeTmp'
    
    Makefile:120: recipe for target 'cmTC_f7474/fast' failed
    
    mingw32-make.exe: *** [cmTC_f7474/fast] Error 2
    
    
    
    
    The system is: Windows - 10.0.17763 - AMD64
    Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded.
    Compiler: C:/Program Files (x86)/GNU Tools Arm Embedded/9 2019-q4-major/bin/arm-none-eabi-gcc.exe 
    Build flags: 
    Id flags: -c 
    
    The output was:
    0
    
    
    Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "CMakeCCompilerId.o"
    
    The C compiler identification is GNU, found in "D:/SDK/15.3/nRF5_SDK_15.3/examples/ble_peripheral/ble_app_blinky/cmake-build/CMakeFiles/3.14.0-rc2/CompilerIdC/CMakeCCompilerId.o"
    
    Checking whether the ASM compiler is GNU using "--version" matched "(GNU assembler)|(GCC)|(Free Software Foundation)":
    arm-none-eabi-gcc.exe (GNU Tools for Arm Embedded Processors 9-2019-q4-major) 9.2.1 20191025 (release) [ARM/arm-9-branch revision 277599]
    Copyright (C) 2019 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.  There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    
    

    # This is the CMakeCache file.
    # For build in directory: d:/SDK/15.3/nRF5_SDK_15.3/examples/ble_peripheral/ble_app_blinky/cmake-build
    # It was generated by CMake: C:/Program Files/CMake/bin/cmake.exe
    # You can edit this file to change values found and used by cmake.
    # If you do not want to change any of the values, simply exit the editor.
    # If you do want to change a value, simply edit, save, and exit the editor.
    # The syntax for the file is as follows:
    # KEY:TYPE=VALUE
    # KEY is the name of a variable in the cache.
    # TYPE is a hint to GUIs for the type of VALUE, DO NOT EDIT TYPE!.
    # VALUE is the current value for the KEY.
    
    ########################
    # EXTERNAL cache entries
    ########################
    
    //Path to a program.
    CMAKE_AR:FILEPATH=C:/Program Files (x86)/GNU Tools Arm Embedded/9 2019-q4-major/bin/arm-none-eabi-ar.exe
    
    //ASM compiler
    CMAKE_ASM_COMPILER:FILEPATH=C:/Program Files (x86)/GNU Tools Arm Embedded/9 2019-q4-major/bin/arm-none-eabi-gcc.exe
    
    //A wrapper around 'ar' adding the appropriate '--plugin' option
    // for the GCC compiler
    CMAKE_ASM_COMPILER_AR:FILEPATH=C:/Program Files (x86)/GNU Tools Arm Embedded/9 2019-q4-major/bin/arm-none-eabi-gcc-ar.exe
    
    //A wrapper around 'ranlib' adding the appropriate '--plugin' option
    // for the GCC compiler
    CMAKE_ASM_COMPILER_RANLIB:FILEPATH=C:/Program Files (x86)/GNU Tools Arm Embedded/9 2019-q4-major/bin/arm-none-eabi-gcc-ranlib.exe
    
    //Choose the type of build, options are: None Debug Release RelWithDebInfo
    // MinSizeRel ...
    CMAKE_BUILD_TYPE:STRING=
    
    //Enable/Disable color output during build.
    CMAKE_COLOR_MAKEFILE:BOOL=ON
    
    //C compiler
    CMAKE_C_COMPILER:FILEPATH=C:/Program Files (x86)/GNU Tools Arm Embedded/9 2019-q4-major/bin/arm-none-eabi-gcc.exe
    
    //A wrapper around 'ar' adding the appropriate '--plugin' option
    // for the GCC compiler
    CMAKE_C_COMPILER_AR:FILEPATH=CMAKE_C_COMPILER_AR-NOTFOUND
    
    //A wrapper around 'ranlib' adding the appropriate '--plugin' option
    // for the GCC compiler
    CMAKE_C_COMPILER_RANLIB:FILEPATH=CMAKE_C_COMPILER_RANLIB-NOTFOUND
    
    //Flags used by the C compiler during all build types.
    CMAKE_C_FLAGS:STRING=
    
    //Flags used by the C compiler during DEBUG builds.
    CMAKE_C_FLAGS_DEBUG:STRING=-g
    
    //Flags used by the C compiler during MINSIZEREL builds.
    CMAKE_C_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG
    
    //Flags used by the C compiler during RELEASE builds.
    CMAKE_C_FLAGS_RELEASE:STRING=-O3 -DNDEBUG
    
    //Flags used by the C compiler during RELWITHDEBINFO builds.
    CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG
    
    //Flags used by the linker during all build types.
    CMAKE_EXE_LINKER_FLAGS:STRING=
    
    //Flags used by the linker during DEBUG builds.
    CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING=
    
    //Flags used by the linker during MINSIZEREL builds.
    CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING=
    
    //Flags used by the linker during RELEASE builds.
    CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING=
    
    //Flags used by the linker during RELWITHDEBINFO builds.
    CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING=
    
    //Install path prefix, prepended onto install directories.
    CMAKE_INSTALL_PREFIX:PATH=C:/Program Files (x86)/ble_app_blinky_pca10040_s132
    
    //Path to a program.
    CMAKE_LINKER:FILEPATH=C:/Program Files (x86)/GNU Tools Arm Embedded/9 2019-q4-major/bin/arm-none-eabi-ld.exe
    
    //Path to a program.
    CMAKE_MAKE_PROGRAM:FILEPATH=C:/MinGW/bin/mingw32-make.exe
    
    //Flags used by the linker during the creation of modules during
    // all build types.
    CMAKE_MODULE_LINKER_FLAGS:STRING=
    
    //Flags used by the linker during the creation of modules during
    // DEBUG builds.
    CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING=
    
    //Flags used by the linker during the creation of modules during
    // MINSIZEREL builds.
    CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING=
    
    //Flags used by the linker during the creation of modules during
    // RELEASE builds.
    CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING=
    
    //Flags used by the linker during the creation of modules during
    // RELWITHDEBINFO builds.
    CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING=
    
    //Path to a program.
    CMAKE_NM:FILEPATH=C:/Program Files (x86)/GNU Tools Arm Embedded/9 2019-q4-major/bin/arm-none-eabi-nm.exe
    
    //Path to a program.
    CMAKE_OBJCOPY:FILEPATH=C:/Program Files (x86)/GNU Tools Arm Embedded/9 2019-q4-major/bin/arm-none-eabi-objcopy.exe
    
    //Path to a program.
    CMAKE_OBJDUMP:FILEPATH=C:/Program Files (x86)/GNU Tools Arm Embedded/9 2019-q4-major/bin/arm-none-eabi-objdump.exe
    
    //Value Computed by CMake
    CMAKE_PROJECT_DESCRIPTION:STATIC=
    
    //Value Computed by CMake
    CMAKE_PROJECT_HOMEPAGE_URL:STATIC=
    
    //Value Computed by CMake
    CMAKE_PROJECT_NAME:STATIC=ble_app_blinky_pca10040_s132
    
    //RC compiler
    CMAKE_RC_COMPILER:FILEPATH=C:/MinGW/bin/windres.exe
    
    //Flags for Windows Resource Compiler during all build types.
    CMAKE_RC_FLAGS:STRING=
    
    //Flags for Windows Resource Compiler during DEBUG builds.
    CMAKE_RC_FLAGS_DEBUG:STRING=
    
    //Flags for Windows Resource Compiler during MINSIZEREL builds.
    CMAKE_RC_FLAGS_MINSIZEREL:STRING=
    
    //Flags for Windows Resource Compiler during RELEASE builds.
    CMAKE_RC_FLAGS_RELEASE:STRING=
    
    //Flags for Windows Resource Compiler during RELWITHDEBINFO builds.
    CMAKE_RC_FLAGS_RELWITHDEBINFO:STRING=
    
    //Path to a program.
    CMAKE_SH:FILEPATH=CMAKE_SH-NOTFOUND
    
    //Flags used by the linker during the creation of shared libraries
    // during all build types.
    CMAKE_SHARED_LINKER_FLAGS:STRING=
    
    //Flags used by the linker during the creation of shared libraries
    // during DEBUG builds.
    CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING=
    
    //Flags used by the linker during the creation of shared libraries
    // during MINSIZEREL builds.
    CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING=
    
    //Flags used by the linker during the creation of shared libraries
    // during RELEASE builds.
    CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING=
    
    //Flags used by the linker during the creation of shared libraries
    // during RELWITHDEBINFO builds.
    CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING=
    
    //If set, runtime paths are not added when installing shared libraries,
    // but are added when building.
    CMAKE_SKIP_INSTALL_RPATH:BOOL=NO
    
    //If set, runtime paths are not added when using shared libraries.
    CMAKE_SKIP_RPATH:BOOL=NO
    
    //Flags used by the linker during the creation of static libraries
    // during all build types.
    CMAKE_STATIC_LINKER_FLAGS:STRING=
    
    //Flags used by the linker during the creation of static libraries
    // during DEBUG builds.
    CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING=
    
    //Flags used by the linker during the creation of static libraries
    // during MINSIZEREL builds.
    CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL:STRING=
    
    //Flags used by the linker during the creation of static libraries
    // during RELEASE builds.
    CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING=
    
    //Flags used by the linker during the creation of static libraries
    // during RELWITHDEBINFO builds.
    CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING=
    
    //Path to a program.
    CMAKE_STRIP:FILEPATH=C:/Program Files (x86)/GNU Tools Arm Embedded/9 2019-q4-major/bin/arm-none-eabi-strip.exe
    
    //If this value is on, makefiles will be generated without the
    // .SILENT directive, and all commands will be echoed to the console
    // during the make.  This is useful for debugging only. With Visual
    // Studio IDE projects all commands are done without /nologo.
    CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE
    
    //Value Computed by CMake
    ble_app_blinky_pca10040_s132_BINARY_DIR:STATIC=D:/SDK/15.3/nRF5_SDK_15.3/examples/ble_peripheral/ble_app_blinky/cmake-build
    
    //Value Computed by CMake
    ble_app_blinky_pca10040_s132_SOURCE_DIR:STATIC=D:/SDK/15.3/nRF5_SDK_15.3/examples/ble_peripheral/ble_app_blinky
    
    
    ########################
    # INTERNAL cache entries
    ########################
    
    //ADVANCED property for variable: CMAKE_AR
    CMAKE_AR-ADVANCED:INTERNAL=1
    //ADVANCED property for variable: CMAKE_ASM_COMPILER
    CMAKE_ASM_COMPILER-ADVANCED:INTERNAL=1
    //ADVANCED property for variable: CMAKE_ASM_COMPILER_AR
    CMAKE_ASM_COMPILER_AR-ADVANCED:INTERNAL=1
    //ADVANCED property for variable: CMAKE_ASM_COMPILER_RANLIB
    CMAKE_ASM_COMPILER_RANLIB-ADVANCED:INTERNAL=1
    //This is the directory where this CMakeCache.txt was created
    CMAKE_CACHEFILE_DIR:INTERNAL=d:/SDK/15.3/nRF5_SDK_15.3/examples/ble_peripheral/ble_app_blinky/cmake-build
    //Major version of cmake used to create the current loaded cache
    CMAKE_CACHE_MAJOR_VERSION:INTERNAL=3
    //Minor version of cmake used to create the current loaded cache
    CMAKE_CACHE_MINOR_VERSION:INTERNAL=14
    //Patch version of cmake used to create the current loaded cache
    CMAKE_CACHE_PATCH_VERSION:INTERNAL=0
    //ADVANCED property for variable: CMAKE_COLOR_MAKEFILE
    CMAKE_COLOR_MAKEFILE-ADVANCED:INTERNAL=1
    //Path to CMake executable.
    CMAKE_COMMAND:INTERNAL=C:/Program Files/CMake/bin/cmake.exe
    //Path to cpack program executable.
    CMAKE_CPACK_COMMAND:INTERNAL=C:/Program Files/CMake/bin/cpack.exe
    //Path to ctest program executable.
    CMAKE_CTEST_COMMAND:INTERNAL=C:/Program Files/CMake/bin/ctest.exe
    //ADVANCED property for variable: CMAKE_C_COMPILER
    CMAKE_C_COMPILER-ADVANCED:INTERNAL=1
    //ADVANCED property for variable: CMAKE_C_COMPILER_AR
    CMAKE_C_COMPILER_AR-ADVANCED:INTERNAL=1
    //ADVANCED property for variable: CMAKE_C_COMPILER_RANLIB
    CMAKE_C_COMPILER_RANLIB-ADVANCED:INTERNAL=1
    //ADVANCED property for variable: CMAKE_C_FLAGS
    CMAKE_C_FLAGS-ADVANCED:INTERNAL=1
    //ADVANCED property for variable: CMAKE_C_FLAGS_DEBUG
    CMAKE_C_FLAGS_DEBUG-ADVANCED:INTERNAL=1
    //ADVANCED property for variable: CMAKE_C_FLAGS_MINSIZEREL
    CMAKE_C_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
    //ADVANCED property for variable: CMAKE_C_FLAGS_RELEASE
    CMAKE_C_FLAGS_RELEASE-ADVANCED:INTERNAL=1
    //ADVANCED property for variable: CMAKE_C_FLAGS_RELWITHDEBINFO
    CMAKE_C_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
    //Path to cache edit program executable.
    CMAKE_EDIT_COMMAND:INTERNAL=C:/Program Files/CMake/bin/cmake-gui.exe
    //Executable file format
    CMAKE_EXECUTABLE_FORMAT:INTERNAL=ELF
    //ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS
    CMAKE_EXE_LINKER_FLAGS-ADVANCED:INTERNAL=1
    //ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_DEBUG
    CMAKE_EXE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
    //ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_MINSIZEREL
    CMAKE_EXE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
    //ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELEASE
    CMAKE_EXE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
    //ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO
    CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
    //Name of external makefile project generator.
    CMAKE_EXTRA_GENERATOR:INTERNAL=
    //Name of generator.
    CMAKE_GENERATOR:INTERNAL=MinGW Makefiles
    //Generator instance identifier.
    CMAKE_GENERATOR_INSTANCE:INTERNAL=
    //Name of generator platform.
    CMAKE_GENERATOR_PLATFORM:INTERNAL=
    //Name of generator toolset.
    CMAKE_GENERATOR_TOOLSET:INTERNAL=
    //Source directory with the top level CMakeLists.txt file for this
    // project
    CMAKE_HOME_DIRECTORY:INTERNAL=D:/SDK/15.3/nRF5_SDK_15.3/examples/ble_peripheral/ble_app_blinky
    //ADVANCED property for variable: CMAKE_LINKER
    CMAKE_LINKER-ADVANCED:INTERNAL=1
    //ADVANCED property for variable: CMAKE_MAKE_PROGRAM
    CMAKE_MAKE_PROGRAM-ADVANCED:INTERNAL=1
    //ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS
    CMAKE_MODULE_LINKER_FLAGS-ADVANCED:INTERNAL=1
    //ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_DEBUG
    CMAKE_MODULE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
    //ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL
    CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
    //ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELEASE
    CMAKE_MODULE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
    //ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO
    CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
    //ADVANCED property for variable: CMAKE_NM
    CMAKE_NM-ADVANCED:INTERNAL=1
    //number of local generators
    CMAKE_NUMBER_OF_MAKEFILES:INTERNAL=1
    //ADVANCED property for variable: CMAKE_OBJCOPY
    CMAKE_OBJCOPY-ADVANCED:INTERNAL=1
    //ADVANCED property for variable: CMAKE_OBJDUMP
    CMAKE_OBJDUMP-ADVANCED:INTERNAL=1
    //Platform information initialized
    CMAKE_PLATFORM_INFO_INITIALIZED:INTERNAL=1
    //ADVANCED property for variable: CMAKE_RANLIB
    CMAKE_RANLIB-ADVANCED:INTERNAL=1
    //noop for ranlib
    CMAKE_RANLIB:INTERNAL=:
    //ADVANCED property for variable: CMAKE_RC_COMPILER
    CMAKE_RC_COMPILER-ADVANCED:INTERNAL=1
    CMAKE_RC_COMPILER_WORKS:INTERNAL=1
    //ADVANCED property for variable: CMAKE_RC_FLAGS
    CMAKE_RC_FLAGS-ADVANCED:INTERNAL=1
    //ADVANCED property for variable: CMAKE_RC_FLAGS_DEBUG
    CMAKE_RC_FLAGS_DEBUG-ADVANCED:INTERNAL=1
    //ADVANCED property for variable: CMAKE_RC_FLAGS_MINSIZEREL
    CMAKE_RC_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
    //ADVANCED property for variable: CMAKE_RC_FLAGS_RELEASE
    CMAKE_RC_FLAGS_RELEASE-ADVANCED:INTERNAL=1
    //ADVANCED property for variable: CMAKE_RC_FLAGS_RELWITHDEBINFO
    CMAKE_RC_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
    //Path to CMake installation.
    CMAKE_ROOT:INTERNAL=C:/Program Files/CMake/share/cmake-3.14
    //ADVANCED property for variable: CMAKE_SH
    CMAKE_SH-ADVANCED:INTERNAL=1
    //ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS
    CMAKE_SHARED_LINKER_FLAGS-ADVANCED:INTERNAL=1
    //ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_DEBUG
    CMAKE_SHARED_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
    //ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL
    CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
    //ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELEASE
    CMAKE_SHARED_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
    //ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO
    CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
    //ADVANCED property for variable: CMAKE_SKIP_INSTALL_RPATH
    CMAKE_SKIP_INSTALL_RPATH-ADVANCED:INTERNAL=1
    //ADVANCED property for variable: CMAKE_SKIP_RPATH
    CMAKE_SKIP_RPATH-ADVANCED:INTERNAL=1
    //ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS
    CMAKE_STATIC_LINKER_FLAGS-ADVANCED:INTERNAL=1
    //ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_DEBUG
    CMAKE_STATIC_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
    //ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL
    CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
    //ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELEASE
    CMAKE_STATIC_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
    //ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO
    CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
    //ADVANCED property for variable: CMAKE_STRIP
    CMAKE_STRIP-ADVANCED:INTERNAL=1
    //ADVANCED property for variable: CMAKE_VERBOSE_MAKEFILE
    CMAKE_VERBOSE_MAKEFILE-ADVANCED:INTERNAL=1
    
    

    Please advice me on my running the Cmake step and how to fix the above issue.

    Thanks,

    Kulkarni

     

  • Hello Team,

    I am stuck on this.. Need your help!

  • Hi! Due to the holidays here in Norway, we are short on staff in the technical support department. You can expect an answer at the beginning of next week.

    Best regards,

    Heidi

  • Hi Heidi,

    Thank you for the response. Also I need  CMAKE_CXX_FLAGS as I am including some C++ files.

  • Hi, in addition to the previous CMakeLists.txt, I'm including the following file to setup the toolchain:

    INCLUDE(CMakeForceCompiler)
    ################################################################################
    # cross compilation tools
    find_program(CROSS_GCC_FULL_PATH "arm-none-eabi-gcc")
    get_filename_component(CROSS_COMPIL_TOOLS ${CROSS_GCC_FULL_PATH} PATH)
    if (NOT EXISTS ${CROSS_COMPIL_TOOLS})
    	message (FATAL_ERROR "Can't find cross compilation tool chain")
    endif()
    
    SET(CPREF				${CROSS_COMPIL_TOOLS}/arm-none-eabi)
    SET(CMAKE_C_COMPILER	${CPREF}-gcc CACHE STRING "arm-none-eabi-gcc" FORCE)
    SET(CMAKE_CXX_COMPILER	${CPREF}-g++ CACHE STRING "arm-none-eabi-g++" FORCE)
    SET(AS					"${CROSS_COMPIL_TOOLS}/arm-none-eabi-gcc -x -assembler-with-cpp"  CACHE STRING "arm-none-eabi-as")
    SET(CMAKE_AR			${CPREF}-ar CACHE STRING "arm-none-eabi-ar" FORCE)
    SET(CMAKE_LD			${CPREF}-ld CACHE STRING "arm-none-eabi-ld" FORCE)
    SET(NM					${CPREF}-nm CACHE STRING "arm-none-eabi-nm" FORCE)
    SET(OBJCOPY				${CPREF}-objcopy CACHE STRING "arm-none-eabi-objcopy" FORCE)
    SET(OBJDUMP				${CPREF}-objdump CACHE STRING "arm-none-eabi-objdump" FORCE)
    SET(READELF				${CPREF}-readelf CACHE STRING "arm-none-eabi-readelf" FORCE)
    SET(CMAKE_RANLIB ${CPREF}-ranlib CACHE STRING "arm-none-eabi-ranlib" FORCE)
    
    #Make sure this is the absolute path to your GNU compiler install folder. Remember to get the version number correct.
    CMAKE_FORCE_C_COMPILER(${CPREF}-gcc GNU)
    CMAKE_FORCE_CXX_COMPILER(${CPREF}-g++ GNU)
    ################################################################################
    
    #fix '-rdynamic' cmake 2.8.9 bug
    SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
    SET(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "")
    
    SET(CMAKE_FIND_ROOT_PATH	${CROSS_COMPIL_TOOLS})
    include_directories(${CROSS_COMPIL_TOOLS}/../arm-none-eabi/include/)
    file(GLOB _CPP_INCLUDE_DIR_ ${CROSS_COMPIL_TOOLS}/../arm-none-eabi/include/c++/*)
    include_directories(${_CPP_INCLUDE_DIR_})
    
    ENABLE_LANGUAGE(ASM)

    Not sure if everything is needed, but at least make sure that the arm-none-eabi include directories are included, similar to the last 5 lines above

Related