Open LeoDJ opened 3 years ago
I'm not well versed in the platformio platform structure, so I can't easily implement that myself.
But I created the following workaround for now:
platformio.ini
:
upload_protocol = custom
upload_port = COM4
upload_command =
nrfutil pkg generate --hw-version 52 --sd-req=0x00 --application $SOURCE --application-version 1 ${SOURCE}.zip
nrfutil dfu usb-serial -pkg ${SOURCE}.zip -p $UPLOAD_PORT
I am experiencing the same issue. Is there any official fix for it?
I have the same issue when using an Adafruit Bluefruit nRF52832 board with Zephyr framework. The upload log also fails with *** [upload] IndexError : list index out of range
. Platformio (5.1.1) and all packages are up-to-date. Is there any solution to this?
Simply add the upload_protocol
toplatformio.ini
for an example if you are using segger jlink,
upload_protocol = jlink
@rajithavk no, I would still like to use nrfutil and if I put upload_protocol = nrfutil
it'll behave the same way.
Trying to upload any code built with the zephyr framework results in the following error:
*** [upload] IndexError : list index out of range
Example platformio.ini:
After digging around a bit in
nordicnrf52/builder/main.py
it seems to me that the nrfutil uploader is only available if you use the Arduino framework. But I want to be able to upload my existing code built with zephyr via nrfutil too.https://github.com/platformio/platform-nordicnrf52/blob/a7d7f2d16e1c506013c64b4bad415776fded459d/builder/main.py#L56-L59 https://github.com/platformio/platform-nordicnrf52/blob/a7d7f2d16e1c506013c64b4bad415776fded459d/builder/main.py#L68-L70
Full upload log