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

Error in main.o

Hello, I am using nrf51 and firmware is ble_app_gls. I have modified my code to work for dfu as well. I am getting error as follows

.\_build\nrf51422_xxac.axf: Error: L6218E: Undefined symbol ble_dfu_init (referred from main.o).
.\_build\nrf51422_xxac.axf: Error: L6218E: Undefined symbol ble_dfu_on_ble_evt (referred from main.o).
.\_build\nrf51422_xxac.axf: Error: L6218E: Undefined symbol ble_gls_init (referred from main.o).

I am attaching my main file with this.

ThanksNew Text Document.txt

Error in cmd errormain1.PNG

Latest Error errormain2.PNG

Latest Error errormain3.PNG

Latest Error errormain4.PNG

Makefile Makefile

errormain5.PNG

Parents
  • You need to add the DFU source file to SRC_FILES in your Makefile by adding the line $(SDK_ROOT)/components/ble/ble_services/ble_dfu/ble_dfu.c \. ble_gls.c should already be in your Makefile, but check that this is the case for the Makefile you use. Also check that the BLE GLS service is enabled in sdk_config.h by setting #define BLE_GLS_ENABLED 1

Reply
  • You need to add the DFU source file to SRC_FILES in your Makefile by adding the line $(SDK_ROOT)/components/ble/ble_services/ble_dfu/ble_dfu.c \. ble_gls.c should already be in your Makefile, but check that this is the case for the Makefile you use. Also check that the BLE GLS service is enabled in sdk_config.h by setting #define BLE_GLS_ENABLED 1

Children
No Data
Related