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

BLE Compilation Errors

Hi

I was trying to take code from ble template and put it in my own project. Even after copying the entire main file and including file directories it shows loads of errors. I am beginer and find it really difficult to get across these things. I do come frome xtensive programming background but things are not clear enough for a beginner to progress. 

The errors displayed are in the files I did not write and are core ble files

Building ‘EM7180’ from solution ‘twi_scanner_pca10040’ in configuration ‘Release’
2> Compiling ‘main.c’
2> In file included from E:\DevWork\nRF5_SDK\examples\peripheral\EM7180\main.c:98:0:
2> ../../../../../../components/ble/nrf_ble_gatt/nrf_ble_gatt.h:78:34: error: 'NRF_SDH_BLE_PERIPHERAL_LINK_COUNT' undeclared here (not in a function); did you mean 'NRF_BLE_GATT_LINK_COUNT'?
2> ../../../../../../components/ble/nrf_ble_gatt/nrf_ble_gatt.h:78:34: note: in definition of macro 'NRF_BLE_GATT_LINK_COUNT'
2> ../../../../../../components/ble/nrf_ble_gatt/nrf_ble_gatt.h:78:70: error: 'NRF_SDH_BLE_CENTRAL_LINK_COUNT' undeclared here (not in a function); did you mean 'NRF_SDH_BLE_PERIPHERAL_LINK_COUNT'?
2> ../../../../../../components/ble/nrf_ble_gatt/nrf_ble_gatt.h:131:38: note: in expansion of macro 'NRF_BLE_GATT_LINK_COUNT'
2> In file included from ../../../../../../integration/nrfx/nrfx_glue.h:71:0,
2>                  from ../../../../../../modules/nrfx/nrfx.h:46,
2>                  from ../../../../../../modules/nrfx/drivers/include/nrfx_gpiote.h:44,
2>                  from ../../../../../../integration/nrfx/legacy/nrf_drv_gpiote.h:43,
2>                  from E:\DevWork\nRF5_SDK\examples\peripheral\EM7180\main.c:58:
2> ../../../../../../components/softdevice/common/nrf_sdh_ble.h:83:15: error: 'NRF_SDH_BLE_ENABLED' undeclared here (not in a function); did you mean 'NRF_SDH_LOG_ENABLED'?
2> ../../../../../../components/libraries/util/app_util.h:237:62: note: in definition of macro '_SELECT_ASSERT_FUNC'
2> ../../../../../../components/libraries/util/app_util.h:253:25: note: in expansion of macro 'STATIC_ASSERT_MSG'
2> ../../../../../../components/softdevice/common/nrf_sdh_ble.h:83:1: note: in expansion of macro 'STATIC_ASSERT'
2> ../../../../../../components/ble/nrf_ble_gatt/nrf_ble_gatt.h:71:1: note: in expansion of macro 'NRF_SDH_BLE_OBSERVER'
2> E:\DevWork\nRF5_SDK\examples\peripheral\EM7180\main.c:136:1: note: in expansion of macro 'NRF_BLE_GATT_DEF'
2> ../../../../../../components/softdevice/common/nrf_sdh_ble.h:83:15: error: expression in static assertion is not an integer
2> ../../../../../../components/libraries/util/app_util.h:237:62: note: in definition of macro '_SELECT_ASSERT_FUNC'
2> ../../../../../../components/libraries/util/app_util.h:253:25: note: in expansion of macro 'STATIC_ASSERT_MSG'
2> ../../../../../../components/softdevice/common/nrf_sdh_ble.h:83:1: note: in expansion of macro 'STATIC_ASSERT'
2> ../../../../../../components/ble/nrf_ble_gatt/nrf_ble_gatt.h:71:1: note: in expansion of macro 'NRF_SDH_BLE_OBSERVER'
2> E:\DevWork\nRF5_SDK\examples\peripheral\EM7180\main.c:136:1: note: in expansion of macro 'NRF_BLE_GATT_DEF'
2> ../../../../../../components/ble/nrf_ble_gatt/nrf_ble_gatt.h:72:22: error: 'NRF_BLE_GATT_BLE_OBSERVER_PRIO' undeclared here (not in a function); did you mean 'APP_BLE_OBSERVER_PRIO'?
2> ../../../../../../components/libraries/util/app_util.h:237:62: note: in definition of macro '_SELECT_ASSERT_FUNC'
2> ../../../../../../components/libraries/util/app_util.h:253:25: note: in expansion of macro 'STATIC_ASSERT_MSG'
2> ../../../../../../components/softdevice/common/nrf_sdh_ble.h:84:1: note: in expansion of macro 'STATIC_ASSERT'
2> ../../../../../../components/ble/nrf_ble_gatt/nrf_ble_gatt.h:71:1: note: in expansion of macro 'NRF_SDH_BLE_OBSERVER'
2> E:\DevWork\nRF5_SDK\examples\peripheral\EM7180\main.c:136:1: note: in expansion of macro 'NRF_BLE_GATT_DEF'
2> ../../../../../../components/softdevice/common/nrf_sdh_ble.h:84:23: error: 'NRF_SDH_BLE_OBSERVER_PRIO_LEVELS' undeclared here (not in a function); did you mean 'NRF_SDH_BLE_OBSERVERS'?
2> ../../../../../../components/libraries/util/app_util.h:237:62: note: in definition of macro '_SELECT_ASSERT_FUNC'
2> ../../../../../../components/libraries/util/app_util.h:253:25: note: in expansion of macro 'STATIC_ASSERT_MSG'
2> ../../../../../../components/softdevice/common/nrf_sdh_ble.h:84:1: note: in expansion of macro 'STATIC_ASSERT'
2> ../../../../../../components/ble/nrf_ble_gatt/nrf_ble_gatt.h:71:1: note: in expansion of macro 'NRF_SDH_BLE_OBSERVER'
2> E:\DevWork\nRF5_SDK\examples\peripheral\EM7180\main.c:136:1: note: in expansion of macro 'NRF_BLE_GATT_DEF'
2> ../../../../../../components/ble/nrf_ble_gatt/nrf_ble_gatt.h:72:22: error: expression in static assertion is not an integer
2> ../../../../../../components/libraries/util/app_util.h:237:62: note: in definition of macro '_SELECT_ASSERT_FUNC'
2> ../../../../../../components/libraries/util/app_util.h:253:25: note: in expansion of macro 'STATIC_ASSERT_MSG'
2> ../../../../../../components/softdevice/common/nrf_sdh_ble.h:84:1: note: in expansion of macro 'STATIC_ASSERT'
2> ../../../../../../components/ble/nrf_ble_gatt/nrf_ble_gatt.h:71:1: note: in expansion of macro 'NRF_SDH_BLE_OBSERVER'
2> E:\DevWork\nRF5_SDK\examples\peripheral\EM7180\main.c:136:1: note: in expansion of macro 'NRF_BLE_GATT_DEF'
2> ../../../../../../components/softdevice/common/nrf_sdh_ble.h:83:15: error: expression in static assertion is not an integer
2> ../../../../../../components/libraries/util/app_util.h:237:62: note: in definition of macro '_SELECT_ASSERT_FUNC'
2> ../../../../../../components/libraries/util/app_util.h:253:25: note: in expansion of macro 'STATIC_ASSERT_MSG'
2> ../../../../../../components/softdevice/common/nrf_sdh_ble.h:83:1: note: in expansion of macro 'STATIC_ASSERT'
2> ../../../../../../components/ble/nrf_ble_qwr/nrf_ble_qwr.h:74:5: note: in expansion of macro 'NRF_SDH_BLE_OBSERVER'
2> E:\DevWork\nRF5_SDK\examples\peripheral\EM7180\main.c:137:1: note: in expansion of macro 'NRF_BLE_QWR_DEF'
2> ../../../../../../components/ble/nrf_ble_qwr/nrf_ble_qwr.h:75:26: error: 'NRF_BLE_QWR_BLE_OBSERVER_PRIO' undeclared here (not in a function); did you mean 'NRF_BLE_GATT_BLE_OBSERVER_PRIO'?
2> ../../../../../../components/libraries/util/app_util.h:237:62: note: in definition of macro '_SELECT_ASSERT_FUNC'
2> ../../../../../../components/libraries/util/app_util.h:253:25: note: in expansion of macro 'STATIC_ASSERT_MSG'
2> ../../../../../../components/softdevice/common/nrf_sdh_ble.h:84:1: note: in expansion of macro 'STATIC_ASSERT'
2> ../../../../../../components/ble/nrf_ble_qwr/nrf_ble_qwr.h:74:5: note: in expansion of macro 'NRF_SDH_BLE_OBSERVER'
2> E:\DevWork\nRF5_SDK\examples\peripheral\EM7180\main.c:137:1: note: in expansion of macro 'NRF_BLE_QWR_DEF'
2> ../../../../../../components/ble/nrf_ble_qwr/nrf_ble_qwr.h:75:26: error: expression in static assertion is not an integer
2> ../../../../../../components/libraries/util/app_util.h:237:62: note: in definition of macro '_SELECT_ASSERT_FUNC'
2> ../../../../../../components/libraries/util/app_util.h:253:25: note: in expansion of macro 'STATIC_ASSERT_MSG'
2> ../../../../../../components/softdevice/common/nrf_sdh_ble.h:84:1: note: in expansion of macro 'STATIC_ASSERT'
2> ../../../../../../components/ble/nrf_ble_qwr/nrf_ble_qwr.h:74:5: note: in expansion of macro 'NRF_SDH_BLE_OBSERVER'
2> E:\DevWork\nRF5_SDK\examples\peripheral\EM7180\main.c:137:1: note: in expansion of macro 'NRF_BLE_QWR_DEF'
2> ../../../../../../components/softdevice/common/nrf_sdh_ble.h:83:15: error: expression in static assertion is not an integer
2> ../../../../../../components/libraries/util/app_util.h:237:62: note: in definition of macro '_SELECT_ASSERT_FUNC'
2> ../../../../../../components/libraries/util/app_util.h:253:25: note: in expansion of macro 'STATIC_ASSERT_MSG'
2> ../../../../../../components/softdevice/common/nrf_sdh_ble.h:83:1: note: in expansion of macro 'STATIC_ASSERT'
2> ../../../../../../components/ble/ble_advertising/ble_advertising.h:77:1: note: in expansion of macro 'NRF_SDH_BLE_OBSERVER'
2> E:\DevWork\nRF5_SDK\examples\peripheral\EM7180\main.c:138:1: note: in expansion of macro 'BLE_ADVERTISING_DEF'
2> ../../../../../../components/ble/ble_advertising/ble_advertising.h:78:22: error: 'BLE_ADV_BLE_OBSERVER_PRIO' undeclared here (not in a function); did you mean 'APP_BLE_OBSERVER_PRIO'?
2> ../../../../../../components/libraries/util/app_util.h:237:62: note: in definition of macro '_SELECT_ASSERT_FUNC'
2> ../../../../../../components/libraries/util/app_util.h:253:25: note: in expansion of macro 'STATIC_ASSERT_MSG'
2> ../../../../../../components/softdevice/common/nrf_sdh_ble.h:84:1: note: in expansion of macro 'STATIC_ASSERT'
2> ../../../../../../components/ble/ble_advertising/ble_advertising.h:77:1: note: in expansion of macro 'NRF_SDH_BLE_OBSERVER'
2> E:\DevWork\nRF5_SDK\examples\peripheral\EM7180\main.c:138:1: note: in expansion of macro 'BLE_ADVERTISING_DEF'
2> ../../../../../../components/ble/ble_advertising/ble_advertising.h:78:22: error: expression in static assertion is not an integer
2> ../../../../../../components/libraries/util/app_util.h:237:62: note: in definition of macro '_SELECT_ASSERT_FUNC'
2> ../../../../../../components/libraries/util/app_util.h:253:25: note: in expansion of macro 'STATIC_ASSERT_MSG'
2> ../../../../../../components/softdevice/common/nrf_sdh_ble.h:84:1: note: in expansion of macro 'STATIC_ASSERT'
2> ../../../../../../components/ble/ble_advertising/ble_advertising.h:77:1: note: in expansion of macro 'NRF_SDH_BLE_OBSERVER'
2> E:\DevWork\nRF5_SDK\examples\peripheral\EM7180\main.c:138:1: note: in expansion of macro 'BLE_ADVERTISING_DEF'
2> ../../../../../../components/softdevice/common/nrf_sdh_soc.h:76:15: error: 'NRF_SDH_SOC_ENABLED' undeclared here (not in a function); did you mean 'NRF_SDH_LOG_ENABLED'?
2> ../../../../../../components/libraries/util/app_util.h:237:62: note: in definition of macro '_SELECT_ASSERT_FUNC'
2> ../../../../../../components/libraries/util/app_util.h:253:25: note: in expansion of macro 'STATIC_ASSERT_MSG'
2> ../../../../../../components/softdevice/common/nrf_sdh_soc.h:76:1: note: in expansion of macro 'STATIC_ASSERT'
2> ../../../../../../components/ble/ble_advertising/ble_advertising.h:80:1: note: in expansion of macro 'NRF_SDH_SOC_OBSERVER'
2> E:\DevWork\nRF5_SDK\examples\peripheral\EM7180\main.c:138:1: note: in expansion of macro 'BLE_ADVERTISING_DEF'
2> ../../../../../../components/softdevice/common/nrf_sdh_soc.h:76:15: error: expression in static assertion is not an integer
2> ../../../../../../components/libraries/util/app_util.h:237:62: note: in definition of macro '_SELECT_ASSERT_FUNC'
2> ../../../../../../components/libraries/util/app_util.h:253:25: note: in expansion of macro 'STATIC_ASSERT_MSG'
2> ../../../../../../components/softdevice/common/nrf_sdh_soc.h:76:1: note: in expansion of macro 'STATIC_ASSERT'
2> ../../../../../../components/ble/ble_advertising/ble_advertising.h:80:1: note: in expansion of macro 'NRF_SDH_SOC_OBSERVER'
2> E:\DevWork\nRF5_SDK\examples\peripheral\EM7180\main.c:138:1: note: in expansion of macro 'BLE_ADVERTISING_DEF'
2> ../../../../../../components/ble/ble_advertising/ble_advertising.h:81:22: error: 'BLE_ADV_SOC_OBSERVER_PRIO' undeclared here (not in a function); did you mean 'BLE_ADV_BLE_OBSERVER_PRIO'?
2> ../../../../../../components/libraries/util/app_util.h:237:62: note: in definition of macro '_SELECT_ASSERT_FUNC'
2> ../../../../../../components/libraries/util/app_util.h:253:25: note: in expansion of macro 'STATIC_ASSERT_MSG'
2> ../../../../../../components/softdevice/common/nrf_sdh_soc.h:77:1: note: in expansion of macro 'STATIC_ASSERT'
2> ../../../../../../components/ble/ble_advertising/ble_advertising.h:80:1: note: in expansion of macro 'NRF_SDH_SOC_OBSERVER'
2> E:\DevWork\nRF5_SDK\examples\peripheral\EM7180\main.c:138:1: note: in expansion of macro 'BLE_ADVERTISING_DEF'
2> ../../../../../../components/softdevice/common/nrf_sdh_soc.h:77:23: error: 'NRF_SDH_SOC_OBSERVER_PRIO_LEVELS' undeclared here (not in a function); did you mean 'NRF_SDH_BLE_OBSERVER_PRIO_LEVELS'?
2> ../../../../../../components/libraries/util/app_util.h:237:62: note: in definition of macro '_SELECT_ASSERT_FUNC'
2> ../../../../../../components/libraries/util/app_util.h:253:25: note: in expansion of macro 'STATIC_ASSERT_MSG'
2> ../../../../../../components/softdevice/common/nrf_sdh_soc.h:77:1: note: in expansion of macro 'STATIC_ASSERT'
2> ../../../../../../components/ble/ble_advertising/ble_advertising.h:80:1: note: in expansion of macro 'NRF_SDH_SOC_OBSERVER'
2> E:\DevWork\nRF5_SDK\examples\peripheral\EM7180\main.c:138:1: note: in expansion of macro 'BLE_ADVERTISING_DEF'
2> ../../../../../../components/ble/ble_advertising/ble_advertising.h:81:22: error: expression in static assertion is not an integer
2> ../../../../../../components/libraries/util/app_util.h:237:62: note: in definition of macro '_SELECT_ASSERT_FUNC'
2> ../../../../../../components/libraries/util/app_util.h:253:25: note: in expansion of macro 'STATIC_ASSERT_MSG'
2> ../../../../../../components/softdevice/common/nrf_sdh_soc.h:77:1: note: in expansion of macro 'STATIC_ASSERT'
2> ../../../../../../components/ble/ble_advertising/ble_advertising.h:80:1: note: in expansion of macro 'NRF_SDH_SOC_OBSERVER'
2> E:\DevWork\nRF5_SDK\examples\peripheral\EM7180\main.c:138:1: note: in expansion of macro 'BLE_ADVERTISING_DEF'
2> ../../../../../../components/libraries/timer/app_timer.h:116:21: error: 'APP_TIMER_CONFIG_RTC_FREQUENCY' undeclared (first use in this function); did you mean 'APP_TIMER_CONFIG_LOG_LEVEL'?
2> ../../../../../../components/libraries/util/app_util.h:331:37: note: in definition of macro 'ROUNDED_DIV'
2> E:\DevWork\nRF5_SDK\examples\peripheral\EM7180\main.c:120:41: note: in expansion of macro 'APP_TIMER_TICKS'
2> E:\DevWork\nRF5_SDK\examples\peripheral\EM7180\main.c:378:46: note: in expansion of macro 'FIRST_CONN_PARAMS_UPDATE_DELAY'
2> ../../../../../../components/libraries/timer/app_timer.h:116:21: note: each undeclared identifier is reported only once for each function it appears in
2> ../../../../../../components/libraries/util/app_util.h:331:37: note: in definition of macro 'ROUNDED_DIV'
2> E:\DevWork\nRF5_SDK\examples\peripheral\EM7180\main.c:120:41: note: in expansion of macro 'APP_TIMER_TICKS'
2> E:\DevWork\nRF5_SDK\examples\peripheral\EM7180\main.c:378:46: note: in expansion of macro 'FIRST_CONN_PARAMS_UPDATE_DELAY'
2> ../../../../../../components/softdevice/common/nrf_sdh_ble.h:83:15: error: expression in static assertion is not an integer
2> ../../../../../../components/libraries/util/app_util.h:237:62: note: in definition of macro '_SELECT_ASSERT_FUNC'
2> ../../../../../../components/libraries/util/app_util.h:253:25: note: in expansion of macro 'STATIC_ASSERT_MSG'
2> ../../../../../../components/softdevice/common/nrf_sdh_ble.h:83:1: note: in expansion of macro 'STATIC_ASSERT'
2> E:\DevWork\nRF5_SDK\examples\peripheral\EM7180\main.c:534:5: note: in expansion of macro 'NRF_SDH_BLE_OBSERVER'
2> E:\DevWork\nRF5_SDK\examples\peripheral\EM7180\main.c:112:41: error: expression in static assertion is not an integer
2> ../../../../../../components/libraries/util/app_util.h:237:62: note: in definition of macro '_SELECT_ASSERT_FUNC'
2> ../../../../../../components/libraries/util/app_util.h:253:25: note: in expansion of macro 'STATIC_ASSERT_MSG'
2> ../../../../../../components/softdevice/common/nrf_sdh_ble.h:84:1: note: in expansion of macro 'STATIC_ASSERT'
2> E:\DevWork\nRF5_SDK\examples\peripheral\EM7180\main.c:534:5: note: in expansion of macro 'NRF_SDH_BLE_OBSERVER'
2> E:\DevWork\nRF5_SDK\examples\peripheral\EM7180\main.c:534:42: note: in expansion of macro 'APP_BLE_OBSERVER_PRIO'

Related