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

Mesh DFU Example 52840 - No CMD handler

Using 840DK and latest Segger (4.42)

Building Mesh DFU example: dfu_nrf52840_xxAA_s140_7_0_1

Latest Mesh SDK v4

Latest SDK 16

Build with no errors, when starting debug, loads app, soft device without any problems, an runs with following output: No CMD handler!

In one post found suggestion to change RAM_PH_SIZE to RAM_SIZE in flash_placement.xml

 <MemorySegment name="RAM" start="$(RAM_PH_START)" size="$(RAM_PH_SIZE)">

but this results in the linking errors.

Building ‘dfu_nrf52840_xxAA_s140_7.0.1’ from solution ‘dfu_nrf52840_xxAA_s140_7.0.1’ in configuration ‘Debug’
Generating linker script ‘dfu_nrf52840_xxAA_s140_7.0.1.ld’
Linking dfu_nrf52840_xxAA_s140_7.0.1.elf
.reserved_ram is too large to fit in RAM memory segment
.data_run is too large to fit in RAM memory segment
.bss is too large to fit in RAM memory segment
.heap is too large to fit in RAM memory segment
section .heap overlaps absolute placed section .stack
Build failed

<t: 0>, main.c, 194, ----- Bluetooth Mesh DFU Example -----
<t: 13451>, serial_handler_prov.c, 267, Generating encryption keypair...
<t: 18243>, main.c, 200, Initialization complete!
<t: 22923>, main.c, 221, Enabling serial interface...
<t: 22926>, mesh_app_utils.c, 65, Device UUID (raw): A5C185160B129148864B03CC8F8DA428
<t: 22929>, mesh_app_utils.c, 66, Device UUID : 1685C1A5-120B-4891-864B-03CC8F8DA428
<t: 22939>, nrf_mesh_dfu.c, 919, ERROR: No CMD handler!
<t: 22946>, main.c, 229, DFU example started!

Parents
  • Hi Piotr, 

    You would need to flash the bootloader in addition to the DFU application and the device page. 

    So 4 things need to be flashed: 

    - softdevice

    - bootloader

    - dfu application (\examples\dfu)

    - device page. 

    The bootloader binary file can be found at \Mesh_v4.0.0\bin\bootloader

    You can compile the bootloader as well, to compile the bootloader you do this on the commandline: 

    cmake -G Ninja .. -DSDK_ROOT=[path to your nRF5 SDK] -DCMAKE_BUILD_TYPE=MinSizeRel -DBUILD_BOOTLOADER=ON


  • Good, some progress...

    2 questions:

    Which bootloader is "better": gccarmemb or armcc?

    Are the softdevices the same as in the sdk16? Why are those duplicated here?

  • And following one, the serial bootloader is for the examples using serial, correct?

    It wold be serial and dfu with serial. The "nonserial" bootloaders are for all other ones, dfu w/o serial, beacon, etc.

    I do not want to get into cmake if possible, prefer to stay within SES, since I have a lot to debug.

  • They are the same code, just compiled using different toolchain gccarmemb or armcc. You can use either of them. 
    The softdevice is the same as in the nRF5 SDK. No difference. 


    The serial bootloader is the bootloader that support serial interface. This mean this bootloader when running without app (or if the app switch to the bootloader) it can receive data via UART. 

    The non serial bootloader can be used with serial dfu application and also with non serial dfu application. But when it has to run standalone it can't receive data via UART. When it's used with serial interface

    Please follow this guide strictly to test the mesh DFU feature: 


    https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.meshsdk.v4.0.0/md_doc_libraries_dfu_dfu_quick_start.html?cp=7_2_2_2_3

  • OK, got it loaded and running. Switched to 832DK, since we will be running on 52832

    Still not clear why you put both (gcc and non-gcc) bootloaders in the SDK. I want to push to our SVN just one of those, and selected armcc

    Is the ses using gcc compiler, or arm version? And from your experience, which one is better?

    So next will be testing of the DFU operation, but first need to do the first mesh, start with serial example ...

    Thanks, Piotr

    <t: 0>, main.c, 194, ----- Bluetooth Mesh DFU Example -----
    <t: 18213>, serial_handler_prov.c, 267, Generating encryption keypair...
    <t: 22949>, main.c, 200, Initialization complete!
    <t: 27594>, main.c, 221, Enabling serial interface...
    <t: 27597>, mesh_app_utils.c, 65, Device UUID (raw): 2DADD3BED4C6C847A870788934617ADD
    <t: 27600>, mesh_app_utils.c, 66, Device UUID : BED3AD2D-C6D4-47C8-A870-788934617ADD
    <t: 27609>, nrf_mesh_dfu.c, 538, RADIO TX! SLOT 0, count 255, interval: periodic, handle: FFFE
    <t: 27614>, nrf_mesh_dfu.c, 576, SERIAL TX!
    <t: 27620>, main.c, 229, DFU example started!

  • Armcc is provided by Keil (belong to ARM) and gcc is from gnu.org. It's hard to tell which one is better. But I don't see a big difference in performance or code size.

    SES use GCC as the compiler. But it's not a problem if you use the bootloader compiled with armcc and the application compiled with gcc. They are independent binaries. 

Reply Children
No Data
Related