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

Custom DFU transport over mesh (NCS 1.6)

Good day!

I have a problem with bootloader and custon DFU transport on nRF52840. What I do:

  1. Transfer DFU over mesh using vendor model (it was implemented for MESH SDK, had been tested and successfully worked before NCS migration);
  2. Use dfu target mcuboot to store new FW on flash (also tried to save it directly using stream flash and mcuboot api for update)
  3. After transfer and reboot board turns off for a bout half minute and turns back to primary slot.

Is it possible to do DFU this way? Or I should use MCUMGR?

Also I can't figure out flash map. I found that PM manager overrides dts, fine. Secondary address starts from 0x85000, in my case, and debug shows that boot util looks for FW at other address:

00> I: dfu core > dfu_core_update_local_fw > header info >> size 338724, ver 1
00> D: writing magic; fa_id=5 off=0x78ff0 (0xfdff0)
00> D: writing swap_info; fa_id=5 off=0x78fd8 (0xfdfd8), swap_type=0x2 image_num=0x0
00> I: MCUBoot image upgrade scheduled. Reset device to apply
00> D: dfu core > dfu_core_update_local_fw > storing dfu request.

P.s. I can't enable RTT logging in MCUBoot to get log info at startup. I use next configs in mcuboot.conf :

CONFIG_LOG=y
CONFIG_LOG_MODE_MINIMAL=y # former CONFIG_MODE_MINIMAL
CONFIG_SERIAL=n
CONFIG_USE_SEGGER_RTT=y
CONFIG_LOG_BACKEND_RTT=y
CONFIG_LOG_MODE_IMMEDIATE=y
CONFIG_UART_CONSOLE=n
CONFIG_RTT_CONSOLE=y

### Ensure Zephyr logging changes don't use more resources
CONFIG_LOG_DEFAULT_LEVEL=4
### Decrease footprint by ~4 KB in comparison to CBPRINTF_COMPLETE=y
CONFIG_CBPRINTF_NANO=y

CONFIG_BOOT_MAX_IMG_SECTORS=1024

and overlay definition at CmakeLists

if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/mcuboot.conf")
    list(APPEND mcuboot_OVERLAY_CONFIG
            "${CMAKE_CURRENT_SOURCE_DIR}/mcuboot.conf"
            )
endif()

Tools:

  1. nRF52840 custom board
  2. NCS v1.6.1
  3. Ubuntu
  4. JLinkRTTViewer
Parents Reply Children
No Data
Related