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
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 OEM: IAR VTref=4.853V 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:
Can anyone please help resolve this?
Thanks in advance.