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

Secure DFU Bootloader Example not Advertising

I have followed all steps in the recent blog, but the device doesn't advertise. I am using:

  • BMD-300-EVAL devkit (nrf52832)
  • SDK 12.1.0
  • S132 3.0.0
  • Eclipse with gcc-arm-none-eabi-4_9-2015q3
  • Example folder is located in: nRF5_SDK_12.1.0/examples/dfu/bootloader_secure/

I have been using this setup with no issue for the development of other example applications and my own applications.

I notice in sdk_config.h that the clock is disabled. Could this be causing a problem? I tried to enabling it and adding the includes that it needed to the Makefile, but this did not work. Also, it seems that the softdevice is not enabled in main.c. I also tried enabling logging, but this causes a compile error. "region 'FLASH' overflowed by 9748 bytes. I don't know how to fix this so that I can debug.

Where o where am I going wrong?

Parents
  • Hi ,

    Could you try to test with SDK v13 ? I haven't heard of issue with the Secure bootloader and gcc except for the buttonless example as summarized here.

    How did you test ? Did you modify anything in the dfu bootloader ? If you simply compile (without modifying anything) and flash the bootloader and the softdevice, would it advertise ?

    You can remove optimization and run the bootloader in debug mode and see where it crashes.

  • Thanks for the super quick response.

    Ok so I started with a completely fresh SDK-13.0.0. I make micro-ecc and copy over public_key.c and adjust the Makefile to point to it.

    Build completes successfully. I flash softdevice v4 and then the bootloader. LED1 and LED3 on BMD-300-EVAL illuminates. NRF Connect shows it's advertising. Yippee!

    I tried building the pca10040_debug. Without changing any optimization levels, it compiles. When I remove optimization (-O0) it gives me this error: ../../../../../components/libraries/bootloader/nrf_bootloader_app_start_asm.c:129:1: error: r7 cannot be used in asm here

    Debugging is useless with optimization as all I can see is disassembly.

    Results for SDK 12.2.0 example are that LED1 and LED3 illuminate. With 12.1.0 there is no illumination. Neither advertise.

    I still want to figure out what's going wrong with SDK 12 as I don't want to have to port over to SDK 13 and S132 v4.

Reply
  • Thanks for the super quick response.

    Ok so I started with a completely fresh SDK-13.0.0. I make micro-ecc and copy over public_key.c and adjust the Makefile to point to it.

    Build completes successfully. I flash softdevice v4 and then the bootloader. LED1 and LED3 on BMD-300-EVAL illuminates. NRF Connect shows it's advertising. Yippee!

    I tried building the pca10040_debug. Without changing any optimization levels, it compiles. When I remove optimization (-O0) it gives me this error: ../../../../../components/libraries/bootloader/nrf_bootloader_app_start_asm.c:129:1: error: r7 cannot be used in asm here

    Debugging is useless with optimization as all I can see is disassembly.

    Results for SDK 12.2.0 example are that LED1 and LED3 illuminate. With 12.1.0 there is no illumination. Neither advertise.

    I still want to figure out what's going wrong with SDK 12 as I don't want to have to port over to SDK 13 and S132 v4.

Children
No Data
Related