Skip to content

Unable to upload any sketch to ItsyBitsy nRF52840 using adafruit-nrfutil and arduino-cli #476

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ardnew opened this issue Apr 4, 2020 · 2 comments
Labels

Comments

@ardnew
Copy link

ardnew commented Apr 4, 2020

Describe the bug
When trying to upload any sketch using the official arduino-cli, the adafruit-nrfutil upload utility fails to locate the generated DFU .zip package, and thus can't program the device.

Set up (please complete the following information)

  • ItsyBitsy nRF52840, adafruit:nrf52 0.19.0, arduino-cli Version: 0.0.0-git Commit: 8759bf46
  • Ubuntu 18.04.4 LTS
== SETTINGS ======================================================

  config         - --config-file /home/andrew/.config/arduino-cli/config.yaml
  mode           - compile+upload
  board (fqbn)   - adafruit:nrf52:itsybitsy52840
  upload         - /dev/ttyACM1
  sketchbook     - /home/andrew/Development/arduino/sketchbook
  sketch         - bled
  log level      - trace

==================================================================

  arduino-cli --config-file /home/andrew/.config/arduino-cli/config.yaml compile
    --verbose --log-level trace
    --fqbn adafruit:nrf52:itsybitsy52840
    --upload --port /dev/ttyACM1
    --build-path /home/andrew/.tmp/arduino-build/bled
    --build-cache-path /home/andrew/.tmp/arduino-build.cache/bled
      /home/andrew/Development/arduino/sketchbook/bled

==================================================================

------------------------------------------------------------------
$ arduino-cli --config-file /home/andrew/.config/arduino-cli/config.yaml compile --verbose --log-level trace --fqbn adafruit:nrf52:itsybitsy52840 --upload --port /dev/ttyACM1  --build-path /home/andrew/.tmp/arduino-build/bled --build-cache-path /home/andrew/.tmp/arduino-build.cache/bled  /home/andrew/Development/arduino/sketchbook/bled
------------------------------------------------------------------

