Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs

NRF5 SDK application debugging cannot run with dfu/secure_bootloader (sdk 17.0.2)

Hi,

1. I can use Programmer in nRF Connect for Desktop to flash the hex file (nRF5_SDK_17.0.2_d674dde\examples\dfu\secure_dfu_test_images\ble\nrf52832sd_s132_bootloader_buttonless_with_setting_page_dfu_secure_ble_debug_without_bonds.hex) into my board.

2. I can use the segger IDE to debug ble_app_buttonless_dfu project and check RTT info.

3. Follow the steps in this link, I can finish BLE DFU process successfully :

a. generate key, bootloader, setting_page, application and merge into hex file

b. flash the hex file in to my board 

c. generate updated application zip file and do DFU successfully

Now, I connect the board to segger IDE with JLink, it can download but cannot run from main().

I searched some articles and it said the dfu/secure_bootloader have some memory conflict with softDevice. However, I did not see any detailed or easy solution about how to solve this issue. I found this solution and this answer using SDK 15, but some variables or functions have already changed in SDK 17.

Parents
  • Hi, 

    You should program SD+BL+setting before debugging the ble_app_buttonless_dfu app, 

    Regards,
    Amanda

  • should program SD+BL+setting before debugging the ble_app_buttonless_dfu app

    I did following test:

    a. merge SD+BL+settings+app as one hex file, program it into the board -> everything ok, system runs with led and buzzer

    b. connect above board to Jlink, Build and Debug, it downloads and verify successfully, but it cannot start from main(). The board is in bootloader mode, boardcasting as DfuTarg in nRF Connect.

    c. if I program the board with hex file in SDK ( nRF5_SDK_17.0.2_d674dde\examples\dfu\secure_dfu_test_images\ble\nrf52832\sd_s132_bootloader_buttonless_with_setting_page_dfu_secure_ble_debug_without_bonds.hex), it can use Jlink to debug.

    According to this link, it said the bootloader defined memory address at 0xFF8 and 0xFFC, which is conflict with SoftDevice (0~0x25FFF). Since I can use test images from SDK, there should be proejct about how to generate that bootloader.

    Is there any solution so that I can use JLink to debug my project with my secure bootloader?

  • Hi, 

    Chelsea said:
    b. connect above board to Jlink, Build and Debug, it downloads and verify successfully, but it cannot start from main(). The board is in bootloader mode, boardcasting as DfuTarg in nRF Connect.

    I run into this situation when I use the setting generated for ble_app_buttonless_dfu built with the release but load the app with debug mode. So, I would suggest you generate the setting for the app with the debug. The settings for the release and the debug are different. 

    -Amanda 

Reply
  • Hi, 

    Chelsea said:
    b. connect above board to Jlink, Build and Debug, it downloads and verify successfully, but it cannot start from main(). The board is in bootloader mode, boardcasting as DfuTarg in nRF Connect.

    I run into this situation when I use the setting generated for ble_app_buttonless_dfu built with the release but load the app with debug mode. So, I would suggest you generate the setting for the app with the debug. The settings for the release and the debug are different. 

    -Amanda 

Children
Related