mcumgr: The firmware doesn't boot up after upload

Hi there,

I use MCUboot, and seemingly, the firmware update succeeds:

$ p mcumgr --conntype serial --connstring "/dev/ttyACM2,baud=115200" image upload -e zephyr.bin
 413.38 KiB / 413.38 KiB [============================================================================================================================================================================================================================] 100.00% 1.06 KiB/s 6m31s
Done

However, for some reason, the `image list` command yields no results:

$ p mcumgr --conntype serial --connstring "/dev/ttyACM2,baud=115200" image list
Images:
Split status: N/A (0)

Given the lack of image results, I couldn't reproduce the steps of the  Add DFU support to your application guide, which I've tried to follow.

After restarting the device, the firmware doesn't boot up.

CONFIG_BOOTLOADER_MCUBOOT=y is featured in my prj.conf.

child_image/mcuboot.conf contains the following:

CONFIG_PINCTRL=y
CONFIG_PM_PARTITION_SIZE_MCUBOOT=0x10000
CONFIG_LOG=y
CONFIG_SIZE_OPTIMIZATIONS=y
CONFIG_SERIAL=y
CONFIG_UART_LINE_CTRL=y
CONFIG_MCUBOOT_SERIAL=y
CONFIG_BOOT_SERIAL_CDC_ACM=y
CONFIG_BOOT_SERIAL_PIN_RESET=y
CONFIG_BOOT_SERIAL_WAIT_FOR_DFU=y
CONFIG_BOOT_SERIAL_WAIT_FOR_DFU_ALWAYS=n
CONFIG_BOOT_SERIAL_WAIT_FOR_DFU_TIMEOUT=3000
CONFIG_BOOT_SERIAL_NO_APPLICATION=y
CONFIG_LOG_BACKEND_UART=y
CONFIG_LOG_BACKEND_RTT=n

(The CONFIG_BOOT_SERIAL_WAIT_FOR_DFU_ALWAYS=n Kconfig option comes from  MCUboot should only timeout after hardware reset .)

The devicetree flash section:

&flash0 {
    partitions {
        compatible = "fixed-partitions";
        #address-cells = <1>;
        #size-cells = <1>;

        boot_partition: partition@0 {
            label = "mcuboot";
            reg = <0x0 0xc000>;
        };
        slot0_partition: partition@c000 {
            label = "image-0";
            reg = <0xc000 0x72000>;
        };
        slot1_partition: partition@7e000 {
            label = "image-1";
            reg = <0x7e000 0x72000>;
        };
        scratch_partition: partition@f0000 {
            label = "image-scratch";
            reg = <0xf0000 0xa000>;
        };
        storage_partition: partition@fa000 {
            label = "storage";
            reg = <0xfa000 0x6000>;
        };
    };
};

Thanks in advance for your help!

Laci

