MCUBoot usb with openthread sample

I have a custom board with a BMD345-A-R module and working with ncs v2.2.0. It has an USB port to comunicate with a RaspberryPi. The board works perfectly cause I have tried several examples:

Serial MCUBoot -> I can manage firmware updates with mcumgr via USB.

openthread -> I configure the project RCP mode and I can connect with ot-ctl (from my RaspberryPi) to my custom board (RCP).

I have to add this "CONFIG_BOARD_ENABLE_DCDC=n" to my prj.conf and mcuboot.conf. Resuming, I have created an openthread project and added the code necessary to enable MCUBoot like the tutorial explain. 

My problem is openthread is working fine but I cant communicate with mcumgr. I try:

mcumgr --conntype serial --connstring "/dev/ttyACM0,baud=115200" echo hello

But has no response.

I have add the next configuration files to openthread project:

overlay-rcp.conf

overlay-usb-nrf-br.conf

usb.overlay

I tried adding "overlay-cdc.conf" too like SMP_Server indicate to build it, but it is the same result, Openthread works but mcumgr not.

I tried the SMP_Server sample with the next build command:

west build  -p  -b nrf52840dk_nrf52840    zephyr/samples/subsys/mgmt/mcumgr/smp_svr    --    -DOVERLAY_CONFIG='overlay-cdc.conf;custom_config.conf'    -DDTC_OVERLAY_FILE=usb.overlay

And it works too. Mcumgr communicates ok. custom_config.conf has "CONFIG_BOARD_ENABLE_DCDC=n" and I added it to the mcuboot.conf in child_image folder too.

I attach the project, maybe you can try it on a nrf52840DK board.0272.coprocessor_custom.zip

