The semihosting mechanism
C-SPY emulated I/O is compatible with the RISC-V semihosting specification. When an application invokes a semihosting call, the execution stops at a debugger breakpoint. The debugger then handles the call, performs any necessary actions on the host computer and then resumes the execution.
There are two variants of semihosting mechanisms available:
Using the
EBREAKinstruction, according to the RISC-V standardUsing IAR breakpoint, for backwards compatibility and troubleshooting.
Note
IAR breakpoint is an IAR-specific extension of the semihosting standard. If you link your application with libraries built with tool chains from other vendors than IAR and use IAR breakpoint, semihosting calls made from code in those libraries will not work.