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

how to add DFU service to existing code

hi, i am working on example programs. i want to add dfu service to example hrs code. added ble_dfu, bootloader_util_arm, dfu_app_handler.c files to example ble_hrs code. on keil IDE. by seeing this link devzone.nordicsemi.com/.../a00076.html

while building This code i am facing so many errors. image description

errors are 1)in ble_dfu.c has no field update,offset, len. (but these are declared in ble_gatts.h and this .h file is included in ble_dfu.c) please suggest the procedure to move forward thank you.

Parents
  • The best way to start is to use one of the project files of the hrs example which already includes DFU. You can find them under nRF5_SDK_11.0.0_89a8197/examples/ble_peripheral/ble_app_hrs/pca10028/s130_with_dfu

    The #define BLE_DFU_APP_SUPPORT is used to enable the DFU support in this example.

    The error "cannot open source file" is problably because you didn't include the directory which contains the header file to the include search path which might also explain the other errors. I don't know Keil, but in the gcc Makefile it is done this way: INC_PATHS += -I$(abspath ../../../../../../components/ble/ble_services/ble_dfu)

    Just compare the two folders examples/ble_peripheral/ble_app_hrs/pca10028/s130_with_dfu/S130/armv4 and examples/ble_peripheral/ble_app_hrs/pca10028/s130_with_dfu/S130_with_dfu/armv4 to see the different project settings (the main.c sourcecode is identical!).

    Michael

Reply
  • The best way to start is to use one of the project files of the hrs example which already includes DFU. You can find them under nRF5_SDK_11.0.0_89a8197/examples/ble_peripheral/ble_app_hrs/pca10028/s130_with_dfu

    The #define BLE_DFU_APP_SUPPORT is used to enable the DFU support in this example.

    The error "cannot open source file" is problably because you didn't include the directory which contains the header file to the include search path which might also explain the other errors. I don't know Keil, but in the gcc Makefile it is done this way: INC_PATHS += -I$(abspath ../../../../../../components/ble/ble_services/ble_dfu)

    Just compare the two folders examples/ble_peripheral/ble_app_hrs/pca10028/s130_with_dfu/S130/armv4 and examples/ble_peripheral/ble_app_hrs/pca10028/s130_with_dfu/S130_with_dfu/armv4 to see the different project settings (the main.c sourcecode is identical!).

    Michael

Children
Related