Hello everybody !
I am struggling to make a blink program on the board nordic nRF52 DK
I am new to platformio and nrf52 DK. I followed this tutorial : Arduino and Nordic nRF52-DK: debugging and unit testing — PlatformIO latest documentation
I just want to get familliar with nRF52_DK to later use nRF52840 on a custom baord.
My error is : Connecting to J-Link via USB…FAILED when I try to upload on the board.
Full upload message below :
Complete Upload log
> Processing nrf52_dk (platform: nordicnrf52; board: nrf52_dk; framework: arduino)
----------------------------------------------------------------------------------------------------------------------------------------------------------------------CONFIGURATION: https://docs.platformio.org/page/boards/nordicnrf52/nrf52_dk.html
PLATFORM: Nordic nRF52 (7.1.0) > Nordic nRF52-DK
HARDWARE: NRF52832 64MHz, 64KB RAM, 512KB Flash
DEBUG: Current (jlink) On-board (cmsis-dap, jlink) External (blackmagic, stlink)
PACKAGES:
- framework-arduinonordicnrf5 1.700.201209 (7.0)
- tool-bossac-nordicnrf52 1.10901.201022 (1.9.1)
- tool-jlink 1.68801.0 (6.88.1)
- tool-openocd 2.1000.200630 (10.0)
- tool-sreccat 1.164.0 (1.64)
- toolchain-gccarmnoneeabi 1.70201.0 (7.2.1)
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 12 compatible libraries
Scanning dependencies...
No dependencies
Building in release mode
MethodWrapper(["checkprogsize"], [".pio\build\nrf52_dk\firmware.elf"])
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [ ] 0.2% (used 140 bytes from 65536 bytes)
Flash: [ ] 0.4% (used 2224 bytes from 524288 bytes)
.pio\build\nrf52_dk\firmware.elf :
section size addr
.text 2108 0
.ARM.exidx 8 2108
.data 108 536870912
.bss 32 536871020
.heap 4096 536871056
.stack_dummy 4096 536871056
.ARM.attributes 46 0
.comment 126 0
.debug_frame 148 0
Total 10768
<lambda>(["upload"], [".pio\build\nrf52_dk\firmware.hex"])
AVAILABLE: blackmagic, cmsis-dap, jlink, mbed, nrfjprog, stlink
CURRENT: upload_protocol = jlink
JLink.exe -device nRF52832_xxAA -speed 4000 -if swd -autoconnect 1 -NoGui 1 -CommanderScript "C:\Users\clement.deligeon\Documents\PlatformIO\Projects\arduino-tutorial\.pio\build\nrf52_dk\upload.jlink"
SEGGER J-Link Commander V6.88b (Compiled Nov 27 2020 15:45:43)
DLL version V6.88b, compiled Nov 27 2020 15:44:11
J-Link Command File read successfully.
Processing script file...
J-Link connection not established yet but required for command.
Connecting to J-Link via USB...FAILED: Cannot connect to J-Link.
J-Link connection not established yet but required for command.
Connecting to J-Link via USB...FAILED: Failed to open DLL
J-Link connection not established yet but required for command.
Connecting to J-Link via USB...FAILED: Failed to open DLL
Script processing completed.
My config platformio is below and I am on platformio IDE through Vscode :
platformio.ini
; PlatformIO Project Configuration File
;
; Build options: build flags, source filter
; Upload options: custom upload port, speed and extra flags
; Library options: dependencies, extra library storages
; Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html
[env:nrf52_dk]
platform = nordicnrf52
board = nrf52_dk
framework = arduino
Jlink
I download the software for Jlink.
One cause of the issue could be that I have GDB v7.0 with segger embedded studio and GDB v6.88 with platformio.
I checked on nordic documentation and from my understanding Jlink is directly embbedded in the board.
I already executed : Instdrivers.exe Not sure of what the result should be because I still can’t see Jlink in the device manager of windows.
Hardware
I also check power on my board which is alimented via usb and everything is fine.
However nothing is detected when I plug it in my my usb port via cable.
I also try with both usb port of my laptop.
I try my cable and it can transfer data.
What should I check try next ? i don’t understand the failed to open DLL is a windows issue ?
I am stuck since several days on this issue.
Thank you for your help. I think solution to my problem is obvious but I can’t find it currently.