Board Support Package provide default hardware mappings and initialization for RV64.
Topics | |
| API Functions | |
| Board Support Package API functions. | |
| Bsp_printf Config (Legacy) | |
| Only applicable when using setting (NEWLIB=NOSTD) in makefile. Toggle between the Lite and Full printf implementations and enable specific format specifiers. | |
| Default SoC Peripherals | |
| Default Hardware mappings for the primary Interrupt Controller and Timer. | |
This module provides configurations and initialization for the primary UART, CLINT timer, and PLIC interrupt controller on the EfxSapphireSoC platform.
Usage 1 — Basic Initialization
Always call bsp_init() at the start of main function to initialize UART module.
User could use bsp_putChar and bsp_getChar for character I/O which are mapped to the physical UART if it exists in hardware, otherwise they will be safe dummy macros that do nothing.
It is recommended to use newlib-nano for the optimized printf and scanf which are also mapped to the physical UART for better functionality and compatibility with the C library.
Usage 2 — Semihosting Print
To enable semihosting print functionality, define ENABLE_SEMIHOSTING_PRINT as 1.
Usage 3 — Legacy bsp_printf (NOSTD)
To use the legacy bsp_printf (same as RV32), change NEWLIB to NOSTD in the makefile which overrides the standard printf.
User may configure the behavior of this custom printf via BSP_SETTING:
Usage 4 — UART Configuration
To configure the physical UART parameters, modify the following macros. See Default SoC Peripherals for the full list of hardware mappings.
By default, it is configured to use the physical UART if it exists in hardware, otherwise it will provide dummy macros that do nothing.