|
From: <sof...@kl...> - 2022-02-14 10:10:58
|
Using OpenOCD 0.11.0+dev-00562-g5ab74bde0 (2022-02-13-15:27) then both
$ ./src/openocd -s ./tcl -f interface/stlink-dap.cfg -f target/renesas_s7g2.cfg
and
$ ./src/openocd -s ./tcl -f interface/jlink.cfg -f target/renesas_s7g2.cfg
work for me on an R7FS124 device. The J-Link is fitted onto a DK-S124 dev board and the ST-Link
plugs onto the board right next to it. I have both connected simultaneously and can switch between
the two (for comparison purposes) at will.
I can debug with GDB quite happily via either interface, though there is a bit of an oddity when
starting up. When first connecting, OpenOCD reports "Halt timed out, wake up GDB" and can't halt the
core. I notice that the core is no longer running at this point (because my "blink" code isn't
flashing the LED.)
Debug: 155 14813 command.c:166 script_debug(): command - halt
Debug: 156 14819 target.c:3304 handle_halt_command(): -
Debug: 157 14819 cortex_m.c:988 cortex_m_halt(): target->state: reset
Debug: 158 14825 target.c:3286 target_wait_state(): waiting for target halted...
Debug: 166 18617 cortex_m.c:922 cortex_m_poll(): Exit from reset with dcb_dhcsr 0x1000001
Debug: 167 18623 cortex_m.c:593 cortex_m_endreset_event(): DCB_DEMCR = 0x01000000
Debug: 168 18623 stlink_usb.c:4314 stlink_usb_misc_rw_segment(): Queue: 2 commands in 4 items
Debug: 169 18628 target.c:2717 target_write_u32(): address: 0xe0002000, value: 0x00000003
Debug: 170 18628 stlink_usb.c:4314 stlink_usb_misc_rw_segment(): Queue: 2 commands in 5 items
Debug: 171 18640 target.c:2629 target_read_u32(): address: 0xe0002000, value: 0x00000041
Debug: 172 18640 target.c:2717 target_write_u32(): address: 0xe0002008, value: 0x00000000
Debug: 173 18646 target.c:2717 target_write_u32(): address: 0xe000200c, value: 0x00000000
Debug: 174 18652 target.c:2717 target_write_u32(): address: 0xe0002010, value: 0x00000000
Debug: 175 18658 target.c:2717 target_write_u32(): address: 0xe0002014, value: 0x00000000
Debug: 176 18664 target.c:2717 target_write_u32(): address: 0xe0001020, value: 0x00000000
Debug: 177 18670 target.c:2717 target_write_u32(): address: 0xe0001024, value: 0x00000000
Debug: 178 18676 target.c:2717 target_write_u32(): address: 0xe0001028, value: 0x00000000
Debug: 179 18682 target.c:2717 target_write_u32(): address: 0xe0001030, value: 0x00000000
Debug: 180 18688 target.c:2717 target_write_u32(): address: 0xe0001034, value: 0x00000000
Debug: 181 18694 target.c:2717 target_write_u32(): address: 0xe0001038, value: 0x00000000
Info : 184 19824 target.c:576 target_poll(): Halt timed out, wake up GDB.
Debug: 185 19824 target.c:1847 target_call_event_callbacks(): target event 0 (gdb-halt) for core
s7g2.cpu
Error: 186 19830 target.c:3294 target_wait_state(): timed out while waiting for target halted
Debug: 187 19830 command.c:556 run_command(): Command 'halt' failed with error code -4
If I reset the S124, then re-run OpenOCD again it does manage to halt the core and debugging can
proceed as normal.
I haven't yet checked what registers are being read/written in the debug output lines 169 to 180
above. I will investigate in due course, but thought I'd mention it in case someone else already
knows the answer.
On 12/02/2022 02:45, Tom Wong-Cornall wrote:
>>> I'm starting to work with a Renesas Synergy device - specifically a Cortex M0+ core in the "S1" family.
>> I was interested in the same thing a while back. I haven't found anything that would work
>> outside of the proprietary Renesas tools.
> On that note I am keen to get OpenOCD talking to my RA2L1s; the EK-RA2L1
> contains J-Link firmware and without creating any new config files I can
> get as far as here which is encouraging:
>
> ~~~
>
> $ openocd -f /usr/share/openocd/scripts/interface/jlink.cfg -c "adapter speed 1000" -c "transport select swd"
> Open On-Chip Debugger 0.11.0+dev-00562-g5ab74bde0 (2022-02-12-14:26)
> Licensed under GNU GPL v2
> For bug reports, read
> http://openocd.org/doc/doxygen/bugs.html
> adapter speed: 1000 kHz
>
> swd
> Info : Listening on port 6666 for tcl connections
> Info : Listening on port 4444 for telnet connections
> Info : J-Link OB-S124 compiled Sep 21 2020 16:58:21
> Info : Hardware version: 1.00
> Info : VTarget = 3.300 V
> Info : clock speed 1000 kHz
> Warn : gdb services need one or more targets defined
|