Microchip provides SoftConsole toolchain to build a RISC-V user application executable
(.hex
) file and debug it. The reference design files
include the SoftConsole workspace that contains the
MiV_uart_blinky
software project. The
MiV_uart_blinky
user application is programmed on an
external SPI Flash using Libero SoC. The user application blinks user LEDs and
performs DDR3 read and write operations. The DDR3 read/write status is displayed
on the UART terminal.
As per the Libero SoC design memory map, the UART and GPIO peripheral addresses are mapped to
0x60000000 and 0x60001000, respectively. This information is provided in the
hw_platform.h
file as shown in the following figure.
The user application must be executed from the TCM memory (code, data, and stack). Therefore, the RAM address in the linker script is set to the starting address of the TCM memory as shown in the following figure.
The linker script (miv-rv32-ram.ld
) is available in the
SoftConsole_Project\MiV_uart_blinky\miv_rv32_hal
folder of
the design files. Building the user application involves the following steps:
main.c
fileFor more information about these steps, see TU0775: PolarFire FPGA: Building a Mi-V Processor Subsystem Tutorial. The .hex
file is created after successful
build and it is used for design and memory Initialization configuration in Running the Demo.