Is ARM semihosting I/O supported with JLinkGDBServer and a J-Link OB attached to a Toshiba TMPM341 (Cortex-M3)? I've been poking around this forum for a while now, but I only turned up some very old messages, and no answers that really came out and said what was going on. The documentation (UM08005_JLinkGDBServer.pdf) makes mention of the "semihosting enable" and "semihosting ThumbSWI" remote commands, but their more detailed descriptions have a few hints that they're oriented to the older pre ARMv7 architectures.
If I try to do Cortex-M3-style semihosting (via a "bkpt 0xab" instruction), the debugger just halts, with a breakpoint trap. Here's a little gdb transcript:
(gdb) c
Program received signal SIGTRAP, Trace/breakpoint trap.
0x000003d6 in semihost_SYS_WRITE0 (s=0x20000004 "Hello, world!\n") at driver/semihosting.c:5
5 __asm ("mov r1, %[string]; \
(gdb) disas
Dump of assembler code for function semihost_SYS_WRITE0:
0x000003d0 <+0>: mov r2, r0
0x000003d2 <+2>: mov r1, r2
0x000003d4 <+4>: movs r0, #4
=> 0x000003d6 <+6>: bkpt 0x00ab
0x000003d8 <+8>: bx lr
End of assembler dump.
My GDB build should support things fine - I was using semihosting successfully with the LPCXpresso dev boards from NXP. The only major differences are the GDB server software and the specific target chip (the LPC I was using was Cortex-M0, but I don't think that should make a difference). So, presumably the LPC debug server software supports semihosting, but the Segger JLinkGDBServer does not - unless I'm doing something wrong, which is certainly quite possible.
Is there a way to get this I/O channel working? In the absence of semihosting, does JLinkGDBServer support DCC for I/O? What does it expect to see on the target side for support, if so?
Thanks for any information you can provide! Please let me know if there's any other information you'd find useful from my side.
If I try to do Cortex-M3-style semihosting (via a "bkpt 0xab" instruction), the debugger just halts, with a breakpoint trap. Here's a little gdb transcript:
(gdb) c
Program received signal SIGTRAP, Trace/breakpoint trap.
0x000003d6 in semihost_SYS_WRITE0 (s=0x20000004 "Hello, world!\n") at driver/semihosting.c:5
5 __asm ("mov r1, %[string]; \
(gdb) disas
Dump of assembler code for function semihost_SYS_WRITE0:
0x000003d0 <+0>: mov r2, r0
0x000003d2 <+2>: mov r1, r2
0x000003d4 <+4>: movs r0, #4
=> 0x000003d6 <+6>: bkpt 0x00ab
0x000003d8 <+8>: bx lr
End of assembler dump.
My GDB build should support things fine - I was using semihosting successfully with the LPCXpresso dev boards from NXP. The only major differences are the GDB server software and the specific target chip (the LPC I was using was Cortex-M0, but I don't think that should make a difference). So, presumably the LPC debug server software supports semihosting, but the Segger JLinkGDBServer does not - unless I'm doing something wrong, which is certainly quite possible.
Is there a way to get this I/O channel working? In the absence of semihosting, does JLinkGDBServer support DCC for I/O? What does it expect to see on the target side for support, if so?
Thanks for any information you can provide! Please let me know if there's any other information you'd find useful from my side.
The post was edited 1 time, last by carlnorum ().