DFU Mesh serial not working

Hello, 

I'm trying to use mesh_bootloader_serial_gccarmemb_nrf52832_xxAA.hex with my custom app based on light switch example. 

I'm working with nrf_mesh_sdk 5.0. nRF52832 and devkit.

I'm programming with : 

nrfjprog --eraseall 
mergehex --merge "nrf5_SDK_for_Mesh_v5/bin/softdevice/s132_nrf52_7.2.0_softdevice.hex" "nrf5_SDK_for_Mesh_v5/mesh/bootloader/build/mesh_bootloader_serial_gccarmemb_nrf52832_xxAA_Debug/mesh_bootloader_serial_gccarmemb_nrf52832_xxAA.hex" --output "SD_BL.hex"
mergehex --merge "SD_BL.hex" "myapp_nrf52832_xxAA_s132_7.2.0.hex" --output "SD_BL_APP.hex"
nrfjprog --program "SD_BL_APP.hex" --family NRF52 --chiperase
nrfjprog --reset


My app is working but the bootloader is not started. 

I tried and read all your documentations. The application starts but the bootloader does not. The start address for the application flash is 0x26000 and the bootloader starts at 0x78000.

I don't have any programming errors except when I try to program the setting.hex that I generate with nrfutil settings generate.


Why is my bootloader never called? I put logs and a delay without success.

Thank you 

  • Yes you are right.

    When working with precompiled bin dfu it works. But I'm trying to use sagger projet with light switch. 

    Here all my CMD : 

    nrfjprog --eraseall
    Erasing user available code and UICR flash areas.
    Applying system reset.
    
    nrfjprog --program "nrf5_SDK_for_Mesh_v5/bin/softdevice/s132_nrf52_7.2.0_softdevice.hex" 
    Parsing hex file.
    Reading flash area to program to guarantee it is erased.
    Checking that the area to write is not protected.
    Programming device.
    
    nrfjprog --program "nrf5_SDK_for_Mesh_v5/mesh/bootloader/build/mesh_bootloader_serial_gccarmemb_nrf52832_xxAA_Debug/mesh_bootloader_serial_gccarmemb_nrf52832_xxAA.hex"
    Parsing hex file.
    Reading flash area to program to guarantee it is erased.
    Checking that the area to write is not protected.
    Programming device.
    
    nrfjprog --program "nrf5_SDK_for_Mesh_v5/examples/dfu/build/dfu_no_serial_nrf52832_xxAA_s132_7.2.0_Debug/dfu_no_serial_nrf52832_xxAA_s132_7.2.0.hex"
    Parsing hex file.
    Reading flash area to program to guarantee it is erased.
    Checking that the area to write is not protected.
    Programming device.
    
    python pc-nrfutil-5.2.0/ settings generate --family NRF52 --application "nrf5_SDK_for_Mesh_v5/examples/dfu/build/dfu_no_serial_nrf52832_xxAA_s132_7.2.0_Debug/dfu_no_serial_nrf52832_xxAA_s132_7.2.0.hex" --application-version 1 --bootloader-version 1 --bl-settings-version 1 "DFU/setting.hex"
    
    I also tried --bl-settings-version 2
    
    Note: Generating a DFU settings page with backup page included.
    This is only required for bootloaders from nRF5 SDK 15.1 and newer.
    If you want to skip backup page generation, use --no-backup option.
    Generated Bootloader DFU settings .hex file and stored it in: DFU/setting.hex
    
    Bootloader DFU Settings:
    * File: DFU/setting.hex
    * Family: nRF52
    * Start Address: 0x0007F000
    * CRC: 0xFE5F3DE8
    * Settings Version: 0x00000001 (1)
    * App Version: 0x00000001 (1)
    * Bootloader Version: 0x00000001 (1)
    * Bank Layout: 0x00000000
    * Current Bank: 0x00000000
    * Application Size: 0x0001D658 (120408 bytes)
    * Application CRC: 0xF02D6B0F
    * Bank0 Bank Code: 0x00000001
    * Softdevice Size: 0x00000000 (0 bytes)
    * Boot Validation CRC: 0x00000000
    * SD Boot Validation Type: 0x00000000 (0)
    * App Boot Validation Type: 0x00000000 (0)
    
    
    nrfjprog --program "DFU/setting.hex" --verify
    Parsing hex file.
    Reading flash area to program to guarantee it is erased.
    ERROR: The area to write is not erased.

  • Hi Nabil, 
    I'm not so sure I read you right. But did you have trouble updating the dfu_no_serial ? 


    Please help us by following the instruction in the documentation and tell us at exactly which step you have the issue. 

  • I understand, not easy to explain. 

    In fact everything works when I program the precompiled bin. from : 

    nrfjprog --program "nrf5_SDK_for_Mesh_v5/bin/bootloader/gccarmemb/mesh_bootloader_serial_gccarmemb_nrf52832_xxAA.hex"

    but not from segger project : 


    nrfjprog --program "/nrf5_SDK_for_Mesh_v5/mesh/bootloader/build/mesh_bootloader_serial_gccarmemb_nrf52832_xxAA_Debug/mesh_bootloader_serial_gccarmemb_nrf52832_xxAA.hex"


    something is not the same in the sagger project and makes it not work. I see that it does not work because the bootloader does not work as explained above. -> BOOTLOADERADDR() == 0xFFFFFFFF

  • Hi Nabil, 

    Could you show how you compiled the bootloader ? 
    The BOOTLOADERADDR gets the value either from UICR or from MBR info page. This should be written when you write the bootloader. 
    You should see it in \mesh\bootloader\src\main.c 

    I suspect that there could be something wrong with the compiler, please make sure you use the exact compiler as mentioned in the documentation: 9-2019-q4-major (9.2.1)

Related