I'm working with following project and would like to add the DFU trigger library.
https://github.com/openthread/ot-nrf528xx
1. Build like this, I'm using a PCA10059 Dongle
./script/build nrf52840 USB_trans -DOT_BOOTLOADER=USB
2. I create the hex File
arm-none-eabi-objcopy -O ihex ot-cli-ftd ot-cli-ftd.hex
3. I generate .Zip file for nrfutil
nrfutil pkg generate --debug-mode --hw-version 52 --sd-req 0x00 --application ot-cli-ftd.hex app_dfu_package.zip
4. I must press the reset button to get into Bootloader mode and load the Firmware.
nrfutil dfu usb-serial -pkg app_dfu_package.zip -p COM8
ERROR:
C:\Users\..Desktop\Nrfutil-Trigger-Test>nrfutil dfu usb-serial -pkg app_dfu_package.zip -p COM8
[------------------------------------] 0%2021-07-12 16:15:37,334 No trigger interface found for device with serial number: CFXXXXXXXX, Product ID: 0xCAFE and Vendor ID: 0x1915
How can I implement the DFU-Trigger library and how can I trigger it with nrfutil?
Output of ./script/build :
vscode ➜ /workspaces/ot-nrf528xx (main ✗) $ ./script/build nrf52840 USB_trans -DOT_BOOTLOADER=USB
+ OT_CMAKE_NINJA_TARGET=
+ NRF_PLATFORMS=(nrf52811 nrf52833 nrf52840)
+ readonly NRF_PLATFORMS
+ NRF_BUILD_TYPES=(UART_trans USB_trans SPI_trans_NCP soft_crypto soft_crypto_threading)
+ readonly NRF_BUILD_TYPES
++ pwd
+ readonly OT_SRCDIR=/workspaces/ot-nrf528xx
+ OT_SRCDIR=/workspaces/ot-nrf528xx
+ OT_OPTIONS=("-DCMAKE_BUILD_TYPE=MinSizeRel" "-DOT_PLATFORM=external" "-DOT_SLAAC=ON")
+ readonly OT_OPTIONS
+ main nrf52840 USB_trans -DOT_BOOTLOADER=USB
+ [[ 3 == 0 ]]
+ local platform=nrf52840
+ echo nrf52811 nrf52833 nrf52840
+ grep -wq nrf52840
+ [[ 3 == 1 ]]
+ local nrf_build_type=USB_trans
+ echo UART_trans USB_trans SPI_trans_NCP soft_crypto soft_crypto_threading
+ grep -wq USB_trans
+ shift
+ shift
+ local_options=()
+ local local_options
+ options=("${OT_OPTIONS[@]}")
+ local options
+ case "${platform}" in
+ local_options+=("-DCMAKE_TOOLCHAIN_FILE=src/${platform}/arm-none-eabi.cmake")
+ case "${nrf_build_type}" in
+ options+=("${local_options[@]}" "-DOT_USB=ON" "-DOT_EXTERNAL_MBEDTLS=nordicsemi-mbedtls")
+ options+=("$@")
+ build -DNRF_PLATFORM=nrf52840 -DCMAKE_BUILD_TYPE=MinSizeRel -DOT_PLATFORM=external -DOT_SLAAC=ON -DCMAKE_TOOLCHAIN_FILE=src/nrf52840/arm-none-eabi.cmake -DOT_USB=ON -DOT_EXTERNAL_MBEDTLS=nordicsemi-mbedtls -DOT_BOOTLOADER=USB
+ local builddir=build
+ mkdir -p build
+ cd build
+ cmake -GNinja -DOT_COMPILE_WARNING_AS_ERROR=ON -DNRF_PLATFORM=nrf52840 -DCMAKE_BUILD_TYPE=MinSizeRel -DOT_PLATFORM=external -DOT_SLAAC=ON -DCMAKE_TOOLCHAIN_FILE=src/nrf52840/arm-none-eabi.cmake -DOT_USB=ON -DOT_EXTERNAL_MBEDTLS=nordicsemi-mbedtls -DOT_BOOTLOADER=USB /workspaces/ot-nrf528xx
-- OpenThread Source Directory: /workspaces/ot-nrf528xx/openthread
-- OpenThread CMake build type: MinSizeRel
-- Package Name: OPENTHREAD
-- Setting default package version: thread-reference-20200818-1060-g681214da9
-- Package Version: thread-reference-20200818-1060-g681214da9
-- Configuring done
-- Generating done
-- Build files have been written to: /workspaces/ot-nrf528xx/build
+ [[ -n '' ]]
+ ninja
[29/113] cd /workspaces/ot-nrf528xx/build/openthread && /usr/bin/cmake -DLIST="OPENTHREAD_CONFIG_ASSER...eck.h";MBEDTLS_CONFIG_FILE="nrf-config.h"" -P /workspaces/ot-nrf528xx/openthread/etc/cmake/print.cmak
OPENTHREAD_CONFIG_ASSERT_ENABLE=1
OPENTHREAD_CONFIG_BACKBONE_ROUTER_DUA_NDPROXYING_ENABLE=0
OPENTHREAD_CONFIG_BACKBONE_ROUTER_MULTICAST_ROUTING_ENABLE=0
OPENTHREAD_CONFIG_ENABLE_BUILTIN_MBEDTLS=0
OPENTHREAD_CONFIG_ENABLE_BUILTIN_MBEDTLS_MANAGEMENT=1
OPENTHREAD_CONFIG_PING_SENDER_ENABLE=1
OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE=1
OPENTHREAD_SPINEL_CONFIG_RCP_RESTORATION_MAX_COUNT=0
PACKAGE_NAME=OPENTHREAD
PACKAGE_VERSION=thread-reference-20200818-1060-g681214da9
OPENTHREAD_CONFIG_THREAD_VERSION=OT_THREAD_VERSION_1_2
OPENTHREAD_CONFIG_NCP_HDLC_ENABLE=1
OPENTHREAD_CONFIG_FILE=openthread-core-nrf52840-config.h
OPENTHREAD_PROJECT_CORE_CONFIG_FILE=openthread-core-nrf52840-config.h
OPENTHREAD_CORE_CONFIG_PLATFORM_CHECK_FILE=openthread-core-nrf52840-config-check.h
MBEDTLS_USER_CONFIG_FILE=nrf52840-mbedtls-config.h
USB_CDC_AS_SERIAL_TRANSPORT=1
APP_USBD_NRF_DFU_TRIGGER_ENABLED=1
OPENTHREAD_CORE_CONFIG_PLATFORM_CHECK_FILE=openthread-core-nrf52840-config-check.h
MBEDTLS_CONFIG_FILE=nrf-config.h
[113/113] Linking CXX executable bin/ot-ncp-ftd
+ cd /workspaces/ot-nrf528xx

