I have built a code for AT91R4008 in keil and now I want to debug it by J-Link 14 pin on pcb. But when I connect the J-Link to the USB port of my pc and the 14 pin Jtag IDE connector on pcb, keil does not recognize anything. Even windows find j-link and install the driver, but there is no change in keil and when I click on start debug session an error comes saying:
Target DLL has been cancelled. Debugger aborted!
Without connecting the j-link to the pc, if you click on start debug session, this error will be announced too.
I have searched a lot about debugging with j-link but I couldn't find any solution.
<unlock kinetis>? It's an ATMEL part, not a KINETIS/FREESCALE part.
It's a very antiquated part, are you sure you can flash it via JTAG? Probably need an applet to support whatever external flash you have on the device. Looked at J-Flash?
In Keil, you'd probably want to target the internal SRAM (Target RAM + SAM-ICE), and create a debugger script (.ini) to download the code into RAM and execute it from there.
C:\Keil421\ARM\Boards\Atmel\EB40A\Hello\Hello.c