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

GCC Makefiles for BLE example projects are missing from the SDK.

They're there for the nrf6310 board but not pca10000 or pca10001. Reasonably easy to recreate, but kind of wish I didn't have to! Also there is a warning about a typedef that is defined but not used so you have to turn of -Werror in Makefiles.common. Here's the ble_app_hrs one that worked for me:

TARGET_CHIP := NRF51822_QFAA_CA
BOARD := BOARD_PCA10001
CFLAGS += -DNRF51 -DDEBUG_NRF_USER -DBLE_STACK_SUPPORT_REQD -DBOARD_PCA10001

OUTPUT_FILENAME := ble_app_hrs
SDK_PATH = ../../../../../

C_SOURCE_FILES += ../main.c
C_SOURCE_FILES += ../battery.c
C_SOURCE_FILES += ../led.c

C_SOURCE_FILES += $(SDK_PATH)Source/ble/ble_services/ble_bas.c
C_SOURCE_FILES += $(SDK_PATH)Source/ble/ble_services/ble_dis.c
C_SOURCE_FILES += $(SDK_PATH)Source/ble/ble_services/ble_hrs.c
C_SOURCE_FILES += $(SDK_PATH)Source/ble/ble_conn_params.c
C_SOURCE_FILES += $(SDK_PATH)Source/ble/ble_advdata.c
C_SOURCE_FILES += $(SDK_PATH)Source/ble/ble_services/ble_srv_common.c
C_SOURCE_FILES += $(SDK_PATH)Source/app_common/app_timer.c
C_SOURCE_FILES += $(SDK_PATH)Source/sd_common/softdevice_handler.c
C_SOURCE_FILES += $(SDK_PATH)Source/ble/ble_bondmngr.c
C_SOURCE_FILES += $(SDK_PATH)Source/app_common/pstorage.c
C_SOURCE_FILES += $(SDK_PATH)Source/app_common/crc16.c
C_SOURCE_FILES += $(SDK_PATH)Source/app_common/app_button.c
C_SOURCE_FILES += $(SDK_PATH)Source/app_common/app_gpiote.c
C_SOURCE_FILES += $(SDK_PATH)Source/ble/ble_error_log.c
C_SOURCE_FILES += $(SDK_PATH)Source/ble/ble_debug_assert_handler.c

INCLUDEPATHS += -I"$(SDK_PATH)Include/app_common"
INCLUDEPATHS += -I"$(SDK_PATH)Include/s110"
INCLUDEPATHS += -I"$(SDK_PATH)Include/ble/ble_services"
INCLUDEPATHS += -I"$(SDK_PATH)Include/ble"
INCLUDEPATHS += -I"$(SDK_PATH)Include/sd_common"
INCLUDEPATHS += -I"$(SDK_PATH)Include"

#Uncomment correct line if you have s110 programmed on the chip. xxaa is 256k version, xxab is 128k.
DEVICE_VARIANT := xxaa
#DEVICE_VARIANT := xxab

USE_SOFTDEVICE := s110
#USE_SOFTDEVICE := s210

include $(SDK_PATH)Source/templates/gcc/Makefile.common



Related