Open maxgerhardt opened 2 years ago
Hi, couldn't find a good place to ask this. I have a Nordic nRF52840 Dongle, but i'm unable to program it with platformio or the nrf "Programmer". I tried googling but can't figure out what i'm missing. I'm using the stock bootloader - is that the problem?
Platformio says:
Looking for upload port... Using manually specified: COM8 Forcing reset using 1200bps open/close on port COM8 Waiting for the new upload port... Uploading .pio\build\adafruit_feather_nrf52840\firmware.zip Upgrading target on COM8 with DFU package ***.pio\build\adafruit_feather_nrf52840\firmware.zip. Flow control is disabled, Single bank, Touch disabled Timed out waiting for acknowledgement from device.
Failed to upgrade target. Error is: Attempting to use a port that is not open Traceback (most recent call last): File "nordicsemi__main__.py", line 294, in serial File "nordicsemi\dfu\dfu.py", line 235, in dfu_send_images File "nordicsemi\dfu\dfu.py", line 203, in _dfu_send_image File "nordicsemi\dfu\dfu_transport_serial.py", line 155, in send_init_packet File "nordicsemi\dfu\dfu_transport_serial.py", line 241, in send_packet File "site-packages\serial\serialwin32.py", line 304, in write serial.serialutil.SerialException: Attempting to use a port that is not open
Possible causes:
I also tried to transfer the resulting .hex file in the nrf "Programmer" but get:
14:17:11.906 Opening serial port for SDFU programming: 0% 14:17:12.315 Opening serial port for SDFU programming: 100% 14:17:12.379 Uploading image through SDFU: 0% 14:17:12.411 async task failure for id: 749760214408 msg: (Origin: "Error when running fw program.")
I know the com port is live (COM8) as i can open/close it in a terminal program. Sorry if this is something trivial i should know the answer to. Thanks in advance.
The Community_nRF52_Arduino in its latest stable-release 0.1.20 is a modified version of the adafruit core with support for certain boards which are not supported there, like custom-made boards or the Nordic nRF52840 Dongle.
I've created a demo project at https://github.com/maxgerhardt/pio-community-nrf52-example to showcase that you can use the
nordicnrf52@5.0.1
platform (to get the right build logic for the base adafruit 0.1.20 core) together withframework-arduinoadafruitnrf52
overridden to usehttps://github.com/jpconstantineau/Community_nRF52_Arduino.git#0.1.21
and a custom pca10059.json bord definition in order to get Nordic nRF52840 Dongle board supprt.This issue is linked to https://github.com/platformio/platform-nordicnrf52/issues/68 for Nordic nRF52840 Dongle support and https://github.com/jpconstantineau/Community_nRF52_Arduino/issues/20 for the demonstration of experimental PlatformIO support.