Using board 'itsybitsy52840' from platform in folder: /home/andrew/.config/arduino-cli/packages/adafruit/hardware/nrf52/0.19.0
Using core 'nRF5' from platform in folder: /home/andrew/.config/arduino-cli/packages/adafruit/hardware/nrf52/0.19.0
Detecting libraries used...
/home/andrew/.config/arduino-cli/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/bin/arm-none-eabi-g++ -mcpu=cortex-m4 -mthumb -c -g -w -mfloat-abi=hard -mfpu=fpv4-sp-d16 -u _printf_float -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -w -x c++ -E -CC -DF_CPU=64000000 -DARDUINO=10607 -DARDUINO_NRF52840_ITSYBITSY -DARDUINO_ARCH_NRF52 "-DARDUINO_BSP_VERSION=\"0.19.0\"" -DNRF52840_XXAA -DARDUINO_NRF52_ITSYBITSY -DUSBCON -DUSE_TINYUSB -DUSB_VID=0x239A -DUSB_PID=0x8051 "-DUSB_MANUFACTURER=\"Adafruit LLC\"" "-DUSB_PRODUCT=\"ItsyBitsy nRF52840 Express\"" -DSOFTDEVICE_PRESENT -DARDUINO_NRF52_ADAFRUIT -DNRF52_SERIES -DLFS_NAME_MAX=64 -Ofast -DCFG_DEBUG=0 -I/home/andrew/.config/arduino-cli/packages/adafruit/hardware/nrf52/0.19.0/cores/nRF5/cmsis/include -I/home/andrew/.config/arduino-cli/packages/adafruit/hardware/nrf52/0.19.0/cores/nRF5/nordic -I/home/andrew/.config/arduino-cli/packages/adafruit/hardware/nrf52/0.19.0/cores/nRF5/nordic/nrfx -I/home/andrew/.config/arduino-cli/packages/adafruit/hardware/nrf52/0.19.0/cores/nRF5/nordic/nrfx/hal -I/home/andrew/.config/arduino-cli/packages/adafruit/hardware/nrf52/0.19.0/cores/nRF5/nordic/nrfx/mdk -I/home/andrew/.config/arduino-cli/packages/adafruit/hardware/nrf52/0.19.0/cores/nRF5/nordic/nrfx/soc -I/home/andrew/.config/arduino-cli/packages/adafruit/hardware/nrf52/0.19.0/cores/nRF5/nordic/nrfx/drivers/include -I/home/andrew/.config/arduino-cli/packages/adafruit/hardware/nrf52/0.19.0/cores/nRF5/nordic/nrfx/drivers/src -I/home/andrew/.config/arduino-cli/packages/adafruit/hardware/nrf52/0.19.0/cores/nRF5/nordic/softdevice/s140_nrf52_6.1.1_API/include -I/home/andrew/.config/arduino-cli/packages/adafruit/hardware/nrf52/0.19.0/cores/nRF5/freertos/Source/include -I/home/andrew/.config/arduino-cli/packages/adafruit/hardware/nrf52/0.19.0/cores/nRF5/freertos/config -I/home/andrew/.config/arduino-cli/packages/adafruit/hardware/nrf52/0.19.0/cores/nRF5/freertos/portable/GCC/nrf52 -I/home/andrew/.config/arduino-cli/packages/adafruit/hardware/nrf52/0.19.0/cores/nRF5/freertos/portable/CMSIS/nrf52 -I/home/andrew/.config/arduino-cli/packages/adafruit/hardware/nrf52/0.19.0/cores/nRF5/sysview/SEGGER -I/home/andrew/.config/arduino-cli/packages/adafruit/hardware/nrf52/0.19.0/cores/nRF5/sysview/Config -I/home/andrew/.config/arduino-cli/packages/adafruit/hardware/nrf52/0.19.0/cores/nRF5/TinyUSB -I/home/andrew/.config/arduino-cli/packages/adafruit/hardware/nrf52/0.19.0/cores/nRF5/TinyUSB/Adafruit_TinyUSB_ArduinoCore -I/home/andrew/.config/arduino-cli/packages/adafruit/hardware/nrf52/0.19.0/cores/nRF5/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src -I/home/andrew/.config/arduino-cli/packages/adafruit/hardware/nrf52/0.19.0/cores/nRF5 -I/home/andrew/.config/arduino-cli/packages/adafruit/hardware/nrf52/0.19.0/variants/itsybitsy_nrf52840_express /home/andrew/.tmp/arduino-build/bled/sketch/bled.ino.cpp -o /dev/null
Alternatives for Adafruit_NeoPixel.h: [[email protected]]
ResolveLibrary(Adafruit_NeoPixel.h)
  -> candidates: [[email protected]]
