SparkFun Forums 

Where electronics enthusiasts find answers.

Open source ARM Debugger
By GeorgeIoak
#190986
I've searched around and haven't been able to find help so hopefully this forum can help. I've compiled the latest OpenOCD (Open On-Chip Debugger 0.10.0-dev-00330-g5d5c9bc) and am running it on a Raspberry Pi. My openocd.cfg file has the following in it:
Code: Select all
source [find interface/raspberrypi2-native.cfg]
transport select swd

set CHIPNAME at91samd21g18
#source [find target/at91samdXX.cfg]
source [find target/psoc4.cfg]

# did not yet manage to make a working setup using srst
#reset_config srst_only
reset_config  srst_nogate

adapter_nsrst_delay 100
adapter_nsrst_assert_width 100

init
targets
reset halt
My end goal is to try and program a Proc BLE part but before I tried that I thought it best to try a CY8CKIT-049-41xx PSoC 4 Prototyping kit since I thought this board was supported.

This is my first time using OpenOCD so I wouldn't be surprised if I've missed something. When I start the session I get the following:
Code: Select all
pi@raspberrypi:~/cypress $ sudo openocd
Open On-Chip Debugger 0.10.0-dev-00330-g5d5c9bc (2016-08-03-13:52)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
BCM2835 GPIO nums: swclk = 25, swdio = 24
BCM2835 GPIO config: srst = 18
srst_only separate srst_gates_jtag srst_push_pull connect_deassert_srst
adapter speed: 1500 kHz
cortex_m reset_config sysresetreq
srst_only separate srst_nogate srst_push_pull connect_deassert_srst
adapter_nsrst_delay: 100
adapter_nsrst_assert_width: 100
Info : BCM2835 GPIO JTAG/SWD bitbang driver
Info : SWD only mode enabled (specify tck, tms, tdi and tdo gpios to add JTAG mode)
Info : clock speed 1507 kHz
Info : SWD DPIDR 0x0bb11477
Info : at91samd21g18.cpu: hardware has 4 breakpoints, 2 watchpoints
    TargetName         Type       Endian TapName            State
--  ------------------ ---------- ------ ------------------ ------------
 0* at91samd21g18.cpu  cortex_m   little at91samd21g18.cpu  running
PSoC 4 reset can handle only one psoc4.cpu target
in procedure 'reset' called at file "openocd.cfg", line 17
in procedure 'ocd_bouncer'
If I comment out line 17 (reset halt). I get this:
Code: Select all
pi@raspberrypi:~/cypress $ sudo openocd
Open On-Chip Debugger 0.10.0-dev-00330-g5d5c9bc (2016-08-03-13:52)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
BCM2835 GPIO nums: swclk = 25, swdio = 24
BCM2835 GPIO config: srst = 18
srst_only separate srst_gates_jtag srst_push_pull connect_deassert_srst
adapter speed: 1500 kHz
cortex_m reset_config sysresetreq
srst_only separate srst_nogate srst_push_pull connect_deassert_srst
adapter_nsrst_delay: 100
adapter_nsrst_assert_width: 100
Info : BCM2835 GPIO JTAG/SWD bitbang driver
Info : SWD only mode enabled (specify tck, tms, tdi and tdo gpios to add JTAG mode)
Info : clock speed 1507 kHz
Info : SWD DPIDR 0x0013d9a8
Error: Could not initialize the debug port
    TargetName         Type       Endian TapName            State
--  ------------------ ---------- ------ ------------------ ------------
 0* at91samd21g18.cpu  cortex_m   little at91samd21g18.cpu  unknown
So I'm stuck with it unable to initialize the debug port. I've checked the obvious things like wiring and everything seems OK so I'll have to assume it's something with the configuration.

Thanks in advance for anyone's help,
George
long long title how many chars? lets see 123 ok more? yes 60

We have created lots of YouTube videos just so you can achieve [...]

Another post test yes yes yes or no, maybe ni? :-/

The best flat phpBB theme around. Period. Fine craftmanship and [...]

Do you need a super MOD? Well here it is. chew on this

All you need is right here. Content tag, SEO, listing, Pizza and spaghetti [...]

Lasagna on me this time ok? I got plenty of cash

this should be fantastic. but what about links,images, bbcodes etc etc? [...]