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

Compiling error for nrf51 development dongle

I try to transfer the codewords from nrf51822 Dk board to a dongle board, while the dk board is PCA10028 and the dongle board is PCA10031, when I change the port numbers and try to compile, but there is an error that shows build\nrf51422_xxac.axf: Error: L6218E: Undefined symbol bsp_button_is_pressed (referred from bsp_btn_ble.o). Because the dongle board has no buttons so what is the problem and how to fix it? The softdevice version I used is s130_nrf51_2.0.1_softdevice and SDK is 12.2 , is this problem with wrong softdevice version or the unmatched sdk version? So how to deal with this problem? What is the correct version to change form DK board to Dongle ?

Parents
  • Hi,

    If the board does not have buttons, you should remove the bsp_btn_ble library, as it does nothing usefull without buttons.

    I don't know which example you have based your code on, but the procedure to remove it should be similar for most examples in the SDK (I have based this on the ble_app_hrs example):

    1. Remove call to bsp_btn_ble_sleep_mode_prepare() in sleep_mode_enter().
    2. Remove dispatch of BLE events to the bsp_btn_ble_on_ble_evt(p_ble_evt); handler in ble_evt_dispatch.
    3. Remove initialization of bsp_btn_ble_init() in buttons_leds_init().
    4. Exclude/remove source file bsp_btn_ble.c from project.
    5. You can also remove | BSP_INIT_BUTTONS from call to bsp_init(), but this code will not have any effect when BUTTONS_NUMBER = 0.

    Best regards,

    Jørgen

Reply
  • Hi,

    If the board does not have buttons, you should remove the bsp_btn_ble library, as it does nothing usefull without buttons.

    I don't know which example you have based your code on, but the procedure to remove it should be similar for most examples in the SDK (I have based this on the ble_app_hrs example):

    1. Remove call to bsp_btn_ble_sleep_mode_prepare() in sleep_mode_enter().
    2. Remove dispatch of BLE events to the bsp_btn_ble_on_ble_evt(p_ble_evt); handler in ble_evt_dispatch.
    3. Remove initialization of bsp_btn_ble_init() in buttons_leds_init().
    4. Exclude/remove source file bsp_btn_ble.c from project.
    5. You can also remove | BSP_INIT_BUTTONS from call to bsp_init(), but this code will not have any effect when BUTTONS_NUMBER = 0.

    Best regards,

    Jørgen

Children
Related