JLink error in Platform IO: device is unknown to this version of J-Link software


I am trying to start debugging on my ATSAME51G18A mcu and I am getting this error below:
Configuring upload protocol…
AVAILABLE: blackmagic, jlink, stlink
CURRENT: upload_protocol = jlink
Uploading .pio/build/project/firmware.bin
SEGGER J-Link Commander V6.52 (Compiled Sep 27 2019 17:51:12)
DLL version V6.52, compiled Sep 27 2019 17:51:01

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...O.K.
Firmware: J-Link ARM V8 compiled Nov 28 2014 13:44:46
Hardware version: V8.00
S/N: 158010075
Target connection not established yet but required for command.
The selected device "ATSAME51G18" is unknown to this version of the J-Link software.

Please make sure that at least the core J-Link shall connect to, is selected.
Proper device selection is required to use the J-Link internal flash loaders
for flash download or unlimited flash breakpoints.

For some devices which require a special handling, selection of the correct device is important.
No valid device has been selected.

Target connection not established yet but required for command.
Please specify device / core. <Default>: ATSAME51G18
Type '?' for selection dialog

I tried connecting to the target using JLinkExe and it connects alright and I am also able to read from memory locations. Target name is same in both the cases.

Platformio.ini lookslike this:

debug_tool = jlink
upload_protocol = jlink

Debug and Upload section in .json file looks like this:

“debug”: {
“default_tools”: [“jlink”],
“openocd_target”: “same5x”,
“jlink_device”: “ATSAME51G18”,
“svd_path”: “ATSAME51G18A.svd”
“upload”: {
“offset_address”: “0x00000000”,
“maximum_ram_size”: 131072,
“maximum_size”: 262144,
“protocols”: [
“protocol”: “jlink”

Can anyone please help resolve this?
Thanks in advance.


The device name is actually not known in this Jlink version (6.52). Starting JLink.exe and doing a ExpDevList list.txt reveals no ATSAME51G18. So ATSAME51Gxx type chips at all.


Can you manually download the latest version (6.86g) from SEGGER - The Embedded Experts - Downloads and replace the files in C:\Users\<user>\.platformio\packages\tool-jlink with the new version (but leave the package.json unmodified) and see if that works?