/home/andrew/.config/arduino-cli/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/bin/arm-none-eabi-g++ -mcpu=cortex-m4 -mthumb -c -g -w -mfloat-abi=hard -mfpu=fpv4-sp-d16 -u _printf_float -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -w -x c++ -E -CC -DF_CPU=64000000 -DARDUINO=10607 -DARDUINO_NRF52840_ITSYBITSY -DARDUINO_ARCH_NRF52 "-DARDUINO_BSP_VERSION=\"0.19.0\"" -DNRF52840_XXAA -DARDUINO_NRF52_ITSYBITSY -DUSBCON -DUSE_TINYUSB -DUSB_VID=0x239A -DUSB_PID=0x8051 "-DUSB_MANUFACTURER=\"Adafruit LLC\"" "-DUSB_PRODUCT=\"ItsyBitsy nRF52840 Express\"" -DSOFTDEVICE_PRESENT -DARDUINO_NRF52_ADAFRUIT -DNRF52_SERIES -DLFS_NAME_MAX=64 -Ofast -DCFG_DEBUG=0 -I/home/andrew/.config/arduino-cli/packages/adafruit/hardware/nrf52/0.19.0/cores/nRF5/cmsis/include -I/home/andrew/.config/arduino-cli/packages/adafruit/hardware/nrf52/0.19.0/cores/nRF5/nordic -I/home/andrew/.config/arduino-cli/packages/adafruit/hardware/nrf52/0.19.0/cores/nRF5/nordic/nrfx -I/home/andrew/.config/arduino-cli/packages/adafruit/hardware/nrf52/0.19.0/cores/nRF5/nordic/nrfx/hal -I/home/andrew/.config/arduino-cli/packages/adafruit/hardware/nrf52/0.19.0/cores/nRF5/nordic/nrfx/mdk -I/home/andrew/.config/arduino-cli/packages/adafruit/hardware/nrf52/0.19.0/cores/nRF5/nordic/nrfx/soc -I/home/andrew/.config/arduino-cli/packages/adafruit/hardware/nrf52/0.19.0/cores/nRF5/nordic/nrfx/drivers/include -I/home/andrew/.config/arduino-cli/packages/adafruit/hardware/nrf52/0.19.0/cores/nRF5/nordic/nrfx/drivers/src -I/home/andrew/.config/arduino-cli/packages/adafruit/hardware/nrf52/0.19.0/cores/nRF5/nordic/softdevice/s140_nrf52_6.1.1_API/include -I/home/andrew/.config/arduino-cli/packages/adafruit/hardware/nrf52/0.19.0/cores/nRF5/freertos/Source/include -I/home/andrew/.config/arduino-cli/packages/adafruit/hardware/nrf52/0.19.0/cores/nRF5/freertos/config -I/home/andrew/.config/arduino-cli/packages/adafruit/hardware/nrf52/0.19.0/cores/nRF5/freertos/portable/GCC/nrf52 -I/home/andrew/.config/arduino-cli/packages/adafruit/hardware/nrf52/0.19.0/cores/nRF5/freertos/portable/CMSIS/nrf52 -I/home/andrew/.config/arduino-cli/packages/adafruit/hardware/nrf52/0.19.0/cores/nRF5/sysview/SEGGER -I/home/andrew/.config/arduino-cli/packages/adafruit/hardware/nrf52/0.19.0/cores/nRF5/sysview/Config -I/home/andrew/.config/arduino-cli/packages/adafruit/hardware/nrf52/0.19.0/cores/nRF5/TinyUSB -I/home/andrew/.config/arduino-cli/packages/adafruit/hardware/nrf52/0.19.0/cores/nRF5/TinyUSB/Adafruit_TinyUSB_ArduinoCore -I/home/andrew/.config/arduino-cli/packages/adafruit/hardware/nrf52/0.19.0/cores/nRF5/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src -I/home/andrew/.config/arduino-cli/packages/adafruit/hardware/nrf52/0.19.0/cores/nRF5 -I/home/andrew/.config/arduino-cli/packages/adafruit/hardware/nrf52/0.19.0/variants/itsybitsy_nrf52840_express -I/home/andrew/Development/arduino/sketchbook/libraries/Adafruit_NeoPixel /home/andrew/.tmp/arduino-build/bled/sketch/bled.ino.cpp -o /dev/null
Using cached library dependencies for file: /home/andrew/Development/arduino/sketchbook/libraries/Adafruit_NeoPixel/Adafruit_NeoPixel.cpp
Using cached library dependencies for file: /home/andrew/Development/arduino/sketchbook/libraries/Adafruit_NeoPixel/esp8266.c
Generating function prototypes...
/home/andrew/.config/arduino-cli/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/bin/arm-none-eabi-g++ -mcpu=cortex-m4 -mthumb -c -g -w -mfloat-abi=hard -mfpu=fpv4-sp-d16 -u _printf_float -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -w -x c++ -E -CC -DF_CPU=64000000 -DARDUINO=10607 -DARDUINO_NRF52840_ITSYBITSY -DARDUINO_ARCH_NRF52 "-DARDUINO_BSP_VERSION=\"0.19.0\"" -DNRF52840_XXAA -DARDUINO_NRF52_ITSYBITSY -DUSBCON -DUSE_TINYUSB -DUSB_VID=0x239A -DUSB_PID=0x8051 "-DUSB_MANUFACTURER=\"Adafruit LLC\"" "-DUSB_PRODUCT=\"ItsyBitsy nRF52840 Express\"" -DSOFTDEVICE_PRESENT -DARDUINO_NRF52_ADAFRUIT -DNRF52_SERIES -DLFS_NAME_MAX=64 -Ofast -DCFG_DEBUG=0 -I/home/andrew/.config/arduino-cli/packages/adafruit/hardware/nrf52/0.19.0/cores/nRF5/cmsis/include -I/home/andrew/.config/arduino-cli/packages/adafruit/hardware/nrf52/0.19.0/cores/nRF5/nordic -I/home/andrew/.config/arduino-cli/packages/adafruit/hardware/nrf52/0.19.0/cores/nRF5/nordic/nrfx -I/home/andrew/.config/arduino-cli/packages/adafruit/hardware/nrf52/0.19.0/cores/nRF5/nordic/nrfx/hal -I/home/andrew/.config/arduino-cli/packages/adafruit/hardware/nrf52/0.19.0/cores/nRF5/nordic/nrfx/mdk -I/home/andrew/.config/arduino-cli/packages/adafruit/hardware/nrf52/0.19.0/cores/nRF5/nordic/nrfx/soc -I/home/andrew/.config/arduino-cli/packages/adafruit/hardware/nrf52/0.19.0/cores/nRF5/nordic/nrfx/drivers/include -I/home/andrew/.config/arduino-cli/packages/adafruit/hardware/nrf52/0.19.0/cores/nRF5/nordic/nrfx/drivers/src -I/home/andrew/.config/arduino-cli/packages/adafruit/hardware/nrf52/0.19.0/cores/nRF5/nordic/softdevice/s140_nrf52_6.1.1_API/include -I/home/andrew/.config/arduino-cli/packages/adafruit/hardware/nrf52/0.19.0/cores/nRF5/freertos/Source/include -I/home/andrew/.config/arduino-cli/packages/adafruit/hardware/nrf52/0.19.0/cores/nRF5/freertos/config -I/home/andrew/.config/arduino-cli/packages/adafruit/hardware/nrf52/0.19.0/cores/nRF5/freertos/portable/GCC/nrf52 -I/home/andrew/.config/arduino-cli/packages/adafruit/hardware/nrf52/0.19.0/cores/nRF5/freertos/portable/CMSIS/nrf52 -I/home/andrew/.config/arduino-cli/packages/adafruit/hardware/nrf52/0.19.0/cores/nRF5/sysview/SEGGER -I/home/andrew/.config/arduino-cli/packages/adafruit/hardware/nrf52/0.19.0/cores/nRF5/sysview/Config -I/home/andrew/.config/arduino-cli/packages/adafruit/hardware/nrf52/0.19.0/cores/nRF5/TinyUSB -I/home/andrew/.config/arduino-cli/packages/adafruit/hardware/nrf52/0.19.0/cores/nRF5/TinyUSB/Adafruit_TinyUSB_ArduinoCore -I/home/andrew/.config/arduino-cli/packages/adafruit/hardware/nrf52/0.19.0/cores/nRF5/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src -I/home/andrew/.config/arduino-cli/packages/adafruit/hardware/nrf52/0.19.0/cores/nRF5 -I/home/andrew/.config/arduino-cli/packages/adafruit/hardware/nrf52/0.19.0/variants/itsybitsy_nrf52840_express -I/home/andrew/Development/arduino/sketchbook/libraries/Adafruit_NeoPixel /home/andrew/.tmp/arduino-build/bled/sketch/bled.ino.cpp -o /home/andrew/.tmp/arduino-build/bled/preproc/ctags_target_for_gcc_minus_e.cpp
/home/andrew/.config/arduino-cli/packages/builtin/tools/ctags/5.8-arduino11/ctags -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives /home/andrew/.tmp/arduino-build/bled/preproc/ctags_target_for_gcc_minus_e.cpp
Compiling sketch...
/home/andrew/.config/arduino-cli/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/bin/arm-none-eabi-g++ -mcpu=cortex-m4 -mthumb -c -g -w -mfloat-abi=hard -mfpu=fpv4-sp-d16 -u _printf_float -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD -DF_CPU=64000000 -DARDUINO=10607 -DARDUINO_NRF52840_ITSYBITSY -DARDUINO_ARCH_NRF52 "-DARDUINO_BSP_VERSION=\"0.19.0\"" -DNRF52840_XXAA -DARDUINO_NRF52_ITSYBITSY -DUSBCON -DUSE_TINYUSB -DUSB_VID=0x239A -DUSB_PID=0x8051 "-DUSB_MANUFACTURER=\"Adafruit LLC\"" "-DUSB_PRODUCT=\"ItsyBitsy nRF52840 Express\"" -DSOFTDEVICE_PRESENT -DARDUINO_NRF52_ADAFRUIT -DNRF52_SERIES -DLFS_NAME_MAX=64 -Ofast -DCFG_DEBUG=0 -I/home/andrew/.config/arduino-cli/packages/adafruit/hardware/nrf52/0.19.0/cores/nRF5/cmsis/include -I/home/andrew/.config/arduino-cli/packages/adafruit/hardware/nrf52/0.19.0/cores/nRF5/nordic -I/home/andrew/.config/arduino-cli/packages/adafruit/hardware/nrf52/0.19.0/cores/nRF5/nordic/nrfx -I/home/andrew/.config/arduino-cli/packages/adafruit/hardware/nrf52/0.19.0/cores/nRF5/nordic/nrfx/hal -I/home/andrew/.config/arduino-cli/packages/adafruit/hardware/nrf52/0.19.0/cores/nRF5/nordic/nrfx/mdk -I/home/andrew/.config/arduino-cli/packages/adafruit/hardware/nrf52/0.19.0/cores/nRF5/nordic/nrfx/soc -I/home/andrew/.config/arduino-cli/packages/adafruit/hardware/nrf52/0.19.0/cores/nRF5/nordic/nrfx/drivers/include -I/home/andrew/.config/arduino-cli/packages/adafruit/hardware/nrf52/0.19.0/cores/nRF5/nordic/nrfx/drivers/src -I/home/andrew/.config/arduino-cli/packages/adafruit/hardware/nrf52/0.19.0/cores/nRF5/nordic/softdevice/s140_nrf52_6.1.1_API/include -I/home/andrew/.config/arduino-cli/packages/adafruit/hardware/nrf52/0.19.0/cores/nRF5/freertos/Source/include -I/home/andrew/.config/arduino-cli/packages/adafruit/hardware/nrf52/0.19.0/cores/nRF5/freertos/config -I/home/andrew/.config/arduino-cli/packages/adafruit/hardware/nrf52/0.19.0/cores/nRF5/freertos/portable/GCC/nrf52 -I/home/andrew/.config/arduino-cli/packages/adafruit/hardware/nrf52/0.19.0/cores/nRF5/freertos/portable/CMSIS/nrf52 -I/home/andrew/.config/arduino-cli/packages/adafruit/hardware/nrf52/0.19.0/cores/nRF5/sysview/SEGGER -I/home/andrew/.config/arduino-cli/packages/adafruit/hardware/nrf52/0.19.0/cores/nRF5/sysview/Config -I/home/andrew/.config/arduino-cli/packages/adafruit/hardware/nrf52/0.19.0/cores/nRF5/TinyUSB -I/home/andrew/.config/arduino-cli/packages/adafruit/hardware/nrf52/0.19.0/cores/nRF5/TinyUSB/Adafruit_TinyUSB_ArduinoCore -I/home/andrew/.config/arduino-cli/packages/adafruit/hardware/nrf52/0.19.0/cores/nRF5/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src -I/home/andrew/.config/arduino-cli/packages/adafruit/hardware/nrf52/0.19.0/cores/nRF5 -I/home/andrew/.config/arduino-cli/packages/adafruit/hardware/nrf52/0.19.0/variants/itsybitsy_nrf52840_express -I/home/andrew/Development/arduino/sketchbook/libraries/Adafruit_NeoPixel /home/andrew/.tmp/arduino-build/bled/sketch/bled.ino.cpp -o /home/andrew/.tmp/arduino-build/bled/sketch/bled.ino.cpp.o
Compiling libraries...
Compiling library "Adafruit_NeoPixel"
Using previously compiled file: /home/andrew/.tmp/arduino-build/bled/libraries/Adafruit_NeoPixel/esp8266.c.o
Using previously compiled file: /home/andrew/.tmp/arduino-build/bled/libraries/Adafruit_NeoPixel/Adafruit_NeoPixel.cpp.o
Compiling core...
Using previously compiled file: /home/andrew/.tmp/arduino-build/bled/core/variant.cpp.o
Using precompiled core: /home/andrew/.tmp/arduino-build.cache/bled/core/core_adafruit_nrf52_itsybitsy52840_60875081169fc8cfc6c1253c4e706a38.a
Linking everything together...
/home/andrew/.config/arduino-cli/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/bin/arm-none-eabi-gcc -L/home/andrew/.tmp/arduino-build/bled -Ofast -Wl,--gc-sections -save-temps -L/home/andrew/.config/arduino-cli/packages/adafruit/hardware/nrf52/0.19.0/cores/nRF5/linker -Tnrf52840_s140_v6.ld -Wl,-Map,/home/andrew/.tmp/arduino-build/bled/bled.ino.map -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -u _printf_float -Wl,--cref -Wl,--check-sections -Wl,--gc-sections -Wl,--unresolved-symbols=report-all -Wl,--warn-common -Wl,--warn-section-align --specs=nano.specs --specs=nosys.specs -o /home/andrew/.tmp/arduino-build/bled/bled.ino.elf /home/andrew/.tmp/arduino-build/bled/sketch/bled.ino.cpp.o /home/andrew/.tmp/arduino-build/bled/libraries/Adafruit_NeoPixel/esp8266.c.o /home/andrew/.tmp/arduino-build/bled/libraries/Adafruit_NeoPixel/Adafruit_NeoPixel.cpp.o /home/andrew/.tmp/arduino-build/bled/core/variant.cpp.o -Wl,--start-group -lm /home/andrew/.tmp/arduino-build/bled/../../arduino-build.cache/bled/core/core_adafruit_nrf52_itsybitsy52840_60875081169fc8cfc6c1253c4e706a38.a -Wl,--end-group
/home/andrew/.config/arduino-cli/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/bin/arm-none-eabi-objcopy -O ihex /home/andrew/.tmp/arduino-build/bled/bled.ino.elf /home/andrew/.tmp/arduino-build/bled/bled.ino.hex
adafruit-nrfutil dfu genpkg --dev-type 0x0052 --sd-req 0x00B6 --application /home/andrew/.tmp/arduino-build/bled/bled.ino.hex /home/andrew/.tmp/arduino-build/bled/bled.ino.zip
Zip created at /home/andrew/.tmp/arduino-build/bled/bled.ino.zip
Using library Adafruit_NeoPixel at version 1.3.5 in folder: /home/andrew/Development/arduino/sketchbook/libraries/Adafruit_NeoPixel 
/home/andrew/.config/arduino-cli/packages/arduino/tools/arm-none-eabi-gcc/7-2017q4/bin/arm-none-eabi-size -A /home/andrew/.tmp/arduino-build/bled/bled.ino.elf
Sketch uses 38708 bytes (4%) of program storage space. Maximum is 815104 bytes.
Global variables use 6644 bytes (2%) of dynamic memory, leaving 230924 bytes for local variables. Maximum is 237568 bytes.
No new serial port detected.
Usage: adafruit-nrfutil dfu serial [OPTIONS]

