semihostingDemo
The semihosting facilitates communication between the host machine and the targeted embedded system through a debugger. This feature is useful during development and debugging phases, as it lets you print debug messages without enabling a UART peripheral. It is also advantageous when you want to omit the UART peripheral in resource-constrained designs.
The semihostingDemo example design clearly illustrates how to leverage semihosting in the High-Performance Sapphire RV32 SoC. To activate semihosting, ensure that the ENABLE_SEMIHOSTING_PRINT define is set to 1 in the bsp.h header file. This enables the seamless output of debug messages. All UART printing calls, e.g., bsp_print, bsp_printf, and other printing APIs, that are available in the bsp.h file is directed to the Efinity RISC-V Embedded Software IDE console. No modifications are required for your embedded software design.
This demonstration shows the Efinity RISC-V Embedded Software IDE's ability to print debug messages and read them from the console.
keep_alive() is not invoked. This warning
arises from the blocking nature of the semihosting reading, which can potentially delay
the debugger from sending the keep_alive() signal on time. This warning
does not impact the functionality of the application. It is simply a notification
related to the timing of the keep_alive() signal. Therefore, it should
not be a cause of alarm regarding the overall performance or expected behavior of the
system.