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

SDK 6.1.0 and s120 v1.0.1 multilink peripheral example: compilation error

Hi community,

When I want to use the example multilink peripheral inside the s120 directory example of the SDK 6.1.0, I'm not able to compile the code.

The device_manager_peripheral.c file is not aligned with the header file ble_gap.h provided for s120 soft device ; some structure (ble_gap_evt_auth_status_t, ble_gap_sec_keys_t, ble_gap_evt_sec_info_request_t) don't contain the right element in the ble_gap.h in nrf51822/include/s120 directory and one function prototype (sd_ble_gap_sec_params_reply) is not the well one. If we take a look, inside s110 or s130 ble_gap.h file, everything is ok.

Why this mismatch exists or something is wrong in my setup ?

Thanks in advance

Parents
  • Hi Terje,

    Thanks for your reply!

    I'm using GCC (arm-none-eabi-gcc) as cross compiler and a fresh version of the nrf51 SDK v6.1.0.0.

    One of include directory is nrf51822/include/s120, which is aligned with the header file provided in the s120 soft device version 1.0.1.

    If you take a look, in the ble_gap.h file contains inside the s120 directory, the structure ble_gap_evt_auth_status_t is like that:

    typedef struct
    {
      uint8_t               auth_status; 
      uint8_t               error_src : 2; 
      uint8_t               bonded : 1; 
      ble_gap_sec_levels_t  sm1_levels;  
      ble_gap_sec_levels_t  sm2_levels;  
      ble_gap_sec_kdist_t   kdist_periph; 
      ble_gap_sec_kdist_t   kdist_central; 
    } ble_gap_evt_auth_status_t;
    

    But, in the device_manager_peripheral.c, it needs to access to periph_kex, element of the ble_gap_evt_auth_status_t structure. This element in the ble_gap.h is not available (as you can see above).

    Same for the function prototype sd_ble_gap_sec_params_reply():

    available: SVCALL(SD_BLE_GAP_SEC_PARAMS_REPLY, uint32_t, sd_ble_gap_sec_params_reply(uint16_t conn_handle, uint8_t sec_status, ble_gap_sec_params_t const *p_sec_params, ble_gap_sec_keyset_t const *p_sec_keyset));

    expected: SVCALL(SD_BLE_GAP_SEC_PARAMS_REPLY, uint32_t, sd_ble_gap_sec_params_reply(uint16_t conn_handle, uint8_t sec_status, ble_gap_sec_params_t const * const p_sec_params));

    I wondering if in the Keil project, the include header file is not the one expected, i.e. s110?

    Thanks in advance

Reply
  • Hi Terje,

    Thanks for your reply!

    I'm using GCC (arm-none-eabi-gcc) as cross compiler and a fresh version of the nrf51 SDK v6.1.0.0.

    One of include directory is nrf51822/include/s120, which is aligned with the header file provided in the s120 soft device version 1.0.1.

    If you take a look, in the ble_gap.h file contains inside the s120 directory, the structure ble_gap_evt_auth_status_t is like that:

    typedef struct
    {
      uint8_t               auth_status; 
      uint8_t               error_src : 2; 
      uint8_t               bonded : 1; 
      ble_gap_sec_levels_t  sm1_levels;  
      ble_gap_sec_levels_t  sm2_levels;  
      ble_gap_sec_kdist_t   kdist_periph; 
      ble_gap_sec_kdist_t   kdist_central; 
    } ble_gap_evt_auth_status_t;
    

    But, in the device_manager_peripheral.c, it needs to access to periph_kex, element of the ble_gap_evt_auth_status_t structure. This element in the ble_gap.h is not available (as you can see above).

    Same for the function prototype sd_ble_gap_sec_params_reply():

    available: SVCALL(SD_BLE_GAP_SEC_PARAMS_REPLY, uint32_t, sd_ble_gap_sec_params_reply(uint16_t conn_handle, uint8_t sec_status, ble_gap_sec_params_t const *p_sec_params, ble_gap_sec_keyset_t const *p_sec_keyset));

    expected: SVCALL(SD_BLE_GAP_SEC_PARAMS_REPLY, uint32_t, sd_ble_gap_sec_params_reply(uint16_t conn_handle, uint8_t sec_status, ble_gap_sec_params_t const * const p_sec_params));

    I wondering if in the Keil project, the include header file is not the one expected, i.e. s110?

    Thanks in advance

Children
No Data
Related