Error: Invalid value for "-pkg" / "--package": Path "/home/andrew/Development/arduino/sketchbook/bled/bled.adafruit.nrf52.itsybitsy52840.zip" does not exist.
Error during Upload: uploading error: exit status 2

To Reproduce
Steps to reproduce the behavior:

  1. Install arduino-cli
  2. Install Adafruit nRF52 core:
arduino-cli core update-index --additional-urls https://adafruit.github.io/arduino-board-index/package_adafruit_index.json
arduino-cli core install --additional-urls https://adafruit.github.io/arduino-board-index/package_adafruit_index.json adafruit:nrf52
  1. Using any valid sketch, compile and upload using a non-default build path specified at command line:
arduino-cli compile --verbose --log-level trace --fqbn adafruit:nrf52:itsybitsy52840 --upload --port /dev/ttyACM1  --build-path /home/andrew/.tmp/arduino-build/bled --build-cache-path /home/andrew/.tmp/arduino-build.cache/bled  /home/andrew/Development/arduino/sketchbook/bled

Expected behavior
I expect the adafruit-nrfutil to locate the generated DFU .zip package and use it to program the device.

Screenshots
N/A

Additional context
This issue was also posted at arduino/arduino-cli#641 because I'm not really sure which project is responsible. There is a little more detail in diagnosing the issue in that thread.

