PlatformIO Community

Upload failure - list index out of range

I am getting a failure - [upload] IndexError : list index out of range, using the Blink example.
The Build command is successful; this error is when trying to Upload. The full Upload log and error as follows:

CONFIGURATION: https://docs.platformio.org/page/boards/nordicnrf52/particle_boron.html
PLATFORM: Nordic nRF52 4.1.0 > Particle Boron
HARDWARE: NRF52840 64MHz, 243KB RAM, 796KB Flash
DEBUG: Current (jlink) External (jlink)
PACKAGES:

  • framework-zephyr 2.20100.200220 (2.1.0)
  • framework-zephyr-civetweb 0.20100.190807 (2.1.0)
  • framework-zephyr-fatfs 0.20100.190522 (2.1.0)
  • framework-zephyr-hal-nordic 0.20100.191028 (2.1.0)
  • framework-zephyr-libmetal 0.20100.190530 (2.1.0)
  • framework-zephyr-littlefs 0.20100.190811 (2.1.0)
  • framework-zephyr-lvgl 0.20100.190812 (2.1.0)
  • framework-zephyr-mbedtls 0.20100.191006 (2.1.0)
  • framework-zephyr-mcumgr 0.20100.190528 (2.1.0)
  • framework-zephyr-mipi-sys-t 0.20100.191024 (2.1.0)
  • framework-zephyr-nffs 0.20100.190523 (2.1.0)
  • framework-zephyr-open-amp 0.20100.190612 (2.1.0)
  • framework-zephyr-openthread 0.20100.191024 (2.1.0)
  • framework-zephyr-segger 0.20100.190421 (2.1.0)
  • framework-zephyr-tinycbor 0.20100.191016 (2.1.0)
  • tool-bossac-nordicnrf52 1.10866.191129 (1.8.66)
  • tool-cmake 3.15.5
  • tool-dtc 1.4.7
  • tool-ninja 1.9.0
  • tool-openocd 2.1000.190707 (10.0)
  • tool-sreccat 1.164.0 (1.64)
  • toolchain-gccarmnoneeabi 1.80201.190214 (8.2.1)
    LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
    LDF Modes: Finder ~ chain, Compatibility ~ soft
    Found 0 compatible libraries
    Scanning dependencies…
    No dependencies
    Building in release mode
    *** [upload] IndexError : list index out of range
  • what does pio device list output? (you might need to execute this in a PIO terminal).
  • what’s your platformio.ini?
  • is there any more output shown that shows the line that fails? Does it maybe show that in a “Verbose Upload” (or pio run -t upload -v?)

pio device list outputs:

COM4

Hardware ID: USB VID:PID=2B04:C00D SER=8
Description: USB Serial Device (COM4)

platformio.ini is:

[env:particle_boron]
platform = nordicnrf52
board = particle_boron
framework = zephyr

As for pio run -t upload -v, what I copied above is all there is to the output.

Weird that it suppresses the stacktrace and thus the source of the error. Maybe @valeros or @ivankravets know how to diagnose that…

hi @dasher! Is there a bootloader on this board? The default upload method is nrfutil so probably you need to put your device in DFU mode.

Putting the device into DFU mode (through button sequence) was not sufficient, the result is the same. In DFU mode, I notice the Serial COM device doesn’t present itself in the Devices list, so maybe there’s a Windows driver missing?

So here’s the confusing part. Platformio is presented as single-click install and start coding. But it sounds like you’re saying that Particle integration is incomplete. How would we know how much of Particle to install and configure, versus where do we let Platformio take over? There’s no issue in doing the Particle work, however the Platformio documentation says nothing about it, so the amount of preparation work with Particle is unknowable.

Unless there’s just a bug somewhere, but this combo doesn’t seem to work out of the box.

1 Like

I’m having the exact same issue with Particle Argon devices. Have tried in DFU mode, etc. I can upload fine to other nrf52840 devices, such as the makerdiary device, but not this one. I have also tried registering the device with particle to see if it was some obscure registration requirement, but no luck.
Any guidance would be helpful!