SparkFun Forums 

Where electronics enthusiasts find answers.

Open source ARM Debugger
By Lurkers
#197113
Hi all,

I'm just starting with OpenOCD, trying to program an ATSAM4LC2AA with a J-Link via SWD.

My openocd.cfg looks like this:
Code: Select all
source [find interface/jlink.cfg]

# GDB can also flash my flash!
gdb_memory_map enable
gdb_flash_program enable

source [find target/at91sam4lXX.cfg]
My jlink.cfg looks like this:
Code: Select all
interface jlink
transport select swd
adapter_khz 50
init
jlink hwstatus
Whenever I run openocd.exe, I get this:
Code: Select all
Open On-Chip Debugger 0.10.0 (2017-08-21) [https://github.com/sysprogs/openocd]
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
adapter speed: 50 kHz
Info : No device selected, using first device.
Info : J-Link ARM V8 compiled Nov 28 2014 13:44:46
Info : Hardware version: 8.00
Info : VTarget = 1.811 V
Info : clock speed 50 kHz
Error: BUG: current_target out of bounds
This error (Error: BUG: current_target out of bounds) always happens. I've tried changing several things here and there on all 3 configuration files, but this always happens.

Googling about this I saw a lot of "SWD is not yet supported". Is this true?

Thanks for your help!