Has anyone used semihosting with an ARM core to allow them to use the debugger for stdio for the shell? I don’t have an available UART on this board I’m developing for. My two options are USB or semihosting with the debugger. As USB currently is unsupported with Riot, it’d be great to figure out how to utilize semihosting in the meantime.
Thanks everyone for the suggestions. Segger RTT looks like it could be the perfect solution. It actually sounds very similar to semihosting.
I am trying to use this with an ST-Link V2 and STM32 cortex m3 processor. Does anyone know if it has been tested on this? I’ve added the module, but it doesn’t seem to be working. I have used the debug target to start gdb and my program.
That makes since, I misunderstood before, I thought this was a JTAG specific functionality. Thanks for the clarification. Unfortunately I have an external ST-Link V2, not the onboard.
I suppose that brings the original question back. Trying to get semihosting working. It sounds very similar to Segger RTT so it seems possible. Even better is it shouldn’t be more than an openocd command and a couple tool-chain flags (in theory). but I’m not so sure of where to start.
So in my attempt to get semihosting working I think I need to understand how Riot and newlib currently work together. Does Riot use pre-compiled newlib libraries? If so, where are they and how are they currently linked?
It seems I’ll probably need to disable the newlib syscalls defined with UART_STDIO etc. Not sure if there is a good way of doing this from the upper level Makefile? Anyone know?