If I manually upload using the utility template and provide the DFU .zip path explicitly, the programming works as expected:

adafruit-nrfutil --verbose dfu serial -pkg /home/andrew/.tmp/arduino-build/bled/bled.ino.zip -p /dev/ttyACM1 -b 115200 --singlebank
@ardnew ardnew added the Bug label Apr 4, 2020
@ardnew ardnew changed the title Unable to upload any sketch to ItsyBitsy nRF52840 using adafruit-nrfutil in arduino-cli Unable to upload any sketch to ItsyBitsy nRF52840 using adafruit-nrfutil and arduino-cli Apr 4, 2020
@hathach
Copy link
Member

hathach commented Aug 3, 2020

I have tried with arduino-cli 0.11.0 , seems like they fix the issue, it is worth to give it a try again.

arduino-cli Version: 0.11.0 Commit: 0296f4d

Tested with much simpler command that take the sketch folder as parameter (this is necessary for the output zip file is expanded correctly in the upload command). Note: if you have issue with arduino-cli cannot perform DTR, please update to master which add a few ms delay before reset into DFU #549 .

arduino-cli compile --fqbn adafruit:nrf52:feather52840:softdevice=s140v6,debug=l0 --upload --port /dev/ttyACM0 sketch_jul29a

Sketch uses 74116 bytes (9%) of program storage space. Maximum is 815104 bytes.
Global variables use 11996 bytes (5%) of dynamic memory, leaving 225572 bytes for local variables. Maximum is 237568 bytes.
Upgrading target on /dev/ttyACM0 with DFU package /home/hathach/Arduino/sketches/sketch_jul29a/build/adafruit.nrf52.feather52840/sketch_jul29a.ino.zip. Flow control is disabled, Single bank, Touch disabled
########################################
########################################
########################################
#########################
Activating new firmware
Device programmed.

@hathach
Copy link
Member

hathach commented Aug 3, 2020

closed since not reproducible. Feel free to re-open if you still have the issue with this.

@hathach hathach closed this as completed Aug 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants