This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

why am I getting the wrong ble_advertising.h after a update to SDK 8.1.0 from 8.0.0?

I am getting the following warning and errors after updating to nrf51 SDK 8.1.0 from 8.0.0 Do I need to change something else?

compiling main.c...
App\main.c(197): error:  #167: argument of type "ble_adv_modes_config_t *" is incompatible with parameter of type "const ble_advdata_t *"
      err_code = ble_advertising_init(&advdata, &options, on_adv_evt, NULL);
App\main.c(197): error:  #167: argument of type "void (*)(ble_adv_evt_t)" is incompatible with parameter of type "const ble_adv_modes_config_t *"
      err_code = ble_advertising_init(&advdata, &options, on_adv_evt, NULL);
App\main.c(197): error:  #165: too few arguments in function call
      err_code = ble_advertising_init(&advdata, &options, on_adv_evt, NULL);
App\main.c: 0 warnings, 3 errors
compiling bsp.c...
RTE\Board_Support\nRF51822_xxAC\bsp.c(493): warning:  #223-D: function "bsp_event_to_button_assign" declared implicitly
              err_code = bsp_event_to_button_assign(cnt, (bsp_event_t)(BSP_EVENT_KEY_0 + cnt) );
RTE\Board_Support\nRF51822_xxAC\bsp.c(551): error:  #159: declaration is incompatible with previous "bsp_event_to_button_assign" (declared at line 493)
  uint32_t bsp_event_to_button_assign(uint32_t button, bsp_event_t event)
RTE\Board_Support\nRF51822_xxAC\bsp.c(576): error:  #147-D: declaration is incompatible with "uint32_t bsp_buttons_enable(void)" (declared at line 297 of "C:\Keil_v5\ARM\PACK\NordicSemiconductor\nRF_Examples\8.1.0\bsp\bsp.h")
  uint32_t bsp_buttons_enable(uint32_t buttons)
RTE\Board_Support\nRF51822_xxAC\bsp.c: 1 warning, 2 errors
compiling ble_advertising.c...
RTE\nRF_BLE\nRF51822_xxAC\ble_advertising.c(88): error:  #147-D: declaration is incompatible with "uint32_t ble_advertising_init(const ble_advdata_t *, const ble_advdata_t *, const ble_adv_modes_config_t *, const ble_advertising_evt_handler_t, const ble_advertising_error_handler_t)" (declared at line 157 of "C:\Keil_v5\ARM\PACK\NordicSemiconductor\nRF_BLE\3.0.0\ble_advertising\ble_advertising.h")
  uint32_t ble_advertising_init(ble_advdata_t const                 * p_advdata,
RTE\nRF_BLE\nRF51822_xxAC\ble_advertising.c: 0 warnings, 1 error
compiling nrf_drv_gpiote.c...
C:\Keil_v5\ARM\PACK\NordicSemiconductor\nRF_Drivers\3.0.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[NUMBER_OF_GPIO_TE+GPIOTE_CONFIG_NUM_OF_LOW_POWER_EVENTS];
C:\Keil_v5\ARM\PACK\NordicSemiconductor\nRF_Drivers\3.0.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.0.0\gpiote\nrf_drv_gpiote.c: 0 warnings, 2 errors
".\Objects\Remote_Nordic.axf" - 8 Error(s), 1 Warning(s).
Target not created.
Parents
  • When you post code/output can you use one of the formatting icons so it's readable please. I just edited it (select code, hit the button marked '0101').

    Yes if you look at the headers for 8.1 vs 8.0 you will see the parameters to ble_advertising_init() changed because that function now does more and takes an extra parameter in the middle. Similarly the BSP package has changed and you'll need to make adjustments there too.

    So that's not the wrong ble_advertising.h, it's the right one, 8.1 has a different API.

Reply
  • When you post code/output can you use one of the formatting icons so it's readable please. I just edited it (select code, hit the button marked '0101').

    Yes if you look at the headers for 8.1 vs 8.0 you will see the parameters to ble_advertising_init() changed because that function now does more and takes an extra parameter in the middle. Similarly the BSP package has changed and you'll need to make adjustments there too.

    So that's not the wrong ble_advertising.h, it's the right one, 8.1 has a different API.

Children
No Data
Related