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

nrf51-ble-app-lbs

i downloaded source code from github.com/.../nrf51-ble-app-lbs. and i am getting error like C:\Keil_v5\ARM\PACK\NordicSemiconductor\nRF_DeviceFamilyPack\8.2.0\Device\Include\nrf51.h(119): error: #5: cannot open source input file "core_cm0.h": No such file or directory. can you tell me how to solve this error?

  • i read that post but i am getting error in nrf_drv_gpiote.c file so i followed this post devzone.nordicsemi.com/.../. i changed nrf_dev_gpiote.c but can't edit nrf_dev_gpiote.h file.now i am getting many errors like that

    RTE\nRF_BLE\nRF51822_xxAA\ble_conn_params.c(27): error: #260-D: explicit type is missing ("int" assumed) APP_TIMER_DEF(m_conn_params_timer_id); /< Connection parameters timer. */ RTE\nRF_BLE\nRF51822_xxAA\ble_conn_params.c(27): error: #92: identifier-list parameters may only be used in a function definition APP_TIMER_DEF(m_conn_params_timer_id); /< Connection parameters timer. */ RTE\nRF_BLE\nRF51822_xxAA\ble_conn_params.c(129): error: #20: identifier "m_conn_params_timer_id" is undefined return app_timer_create(&m_conn_params_timer_id, RTE\nRF_BLE\nRF51822_xxAA\ble_conn_params.c(137): error: #20: identifier "m_conn_params_timer_id" is undefined return app_timer_stop(m_conn_params_timer_id); RTE\nRF_BLE\nRF51822_xxAA\ble_conn_params.c(172): error: #20: identifier "m_conn_params_timer_id" is undefined err_code = app_timer_start(m_conn_params_timer_id, timeout_ticks, NULL); RTE\nRF_BLE\nRF51822_xxAA\ble_conn_params.c(218): error: #20: identifier "m_conn_params_timer_id" is undefined err_code = app_timer_stop(m_conn_params_timer_id); RTE\nRF_BLE\nRF51822_xxAA\ble_conn_params.c(248): error: #20: identifier "m_conn_params_timer_id" is undefined err_code = app_timer_stop(m_conn_params_timer_id); RTE\nRF_BLE\nRF51822_xxAA\ble_conn_params.c: 0 warnings, 7 errors compiling ble_advdata.c... compiling nrf_drv_common.c... compiling nrf_delay.c... compiling nrf_drv_gpiote.c... C:\Keil_v5\ARM\PACK\NordicSemiconductor\nRF_Drivers\3.1.0\gpiote\nrf_drv_gpiote.c(30): error: #20: identifier "GPIOTE_CONFIG_NUM_OF_LOW_POWER_EVENTS" is undefined nrf_drv_gpiote_evt_handler_t handlers[ UMBER_OF_GPIO_TE+GPIOTE_CONFIG_NUM_OF_LOW_POWER_EVENTS]; C:\Keil_v5\ARM\PACK\NordicSemiconductor\nRF_Drivers\3.1.0\gpiote\nrf_drv_gpiote.c(148): error: #20: identifier "GPIOTE_CONFIG_IRQ_PRIORITY" is undefined nrf_drv_common_irq_enable(GPIOTE_IRQn, GPIOTE_CONFIG_IRQ_PRIORITY); C:\Keil_v5\ARM\PACK\NordicSemiconductor\nRF_Drivers\3.1.0\gpiote\nrf_drv_gpiote.c(182): error: #147-D: declaration is incompatible with "ret_code_t nrf_drv_gpiote_out_init(nrf_drv_gpiote_pin_t, const nrf_drv_gpiote_out_config_t *)" (declared at line 165 of "C:\Keil_v5\ARM\PACK\NordicSemiconductor\nRF_Drivers\3.1.0\gpiote\nrf_drv_gpiote.h") ret_code_t nrf_drv_gpiote_out_init(nrf_drv_gpiote_pin_t pin, nrf_drv_gpiote_out_config_t * p_config) C:\Keil_v5\ARM\PACK\NordicSemiconductor\nRF_Drivers\3.1.0\gpiote\nrf_drv_gpiote.c(320): error: #147-D: declaration is incompatible with "ret_code_t nrf_drv_gpiote_in_init(nrf_drv_gpiote_pin_t, const nrf_drv_gpiote_in_config_t *, nrf_drv_gpiote_evt_handler_t)" (declared at line 237 of "C:\Keil_v5\ARM\PACK\NordicSemiconductor\nRF_Drivers\3.1.0\gpiote\nrf_drv_gpiote.h") ret_code_t nrf_drv_gpiote_in_init(nrf_drv_gpiote_pin_t pin, C:\Keil_v5\ARM\PACK\NordicSemiconductor\nRF_Drivers\3.1.0\gpiote\nrf_drv_gpiote.c: 0 warnings, 4 errors compiling app_error.c... compiling nrf_assert.c... compiling app_timer.c... RTE\nRF_Libraries\nRF51822_xxAA\app_timer.c(62): error: #94: the size of an array must be greater than zero

    TATIC_ASSERT(sizeof(timer_node_t) == APP_TIMER_NODE_SIZE); RTE\nRF_Libraries\nRF51822_xxAA\app_timer.c(62): error: #256: invalid redeclaration of type name "static_assert_failed" (declared at line 28)

    TATIC_ASSERT(sizeof(timer_node_t) == APP_TIMER_NODE_SIZE); RTE\nRF_Libraries\nRF51822_xxAA\app_timer.c(93): warning: #983-D: typedef name has already been declared (with similar type)

    TATIC_ASSERT(sizeof(timer_user_op_t) <= APP_TIMER_USER_OP_SIZE); RTE\nRF_Libraries\nRF51822_xxAA\app_timer.c(94): warning: #983-D: typedef name has already been declared (with similar type)

    TATIC_ASSERT(sizeof(timer_user_op_t) % 4 == 0); RTE\nRF_Libraries\nRF51822_xxAA\app_timer.c(114): warning: #983-D: typedef name has already been declared (with similar type)

    TATIC_ASSERT(sizeof(timer_user_t) == APP_TIMER_USER_SIZE); RTE\nRF_Libraries\nRF51822_xxAA\app_timer.c(115): warning: #983-D: typedef name has already been declared (with similar type)

    TATIC_ASSERT(sizeof(timer_user_t) % 4 == 0); RTE\nRF_Libraries\nRF51822_xxAA\app_timer.c: 4 warnings, 2 errors compiling softdevice_handler.c... "._build\ble_app_lbs.axf" - 13 Error(s), 5 Warning(s). Target not created. Build Time Elapsed: 00:00:14

  • Which SDK are you using? The example is designed for SDK 8.0.

  • Can't you just use the example that you can copy from pack installer? Or add the liberary's with keil's "manage runtime environment'? Did you installed in keil all the necessary component associated with Nordic?

  • i am using that example. and i have also used keil's manage runtime environment

Related