Parents
  • In the meantime, I've realized that the size of CONFIG_PM_PARTITION_SIZE_MCUBOOT and boot_partition didn't match and updated the partitions accordingly:

    &flash0 {
        partitions {
            compatible = "fixed-partitions";
            #address-cells = <1>;
            #size-cells = <1>;
    
            boot_partition: partition@0 {
                label = "mcuboot";
                reg = <0x0 0x10000>;
            };
            slot0_partition: partition@10000 {
                label = "image-0";
                reg = <0x10000 0x72000>;
            };
            slot1_partition: partition@82000 {
                label = "image-1";
                reg = <0x82000 0x72000>;
            };
            scratch_partition: partition@f4000 {
                label = "image-scratch";
                reg = <0xf4000 0x6000>;
            };
            storage_partition: partition@fe000 {
                label = "storage";
                reg = <0xfe000 0x2000>;
            };
        };
    };

    But sadly, the issue persists.

  • Hi Laci,

    Please try to use the same static partition file ( warning from partition_manager on NCS 2.5.0 ) for your project(s) to ensure your memory layout is consistent across builds.  

    Best regards,

    Vidar

  • Hi Vidar,

    I've copied $BUILD_DIR/partitions.yml as $APPLICATION_CONFIG_DIR/pm_static.yml, and the build is picking it up according to:

    -- Found partition manager static configuration: /home/laci/projects/firmware/uhk/device/pm_static.yml
    Partition 'mcuboot' is not included in the dynamic resolving since it is statically defined.
    Partition 'mcuboot_pad' is not included in the dynamic resolving since it is statically defined.
    Partition 'mcuboot_primary' is not included in the dynamic resolving since it is statically defined.
    Partition 'mcuboot_primary_app' is not included in the dynamic resolving since it is statically defined.
    Partition 'mcuboot_secondary' is not included in the dynamic resolving since it is statically defined.
    Partition 'settings_storage' is not included in the dynamic resolving since it is statically defined.

    But then, I can see MCUboot enumerating via USB and staying enumerated, never executing the application firmware.

    The above log fragment is included before the MCUboot memory regions are printed, but afterward, they're not included again before the application firmware's memory regions are printed. I'm unsure whether it's a problem.

    Am I missing something?

  • Hi,

    mlac said:
    I've copied $BUILD_DIR/partitions.yml as $APPLICATION_CONFIG_DIR/pm_static.yml, and the build is picking it up according to:

    This is the correct approach, and the build log also confirms that the static partition file was applied correctly. I don't think this is related to your current issue.

    mlac said:
    But then, I can see MCUboot enumerating via USB and staying enumerated, never executing the application firmware.

    This suggests that MCUBoot is not finding a bootable image. Did you flash the merged.hex file?

  • Yes, I do flash the merged.hex file.

    Following is the build and flash log:

     *  Executing task: nRF Connect: Build [pristine]: device/build/bar-n-right (active) 
    
    Building device
    west build --build-dir /home/laci/projects/firmware-barn/bar/device/build/bar-n-right /home/laci/projects/firmware-barn/bar/device --pristine --board bar-n-right --no-sysbuild -- -DNCS_TOOLCHAIN_VERSION=NONE -DBOARD_ROOT=/home/laci/projects/firmware-barn/bar -DCONF_FILE=/home/laci/projects/firmware-barn/bar/device/prj.conf -DOVERLAY_CONFIG=/home/laci/projects/firmware-barn/bar/device/prj.conf.overlays/bar-n-right.prj.conf
    
    -- west build: generating a build system
    Loading Zephyr default modules (Zephyr base).
    -- Application: /home/laci/projects/firmware-barn/bar/device
    -- CMake version: 3.20.5
    -- Found Python3: /home/laci/ncs/toolchains/7795df4459/usr/local/bin/python3.8 (found suitable exact version "3.8.2") found components: Interpreter 
    -- Cache files will be written to: /home/laci/.cache/zephyr
    -- Zephyr version: 3.3.99 (/home/laci/projects/firmware-barn/nrfconnect/zephyr)
    -- Found west (found suitable version "1.1.0", minimum required is "0.7.1")
    -- Board: bar-n-right
    -- Found host-tools: zephyr 0.16.1 (/home/laci/ncs/toolchains/7795df4459/opt/zephyr-sdk)
    -- Found toolchain: zephyr 0.16.1 (/home/laci/ncs/toolchains/7795df4459/opt/zephyr-sdk)
    -- Found Dtc: /home/laci/ncs/toolchains/7795df4459/usr/bin/dtc (found suitable version "1.4.7", minimum required is "1.4.6") 
    -- Found BOARD.dts: /home/laci/projects/firmware-barn/bar/boards/arm/bar-n-right/bar-n-right.dts
    -- Generated zephyr.dts: /home/laci/projects/firmware-barn/bar/device/build/bar-n-right/zephyr/zephyr.dts
    -- Generated devicetree_generated.h: /home/laci/projects/firmware-barn/bar/device/build/bar-n-right/zephyr/include/generated/devicetree_generated.h
    -- Including generated dts.cmake file: /home/laci/projects/firmware-barn/bar/device/build/bar-n-right/zephyr/dts.cmake
    Parsing /home/laci/projects/firmware-barn/bar/device/Kconfig
    Loaded configuration '/home/laci/projects/firmware-barn/bar/boards/arm/bar-n-right/bar-n-right_defconfig'
    Merged configuration '/home/laci/projects/firmware-barn/bar/device/prj.conf'
    Merged configuration '/home/laci/projects/firmware-barn/bar/device/prj.conf.overlays/bar-n-right.prj.conf'
    Configuration saved to '/home/laci/projects/firmware-barn/bar/device/build/bar-n-right/zephyr/.config'
    Kconfig header saved to '/home/laci/projects/firmware-barn/bar/device/build/bar-n-right/zephyr/include/generated/autoconf.h'
    
    warning: Deprecated symbol CPLUSPLUS is enabled.
    
    
    warning: Deprecated symbol LIB_CPLUSPLUS is enabled.
    
    
    warning: Experimental symbol UDC_DRIVER is enabled.
    
    -- Found GnuLd: /home/laci/ncs/toolchains/7795df4459/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd (found version "2.38") 
    -- The C compiler identification is GNU 12.2.0
    -- The CXX compiler identification is GNU 12.2.0
    -- The ASM compiler identification is GNU
    -- Found assembler: /home/laci/ncs/toolchains/7795df4459/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc
    -- Found Python3: /home/laci/ncs/toolchains/7795df4459/usr/local/bin/python3.8 (found version "3.8.2") found components: Interpreter 
    
    === child image mcuboot -  begin ===
    loading initial cache file /home/laci/projects/firmware-barn/bar/device/build/bar-n-right/mcuboot/child_image_preload.cmake
    Loading Zephyr default modules (Zephyr base).
    -- Application: /home/laci/projects/firmware-barn/nrfconnect/bootloader/mcuboot/boot/zephyr
    -- CMake version: 3.20.5
    -- Found Python3: /home/laci/ncs/toolchains/7795df4459/usr/local/bin/python3.8 (found suitable exact version "3.8.2") found components: Interpreter 
    -- Cache files will be written to: /home/laci/.cache/zephyr
    -- Zephyr version: 3.3.99 (/home/laci/projects/firmware-barn/nrfconnect/zephyr)
    -- Found west (found suitable version "1.1.0", minimum required is "0.7.1")
    -- Board: bar-n-right
    -- Found host-tools: zephyr 0.16.1 (/home/laci/ncs/toolchains/7795df4459/opt/zephyr-sdk)
    -- Found toolchain: zephyr 0.16.1 (/home/laci/ncs/toolchains/7795df4459/opt/zephyr-sdk)
    -- Found Dtc: /home/laci/ncs/toolchains/7795df4459/usr/bin/dtc (found suitable version "1.4.7", minimum required is "1.4.6") 
    -- Found BOARD.dts: /home/laci/projects/firmware-barn/bar/boards/arm/bar-n-right/bar-n-right.dts
    -- Found devicetree overlay: /home/laci/projects/firmware-barn/nrfconnect/nrf/modules/mcuboot/usb.overlay
    -- Generated zephyr.dts: /home/laci/projects/firmware-barn/bar/device/build/bar-n-right/mcuboot/zephyr/zephyr.dts
    -- Generated devicetree_generated.h: /home/laci/projects/firmware-barn/bar/device/build/bar-n-right/mcuboot/zephyr/include/generated/devicetree_generated.h
    -- Including generated dts.cmake file: /home/laci/projects/firmware-barn/bar/device/build/bar-n-right/mcuboot/zephyr/dts.cmake
    Parsing /home/laci/projects/firmware-barn/nrfconnect/bootloader/mcuboot/boot/zephyr/Kconfig
    Loaded configuration '/home/laci/projects/firmware-barn/bar/boards/arm/bar-n-right/bar-n-right_defconfig'
    Merged configuration '/home/laci/projects/firmware-barn/nrfconnect/bootloader/mcuboot/boot/zephyr/prj.conf'
    Merged configuration '/home/laci/projects/firmware-barn/nrfconnect/nrf/subsys/partition_manager/partition_manager_enabled.conf'
    Merged configuration '/home/laci/projects/firmware-barn/bar/device/child_image/mcuboot.conf'
    Merged configuration '/home/laci/projects/firmware-barn/bar/device/build/bar-n-right/mcuboot/zephyr/misc/generated/extra_kconfig_options.conf'
    Configuration saved to '/home/laci/projects/firmware-barn/bar/device/build/bar-n-right/mcuboot/zephyr/.config'
    Kconfig header saved to '/home/laci/projects/firmware-barn/bar/device/build/bar-n-right/mcuboot/zephyr/include/generated/autoconf.h'
    -- Found GnuLd: /home/laci/ncs/toolchains/7795df4459/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd (found version "2.38") 
    -- The C compiler identification is GNU 12.2.0
    -- The CXX compiler identification is GNU 12.2.0
    -- The ASM compiler identification is GNU
    -- Found assembler: /home/laci/ncs/toolchains/7795df4459/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc
    MCUBoot bootloader key file: /home/laci/projects/firmware-barn/nrfconnect/bootloader/mcuboot/root-ec-p256.pem
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /home/laci/projects/firmware-barn/bar/device/build/bar-n-right/mcuboot
    === child image mcuboot -  end ===
    
    CMake Warning at /home/laci/projects/firmware-barn/nrfconnect/zephyr/CMakeLists.txt:1865 (message):
      __ASSERT() statements are globally ENABLED
    
    
    -- Found partition manager static configuration: /home/laci/projects/firmware-barn/bar/device/pm_static.yml
    Partition 'mcuboot' is not included in the dynamic resolving since it is statically defined.
    Partition 'mcuboot_pad' is not included in the dynamic resolving since it is statically defined.
    Partition 'mcuboot_primary' is not included in the dynamic resolving since it is statically defined.
    Partition 'mcuboot_primary_app' is not included in the dynamic resolving since it is statically defined.
    Partition 'mcuboot_secondary' is not included in the dynamic resolving since it is statically defined.
    Partition 'settings_storage' is not included in the dynamic resolving since it is statically defined.
    CMake Warning (dev) at /home/laci/ncs/toolchains/7795df4459/usr/local/share/cmake-3.20/Modules/GNUInstallDirs.cmake:236 (message):
      Unable to determine default CMAKE_INSTALL_LIBDIR directory because no
      target architecture is known.  Please enable at least one language before
      including GNUInstallDirs.
    Call Stack (most recent call first):
      c2usb/CMakeLists.txt:5 (include)
    This warning is for project developers.  Use -Wno-dev to suppress it.
    
    -- etl | Version string determined with git describe: 20.36.1
    -- etl | Determined ETL version 20.36.1 from the git tag
    -- Found Python: /usr/bin/python3.10 (found suitable version "3.10.12", minimum required is "3") found components: Interpreter 
    Code generation to path "/home/laci/projects/firmware-barn/bar/device/c2usb/modules/hid-rp/hid-rp/hid/page" is complete.
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /home/laci/projects/firmware-barn/bar/device/build/bar-n-right
    -- west build: building application
    [1/364] Preparing syscall dependency handling
    
    [3/364] Generating include/generated/version.h
    -- Zephyr version: 3.3.99 (/home/laci/projects/firmware-barn/nrfconnect/zephyr), build: v3.3.99-ncs1-1
    [1/217] Preparing syscall dependency handling
    
    [2/217] Generating include/generated/version.h
    -- Zephyr version: 3.3.99 (/home/laci/projects/firmware-barn/nrfconnect/zephyr), build: v3.3.99-ncs1-1
    [207/217] Linking C executable zephyr/zephyr_pre0.elf
    
    [211/217] Linking C executable zephyr/zephyr_pre1.elf
    
    [217/217] Linking C executable zephyr/zephyr.elf
    Memory region         Used Size  Region Size  %age Used
               FLASH:       55416 B        64 KB     84.56%
                 RAM:       33216 B       256 KB     12.67%
            IDT_LIST:          0 GB         2 KB      0.00%
    [15/364] Building CXX object c2usb/CMakeFiles/c2usb.dir/c2usb/usb/df/class/cdc_acm.cpp.obj
    ../../c2usb/c2usb/usb/df/class/cdc_acm.cpp: In member function 'virtual void usb::df::cdc::acm::function::control_setup_request(usb::df::message&, const usb::df::config::interface&)':
    ../../c2usb/c2usb/usb/df/class/cdc_acm.cpp:76:14: warning: unused variable 'data_terminal_ready' [-Wunused-variable]
       76 |         bool data_terminal_ready = msg.request().wValue & 1;
          |              ^~~~~~~~~~~~~~~~~~~
    ../../c2usb/c2usb/usb/df/class/cdc_acm.cpp:77:14: warning: unused variable 'request_to_send' [-Wunused-variable]
       77 |         bool request_to_send = msg.request().wValue & 2;
          |              ^~~~~~~~~~~~~~~
    [28/364] Building CXX object c2usb/CMakeFiles/c2usb.dir/c2usb/port/zephyr/udc_mac.cpp.obj
    In file included from /home/laci/projects/firmware-barn/nrfconnect/zephyr/include/zephyr/device.h:13,
                     from /home/laci/projects/firmware-barn/nrfconnect/zephyr/include/zephyr/drivers/usb/udc.h:16,
                     from ../../c2usb/c2usb/port/zephyr/udc_mac.hpp:23,
                     from ../../c2usb/c2usb/port/zephyr/udc_mac.cpp:11:
    ../../c2usb/c2usb/port/zephyr/udc_mac.cpp:43:10: warning: invalid conversion from 'int (*)(const device*)' to 'int (*)()' [-fpermissive]
       43 | SYS_INIT(udc_mac_preinit, POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEVICE);
    /home/laci/projects/firmware-barn/nrfconnect/zephyr/include/zephyr/init.h:156:45: note: in definition of macro 'SYS_INIT_NAMED'
      156 |                         .init_fn = {.sys = (init_fn_)},                        \
          |                                             ^~~~~~~~
    ../../c2usb/c2usb/port/zephyr/udc_mac.cpp:43:1: note: in expansion of macro 'SYS_INIT'
       43 | SYS_INIT(udc_mac_preinit, POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEVICE);
          | ^~~~~~~~
    [49/364] Building C object CMakeFiles/app.dir/src/bt_hid.c.obj
    In file included from ../../src/bt_hid.c:5:
    /home/laci/projects/firmware-barn/nrfconnect/zephyr/include/zephyr/usb/class/usb_hid.h:36:32: warning: 'struct usb_setup_packet' declared inside parameter list will not be visible outside of this definition or declaration
       36 |                         struct usb_setup_packet *setup, int32_t *len,
          |                                ^~~~~~~~~~~~~~~~
    ../../src/bt_hid.c: In function 'hid_mouse_init':
    ../../src/bt_hid.c:315:13: warning: Macro is deprecated
      315 |     static const uint8_t mouse_movement_mask[ceiling_fraction(INPUT_REP_MOVEMENT_LEN, 8)] = {0};
          |             ^~~~~~~~~~~~~~~~~~~~~
    ../../src/bt_hid.c: In function 'key_report_send':
    ../../src/bt_hid.c:401:17: warning: unused variable 'buffer' [-Wunused-variable]
      401 |         uint8_t buffer[INPUT_REP_MOVEMENT_LEN] = {0, 0, 5};
          |                 ^~~~~~
    ../../src/bt_hid.c:396:9: warning: unused variable 'mouse_err' [-Wunused-variable]
      396 |     int mouse_err = 0;
          |         ^~~~~~~~~
    ../../src/bt_hid.c: At top level:
    ../../src/bt_hid.c:234:13: warning: 'hid_mouse_init' defined but not used [-Wunused-function]
      234 | static void hid_mouse_init(void)
          |             ^~~~~~~~~~~~~~
    [348/364] Linking CXX executable zephyr/zephyr_pre0.elf
    
    [352/364] Linking CXX executable zephyr/zephyr_pre1.elf
    
    [361/364] Linking CXX executable zephyr/zephyr.elf
    Memory region         Used Size  Region Size  %age Used
               FLASH:      459568 B     486912 B     94.38%
                 RAM:       93556 B       256 KB     35.69%
            IDT_LIST:          0 GB         2 KB      0.00%
    [364/364] Generating zephyr/merged.hex
     *  Terminal will be reused by tasks, press any key to close it. 
    
     *  Executing task: nRF Connect: Build: device/build/bar-n-right (active) 
    
    Building device
    west build --build-dir /home/laci/projects/firmware-barn/bar/device/build/bar-n-right /home/laci/projects/firmware-barn/bar/device
    
    [0/4] Performing build step for 'mcuboot_subimage'
    ninja: no work to do.
     *  Terminal will be reused by tasks, press any key to close it. 
    
     *  Executing task: nRF Connect: Flash: device/build/bar-n-right (active) 
    
    Flashing build/bar-n-right to 69665139
    west flash -d /home/laci/projects/firmware-barn/bar/device/build/bar-n-right --skip-rebuild --dev-id 69665139
    
    -- west flash: using runner nrfjprog
    -- runners.nrfjprog: Flashing file: /home/laci/projects/firmware-barn/bar/device/build/bar-n-right/zephyr/merged.hex
    [ #################### ]  14.517s | Erase file - Done erasing                                                          
    [ #################### ]   6.000s | Program file - Done programming                                                    
    [ #################### ]   6.756s | Verify file - Done verifying                                                       
    Applying system reset.
    Run.
    -- runners.nrfjprog: Board with serial number 69665139 flashed successfully.
     *  Terminal will be reused by tasks, press any key to close it. 
    

    Thanks in advance!

Reply
  • Yes, I do flash the merged.hex file.

    Following is the build and flash log:

     *  Executing task: nRF Connect: Build [pristine]: device/build/bar-n-right (active) 
    
    Building device
    west build --build-dir /home/laci/projects/firmware-barn/bar/device/build/bar-n-right /home/laci/projects/firmware-barn/bar/device --pristine --board bar-n-right --no-sysbuild -- -DNCS_TOOLCHAIN_VERSION=NONE -DBOARD_ROOT=/home/laci/projects/firmware-barn/bar -DCONF_FILE=/home/laci/projects/firmware-barn/bar/device/prj.conf -DOVERLAY_CONFIG=/home/laci/projects/firmware-barn/bar/device/prj.conf.overlays/bar-n-right.prj.conf
    
    -- west build: generating a build system
    Loading Zephyr default modules (Zephyr base).
    -- Application: /home/laci/projects/firmware-barn/bar/device
    -- CMake version: 3.20.5
    -- Found Python3: /home/laci/ncs/toolchains/7795df4459/usr/local/bin/python3.8 (found suitable exact version "3.8.2") found components: Interpreter 
    -- Cache files will be written to: /home/laci/.cache/zephyr
    -- Zephyr version: 3.3.99 (/home/laci/projects/firmware-barn/nrfconnect/zephyr)
    -- Found west (found suitable version "1.1.0", minimum required is "0.7.1")
    -- Board: bar-n-right
    -- Found host-tools: zephyr 0.16.1 (/home/laci/ncs/toolchains/7795df4459/opt/zephyr-sdk)
    -- Found toolchain: zephyr 0.16.1 (/home/laci/ncs/toolchains/7795df4459/opt/zephyr-sdk)
    -- Found Dtc: /home/laci/ncs/toolchains/7795df4459/usr/bin/dtc (found suitable version "1.4.7", minimum required is "1.4.6") 
    -- Found BOARD.dts: /home/laci/projects/firmware-barn/bar/boards/arm/bar-n-right/bar-n-right.dts
    -- Generated zephyr.dts: /home/laci/projects/firmware-barn/bar/device/build/bar-n-right/zephyr/zephyr.dts
    -- Generated devicetree_generated.h: /home/laci/projects/firmware-barn/bar/device/build/bar-n-right/zephyr/include/generated/devicetree_generated.h
    -- Including generated dts.cmake file: /home/laci/projects/firmware-barn/bar/device/build/bar-n-right/zephyr/dts.cmake
    Parsing /home/laci/projects/firmware-barn/bar/device/Kconfig
    Loaded configuration '/home/laci/projects/firmware-barn/bar/boards/arm/bar-n-right/bar-n-right_defconfig'
    Merged configuration '/home/laci/projects/firmware-barn/bar/device/prj.conf'
    Merged configuration '/home/laci/projects/firmware-barn/bar/device/prj.conf.overlays/bar-n-right.prj.conf'
    Configuration saved to '/home/laci/projects/firmware-barn/bar/device/build/bar-n-right/zephyr/.config'
    Kconfig header saved to '/home/laci/projects/firmware-barn/bar/device/build/bar-n-right/zephyr/include/generated/autoconf.h'
    
    warning: Deprecated symbol CPLUSPLUS is enabled.
    
    
    warning: Deprecated symbol LIB_CPLUSPLUS is enabled.
    
    
    warning: Experimental symbol UDC_DRIVER is enabled.
    
    -- Found GnuLd: /home/laci/ncs/toolchains/7795df4459/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd (found version "2.38") 
    -- The C compiler identification is GNU 12.2.0
    -- The CXX compiler identification is GNU 12.2.0
    -- The ASM compiler identification is GNU
    -- Found assembler: /home/laci/ncs/toolchains/7795df4459/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc
    -- Found Python3: /home/laci/ncs/toolchains/7795df4459/usr/local/bin/python3.8 (found version "3.8.2") found components: Interpreter 
    
    === child image mcuboot -  begin ===
    loading initial cache file /home/laci/projects/firmware-barn/bar/device/build/bar-n-right/mcuboot/child_image_preload.cmake
    Loading Zephyr default modules (Zephyr base).
    -- Application: /home/laci/projects/firmware-barn/nrfconnect/bootloader/mcuboot/boot/zephyr
    -- CMake version: 3.20.5
    -- Found Python3: /home/laci/ncs/toolchains/7795df4459/usr/local/bin/python3.8 (found suitable exact version "3.8.2") found components: Interpreter 
    -- Cache files will be written to: /home/laci/.cache/zephyr
    -- Zephyr version: 3.3.99 (/home/laci/projects/firmware-barn/nrfconnect/zephyr)
    -- Found west (found suitable version "1.1.0", minimum required is "0.7.1")
    -- Board: bar-n-right
    -- Found host-tools: zephyr 0.16.1 (/home/laci/ncs/toolchains/7795df4459/opt/zephyr-sdk)
    -- Found toolchain: zephyr 0.16.1 (/home/laci/ncs/toolchains/7795df4459/opt/zephyr-sdk)
    -- Found Dtc: /home/laci/ncs/toolchains/7795df4459/usr/bin/dtc (found suitable version "1.4.7", minimum required is "1.4.6") 
    -- Found BOARD.dts: /home/laci/projects/firmware-barn/bar/boards/arm/bar-n-right/bar-n-right.dts
    -- Found devicetree overlay: /home/laci/projects/firmware-barn/nrfconnect/nrf/modules/mcuboot/usb.overlay
    -- Generated zephyr.dts: /home/laci/projects/firmware-barn/bar/device/build/bar-n-right/mcuboot/zephyr/zephyr.dts
    -- Generated devicetree_generated.h: /home/laci/projects/firmware-barn/bar/device/build/bar-n-right/mcuboot/zephyr/include/generated/devicetree_generated.h
    -- Including generated dts.cmake file: /home/laci/projects/firmware-barn/bar/device/build/bar-n-right/mcuboot/zephyr/dts.cmake
    Parsing /home/laci/projects/firmware-barn/nrfconnect/bootloader/mcuboot/boot/zephyr/Kconfig
    Loaded configuration '/home/laci/projects/firmware-barn/bar/boards/arm/bar-n-right/bar-n-right_defconfig'
    Merged configuration '/home/laci/projects/firmware-barn/nrfconnect/bootloader/mcuboot/boot/zephyr/prj.conf'
    Merged configuration '/home/laci/projects/firmware-barn/nrfconnect/nrf/subsys/partition_manager/partition_manager_enabled.conf'
    Merged configuration '/home/laci/projects/firmware-barn/bar/device/child_image/mcuboot.conf'
    Merged configuration '/home/laci/projects/firmware-barn/bar/device/build/bar-n-right/mcuboot/zephyr/misc/generated/extra_kconfig_options.conf'
    Configuration saved to '/home/laci/projects/firmware-barn/bar/device/build/bar-n-right/mcuboot/zephyr/.config'
    Kconfig header saved to '/home/laci/projects/firmware-barn/bar/device/build/bar-n-right/mcuboot/zephyr/include/generated/autoconf.h'
    -- Found GnuLd: /home/laci/ncs/toolchains/7795df4459/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd (found version "2.38") 
    -- The C compiler identification is GNU 12.2.0
    -- The CXX compiler identification is GNU 12.2.0
    -- The ASM compiler identification is GNU
    -- Found assembler: /home/laci/ncs/toolchains/7795df4459/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc
    MCUBoot bootloader key file: /home/laci/projects/firmware-barn/nrfconnect/bootloader/mcuboot/root-ec-p256.pem
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /home/laci/projects/firmware-barn/bar/device/build/bar-n-right/mcuboot
    === child image mcuboot -  end ===
    
    CMake Warning at /home/laci/projects/firmware-barn/nrfconnect/zephyr/CMakeLists.txt:1865 (message):
      __ASSERT() statements are globally ENABLED
    
    
    -- Found partition manager static configuration: /home/laci/projects/firmware-barn/bar/device/pm_static.yml
    Partition 'mcuboot' is not included in the dynamic resolving since it is statically defined.
    Partition 'mcuboot_pad' is not included in the dynamic resolving since it is statically defined.
    Partition 'mcuboot_primary' is not included in the dynamic resolving since it is statically defined.
    Partition 'mcuboot_primary_app' is not included in the dynamic resolving since it is statically defined.
    Partition 'mcuboot_secondary' is not included in the dynamic resolving since it is statically defined.
    Partition 'settings_storage' is not included in the dynamic resolving since it is statically defined.
    CMake Warning (dev) at /home/laci/ncs/toolchains/7795df4459/usr/local/share/cmake-3.20/Modules/GNUInstallDirs.cmake:236 (message):
      Unable to determine default CMAKE_INSTALL_LIBDIR directory because no
      target architecture is known.  Please enable at least one language before
      including GNUInstallDirs.
    Call Stack (most recent call first):
      c2usb/CMakeLists.txt:5 (include)
    This warning is for project developers.  Use -Wno-dev to suppress it.
    
    -- etl | Version string determined with git describe: 20.36.1
    -- etl | Determined ETL version 20.36.1 from the git tag
    -- Found Python: /usr/bin/python3.10 (found suitable version "3.10.12", minimum required is "3") found components: Interpreter 
    Code generation to path "/home/laci/projects/firmware-barn/bar/device/c2usb/modules/hid-rp/hid-rp/hid/page" is complete.
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /home/laci/projects/firmware-barn/bar/device/build/bar-n-right
    -- west build: building application
    [1/364] Preparing syscall dependency handling
    
    [3/364] Generating include/generated/version.h
    -- Zephyr version: 3.3.99 (/home/laci/projects/firmware-barn/nrfconnect/zephyr), build: v3.3.99-ncs1-1
    [1/217] Preparing syscall dependency handling
    
    [2/217] Generating include/generated/version.h
    -- Zephyr version: 3.3.99 (/home/laci/projects/firmware-barn/nrfconnect/zephyr), build: v3.3.99-ncs1-1
    [207/217] Linking C executable zephyr/zephyr_pre0.elf
    
    [211/217] Linking C executable zephyr/zephyr_pre1.elf
    
    [217/217] Linking C executable zephyr/zephyr.elf
    Memory region         Used Size  Region Size  %age Used
               FLASH:       55416 B        64 KB     84.56%
                 RAM:       33216 B       256 KB     12.67%
            IDT_LIST:          0 GB         2 KB      0.00%
    [15/364] Building CXX object c2usb/CMakeFiles/c2usb.dir/c2usb/usb/df/class/cdc_acm.cpp.obj
    ../../c2usb/c2usb/usb/df/class/cdc_acm.cpp: In member function 'virtual void usb::df::cdc::acm::function::control_setup_request(usb::df::message&, const usb::df::config::interface&)':
    ../../c2usb/c2usb/usb/df/class/cdc_acm.cpp:76:14: warning: unused variable 'data_terminal_ready' [-Wunused-variable]
       76 |         bool data_terminal_ready = msg.request().wValue & 1;
          |              ^~~~~~~~~~~~~~~~~~~
    ../../c2usb/c2usb/usb/df/class/cdc_acm.cpp:77:14: warning: unused variable 'request_to_send' [-Wunused-variable]
       77 |         bool request_to_send = msg.request().wValue & 2;
          |              ^~~~~~~~~~~~~~~
    [28/364] Building CXX object c2usb/CMakeFiles/c2usb.dir/c2usb/port/zephyr/udc_mac.cpp.obj
    In file included from /home/laci/projects/firmware-barn/nrfconnect/zephyr/include/zephyr/device.h:13,
                     from /home/laci/projects/firmware-barn/nrfconnect/zephyr/include/zephyr/drivers/usb/udc.h:16,
                     from ../../c2usb/c2usb/port/zephyr/udc_mac.hpp:23,
                     from ../../c2usb/c2usb/port/zephyr/udc_mac.cpp:11:
    ../../c2usb/c2usb/port/zephyr/udc_mac.cpp:43:10: warning: invalid conversion from 'int (*)(const device*)' to 'int (*)()' [-fpermissive]
       43 | SYS_INIT(udc_mac_preinit, POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEVICE);
    /home/laci/projects/firmware-barn/nrfconnect/zephyr/include/zephyr/init.h:156:45: note: in definition of macro 'SYS_INIT_NAMED'
      156 |                         .init_fn = {.sys = (init_fn_)},                        \
          |                                             ^~~~~~~~
    ../../c2usb/c2usb/port/zephyr/udc_mac.cpp:43:1: note: in expansion of macro 'SYS_INIT'
       43 | SYS_INIT(udc_mac_preinit, POST_KERNEL, CONFIG_KERNEL_INIT_PRIORITY_DEVICE);
          | ^~~~~~~~
    [49/364] Building C object CMakeFiles/app.dir/src/bt_hid.c.obj
    In file included from ../../src/bt_hid.c:5:
    /home/laci/projects/firmware-barn/nrfconnect/zephyr/include/zephyr/usb/class/usb_hid.h:36:32: warning: 'struct usb_setup_packet' declared inside parameter list will not be visible outside of this definition or declaration
       36 |                         struct usb_setup_packet *setup, int32_t *len,
          |                                ^~~~~~~~~~~~~~~~
    ../../src/bt_hid.c: In function 'hid_mouse_init':
    ../../src/bt_hid.c:315:13: warning: Macro is deprecated
      315 |     static const uint8_t mouse_movement_mask[ceiling_fraction(INPUT_REP_MOVEMENT_LEN, 8)] = {0};
          |             ^~~~~~~~~~~~~~~~~~~~~
    ../../src/bt_hid.c: In function 'key_report_send':
    ../../src/bt_hid.c:401:17: warning: unused variable 'buffer' [-Wunused-variable]
      401 |         uint8_t buffer[INPUT_REP_MOVEMENT_LEN] = {0, 0, 5};
          |                 ^~~~~~
    ../../src/bt_hid.c:396:9: warning: unused variable 'mouse_err' [-Wunused-variable]
      396 |     int mouse_err = 0;
          |         ^~~~~~~~~
    ../../src/bt_hid.c: At top level:
    ../../src/bt_hid.c:234:13: warning: 'hid_mouse_init' defined but not used [-Wunused-function]
      234 | static void hid_mouse_init(void)
          |             ^~~~~~~~~~~~~~
    [348/364] Linking CXX executable zephyr/zephyr_pre0.elf
    
    [352/364] Linking CXX executable zephyr/zephyr_pre1.elf
    
    [361/364] Linking CXX executable zephyr/zephyr.elf
    Memory region         Used Size  Region Size  %age Used
               FLASH:      459568 B     486912 B     94.38%
                 RAM:       93556 B       256 KB     35.69%
            IDT_LIST:          0 GB         2 KB      0.00%
    [364/364] Generating zephyr/merged.hex
     *  Terminal will be reused by tasks, press any key to close it. 
    
     *  Executing task: nRF Connect: Build: device/build/bar-n-right (active) 
    
    Building device
    west build --build-dir /home/laci/projects/firmware-barn/bar/device/build/bar-n-right /home/laci/projects/firmware-barn/bar/device
    
    [0/4] Performing build step for 'mcuboot_subimage'
    ninja: no work to do.
     *  Terminal will be reused by tasks, press any key to close it. 
    
     *  Executing task: nRF Connect: Flash: device/build/bar-n-right (active) 
    
    Flashing build/bar-n-right to 69665139
    west flash -d /home/laci/projects/firmware-barn/bar/device/build/bar-n-right --skip-rebuild --dev-id 69665139
    
    -- west flash: using runner nrfjprog
    -- runners.nrfjprog: Flashing file: /home/laci/projects/firmware-barn/bar/device/build/bar-n-right/zephyr/merged.hex
    [ #################### ]  14.517s | Erase file - Done erasing                                                          
    [ #################### ]   6.000s | Program file - Done programming                                                    
    [ #################### ]   6.756s | Verify file - Done verifying                                                       
    Applying system reset.
    Run.
    -- runners.nrfjprog: Board with serial number 69665139 flashed successfully.
     *  Terminal will be reused by tasks, press any key to close it. 
    

    Thanks in advance!

Children
Related