DFU over UART doesn't work

I'm working on a custom board that uses an NRF52840, I've followed the Nordic Developer Academy course related to DFU over uart0 (Exercise 1 - DFU over UART - Nordic Developer Academy (nordicsemi.com)) but unforunately this doesn't work, I suppose this is due to some differences with the DK Board. When I try Serial Recovery the loading is stuck at 0%..

I'm newby and I don't know how to solve it,

Parents Reply Children
  • Hello, unfortunately is not my own project and I can't share the schematic. The last tutorial that I've followed seems to be more suitable to my case (please, correct me if I am wrong) as the ncs is 1.9.1, this is the link https://devzone.nordicsemi.com/guides/nrf-connect-sdk-guides/b/software/posts/ncs-dfu#serial_dfu. It does not compile unless I comment CONFIG_MCUMGR_SMP_UART=y, it reports 

    C:\ncs\v1.9.1\include\device.h:96:39: error: '__device_dts_ord_DT_CHOSEN_zephyr_uart_mcumgr_ORD' undeclared (first use in this function)
    96 | #define DEVICE_DT_NAME_GET(name) _CONCAT(__device_, name)
    .

    My prg.conf instead is:

    .

    CONFIG_GPIO=y
    CONFIG_CONSOLE=y
    CONFIG_UART_CONSOLE=n
    
    CONFIG_NFCT_PINS_AS_GPIOS=y
    
    CONFIG_BOOTLOADER_MCUBOOT=y
    
    CONFIG_I2S=y
    
    CONFIG_PWM=y
    CONFIG_LED=y
    CONFIG_LED_PWM=y
    
    CONFIG_ADC=y
    CONFIG_ADC_ASYNC=y
    
    CONFIG_PM=y
    CONFIG_PM_DEVICE=y
    
    CONFIG_I2S=y
    
    CONFIG_MCUMGR=y
    
    CONFIG_MCUMGR_CMD_IMG_MGMT=y
    CONFIG_MCUMGR_CMD_OS_MGMT=y
    
    CONFIG_BOOTLOADER_MCUBOOT=y
    
    CONFIG_MCUMGR_SMP_UART=y   #source of compiling problem
    
    CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096

    I also added:

    /{
        chosen{
            zephyr,console=&uart0;
            zephyr,shell-uart=&uart0;
            zephyr,uart-mcumgr=&uart0;
        };
    };

  • Hello,

    ''error: '__device_dts_ord_DT_CHOSEN_zephyr_uart_mcumgr_ORD' undeclared (first use in this function)'' error seems that the device driver for the node (The device structure you are trying to get for the devicetree node) has not allocated a struct device for it. Probably device driver is not enabled. Can you share the device tree file and output dts (zephyr.dts), devicetree_generated.h from build folder? I can make the case private. 

    And the NCS intermediate tutorial is compatible with 

    • nRF Connect SDK v2.5.2 – v2.6.1 

    If you work on V1.9.1, it should not work accordingly.  

  • These are the files: 6165.zephyr.dts7673.nrf52840.dtsi, I have not found the devicetree_generated.h but I supposed that this file is the equivalent as this sentence appeared during compiling "-- Generated devicetree_unfixed.h: C:/Users/teodoro.mastellone/Desktop/da_inviare/codice_ridotto/build_1/zephyr/include/generated/devicetree_unfixed.h" 4011.devicetree_unfixed.h.

    Thank you for your help in advance.

Related