Skip to main content

IAR Embedded Workbench for RISC-V 3.40

The semihosting mechanism

In this section:

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 EBREAK instruction, according to the RISC-V standard

  • Using 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.