Parents
  • Hi,

    I removed the build folder in the sample you provided and rebuilt it with "west build -b nrf52840dk_nrf52840" , and ran the commands in the image below

    This result can be seen both with "CONFIG_BOARD_ENABLE_DCDC=n" and with the config removed from config files. 

    Its worth mentioning I have also disabled the Mass Storage feature on the Interface MCU with J-Link commander with the commands:

    - MSDDisable
    - SetHWFC Force
    - exit

    As seen here

    Are you certain that you've not changed anything else or if you're using the com-port for something else? If you've connected the DK to for instance a RTT viewer, then the device is busy and you will not be able to use it to echo anything.

    Kind regards,
    Andreas

  • Yes, but I need it working with USB port... J3 from nrf52840dk is the port I need working with openthread RCP and mcumgr.

    I have tried several configurations with the next .conf to try it works over J3 usb connector:

    overlay-usb-nrf-br.conf

    usb.overlay

    overlay-cdc.conf

    But I cant get it working. 

    Summarizing I have tested the example openthread coprocessor with the next build command:

    west build -p -b nrf52840dk_nrf52840 -- -DDTC_OVERLAY_FILE=usb.overlay -DOVERLAY_CONFIG='overlay-usb-nrf-br.conf;overlay-cdc.conf;overlay-rcp.conf'

    And it works over J3 usb connector. Now I want to add mcumgr, so I add what is explained here. Adding this to prj.conf:

    # Enable mcumgr.
    CONFIG_MCUMGR=y
    
    # Enable most core commands.
    CONFIG_MCUMGR_CMD_IMG_MGMT=y
    CONFIG_MCUMGR_CMD_OS_MGMT=y
    
    # Ensure an MCUboot-compatible binary is generated.
    CONFIG_BOOTLOADER_MCUBOOT=y
    
    # Enable the serial mcumgr transport.
    CONFIG_MCUMGR_SMP_UART=y
    
    # Disable UART Console and enable the RTT console
    CONFIG_UART_CONSOLE=n
    CONFIG_RTT_CONSOLE=y
    CONFIG_USE_SEGGER_RTT=y
    
    # Some command handlers require a large stack.
    CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=4096

    And this into the main:

    #include "os_mgmt/os_mgmt.h"
    #include "img_mgmt/img_mgmt.h"

    os_mgmt_register_group();
    img_mgmt_register_group();

    But it doesnt work. Just works the openthread via J3 usb connector. 

    So I thought that maybe I should add:

     -DOVERLAY_CONFIG=overlay-cdc.conf \
    -DDTC_OVERLAY_FILE=usb.overlay

    Cause SMP_Server sample is explained here. I have builded that example with the next build command:

    west build \
       -b nrf52840dk_nrf52840 \
       samples/subsys/mgmt/mcumgr/smp_svr \
       -- \
       -DOVERLAY_CONFIG=overlay-cdc.conf \
       -DDTC_OVERLAY_FILE=usb.overlay

    And I can use mcumgr via J3 usb connector. So I dont know how to mix openthread and mcumgr acces via J3 usb connector.

  • I'm trying to advance in parallel with my custom project. I have implemented to openthread sample the MCUBoot serial_recovery. The prj.conf from the main aplicattion:

    CONFIG_NETWORKING=y
    CONFIG_NET_L2_OPENTHREAD=y
    
    # Disable certain parts of Zephyr IPv6 stack
    CONFIG_NET_IPV6_NBR_CACHE=n
    CONFIG_NET_IPV6_MLD=n
    
    # Logging
    CONFIG_LOG=y
    CONFIG_LOG_MAX_LEVEL=1
    CONFIG_LOG_MODE_MINIMAL=n
    CONFIG_LOG_BACKEND_SPINEL=y
    CONFIG_LOG_BACKEND_RTT=y
    CONFIG_LOG_BACKEND_UART=n
    CONFIG_BOOT_BANNER=n
    
    # Kernel options
    CONFIG_MAIN_STACK_SIZE=2560
    CONFIG_INIT_STACKS=y
    
    # Increase logging thread stack size due to Spinel backend needs
    CONFIG_LOG_PROCESS_THREAD_STACK_SIZE=2048
    
    # Set OpenThread NCP architecture
    CONFIG_OPENTHREAD_COPROCESSOR=y
    CONFIG_OPENTHREAD_COPROCESSOR_NCP=y
    
    # Add features required for NCP
    CONFIG_OPENTHREAD_DIAG=y
    CONFIG_OPENTHREAD_DHCP6_SERVER=y
    CONFIG_OPENTHREAD_COMMISSIONER=y
    CONFIG_OPENTHREAD_BORDER_AGENT=y
    CONFIG_OPENTHREAD_BORDER_ROUTER=y
    CONFIG_OPENTHREAD_UDP_FORWARD=y
    CONFIG_OPENTHREAD_ENABLE_SERVICE=y
    
    CONFIG_BOOTLOADER_MCUBOOT=y

    I build it with:

    overlay-rcp.conf

    overlay-usb-nrf-br.conf

    usb.overlay

    The mcuboot.conf:

    CONFIG_SIZE_OPTIMIZATIONS=y
    CONFIG_SINGLE_APPLICATION_SLOT=y
    
    # Enable MCUboot Serial Recovery
    CONFIG_MCUBOOT_SERIAL=y
    CONFIG_UART_CONSOLE=n
    
    # Point Serial Recovery to CDC_ACM
    CONFIG_BOOT_SERIAL_CDC_ACM=y
    
    CONFIG_MCUBOOT_INDICATION_LED=y

    But I have error building. If I comment "CONFIG_BOOT_SERIAL_CDC_ACM" then it build correctly. The error I get building with "CONFIG_BOOT_SERIAL_CDC_ACM=y" is:

    west build --build-dir /home/scada/Documents/coprocessor_bootloader/build /home/scada/Documents/coprocessor_bootloader --pristine --board nrf52840dk_nrf52840 -- -DNCS_TOOLCHAIN_VERSION:STRING="NONE" -DBOARD_ROOT:STRING="/home/scada/Documents/ublox_bmd345_nrf52840-main/ubx_bmd345_nrf52840;/home/scada/Documents/coprocessor_custom;/home/scada/Documents/coprocessor_bootloader" -DDTC_OVERLAY_FILE:STRING="/home/scada/Documents/coprocessor_bootloader/usb.overlay" -DCONF_FILE:STRING="/home/scada/Documents/coprocessor_bootloader/prj.conf" -DOVERLAY_CONFIG:STRING="/home/scada/Documents/coprocessor_bootloader/overlay-rcp.conf;/home/scada/Documents/coprocessor_bootloader/overlay-usb-nrf-br.conf"
    
    -- west build: generating a build system
    Loading Zephyr default modules (Zephyr base).
    -- Application: /home/scada/Documents/coprocessor_bootloader
    -- Found Python3: /home/scada/ncs/toolchains/v2.2.0/usr/local/bin/python3.8 (found suitable exact version "3.8.2") found components: Interpreter 
    -- Cache files will be written to: /home/scada/.cache/zephyr
    -- Zephyr version: 3.2.99 (/home/scada/ncs/v2.2.0/zephyr)
    -- Found west (found suitable version "0.14.0", minimum required is "0.7.1")
    -- Board: nrf52840dk_nrf52840
    -- Found host-tools: zephyr 0.15.1 (/home/scada/ncs/toolchains/v2.2.0/opt/zephyr-sdk)
    -- Found toolchain: zephyr 0.15.1 (/home/scada/ncs/toolchains/v2.2.0/opt/zephyr-sdk)
    -- Found Dtc: /home/scada/ncs/toolchains/v2.2.0/usr/bin/dtc (found suitable version "1.4.7", minimum required is "1.4.6") 
    -- Found BOARD.dts: /home/scada/ncs/v2.2.0/zephyr/boards/arm/nrf52840dk_nrf52840/nrf52840dk_nrf52840.dts
    -- Found devicetree overlay: /home/scada/Documents/coprocessor_bootloader/usb.overlay
    -- Generated zephyr.dts: /home/scada/Documents/coprocessor_bootloader/build/zephyr/zephyr.dts
    -- Generated devicetree_generated.h: /home/scada/Documents/coprocessor_bootloader/build/zephyr/include/generated/devicetree_generated.h
    -- Including generated dts.cmake file: /home/scada/Documents/coprocessor_bootloader/build/zephyr/dts.cmake
    
    warning: SHELL_PROMPT_UART (defined at subsys/shell/backends/Kconfig.backends:36) was assigned the
    value 'ncp-uart:~$ ' but got the value ''. Check these unsatisfied dependencies:
    SHELL_BACKEND_SERIAL (=n), SHELL_BACKENDS (=n), SHELL (=n). See
    http://docs.zephyrproject.org/latest/kconfig.html#CONFIG_SHELL_PROMPT_UART and/or look up
    SHELL_PROMPT_UART in the menuconfig/guiconfig interface. The Application Development Primer, Setting
    Configuration Values, and Kconfig - Tips and Best Practices sections of the manual might be helpful
    too.
    
    Parsing /home/scada/Documents/coprocessor_bootloader/Kconfig
    Loaded configuration '/home/scada/ncs/v2.2.0/zephyr/boards/arm/nrf52840dk_nrf52840/nrf52840dk_nrf52840_defconfig'
    Merged configuration '/home/scada/Documents/coprocessor_bootloader/prj.conf'
    Merged configuration '/home/scada/Documents/coprocessor_bootloader/overlay-rcp.conf'
    Merged configuration '/home/scada/Documents/coprocessor_bootloader/overlay-usb-nrf-br.conf'
    Configuration saved to '/home/scada/Documents/coprocessor_bootloader/build/zephyr/.config'
    Kconfig header saved to '/home/scada/Documents/coprocessor_bootloader/build/zephyr/include/generated/autoconf.h'
    -- The C compiler identification is GNU 12.1.0
    -- The CXX compiler identification is GNU 12.1.0
    -- The ASM compiler identification is GNU
    -- Found assembler: /home/scada/ncs/toolchains/v2.2.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc
    CMake Warning at /home/scada/ncs/v2.2.0/zephyr/subsys/usb/device/CMakeLists.txt:22 (message):
      CONFIG_USB_DEVICE_VID has default value 0x2FE3.
    
      This value is only for testing and MUST be configured for USB products.
    
    
    CMake Warning at /home/scada/ncs/v2.2.0/zephyr/subsys/usb/device/CMakeLists.txt:28 (message):
      CONFIG_USB_DEVICE_PID has default value 0x100.
    
      This value is only for testing and MUST be configured for USB products.
    
    
    -- Found Python3: /home/scada/ncs/toolchains/v2.2.0/usr/local/bin/python3.8 (found version "3.8.2") found components: Interpreter 
    
    === child image mcuboot -  begin ===
    loading initial cache file /home/scada/Documents/coprocessor_bootloader/build/mcuboot/child_image_preload.cmake
    Loading Zephyr default modules (Zephyr base).
    -- Application: /home/scada/ncs/v2.2.0/bootloader/mcuboot/boot/zephyr
    -- Found Python3: /home/scada/ncs/toolchains/v2.2.0/usr/local/bin/python3.8 (found suitable exact version "3.8.2") found components: Interpreter 
    -- Cache files will be written to: /home/scada/.cache/zephyr
    -- Zephyr version: 3.2.99 (/home/scada/ncs/v2.2.0/zephyr)
    -- Found west (found suitable version "0.14.0", minimum required is "0.7.1")
    -- Board: nrf52840dk_nrf52840
    -- Found host-tools: zephyr 0.15.1 (/home/scada/ncs/toolchains/v2.2.0/opt/zephyr-sdk)
    -- Found toolchain: zephyr 0.15.1 (/home/scada/ncs/toolchains/v2.2.0/opt/zephyr-sdk)
    -- Found Dtc: /home/scada/ncs/toolchains/v2.2.0/usr/bin/dtc (found suitable version "1.4.7", minimum required is "1.4.6") 
    -- Found BOARD.dts: /home/scada/ncs/v2.2.0/zephyr/boards/arm/nrf52840dk_nrf52840/nrf52840dk_nrf52840.dts
    -- Found devicetree overlay: /home/scada/ncs/v2.2.0/nrf/modules/mcuboot/usb.overlay
    -- Found devicetree overlay: /home/scada/ncs/v2.2.0/bootloader/mcuboot/boot/zephyr/dts.overlay
    -- Generated zephyr.dts: /home/scada/Documents/coprocessor_bootloader/build/mcuboot/zephyr/zephyr.dts
    -- Generated devicetree_generated.h: /home/scada/Documents/coprocessor_bootloader/build/mcuboot/zephyr/include/generated/devicetree_generated.h
    -- Including generated dts.cmake file: /home/scada/Documents/coprocessor_bootloader/build/mcuboot/zephyr/dts.cmake
    Parsing /home/scada/ncs/v2.2.0/bootloader/mcuboot/boot/zephyr/Kconfig
    Loaded configuration '/home/scada/ncs/v2.2.0/zephyr/boards/arm/nrf52840dk_nrf52840/nrf52840dk_nrf52840_defconfig'
    Merged configuration '/home/scada/ncs/v2.2.0/bootloader/mcuboot/boot/zephyr/prj.conf'
    Merged configuration '/home/scada/ncs/v2.2.0/bootloader/mcuboot/boot/zephyr/boards/nrf52840dk_nrf52840.conf'
    Merged configuration '/home/scada/ncs/v2.2.0/nrf/subsys/partition_manager/partition_manager_enabled.conf'
    Merged configuration '/home/scada/Documents/coprocessor_bootloader/child_image/mcuboot.conf'
    Merged configuration '/home/scada/Documents/coprocessor_bootloader/build/mcuboot/zephyr/misc/generated/extra_kconfig_options.conf'
    Configuration saved to '/home/scada/Documents/coprocessor_bootloader/build/mcuboot/zephyr/.config'
    Kconfig header saved to '/home/scada/Documents/coprocessor_bootloader/build/mcuboot/zephyr/include/generated/autoconf.h'
    -- The C compiler identification is GNU 12.1.0
    -- The CXX compiler identification is GNU 12.1.0
    -- The ASM compiler identification is GNU
    -- Found assembler: /home/scada/ncs/toolchains/v2.2.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc
    CMake Warning at /home/scada/ncs/v2.2.0/zephyr/subsys/usb/device/CMakeLists.txt:22 (message):
      CONFIG_USB_DEVICE_VID has default value 0x2FE3.
    
      This value is only for testing and MUST be configured for USB products.
    
    
    CMake Warning at /home/scada/ncs/v2.2.0/zephyr/subsys/usb/device/CMakeLists.txt:28 (message):
      CONFIG_USB_DEVICE_PID has default value 0x100.
    
      This value is only for testing and MUST be configured for USB products.
    
    
    CMake Warning at /home/scada/ncs/v2.2.0/nrf/lib/flash_patch/CMakeLists.txt:8 (message):
      
    
            ----------------------------------------------------------
            --- WARNING: To maintain the integrity of secure boot, ---
            --- enable CONFIG_DISABLE_FLASH_PATCH in production.   ---
            ----------------------------------------------------------
    
    
    CMake Warning at /home/scada/ncs/v2.2.0/zephyr/CMakeLists.txt:824 (message):
      No SOURCES given to Zephyr library: drivers__console
    
      Excluding target from build.
    
    
    MCUBoot bootloader key file: /home/scada/ncs/v2.2.0/bootloader/mcuboot/root-ec-p256.pem
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /home/scada/Documents/coprocessor_bootloader/build/mcuboot
    === child image mcuboot -  end ===
    
    CMake Warning at /home/scada/ncs/v2.2.0/nrf/modules/mcuboot/CMakeLists.txt:286 (message):
      
    
              ---------------------------------------------------------
              --- WARNING: Using default MCUBoot key, it should not ---
              --- be used for production.                           ---
              ---------------------------------------------------------
              
    
    
    
    -- OpenThread Source Directory: /home/scada/ncs/v2.2.0/modules/lib/openthread
    -- OT_ANYCAST_LOCATOR=""
    -- OT_ASSERT=OFF --> OPENTHREAD_CONFIG_ASSERT_ENABLE=0
    -- OT_BACKBONE_ROUTER=OFF --> OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE=0
    -- OT_BACKBONE_ROUTER_DUA_NDPROXYING=""
    -- OT_BACKBONE_ROUTER_MULTICAST_ROUTING=""
    -- OT_BORDER_AGENT=ON --> OPENTHREAD_CONFIG_BORDER_AGENT_ENABLE=1
    -- OT_BORDER_ROUTER=ON --> OPENTHREAD_CONFIG_BORDER_ROUTER_ENABLE=1
    -- OT_BORDER_ROUTING=""
    -- OT_BORDER_ROUTING_COUNTERS=""
    -- OT_CHANNEL_MANAGER=OFF --> OPENTHREAD_CONFIG_CHANNEL_MANAGER_ENABLE=0
    -- OT_CHANNEL_MONITOR=OFF --> OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE=0
    -- OT_CHILD_SUPERVISION=OFF --> OPENTHREAD_CONFIG_CHILD_SUPERVISION_ENABLE=0
    -- OT_COAP=OFF --> OPENTHREAD_CONFIG_COAP_API_ENABLE=0
    -- OT_COAP_BLOCK=OFF --> OPENTHREAD_CONFIG_COAP_BLOCKWISE_TRANSFER_ENABLE=0
    -- OT_COAP_OBSERVE=OFF --> OPENTHREAD_CONFIG_COAP_OBSERVE_API_ENABLE=0
    -- OT_COAPS=OFF --> OPENTHREAD_CONFIG_COAP_SECURE_API_ENABLE=0
    -- OT_COMMISSIONER=ON --> OPENTHREAD_CONFIG_COMMISSIONER_ENABLE=1
    -- OT_CSL_AUTO_SYNC=OFF --> OPENTHREAD_CONFIG_MAC_CSL_AUTO_SYNC_ENABLE=0
    -- OT_CSL_DEBUG=OFF --> OPENTHREAD_CONFIG_MAC_CSL_DEBUG_ENABLE=0
    -- OT_CSL_RECEIVER=OFF --> OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE=0
    -- OT_DATASET_UPDATER=OFF --> OPENTHREAD_CONFIG_DATASET_UPDATER_ENABLE=0
    -- OT_DHCP6_CLIENT=OFF --> OPENTHREAD_CONFIG_DHCP6_CLIENT_ENABLE=0
    -- OT_DHCP6_SERVER=ON --> OPENTHREAD_CONFIG_DHCP6_SERVER_ENABLE=1
    -- OT_DIAGNOSTIC=ON --> OPENTHREAD_CONFIG_DIAG_ENABLE=1
    -- OT_DNS_CLIENT=OFF --> OPENTHREAD_CONFIG_DNS_CLIENT_ENABLE=0
    -- OT_DNS_DSO=OFF --> OPENTHREAD_CONFIG_DNS_DSO_ENABLE=0
    -- OT_DNSSD_SERVER=OFF --> OPENTHREAD_CONFIG_DNSSD_SERVER_ENABLE=0
    -- OT_DUA=OFF --> OPENTHREAD_CONFIG_DUA_ENABLE=0
    -- OT_ECDSA=OFF --> OPENTHREAD_CONFIG_ECDSA_ENABLE=0
    -- OT_EXTERNAL_HEAP=OFF --> OPENTHREAD_CONFIG_HEAP_EXTERNAL_ENABLE=0
    -- OT_FIREWALL=""
    -- OT_HISTORY_TRACKER=OFF --> OPENTHREAD_CONFIG_HISTORY_TRACKER_ENABLE=0
    -- OT_IP6_FRAGM=OFF --> OPENTHREAD_CONFIG_IP6_FRAGMENTATION_ENABLE=0
    -- OT_JAM_DETECTION=OFF --> OPENTHREAD_CONFIG_JAM_DETECTION_ENABLE=0
    -- OT_JOINER=OFF --> OPENTHREAD_CONFIG_JOINER_ENABLE=0
    -- OT_LEGACY=OFF --> OPENTHREAD_CONFIG_LEGACY_ENABLE=0
    -- OT_LINK_METRICS_INITIATOR=OFF --> OPENTHREAD_CONFIG_MLE_LINK_METRICS_INITIATOR_ENABLE=0
    -- OT_LINK_METRICS_SUBJECT=OFF --> OPENTHREAD_CONFIG_MLE_LINK_METRICS_SUBJECT_ENABLE=0
    -- OT_LINK_RAW=OFF --> OPENTHREAD_CONFIG_LINK_RAW_ENABLE=0
    -- OT_LOG_LEVEL_DYNAMIC=OFF --> OPENTHREAD_CONFIG_LOG_LEVEL_DYNAMIC_ENABLE=0
    -- OT_MAC_FILTER=OFF --> OPENTHREAD_CONFIG_MAC_FILTER_ENABLE=0
    -- OT_MESSAGE_USE_HEAP=""
    -- OT_MLE_LONG_ROUTES=OFF --> OPENTHREAD_CONFIG_MLE_LONG_ROUTES_ENABLE=0
    -- OT_MLR=OFF --> OPENTHREAD_CONFIG_MLR_ENABLE=0
    -- OT_MTD_NETDIAG=OFF --> OPENTHREAD_CONFIG_TMF_NETWORK_DIAG_MTD_ENABLE=0
    -- OT_MULTIPLE_INSTANCE=OFF --> OPENTHREAD_CONFIG_MULTIPLE_INSTANCE_ENABLE=0
    -- OT_NAT64_BORDER_ROUTING=""
    -- OT_NAT64_TRANSLATOR=""
    -- OT_NEIGHBOR_DISCOVERY_AGENT=OFF --> OPENTHREAD_CONFIG_NEIGHBOR_DISCOVERY_AGENT_ENABLE=0
    -- OT_NETDATA_PUBLISHER=OFF --> OPENTHREAD_CONFIG_NETDATA_PUBLISHER_ENABLE=0
    -- OT_OTNS=OFF --> OPENTHREAD_CONFIG_OTNS_ENABLE=0
    -- OT_PING_SENDER=ON --> OPENTHREAD_CONFIG_PING_SENDER_ENABLE=1
    -- OT_PLATFORM_NETIF=OFF --> OPENTHREAD_CONFIG_PLATFORM_NETIF_ENABLE=0
    -- OT_PLATFORM_UDP=OFF --> OPENTHREAD_CONFIG_PLATFORM_UDP_ENABLE=0
    -- OT_REFERENCE_DEVICE=OFF --> OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE=0
    -- OT_SERVICE=ON --> OPENTHREAD_CONFIG_TMF_NETDATA_SERVICE_ENABLE=1
    -- OT_SETTINGS_RAM=OFF --> OPENTHREAD_SETTINGS_RAM=0
    -- OT_SLAAC=OFF --> OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE=0
    -- OT_SNTP_CLIENT=OFF --> OPENTHREAD_CONFIG_SNTP_CLIENT_ENABLE=0
    -- OT_SRP_CLIENT=OFF --> OPENTHREAD_CONFIG_SRP_CLIENT_ENABLE=0
    -- OT_SRP_SERVER=OFF --> OPENTHREAD_CONFIG_SRP_SERVER_ENABLE=0
    -- OT_TIME_SYNC=OFF --> OPENTHREAD_CONFIG_TIME_SYNC_ENABLE=0
    -- OT_TREL=OFF --> OPENTHREAD_CONFIG_RADIO_LINK_TREL_ENABLE=0
    -- OT_TX_BEACON_PAYLOAD=""
    -- OT_UDP_FORWARD=ON --> OPENTHREAD_CONFIG_UDP_FORWARD_ENABLE=1
    -- OT_UPTIME=OFF --> OPENTHREAD_CONFIG_UPTIME_ENABLE=0
    -- OT_RCP_RESTORATION_MAX_COUNT=0
    -- Package Name: OPENTHREAD
    -- Setting default package version: 0759de4fc
    -- Package Version: 0759de4fc
    -- Configuring done
    -- Generating done
    -- Build files have been written to: /home/scada/Documents/coprocessor_bootloader/build
    -- west build: building application
    [1/437] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/CMakeFiles/mbedcrypto.dir/home/scada/ncs/v2.2.0/mbedtls/library/pkcs5.c.obj
    [2/437] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/CMakeFiles/mbedx509.dir/home/scada/ncs/v2.2.0/mbedtls/library/x509.c.obj
    [3/437] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/CMakeFiles/mbedx509.dir/home/scada/ncs/v2.2.0/mbedtls/library/x509_create.c.obj
    [4/437] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/CMakeFiles/mbedx509.dir/home/scada/ncs/v2.2.0/mbedtls/library/x509write_csr.c.obj
    [5/437] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/CMakeFiles/mbedx509.dir/home/scada/ncs/v2.2.0/mbedtls/library/x509_crl.c.obj
    [6/437] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/CMakeFiles/mbedx509.dir/home/scada/ncs/v2.2.0/mbedtls/library/x509_crt.c.obj
    [7/437] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/CMakeFiles/mbedx509.dir/home/scada/ncs/v2.2.0/mbedtls/library/x509_csr.c.obj
    [8/437] Generating include/generated/version.h
    -- Zephyr version: 3.2.99 (/home/scada/ncs/v2.2.0/zephyr), build: v3.2.99-ncs1
    [9/437] Preparing syscall dependency handling
    
    [10/437] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/CMakeFiles/mbedcrypto_base.dir/home/scada/ncs/v2.2.0/mbedtls/library/asn1parse.c.obj
    [11/437] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/CMakeFiles/mbedcrypto_base.dir/home/scada/ncs/v2.2.0/mbedtls/library/asn1write.c.obj
    [12/437] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/CMakeFiles/mbedcrypto_base.dir/home/scada/ncs/v2.2.0/mbedtls/library/bignum.c.obj
    [13/437] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/CMakeFiles/mbedcrypto_base.dir/home/scada/ncs/v2.2.0/mbedtls/library/nist_kw.c.obj
    [14/437] Creating directories for 'mcuboot_subimage'
    [15/437] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/CMakeFiles/mbedcrypto_base.dir/home/scada/ncs/v2.2.0/mbedtls/library/base64.c.obj
    [16/437] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/CMakeFiles/mbedcrypto_base.dir/home/scada/ncs/v2.2.0/mbedtls/library/oid.c.obj
    [17/437] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/CMakeFiles/mbedcrypto_base.dir/home/scada/ncs/v2.2.0/mbedtls/library/padlock.c.obj
    [18/437] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/CMakeFiles/mbedcrypto_base.dir/home/scada/ncs/v2.2.0/mbedtls/library/platform.c.obj
    [19/437] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/CMakeFiles/mbedcrypto_base.dir/home/scada/ncs/v2.2.0/mbedtls/library/platform_util.c.obj
    [20/437] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/CMakeFiles/mbedcrypto_base.dir/home/scada/ncs/v2.2.0/mbedtls/library/version.c.obj
    [21/437] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/CMakeFiles/mbedcrypto_base.dir/home/scada/ncs/v2.2.0/mbedtls/library/constant_time.c.obj
    [22/437] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/CMakeFiles/mbedcrypto.dir/home/scada/ncs/v2.2.0/mbedtls/library/psa_crypto.c.obj
    [23/437] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/CMakeFiles/mbedcrypto.dir/home/scada/ncs/v2.2.0/mbedtls/library/psa_crypto_aead.c.obj
    [24/437] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/CMakeFiles/mbedcrypto.dir/home/scada/ncs/v2.2.0/mbedtls/library/psa_crypto_cipher.c.obj
    [25/437] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/CMakeFiles/mbedcrypto.dir/home/scada/ncs/v2.2.0/mbedtls/library/psa_crypto_client.c.obj
    [26/437] No download step for 'mcuboot_subimage'
    [27/437] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/CMakeFiles/mbedcrypto.dir/home/scada/ncs/v2.2.0/mbedtls/library/psa_crypto_ecp.c.obj
    [28/437] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/CMakeFiles/mbedcrypto.dir/home/scada/ncs/v2.2.0/mbedtls/library/psa_crypto_hash.c.obj
    [29/437] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/CMakeFiles/mbedcrypto.dir/home/scada/ncs/v2.2.0/mbedtls/library/psa_crypto_rsa.c.obj
    [30/437] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/CMakeFiles/mbedcrypto.dir/home/scada/ncs/v2.2.0/mbedtls/library/psa_crypto_slot_management.c.obj
    [31/437] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/CMakeFiles/mbedcrypto.dir/home/scada/ncs/v2.2.0/mbedtls/library/psa_crypto_mac.c.obj
    [32/437] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/CMakeFiles/mbedcrypto.dir/home/scada/ncs/v2.2.0/mbedtls/library/psa_crypto_storage.c.obj
    [33/437] Linking C static library modules/nrfxlib/nrfxlib/nrf_security/src/libmbedcrypto_base.a
    [34/437] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/CMakeFiles/mbedcrypto.dir/home/scada/ncs/v2.2.0/mbedtls/library/pem.c.obj
    [35/437] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/CMakeFiles/mbedcrypto.dir/psa_crypto_driver_wrappers.c.obj
    [36/437] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/CMakeFiles/mbedcrypto.dir/home/scada/ncs/v2.2.0/mbedtls/library/pkcs12.c.obj
    [37/437] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/CMakeFiles/mbedcrypto.dir/home/scada/ncs/v2.2.0/mbedtls/library/pkparse.c.obj
    [38/437] No update step for 'mcuboot_subimage'
    [39/437] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/CMakeFiles/mbedcrypto.dir/home/scada/ncs/v2.2.0/mbedtls/library/pkwrite.c.obj
    [40/437] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/CMakeFiles/mbedcrypto.dir/home/scada/ncs/v2.2.0/mbedtls/library/dhm.c.obj
    [41/437] Generating misc/generated/syscalls_subdirs.trigger
    [42/437] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/CMakeFiles/mbedcrypto.dir/home/scada/ncs/v2.2.0/mbedtls/library/cipher.c.obj
    [43/437] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/CMakeFiles/mbedcrypto.dir/home/scada/ncs/v2.2.0/mbedtls/library/cipher_wrap.c.obj
    [44/437] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/CMakeFiles/mbedcrypto.dir/home/scada/ncs/v2.2.0/mbedtls/library/md.c.obj
    [45/437] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/CMakeFiles/mbedcrypto.dir/home/scada/ncs/v2.2.0/mbedtls/library/pk.c.obj
    [46/437] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/CMakeFiles/mbedcrypto.dir/home/scada/ncs/v2.2.0/mbedtls/library/pk_wrap.c.obj
    [47/437] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/CMakeFiles/mbedcrypto.dir/home/scada/ncs/v2.2.0/mbedtls/library/sha1.c.obj
    [48/437] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/CMakeFiles/mbedcrypto.dir/home/scada/ncs/v2.2.0/mbedtls/library/sha256.c.obj
    [49/437] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/CMakeFiles/mbedcrypto.dir/home/scada/ncs/v2.2.0/mbedtls/library/sha512.c.obj
    [50/437] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/CMakeFiles/mbedcrypto.dir/home/scada/ncs/v2.2.0/mbedtls/library/ripemd160.c.obj
    [51/437] No patch step for 'mcuboot_subimage'
    [52/437] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/CMakeFiles/mbedcrypto.dir/home/scada/ncs/v2.2.0/mbedtls/library/md5.c.obj
    [53/437] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/CMakeFiles/mbedcrypto.dir/home/scada/ncs/v2.2.0/mbedtls/library/aesni.c.obj
    [54/437] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/CMakeFiles/mbedcrypto.dir/home/scada/ncs/v2.2.0/mbedtls/library/aria.c.obj
    [55/437] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/CMakeFiles/mbedcrypto.dir/home/scada/ncs/v2.2.0/mbedtls/library/camellia.c.obj
    [56/437] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/CMakeFiles/mbedcrypto.dir/home/scada/ncs/v2.2.0/mbedtls/library/des.c.obj
    [57/437] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/CMakeFiles/mbedcrypto.dir/home/scada/ncs/v2.2.0/mbedtls/library/cmac.c.obj
    [58/437] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/CMakeFiles/mbedcrypto.dir/home/scada/ncs/v2.2.0/mbedtls/library/ccm.c.obj
    [59/437] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/CMakeFiles/mbedcrypto.dir/home/scada/ncs/v2.2.0/mbedtls/library/chachapoly.c.obj
    [60/437] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/CMakeFiles/mbedcrypto.dir/home/scada/ncs/v2.2.0/mbedtls/library/ecdh.c.obj
    [61/437] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/CMakeFiles/mbedcrypto.dir/home/scada/ncs/v2.2.0/mbedtls/library/ecdsa.c.obj
    [62/437] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/CMakeFiles/mbedcrypto.dir/home/scada/ncs/v2.2.0/mbedtls/library/ecp.c.obj
    [63/437] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/CMakeFiles/mbedcrypto.dir/home/scada/ncs/v2.2.0/mbedtls/library/ecp_curves.c.obj
    [64/437] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/CMakeFiles/mbedcrypto.dir/home/scada/ncs/v2.2.0/mbedtls/library/gcm.c.obj
    [65/437] Building C object modules/nrfxlib/nrfxlib/nrf_security/src/CMakeFiles/mbedcrypto.dir/home/scada/ncs/v2.2.0/mbedtls/library/hkdf.c.obj
    [66/437] No configure step for 'mcuboot_subimage'
    [66/437] Performing build step for 'mcuboot_subimage'
    [1/216] Preparing syscall dependency handling
    
    [2/216] Generating include/generated/version.h
    -- Zephyr version: 3.2.99 (/home/scada/ncs/v2.2.0/zephyr), build: v3.2.99-ncs1
    [3/216] Generating misc/generated/syscalls_subdirs.trigger
    [4/216] Generating misc/generated/syscalls.json, misc/generated/struct_tags.json
    [5/216] Generating include/generated/syscall_dispatch.c, include/generated/syscall_list.h
    [6/216] Generating include/generated/driver-validation.h
    [7/216] Generating include/generated/kobj-types-enum.h, include/generated/otype-to-str.h, include/generated/otype-to-size.h
    [8/216] Building C object zephyr/CMakeFiles/offsets.dir/arch/arm/core/offsets/offsets.c.obj
    [9/216] Generating include/generated/offsets.h
    [10/216] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/cbprintf.c.obj
    [11/216] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/cbprintf_packaged.c.obj
    [12/216] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/base64.c.obj
    [13/216] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/crc32c_sw.c.obj
    [14/216] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/crc32_sw.c.obj
    [15/216] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/crc16_sw.c.obj
    [16/216] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/crc8_sw.c.obj
    [17/216] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/dec.c.obj
    [18/216] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/hex.c.obj
    [19/216] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/crc7_sw.c.obj
    [20/216] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/fdtable.c.obj
    [21/216] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/printk.c.obj
    [22/216] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/rb.c.obj
    [23/216] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/sem.c.obj
    [24/216] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/thread_entry.c.obj
    [25/216] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/timeutil.c.obj
    [26/216] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/heap.c.obj
    [27/216] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/heap-validate.c.obj
    [28/216] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/bitarray.c.obj
    [29/216] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/multi_heap.c.obj
    [30/216] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/onoff.c.obj
    [31/216] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/notify.c.obj
    [32/216] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/cbprintf_nano.c.obj
    [33/216] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/ring_buffer.c.obj
    [34/216] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/assert.c.obj
    [35/216] Building C object zephyr/CMakeFiles/zephyr.dir/lib/os/reboot.c.obj
    [36/216] Building C object zephyr/CMakeFiles/zephyr.dir/misc/generated/configs.c.obj
    [37/216] Building ASM object zephyr/CMakeFiles/zephyr.dir/soc/arm/nordic_nrf/common/soc_nrf_common.S.obj
    [38/216] Building C object zephyr/CMakeFiles/zephyr.dir/subsys/logging/log_minimal.c.obj
    [39/216] Building C object zephyr/CMakeFiles/zephyr.dir/soc/arm/nordic_nrf/validate_enabled_instances.c.obj
    [40/216] Building C object zephyr/CMakeFiles/zephyr.dir/soc/arm/nordic_nrf/validate_base_addresses.c.obj
    [41/216] Building C object zephyr/CMakeFiles/zephyr.dir/subsys/usb/device/usb_device.c.obj
    [42/216] Building C object zephyr/CMakeFiles/zephyr.dir/subsys/usb/device/usb_transfer.c.obj
    [43/216] Building C object zephyr/CMakeFiles/zephyr.dir/subsys/usb/device/usb_work_q.c.obj
    [44/216] Building C object zephyr/CMakeFiles/zephyr.dir/subsys/usb/device/usb_descriptor.c.obj
    [45/216] Building C object zephyr/CMakeFiles/zephyr.dir/subsys/usb/device/class/cdc_acm.c.obj
    [46/216] Building C object zephyr/CMakeFiles/zephyr.dir/subsys/tracing/tracing_none.c.obj
    [47/216] Building C object zephyr/CMakeFiles/zephyr.dir/home/scada/ncs/v2.2.0/nrf/subsys/partition_manager/flash_map_partition_manager.c.obj
    [48/216] Building C object zephyr/CMakeFiles/zephyr.dir/subsys/storage/flash_map/flash_map.c.obj
    [49/216] Building C object zephyr/CMakeFiles/zephyr.dir/subsys/storage/flash_map/flash_map_layout.c.obj
    [50/216] Building C object zephyr/CMakeFiles/zephyr.dir/home/scada/ncs/v2.2.0/nrfxlib/crypto/nrf_cc310_platform/src/nrf_cc3xx_platform_abort_zephyr.c.obj
    [51/216] Building C object zephyr/CMakeFiles/zephyr.dir/home/scada/ncs/v2.2.0/nrfxlib/crypto/nrf_cc310_platform/src/nrf_cc3xx_platform_mutex_zephyr.c.obj
    [52/216] Building C object zephyr/CMakeFiles/zephyr.dir/home/scada/ncs/v2.2.0/bootloader/mcuboot/boot/boot_serial/src/serial_recovery_cbor.c.obj
    [53/216] Building C object zephyr/CMakeFiles/zephyr.dir/home/scada/ncs/v2.2.0/bootloader/mcuboot/boot/boot_serial/src/zcbor_decode.c.obj
    [54/216] Building C object zephyr/CMakeFiles/zephyr.dir/home/scada/ncs/v2.2.0/bootloader/mcuboot/boot/boot_serial/src/zcbor_encode.c.obj
    [55/216] Building C object zephyr/CMakeFiles/zephyr.dir/home/scada/ncs/v2.2.0/bootloader/mcuboot/boot/boot_serial/src/zcbor_common.c.obj
    [56/216] Building C object zephyr/CMakeFiles/zephyr.dir/home/scada/ncs/v2.2.0/bootloader/mcuboot/boot/zephyr/serial_adapter.c.obj
    [57/216] Building C object zephyr/CMakeFiles/zephyr.dir/home/scada/ncs/v2.2.0/bootloader/mcuboot/boot/boot_serial/src/boot_serial.c.obj
    [58/216] Generating linker_zephyr_pre1.cmd
    [59/216] Generating linker_zephyr_pre0.cmd
    [60/216] Building C object zephyr/drivers/serial/CMakeFiles/drivers__serial.dir/__/__/misc/empty_file.c.obj
    [61/216] Building C object zephyr/drivers/serial/CMakeFiles/drivers__serial.dir/uart_nrfx_uarte.c.obj
    [62/216] Building C object zephyr/arch/common/CMakeFiles/isr_tables.dir/isr_tables.c.obj
    [63/216] Building C object zephyr/arch/common/CMakeFiles/arch__common.dir/sw_isr_common.c.obj
    [64/216] Building C object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/fatal.c.obj
    [65/216] Building ASM object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/cpu_idle.S.obj
    [66/216] Generating zephyr/autogen-pubkey.c
    [67/216] Building C object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/nmi.c.obj
    [68/216] Building C object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/irq_manage.c.obj
    [69/216] Building C object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/prep_c.c.obj
    [70/216] Building ASM object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/nmi_on_reset.S.obj
    [71/216] Building ASM object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/swap_helper.S.obj
    [72/216] Building ASM object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/isr_wrapper.S.obj
    [73/216] Linking C static library zephyr/libzephyr.a
    [74/216] Building C object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/swap.c.obj
    [75/216] Building C object zephyr/arch/arch/arm/core/aarch32/CMakeFiles/arch__arm__core__aarch32.dir/thread.c.obj
    [76/216] Linking C static library zephyr/arch/common/libisr_tables.a
    [77/216] Building ASM object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/exc_exit.S.obj
    [78/216] Building C object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/fault.c.obj
    [79/216] Building ASM object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/fault_s.S.obj
    [80/216] Building C object CMakeFiles/app.dir/main.c.obj
    [81/216] Building C object CMakeFiles/app.dir/os.c.obj
    [82/216] Building C object CMakeFiles/app.dir/flash_map_extended.c.obj
    [83/216] Building C object CMakeFiles/app.dir/keys.c.obj
    [84/216] Building C object CMakeFiles/app.dir/home/scada/ncs/v2.2.0/bootloader/mcuboot/boot/bootutil/src/fault_injection_hardening.c.obj
    [85/216] Building C object CMakeFiles/app.dir/home/scada/ncs/v2.2.0/bootloader/mcuboot/boot/bootutil/src/image_validate.c.obj
    [86/216] Building C object CMakeFiles/app.dir/home/scada/ncs/v2.2.0/bootloader/mcuboot/boot/bootutil/src/tlv.c.obj
    [87/216] Building C object CMakeFiles/app.dir/home/scada/ncs/v2.2.0/bootloader/mcuboot/boot/bootutil/src/encrypted.c.obj
    [88/216] Building C object CMakeFiles/app.dir/home/scada/ncs/v2.2.0/bootloader/mcuboot/boot/bootutil/src/image_rsa.c.obj
    [89/216] Building C object CMakeFiles/app.dir/home/scada/ncs/v2.2.0/bootloader/mcuboot/boot/bootutil/src/image_ec256.c.obj
    [90/216] Building C object CMakeFiles/app.dir/home/scada/ncs/v2.2.0/bootloader/mcuboot/boot/bootutil/src/image_ed25519.c.obj
    [91/216] Building C object CMakeFiles/app.dir/home/scada/ncs/v2.2.0/bootloader/mcuboot/boot/bootutil/src/bootutil_misc.c.obj
    [92/216] Building C object CMakeFiles/app.dir/home/scada/ncs/v2.2.0/bootloader/mcuboot/ext/nrf/cc310_glue.c.obj
    [93/216] Building C object CMakeFiles/app.dir/home/scada/ncs/v2.2.0/bootloader/mcuboot/ext/mbedtls-asn1/src/platform_util.c.obj
    [94/216] Building C object CMakeFiles/app.dir/single_loader.c.obj
    [95/216] Building C object CMakeFiles/app.dir/home/scada/ncs/v2.2.0/bootloader/mcuboot/ext/mbedtls-asn1/src/asn1parse.c.obj
    [96/216] Building C object CMakeFiles/app.dir/zephyr/autogen-pubkey.c.obj
    [97/216] Building C object CMakeFiles/app.dir/nrf_cleanup.c.obj
    [98/216] Linking C static library zephyr/arch/common/libarch__common.a
    [99/216] Building C object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/irq_init.c.obj
    [100/216] Building ASM object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/reset.S.obj
    [101/216] Linking C static library zephyr/arch/arch/arm/core/aarch32/libarch__arm__core__aarch32.a
    [102/216] Building C object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/fpu.c.obj
    [103/216] Building C object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/scb.c.obj
    [104/216] Building C object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/thread_abort.c.obj
    [105/216] Building ASM object zephyr/arch/arch/arm/core/aarch32/cortex_m/CMakeFiles/arch__arm__core__aarch32__cortex_m.dir/vector_table.S.obj
    [106/216] Building C object zephyr/arch/arch/arm/core/aarch32/mpu/CMakeFiles/arch__arm__core__aarch32__mpu.dir/arm_core_mpu.c.obj
    [107/216] Building C object zephyr/arch/arch/arm/core/aarch32/mpu/CMakeFiles/arch__arm__core__aarch32__mpu.dir/arm_mpu.c.obj
    [108/216] Building C object zephyr/soc/arm/common/cortex_m/CMakeFiles/soc__arm__common__cortex_m.dir/arm_mpu_regions.c.obj
    [109/216] Building C object zephyr/soc/arm/nordic_nrf/nrf52/CMakeFiles/soc__arm__nordic_nrf__nrf52.dir/soc.c.obj
    [110/216] Linking C static library app/libapp.a
    [111/216] Building C object zephyr/drivers/usb/device/CMakeFiles/drivers__usb__device.dir/usb_dc_nrfx.c.obj
    [112/216] Building C object zephyr/drivers/clock_control/CMakeFiles/drivers__clock_control.dir/clock_control_nrf.c.obj
    [113/216] Building C object zephyr/drivers/gpio/CMakeFiles/drivers__gpio.dir/gpio_nrfx.c.obj
    [114/216] Building C object zephyr/drivers/hwinfo/CMakeFiles/drivers__hwinfo.dir/hwinfo_weak_impl.c.obj
    [115/216] Building C object zephyr/drivers/flash/CMakeFiles/drivers__flash.dir/soc_flash_nrf.c.obj
    [116/216] Linking C static library zephyr/arch/arch/arm/core/aarch32/cortex_m/libarch__arm__core__aarch32__cortex_m.a
    [117/216] Linking C static library zephyr/drivers/serial/libdrivers__serial.a
    [118/216] Linking C static library zephyr/arch/arch/arm/core/aarch32/mpu/libarch__arm__core__aarch32__mpu.a
    [119/216] Generating ../../../include/generated/libc/minimal/strerror_table.h
    [120/216] Building C object zephyr/drivers/hwinfo/CMakeFiles/drivers__hwinfo.dir/hwinfo_nrf.c.obj
    [121/216] Building C object zephyr/drivers/flash/CMakeFiles/drivers__flash.dir/flash_page_layout.c.obj
    [122/216] Linking C static library zephyr/soc/arm/common/cortex_m/libsoc__arm__common__cortex_m.a
    [123/216] Linking C static library zephyr/soc/arm/nordic_nrf/nrf52/libsoc__arm__nordic_nrf__nrf52.a
    [124/216] Building C object zephyr/drivers/timer/CMakeFiles/drivers__timer.dir/sys_clock_init.c.obj
    [125/216] Linking C static library zephyr/drivers/usb/device/libdrivers__usb__device.a
    [126/216] Linking C static library zephyr/drivers/clock_control/libdrivers__clock_control.a
    [127/216] Linking C static library zephyr/drivers/gpio/libdrivers__gpio.a
    [128/216] Building C object zephyr/drivers/pinctrl/CMakeFiles/drivers__pinctrl.dir/common.c.obj
    [129/216] Building C object zephyr/drivers/timer/CMakeFiles/drivers__timer.dir/nrf_rtc_timer.c.obj
    [130/216] Building C object zephyr/drivers/pinctrl/CMakeFiles/drivers__pinctrl.dir/pinctrl_nrf.c.obj
    [131/216] Building C object modules/nrf/lib/fprotect/CMakeFiles/..__nrf__lib__fprotect.dir/fprotect_acl.c.obj
    [132/216] Building C object zephyr/CMakeFiles/zephyr_pre0.dir/misc/empty_file.c.obj
    [133/216] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/abort.c.obj
    [134/216] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/atoi.c.obj
    [135/216] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/strtol.c.obj
    [136/216] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/strtoul.c.obj
    [137/216] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/strtoll.c.obj
    [138/216] Building C object modules/nrf/lib/fatal_error/CMakeFiles/..__nrf__lib__fatal_error.dir/fatal_error.c.obj
    [139/216] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/strtoull.c.obj
    [140/216] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/malloc.c.obj
    [141/216] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/bsearch.c.obj
    [142/216] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/exit.c.obj
    [143/216] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdlib/qsort.c.obj
    [144/216] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/string/strncasecmp.c.obj
    [145/216] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/string/strstr.c.obj
    [146/216] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/string/string.c.obj
    [147/216] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/string/strspn.c.obj
    [148/216] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/string/strerror.c.obj
    [149/216] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdout/stdout_console.c.obj
    [150/216] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdout/sprintf.c.obj
    [151/216] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/stdout/fprintf.c.obj
    [152/216] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/math/sqrtf.c.obj
    [153/216] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/math/sqrt.c.obj
    [154/216] Linking C static library modules/nrf/lib/fatal_error/lib..__nrf__lib__fatal_error.a
    [155/216] Linking C static library zephyr/drivers/timer/libdrivers__timer.a
    [156/216] Building C object zephyr/lib/libc/minimal/CMakeFiles/lib__libc__minimal.dir/source/time/gmtime.c.obj
    [157/216] Linking C static library zephyr/drivers/hwinfo/libdrivers__hwinfo.a
    [158/216] Linking C static library zephyr/drivers/flash/libdrivers__flash.a
    [159/216] Linking C static library zephyr/drivers/pinctrl/libdrivers__pinctrl.a
    [160/216] Linking C static library modules/nrf/lib/fprotect/lib..__nrf__lib__fprotect.a
    [161/216] Building C object modules/nrf/drivers/hw_cc310/CMakeFiles/..__nrf__drivers__hw_cc310.dir/hw_cc310.c.obj
    [162/216] Building C object modules/mcuboot/boot/bootutil/zephyr/CMakeFiles/mcuboot_util.dir/home/scada/ncs/v2.2.0/bootloader/mcuboot/boot/bootutil/src/bootutil_public.c.obj
    [163/216] Building C object modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/home/scada/ncs/v2.2.0/modules/hal/nordic/nrfx/mdk/system_nrf52840.c.obj
    [164/216] Building C object modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/nrfx_glue.c.obj
    [165/216] Building C object modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/home/scada/ncs/v2.2.0/modules/hal/nordic/nrfx/helpers/nrfx_flag32_allocator.c.obj
    [166/216] Building C object modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/home/scada/ncs/v2.2.0/modules/hal/nordic/nrfx/drivers/src/nrfx_clock.c.obj
    [167/216] Building C object modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/home/scada/ncs/v2.2.0/modules/hal/nordic/nrfx/drivers/src/nrfx_gpiote.c.obj
    [168/216] Building C object modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/home/scada/ncs/v2.2.0/modules/hal/nordic/nrfx/drivers/src/nrfx_nvmc.c.obj
    [169/216] Building C object modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/home/scada/ncs/v2.2.0/modules/hal/nordic/nrfx/drivers/src/nrfx_power.c.obj
    [170/216] Linking C static library zephyr/lib/libc/minimal/liblib__libc__minimal.a
    [171/216] Building C object modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/home/scada/ncs/v2.2.0/modules/hal/nordic/nrfx/drivers/src/nrfx_ppi.c.obj
    [172/216] Building C object modules/segger/CMakeFiles/modules__segger.dir/home/scada/ncs/v2.2.0/modules/debug/segger/SEGGER/SEGGER_RTT.c.obj
    [173/216] Building C object modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/home/scada/ncs/v2.2.0/modules/hal/nordic/nrfx/drivers/src/nrfx_usbd.c.obj
    [174/216] Building C object modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/home/scada/ncs/v2.2.0/modules/hal/nordic/nrfx/drivers/src/nrfx_wdt.c.obj
    [175/216] Linking C static library modules/nrf/drivers/hw_cc310/lib..__nrf__drivers__hw_cc310.a
    [176/216] Linking C static library modules/mcuboot/boot/bootutil/zephyr/libmcuboot_util.a
    [177/216] Building C object modules/segger/CMakeFiles/modules__segger.dir/SEGGER_RTT_zephyr.c.obj
    [178/216] Building C object zephyr/kernel/CMakeFiles/kernel.dir/main_weak.c.obj
    [179/216] Building C object zephyr/kernel/CMakeFiles/kernel.dir/banner.c.obj
    [180/216] Building C object zephyr/kernel/CMakeFiles/kernel.dir/device.c.obj
    [181/216] Building C object zephyr/kernel/CMakeFiles/kernel.dir/errno.c.obj
    [182/216] Building C object zephyr/kernel/CMakeFiles/kernel.dir/init.c.obj
    [183/216] Building C object zephyr/kernel/CMakeFiles/kernel.dir/fatal.c.obj
    [184/216] Building C object zephyr/kernel/CMakeFiles/kernel.dir/kheap.c.obj
    [185/216] Building C object zephyr/kernel/CMakeFiles/kernel.dir/mem_slab.c.obj
    [186/216] Building C object zephyr/kernel/CMakeFiles/kernel.dir/thread.c.obj
    [187/216] Building C object zephyr/kernel/CMakeFiles/kernel.dir/version.c.obj
    [188/216] Building C object zephyr/kernel/CMakeFiles/kernel.dir/idle.c.obj
    [189/216] Building C object zephyr/kernel/CMakeFiles/kernel.dir/mailbox.c.obj
    [190/216] Linking C static library modules/hal_nordic/nrfx/libmodules__hal_nordic__nrfx.a
    [191/216] Linking C static library modules/segger/libmodules__segger.a
    [192/216] Building C object zephyr/kernel/CMakeFiles/kernel.dir/msg_q.c.obj
    [193/216] Building C object zephyr/kernel/CMakeFiles/kernel.dir/mutex.c.obj
    [194/216] Building C object zephyr/kernel/CMakeFiles/kernel.dir/queue.c.obj
    [195/216] Building C object zephyr/kernel/CMakeFiles/kernel.dir/sem.c.obj
    [196/216] Building C object zephyr/kernel/CMakeFiles/kernel.dir/stack.c.obj
    [197/216] Building C object zephyr/kernel/CMakeFiles/kernel.dir/work.c.obj
    [198/216] Building C object zephyr/kernel/CMakeFiles/kernel.dir/sched.c.obj
    [199/216] Building C object zephyr/kernel/CMakeFiles/kernel.dir/system_work_q.c.obj
    [200/216] Building C object zephyr/kernel/CMakeFiles/kernel.dir/condvar.c.obj
    [201/216] Building C object zephyr/kernel/CMakeFiles/kernel.dir/mempool.c.obj
    [202/216] Building C object zephyr/kernel/CMakeFiles/kernel.dir/xip.c.obj
    [203/216] Building C object zephyr/kernel/CMakeFiles/kernel.dir/timer.c.obj
    [204/216] Building C object zephyr/kernel/CMakeFiles/kernel.dir/timeout.c.obj
    [205/216] Linking C static library zephyr/kernel/libkernel.a
    [206/216] Linking C executable zephyr/zephyr_pre0.elf
    FAILED: zephyr/zephyr_pre0.elf zephyr/zephyr_pre0.map 
    : && ccache /home/scada/ncs/toolchains/v2.2.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc  -gdwarf-4 zephyr/CMakeFiles/zephyr_pre0.dir/misc/empty_file.c.obj -o zephyr/zephyr_pre0.elf  -fuse-ld=bfd  -Wl,-T  zephyr/linker_zephyr_pre0.cmd  -Wl,-Map=/home/scada/Documents/coprocessor_bootloader/build/mcuboot/zephyr/zephyr_pre0.map  -Wl,--whole-archive  app/libapp.a  zephyr/libzephyr.a  zephyr/arch/common/libarch__common.a  zephyr/arch/arch/arm/core/aarch32/libarch__arm__core__aarch32.a  zephyr/arch/arch/arm/core/aarch32/cortex_m/libarch__arm__core__aarch32__cortex_m.a  zephyr/arch/arch/arm/core/aarch32/mpu/libarch__arm__core__aarch32__mpu.a  zephyr/lib/libc/minimal/liblib__libc__minimal.a  zephyr/soc/arm/common/cortex_m/libsoc__arm__common__cortex_m.a  zephyr/soc/arm/nordic_nrf/nrf52/libsoc__arm__nordic_nrf__nrf52.a  zephyr/drivers/usb/device/libdrivers__usb__device.a  zephyr/drivers/clock_control/libdrivers__clock_control.a  zephyr/drivers/gpio/libdrivers__gpio.a  zephyr/drivers/hwinfo/libdrivers__hwinfo.a  zephyr/drivers/flash/libdrivers__flash.a  zephyr/drivers/serial/libdrivers__serial.a  zephyr/drivers/timer/libdrivers__timer.a  zephyr/drivers/pinctrl/libdrivers__pinctrl.a  modules/nrf/lib/fprotect/lib..__nrf__lib__fprotect.a  modules/nrf/lib/fatal_error/lib..__nrf__lib__fatal_error.a  modules/nrf/drivers/hw_cc310/lib..__nrf__drivers__hw_cc310.a  modules/mcuboot/boot/bootutil/zephyr/libmcuboot_util.a  modules/hal_nordic/nrfx/libmodules__hal_nordic__nrfx.a  modules/segger/libmodules__segger.a  -Wl,--no-whole-archive  zephyr/kernel/libkernel.a  zephyr/CMakeFiles/offsets.dir/./arch/arm/core/offsets/offsets.c.obj  -L"/home/scada/ncs/toolchains/v2.2.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.1.0/thumb/v7e-m+fp/hard"  -L/home/scada/Documents/coprocessor_bootloader/build/mcuboot/zephyr  -lgcc  zephyr/arch/common/libisr_tables.a  -no-pie  -mcpu=cortex-m4  -mthumb  -mabi=aapcs  -mfpu=fpv4-sp-d16  -mfloat-abi=hard  -mfp16-format=ieee  -Wl,--gc-sections  -Wl,--build-id=none  -Wl,--sort-common=descending  -Wl,--sort-section=alignment  -Wl,-u,_OffsetAbsSyms  -Wl,-u,_ConfigAbsSyms  -nostdlib  -static  -Wl,-X  -Wl,-N  -Wl,--orphan-handling=warn  /home/scada/ncs/v2.2.0/nrfxlib/crypto/nrf_cc310_platform/lib/cortex-m4/hard-float/no-interrupts/libnrf_cc310_platform_0.9.16.a  /home/scada/ncs/v2.2.0/nrfxlib/crypto/nrf_cc310_bl/lib/cortex-m4/hard-float/no-interrupts/libnrf_cc310_bl_0.9.12.a && cd /home/scada/Documents/coprocessor_bootloader/build/mcuboot/zephyr && /home/scada/ncs/toolchains/v2.2.0/usr/local/lib/python3.8/site-packages/cmake/data/bin/cmake -E echo
    /home/scada/ncs/toolchains/v2.2.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.1.0/../../../../arm-zephyr-eabi/bin/ld.bfd: zephyr/zephyr_pre0.elf section `text' will not fit in region `FLASH'
    /home/scada/ncs/toolchains/v2.2.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.1.0/../../../../arm-zephyr-eabi/bin/ld.bfd: region `FLASH' overflowed by 10808 bytes
    collect2: error: ld returned 1 exit status
    ninja: build stopped: subcommand failed.
    [89/437] cd /home/scada/Documents/coprocessor_bootloader/build/modules/openthread/build && /home/scada/ncs/toolchains/v2.2.0/usr/local/lib/python3.8/site-packages/cmake/data/bin/cmake -DLIST="OPENTHREAD_CONFIG_ASSERT_ENABLE=0;OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE=0;OPENTHREAD_CONFIG_BORDER_AGENT_ENABLE=1;OPENTHREAD_CONFIG_BORDER_ROUTER_ENABLE=1;OPENTHREAD_CONFIG_CHANNEL_MANAGER_ENABLE=0;OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE=0;OPENTHREAD_CONFIG_CHILD_SUPERVISION_ENABLE=0;OPENTHREAD_CONFIG_COAP_API_ENABLE=0;OPENTHREAD_CONFIG_COAP_BLOCKWISE_TRANSFER_ENABLE=0;OPENTHREAD_CONFIG_COAP_OBSERVE_API_ENABLE=0;OPENTHREAD_CONFIG_COAP_SECURE_API_ENABLE=0;OPENTHREAD_CONFIG_COMMISSIONER_ENABLE=1;OPENTHREAD_CONFIG_MAC_CSL_AUTO_SYNC_ENABLE=0;OPENTHREAD_CONFIG_MAC_CSL_DEBUG_ENABLE=0;OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE=0;OPENTHREAD_CONFIG_DATASET_UPDATER_ENABLE=0;OPENTHREAD_CONFIG_DHCP6_CLIENT_ENABLE=0;OPENTHREAD_CONFIG_DHCP6_SERVER_ENABLE=1;OPENTHREAD_CONFIG_DIAG_ENABLE=1;OPENTHREAD_CONFIG_DNS_CLIENT_ENABLE=0;OPENTHREAD_CONFIG_DNS_DSO_ENABLE=0;OPENTHREAD_CONFIG_DNSSD_SERVER_ENABLE=0;OPENTHREAD_CONFIG_DUA_ENABLE=0;OPENTHREAD_CONFIG_ECDSA_ENABLE=0;OPENTHREAD_CONFIG_HEAP_EXTERNAL_ENABLE=0;OPENTHREAD_CONFIG_HISTORY_TRACKER_ENABLE=0;OPENTHREAD_CONFIG_IP6_FRAGMENTATION_ENABLE=0;OPENTHREAD_CONFIG_JAM_DETECTION_ENABLE=0;OPENTHREAD_CONFIG_JOINER_ENABLE=0;OPENTHREAD_CONFIG_LEGACY_ENABLE=0;OPENTHREAD_CONFIG_MLE_LINK_METRICS_INITIATOR_ENABLE=0;OPENTHREAD_CONFIG_MLE_LINK_METRICS_SUBJECT_ENABLE=0;OPENTHREAD_CONFIG_LINK_RAW_ENABLE=0;OPENTHREAD_CONFIG_LOG_LEVEL_DYNAMIC_ENABLE=0;OPENTHREAD_CONFIG_MAC_FILTER_ENABLE=0;OPENTHREAD_CONFIG_MLE_LONG_ROUTES_ENABLE=0;OPENTHREAD_CONFIG_MLR_ENABLE=0;OPENTHREAD_CONFIG_TMF_NETWORK_DIAG_MTD_ENABLE=0;OPENTHREAD_CONFIG_MULTIPLE_INSTANCE_ENABLE=0;OPENTHREAD_CONFIG_NEIGHBOR_DISCOVERY_AGENT_ENABLE=0;OPENTHREAD_CONFIG_NETDATA_PUBLISHER_ENABLE=0;OPENTHREAD_CONFIG_OTNS_ENABLE=0;OPENTHREAD_CONFIG_PING_SENDER_ENABLE=1;OPENTHREAD_CONFIG_PLATFORM_NETIF_ENABLE=0;OPENTHREAD_CONFIG_PLATFORM_UDP_ENABLE=0;OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE=0;OPENTHREAD_CONFIG_TMF_NETDATA_SERVICE_ENABLE=1;OPENTHREAD_SETTINGS_RAM=0;OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE=0;OPENTHREAD_CONFIG_SNTP_CLIENT_ENABLE=0;OPENTHREAD_CONFIG_SRP_CLIENT_ENABLE=0;OPENTHREAD_CONFIG_SRP_SERVER_ENABLE=0;OPENTHREAD_CONFIG_TIME_SYNC_ENABLE=0;OPENTHREAD_CONFIG_RADIO_LINK_TREL_ENABLE=0;OPENTHREAD_CONFIG_UDP_FORWARD_ENABLE=1;OPENTHREAD_CONFIG_UPTIME_ENABLE=0;OPENTHREAD_SPINEL_CONFIG_RCP_RESTORATION_MAX_COUNT=0;OPENTHREAD_CONFIG_ENABLE_BUILTIN_MBEDTLS=0;OPENTHREAD_CONFIG_ENABLE_BUILTIN_MBEDTLS_MANAGEMENT=0;PACKAGE_NAME="OPENTHREAD";OPENTHREAD_CONFIG_THREAD_VERSION=OT_THREAD_VERSION_1_3;OPENTHREAD_CONFIG_NCP_HDLC_ENABLE=1;KERNEL;__ZEPHYR__=1;_FORTIFY_SOURCE=1;_ANSI_SOURCE;__LINUX_ERRNO_EXTENSIONS__;USE_PARTITION_MANAGER=1;__PROGRAM_START;NRF52840_XXAA;NRF_802154_CCA_CORR_LIMIT_DEFAULT=2;NRF_802154_CCA_CORR_THRESHOLD_DEFAULT=45;NRF_802154_CCA_ED_THRESHOLD_DEFAULT=45;NRF_802154_CCA_MODE_DEFAULT=NRF_RADIO_CCA_MODE_ED;NRF_802154_USE_RAW_API=1;NRF_802154_PENDING_SHORT_ADDRESSES=16;NRF_802154_PENDING_EXTENDED_ADDRESSES=16;NRF_802154_RX_BUFFERS=16;NRF_802154_TX_STARTED_NOTIFY_ENABLED=1;NRF_802154_ACK_TIMEOUT_ENABLED=1;NRF_802154_ENCRYPTION_ENABLED=1;NRF_802154_SECURITY_WRITER_ENABLED=1;NRF_802154_IE_WRITER_ENABLED=1;NRF_802154_INTERNAL_RADIO_IRQ_HANDLING=0;NRF_802154_ECB_PRIORITY=-1;NRF_802154_SWI_PRIORITY=1;MBEDTLS_CONFIG_FILE="nrf-config.h";MBEDTLS_USER_CONFIG_FILE="nrf-config-user.h"" -P /home/scada/ncs/v2.2.0/modules/lib/openthread/etc/cmake/print.cmake
    OPENTHREAD_CONFIG_ASSERT_ENABLE=0
    OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE=0
    OPENTHREAD_CONFIG_BORDER_AGENT_ENABLE=1
    OPENTHREAD_CONFIG_BORDER_ROUTER_ENABLE=1
    OPENTHREAD_CONFIG_CHANNEL_MANAGER_ENABLE=0
    OPENTHREAD_CONFIG_CHANNEL_MONITOR_ENABLE=0
    OPENTHREAD_CONFIG_CHILD_SUPERVISION_ENABLE=0
    OPENTHREAD_CONFIG_COAP_API_ENABLE=0
    OPENTHREAD_CONFIG_COAP_BLOCKWISE_TRANSFER_ENABLE=0
    OPENTHREAD_CONFIG_COAP_OBSERVE_API_ENABLE=0
    OPENTHREAD_CONFIG_COAP_SECURE_API_ENABLE=0
    OPENTHREAD_CONFIG_COMMISSIONER_ENABLE=1
    OPENTHREAD_CONFIG_MAC_CSL_AUTO_SYNC_ENABLE=0
    OPENTHREAD_CONFIG_MAC_CSL_DEBUG_ENABLE=0
    OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE=0
    OPENTHREAD_CONFIG_DATASET_UPDATER_ENABLE=0
    OPENTHREAD_CONFIG_DHCP6_CLIENT_ENABLE=0
    OPENTHREAD_CONFIG_DHCP6_SERVER_ENABLE=1
    OPENTHREAD_CONFIG_DIAG_ENABLE=1
    OPENTHREAD_CONFIG_DNS_CLIENT_ENABLE=0
    OPENTHREAD_CONFIG_DNS_DSO_ENABLE=0
    OPENTHREAD_CONFIG_DNSSD_SERVER_ENABLE=0
    OPENTHREAD_CONFIG_DUA_ENABLE=0
    OPENTHREAD_CONFIG_ECDSA_ENABLE=0
    OPENTHREAD_CONFIG_HEAP_EXTERNAL_ENABLE=0
    OPENTHREAD_CONFIG_HISTORY_TRACKER_ENABLE=0
    OPENTHREAD_CONFIG_IP6_FRAGMENTATION_ENABLE=0
    OPENTHREAD_CONFIG_JAM_DETECTION_ENABLE=0
    OPENTHREAD_CONFIG_JOINER_ENABLE=0
    OPENTHREAD_CONFIG_LEGACY_ENABLE=0
    OPENTHREAD_CONFIG_MLE_LINK_METRICS_INITIATOR_ENABLE=0
    OPENTHREAD_CONFIG_MLE_LINK_METRICS_SUBJECT_ENABLE=0
    OPENTHREAD_CONFIG_LINK_RAW_ENABLE=0
    OPENTHREAD_CONFIG_LOG_LEVEL_DYNAMIC_ENABLE=0
    OPENTHREAD_CONFIG_MAC_FILTER_ENABLE=0
    OPENTHREAD_CONFIG_MLE_LONG_ROUTES_ENABLE=0
    OPENTHREAD_CONFIG_MLR_ENABLE=0
    OPENTHREAD_CONFIG_TMF_NETWORK_DIAG_MTD_ENABLE=0
    OPENTHREAD_CONFIG_MULTIPLE_INSTANCE_ENABLE=0
    OPENTHREAD_CONFIG_NEIGHBOR_DISCOVERY_AGENT_ENABLE=0
    OPENTHREAD_CONFIG_NETDATA_PUBLISHER_ENABLE=0
    OPENTHREAD_CONFIG_OTNS_ENABLE=0
    OPENTHREAD_CONFIG_PING_SENDER_ENABLE=1
    OPENTHREAD_CONFIG_PLATFORM_NETIF_ENABLE=0
    OPENTHREAD_CONFIG_PLATFORM_UDP_ENABLE=0
    OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE=0
    OPENTHREAD_CONFIG_TMF_NETDATA_SERVICE_ENABLE=1
    OPENTHREAD_SETTINGS_RAM=0
    OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE=0
    OPENTHREAD_CONFIG_SNTP_CLIENT_ENABLE=0
    OPENTHREAD_CONFIG_SRP_CLIENT_ENABLE=0
    OPENTHREAD_CONFIG_SRP_SERVER_ENABLE=0
    OPENTHREAD_CONFIG_TIME_SYNC_ENABLE=0
    OPENTHREAD_CONFIG_RADIO_LINK_TREL_ENABLE=0
    OPENTHREAD_CONFIG_UDP_FORWARD_ENABLE=1
    OPENTHREAD_CONFIG_UPTIME_ENABLE=0
    OPENTHREAD_SPINEL_CONFIG_RCP_RESTORATION_MAX_COUNT=0
    OPENTHREAD_CONFIG_ENABLE_BUILTIN_MBEDTLS=0
    OPENTHREAD_CONFIG_ENABLE_BUILTIN_MBEDTLS_MANAGEMENT=0
    PACKAGE_NAME=OPENTHREAD
    OPENTHREAD_CONFIG_THREAD_VERSION=OT_THREAD_VERSION_1_3
    OPENTHREAD_CONFIG_NCP_HDLC_ENABLE=1
    KERNEL
    __ZEPHYR__=1
    _FORTIFY_SOURCE=1
    _ANSI_SOURCE
    __LINUX_ERRNO_EXTENSIONS__
    USE_PARTITION_MANAGER=1
    __PROGRAM_START
    NRF52840_XXAA
    NRF_802154_CCA_CORR_LIMIT_DEFAULT=2
    NRF_802154_CCA_CORR_THRESHOLD_DEFAULT=45
    NRF_802154_CCA_ED_THRESHOLD_DEFAULT=45
    NRF_802154_CCA_MODE_DEFAULT=NRF_RADIO_CCA_MODE_ED
    NRF_802154_USE_RAW_API=1
    NRF_802154_PENDING_SHORT_ADDRESSES=16
    NRF_802154_PENDING_EXTENDED_ADDRESSES=16
    NRF_802154_RX_BUFFERS=16
    NRF_802154_TX_STARTED_NOTIFY_ENABLED=1
    NRF_802154_ACK_TIMEOUT_ENABLED=1
    NRF_802154_ENCRYPTION_ENABLED=1
    NRF_802154_SECURITY_WRITER_ENABLED=1
    NRF_802154_IE_WRITER_ENABLED=1
    NRF_802154_INTERNAL_RADIO_IRQ_HANDLING=0
    NRF_802154_ECB_PRIORITY=-1
    NRF_802154_SWI_PRIORITY=1
    MBEDTLS_CONFIG_FILE=nrf-config.h
    MBEDTLS_USER_CONFIG_FILE=nrf-config-user.h
    [415/437] Linking CXX static library zephyr/kernel/libkernel.a
    FAILED: modules/mcuboot/mcuboot_subimage-prefix/src/mcuboot_subimage-stamp/mcuboot_subimage-build mcuboot/zephyr/zephyr.hex mcuboot/zephyr/zephyr.elf 
    cd /home/scada/Documents/coprocessor_bootloader/build/mcuboot && /home/scada/ncs/toolchains/v2.2.0/usr/local/lib/python3.8/site-packages/cmake/data/bin/cmake --build . --
    [417/437] Linking CXX executable zephyr/zephyr_pre0.elf
    
    ninja: build stopped: subcommand failed.
    FATAL ERROR: command exited with status 1: /home/scada/ncs/toolchains/v2.2.0/usr/local/bin/cmake --build /home/scada/Documents/coprocessor_bootloader/build
    
     *  The terminal process terminated with exit code: 1. 
     *  Terminal will be reused by tasks, press any key to close it. 

  • Hi,

    I have not yet been able to recreate your issue today as it's taken longer time than expected, so I will leave you with some answers to some of your questions before the weekend starts, and I'll get back to you as soon as possible on Monday.

    JuanAlm said:
    But with the "mcuboot_serial_recovery_cdc_acm_wait" I cant send an mcumgr command while bootloader is on.

    This should be possible, and it leaves me suspecting the following:

    1. As a sanity check: Could you verify that you're using the nRF USB on the long side of the nRF52840DK (you've mentioned that you're building for 52840dk earlier so I'm assuming you're developing on that DK as well)
    JuanAlm said:
    I have tried with the sample "mcuboot_serial_recovery_cdc_acm" and if I push the button when I switch on the board I enable mcumgr and I can send commands. But with the "mcuboot_serial_recovery_cdc_acm_wait" I cant send an mcumgr command while bootloader is on.

    This should be possible, so I will add this to the investigation list as well. It could indicate that you're not using the nRF USB (which is why I'm asking the previous question), or it could indicate that the USB is being used by something else, such as the RCP.

    JuanAlm said:
    But I have error building. If I comment "CONFIG_BOOT_SERIAL_CDC_ACM" then it build correctly. The error I get building with "CONFIG_BOOT_SERIAL_CDC_ACM=y" is:

    Line 480 in the error log says something about flash overflow. Can you see how large your application is (both with and without the bootloader(s))  

    FAILED: zephyr/zephyr_pre0.elf zephyr/zephyr_pre0.map 
    : && ccache /home/scada/ncs/toolchains/v2.2.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc  -gdwarf-4 zephyr/CMakeFiles/zephyr_pre0.dir/misc/empty_file.c.obj -o zephyr/zephyr_pre0.elf  -fuse-ld=bfd  -Wl,-T  zephyr/linker_zephyr_pre0.cmd  -Wl,-Map=/home/scada/Documents/coprocessor_bootloader/build/mcuboot/zephyr/zephyr_pre0.map  -Wl,--whole-archive  app/libapp.a  zephyr/libzephyr.a  zephyr/arch/common/libarch__common.a  zephyr/arch/arch/arm/core/aarch32/libarch__arm__core__aarch32.a  zephyr/arch/arch/arm/core/aarch32/cortex_m/libarch__arm__core__aarch32__cortex_m.a  zephyr/arch/arch/arm/core/aarch32/mpu/libarch__arm__core__aarch32__mpu.a  zephyr/lib/libc/minimal/liblib__libc__minimal.a  zephyr/soc/arm/common/cortex_m/libsoc__arm__common__cortex_m.a  zephyr/soc/arm/nordic_nrf/nrf52/libsoc__arm__nordic_nrf__nrf52.a  zephyr/drivers/usb/device/libdrivers__usb__device.a  zephyr/drivers/clock_control/libdrivers__clock_control.a  zephyr/drivers/gpio/libdrivers__gpio.a  zephyr/drivers/hwinfo/libdrivers__hwinfo.a  zephyr/drivers/flash/libdrivers__flash.a  zephyr/drivers/serial/libdrivers__serial.a  zephyr/drivers/timer/libdrivers__timer.a  zephyr/drivers/pinctrl/libdrivers__pinctrl.a  modules/nrf/lib/fprotect/lib..__nrf__lib__fprotect.a  modules/nrf/lib/fatal_error/lib..__nrf__lib__fatal_error.a  modules/nrf/drivers/hw_cc310/lib..__nrf__drivers__hw_cc310.a  modules/mcuboot/boot/bootutil/zephyr/libmcuboot_util.a  modules/hal_nordic/nrfx/libmodules__hal_nordic__nrfx.a  modules/segger/libmodules__segger.a  -Wl,--no-whole-archive  zephyr/kernel/libkernel.a  zephyr/CMakeFiles/offsets.dir/./arch/arm/core/offsets/offsets.c.obj  -L"/home/scada/ncs/toolchains/v2.2.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.1.0/thumb/v7e-m+fp/hard"  -L/home/scada/Documents/coprocessor_bootloader/build/mcuboot/zephyr  -lgcc  zephyr/arch/common/libisr_tables.a  -no-pie  -mcpu=cortex-m4  -mthumb  -mabi=aapcs  -mfpu=fpv4-sp-d16  -mfloat-abi=hard  -mfp16-format=ieee  -Wl,--gc-sections  -Wl,--build-id=none  -Wl,--sort-common=descending  -Wl,--sort-section=alignment  -Wl,-u,_OffsetAbsSyms  -Wl,-u,_ConfigAbsSyms  -nostdlib  -static  -Wl,-X  -Wl,-N  -Wl,--orphan-handling=warn  /home/scada/ncs/v2.2.0/nrfxlib/crypto/nrf_cc310_platform/lib/cortex-m4/hard-float/no-interrupts/libnrf_cc310_platform_0.9.16.a  /home/scada/ncs/v2.2.0/nrfxlib/crypto/nrf_cc310_bl/lib/cortex-m4/hard-float/no-interrupts/libnrf_cc310_bl_0.9.12.a && cd /home/scada/Documents/coprocessor_bootloader/build/mcuboot/zephyr && /home/scada/ncs/toolchains/v2.2.0/usr/local/lib/python3.8/site-packages/cmake/data/bin/cmake -E echo
    /home/scada/ncs/toolchains/v2.2.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.1.0/../../../../arm-zephyr-eabi/bin/ld.bfd: zephyr/zephyr_pre0.elf section `text' will not fit in region `FLASH'
    /home/scada/ncs/toolchains/v2.2.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.1.0/../../../../arm-zephyr-eabi/bin/ld.bfd: region `FLASH' overflowed by 10808 bytes

    Kind regards,
    Andreas

  • As a sanity check: Could you verify that you're using the nRF USB on the long side of the nRF52840DK (you've mentioned that you're building for 52840dk earlier so I'm assuming you're developing on that DK as well)

    Yes, Im using J3 connector (nRF USB)

    This should be possible, so I will add this to the investigation list as well. It could indicate that you're not using the nRF USB (which is why I'm asking the previous question), or it could indicate that the USB is being used by something else, such as the RCP.

    I don't think so because in the samples you shared me (https://github.com/hellesvik-nordic/samples_for_nrf_connect_sdk/tree/main/bootloader_samples/serial_recovery/mcuboot_serial_recovery_cdc_acm_wait) the main app is empty.

  • Hi,

    Apologies for not checking back in with you yesterday. Yes, I have some progress for you. Initial debugging suggests that there is an issue with the BOOT_SERIAL_WAIT_FOR_DFU.

    The issue we've uncovered is that CONFIG_BOOT_SERIAL_WAIT_FOR_DFU depends on BOOT_SERIAL_UART", which requires buttons to be set. From mcuboot/boot/zephyr/main.c: 

    #ifdef CONFIG_MCUBOOT_SERIAL
        if (detect_pin() &&

    The patch shown in the image should fix the issue and make the device actually wait for the mcumgr command.

     

    I was currently working on testing this and trying to get it to work together with the RCP, but I should've told you yesterday so you could do some work parallelly to our testing.

    The next thing you will have to do is to verify that you can see the nRF USB com when connecting the device

    - Build and flash the sample -> Change the usb from the programming USB to the nRF USB -> Locate the device (COMxx or TTYACMx depending on which OS you're developing with) -> send mcumgr command to that device to enter serial recovery

    You can modify CONFIG_BOOT_SERIAL_WAIT_FOR_DFU_TIMEOUT=5000 in child_image to buy you some more time before the timout occurs so you have some time to send the mcumgr command to trigger the serial recovery mode.

    Let me know if you have any progress, and in the meanwhile I'll keep working on this as well

    Kind regards,
    Andreas

Reply
  • Hi,

    Apologies for not checking back in with you yesterday. Yes, I have some progress for you. Initial debugging suggests that there is an issue with the BOOT_SERIAL_WAIT_FOR_DFU.

    The issue we've uncovered is that CONFIG_BOOT_SERIAL_WAIT_FOR_DFU depends on BOOT_SERIAL_UART", which requires buttons to be set. From mcuboot/boot/zephyr/main.c: 

    #ifdef CONFIG_MCUBOOT_SERIAL
        if (detect_pin() &&

    The patch shown in the image should fix the issue and make the device actually wait for the mcumgr command.

     

    I was currently working on testing this and trying to get it to work together with the RCP, but I should've told you yesterday so you could do some work parallelly to our testing.

    The next thing you will have to do is to verify that you can see the nRF USB com when connecting the device

    - Build and flash the sample -> Change the usb from the programming USB to the nRF USB -> Locate the device (COMxx or TTYACMx depending on which OS you're developing with) -> send mcumgr command to that device to enter serial recovery

    You can modify CONFIG_BOOT_SERIAL_WAIT_FOR_DFU_TIMEOUT=5000 in child_image to buy you some more time before the timout occurs so you have some time to send the mcumgr command to trigger the serial recovery mode.

    Let me know if you have any progress, and in the meanwhile I'll keep working on this as well

    Kind regards,
    Andreas

Children
  • Great! It works like a charm! Now I can send mcumgr commands!

    Please, don't forget about this:

    You should be able to reset the dongle with RCP-specific commands in the software. From what I can see will have to find a command that calls sys_reboot(). I will have do some investigating to see if I can find a specific command.

    And about this:

    Line 480 in the error log says something about flash overflow. Can you see how large your application is (both with and without the bootloader(s))  

    Without MCUBoot, the app size this:

    Memory region         Used Size  Region Size  %age Used
               FLASH:      171864 B         1 MB     16.39%
                 RAM:       81056 B       256 KB     30.92%
            IDT_LIST:          0 GB         2 KB      0.00%

    But If I include the MCUBoot, it does not build.

  • I will add this info about the flash error. With CONFIG_BOOTLOADER_MCUBOOT=n, the firmware builds and I can run a memory report:

    With CONFIG_BOOTLOADER_MCUBOOT=y, the firmware doesn't build.

    If I run "ninja partition_manager_report" I get the next info:

      flash_primary (0x100000 - 1024kB): 
    +-------------------------------------------------+
    | 0x0: mcuboot (0xc000 - 48kB)                    |
    +---0xc000: mcuboot_primary (0xf2000 - 968kB)-----+
    | 0xc000: mcuboot_pad (0x200 - 512B)              |
    +---0xc200: mcuboot_primary_app (0xf1e00 - 967kB)-+
    | 0xc200: app (0xf1e00 - 967kB)                   |
    +-------------------------------------------------+
    | 0xfe000: settings_storage (0x2000 - 8kB)        |
    +-------------------------------------------------+
    
      sram_primary (0x40000 - 256kB): 
    +--------------------------------------------+
    | 0x20000000: sram_primary (0x40000 - 256kB) |
    +--------------------------------------------+

    With CONFIG_BOOTLOADER_MCUBOOT=y and CONFIG_BOOT_SERIAL_CDC_ACM=n from mcuboot.conf, the firmware builds.The memory report is:

    If I run "ninja partition_manager_report" I get the next info:

      flash_primary (0x100000 - 1024kB): 
    +-------------------------------------------------+
    | 0x0: mcuboot (0xc000 - 48kB)                    |
    +---0xc000: mcuboot_primary (0xf2000 - 968kB)-----+
    | 0xc000: mcuboot_pad (0x200 - 512B)              |
    +---0xc200: mcuboot_primary_app (0xf1e00 - 967kB)-+
    | 0xc200: app (0xf1e00 - 967kB)                   |
    +-------------------------------------------------+
    | 0xfe000: settings_storage (0x2000 - 8kB)        |
    +-------------------------------------------------+
    
      sram_primary (0x40000 - 256kB): 
    +--------------------------------------------+
    | 0x20000000: sram_primary (0x40000 - 256kB) |
    +--------------------------------------------+

     

    Adding to mcuboot.conf "CONFIG_PM_PARTITION_SIZE_MCUBOOT=0x40000" as this thread suggest let the firmware building. I can use mcumgr when bootloader is active:

    and I can upload a file:

    mcumgr --conntype serial --connstring "/dev/ttyACM1,baud=115200" image upload app_update.bin
     168.48 KiB / 168.48 KiB [=================================================================] 100.00% 1.24 KiB/s 2m16s
    Done
    

    But once the upload is finished, I cant see the image:

    mcumgr --conntype serial --connstring "/dev/ttyACM1,baud=115200" image list
    Images:
     image=0 slot=0
        version: 0.0.0.0
        bootable: false
        flags:
        hash: Unavailable
    Split status: N/A (0)

    Anyway the firmware updates. Great! So my last problem is knowing how to reset the dongle with a RCP command.

  • Hi,

    JuanAlm said:
    Please, don't forget about this:

    The rcp specific command "ot-cli reset" should reset the device.

    Mcumgr reset allows you to reset with mcumgr https://docs.zephyrproject.org/3.1.0/services/device_mgmt/mcumgr.html#list-of-commands

    https://github.com/apache/mynewt-mcumgr-cli

    JuanAlm said:
    Without MCUBoot, the app size this:

    There definitely shouldn't be any flash overflow as previously suspected

    JuanAlm said:
    Anyway the firmware updates. Great! So my last problem is knowing how to reset the dongle with a RCP command.

    Does this mean that the flash issue is solved? If so, great!

    Kind regards,
    Andreas

  • The rcp specific command "ot-cli reset" should reset the device.

    No, this just restarts the stack. I can reboot the RaspberryPi anyway and it's enought.

    Does this mean that the flash issue is solved? If so, great!

    The building problem is resolved. I would like to know why it is resolved adding "CONFIG_PM_PARTITION_SIZE_MCUBOOT=0x40000" and if it could provoke an error in the future.

    I would like to know why the list command show this before and after I upload the update:

    mcumgr --conntype serial --connstring "/dev/ttyACM1,baud=115200" image list
    Images:
     image=0 slot=0
        version: 0.0.0.0
        bootable: false
        flags:
        hash: Unavailable
    Split status: N/A (0)

  • JuanAlm said:
    No, this just restarts the stack. I can reboot the RaspberryPi anyway and it's enought.

    We've tested this on the rcp after you've mentioned this, and you're right. It does reset other OT devices but it only restarts the stack for the RCP. Another option is to use ncp vendor commands, such as the one in user_vendor_hook.cpp (https://developer.nordicsemi.com/nRF_Connect_SDK/doc/1.9.1/nrf/ug_thread_vendor_hooks.html#ug-thread-vendor-hooks). This does however demand that you create some custom functionality yourself within the POSIX application, and to implement a handler for it in user__vendor_hook.cpp that ensures that the device restarts.

    JuanAlm said:
    The building problem is resolved. I would like to know why it is resolved adding "CONFIG_PM_PARTITION_SIZE_MCUBOOT=0x40000" and if it could provoke an error in the future.

    It would seem that the mcuboot partition is too small (by ~11080 bytes) to handle the bootloader, so this config allows you to increase the size. However 0x40000 is quite large, so you might get away by increasing it with a smaller amount. I would recommend you to experiment with the size to see if you find something smaller. However, if your app is sufficiently small, there is nothing wrong with having this partition that large as long as you have enough space in the secondary slot to do DFU.

    JuanAlm said:
    I would like to know why the list command show this before and after I upload the update:

    It shows this before the image, as illustrated by this sample that there should not be anything there before the upload. Do you see the same information after uploading but before resetting? 

    Sample: https://github.com/hellesvik-nordic/samples_for_nrf_connect_sdk/tree/main/bootloader_samples/serial_recovery/mcuboot_serial_recovery_cdc_acm_wait

    Kind regards,
    Andreas

Related