Documentation: risc-v/mpfs: update documentation

Update the risc-v/mpfs documentation to match the current work.

Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>
This commit is contained in:
Eero Nurkkala
2022-01-17 09:11:39 +02:00
committed by Xiang Xiao
parent 377093339e
commit 10d98f64d3
+20 -5
View File
@@ -16,20 +16,35 @@ Like: https://xpack.github.io/riscv-none-embed-gcc or https://github.com/sifive/
Booting Booting
======= =======
The NuttX port for now relies on HSS bootloader to carry on some hardware initializations. The NuttX works as a standalone operating system that may initialize all the required clocks and
peripherals including DDR memory. Alternatively, the vendor's HSS bootloader may be used instead to
perform all the initialization steps.
Building and flashing Building and flashing
===================== =====================
Configure the NuttX project: ``./tools/configure.sh icicle:nsh``
Run ``make`` to build the project.
If NuttX is built as a standalone OS with the config option CONFIG_MPFS_BOOTLOADER set, it's important
to note that the image size is very limited: only (128K - 256) bytes. 256 bytes are reserved for the
header that must be prepended into the NuttX binary. This binary is called hss-envm-wrapper-bm1-dummySbic.bin
and may be found from the vendor's HSS implementation. Moreover, after prepending the 256-byte header,
the LMA section needs to be adjusted, for example::
riscv64-unknown-elf-objcopy -I binary -O ihex --change-section-lma *+0x20220000 nuttx.bin nuttx.hex
The output binary nuttx.hex may be flashed with the LiberoSoc tool.
The tool is available from: https://www.microchip.com/en-us/products/fpgas-and-plds/fpga-and-soc-design-tools/fpga/libero-software-later-versions#Documents%20and%20Downloads
There's an alternative way to use NuttX, without the CONFIG_MPFS_BOOTLOADER option set. This expects the
HSS bootloader sets up the system (memories, caches, initializes clocks etc.).
First make sure that ``hss-payload-generator`` is installed. First make sure that ``hss-payload-generator`` is installed.
Available from: https://github.com/polarfire-soc/hart-software-services Available from: https://github.com/polarfire-soc/hart-software-services
This tool is used to convert the ELF/bin to a compatible HSS payload image This tool is used to convert the ELF/bin to a compatible HSS payload image
Configure the NuttX project: ``./tools/configure.sh icicle:nsh``
Run ``make`` to build the project.
Create HSS payload bin:: Create HSS payload bin::
hss-payload-generator -v -c hss-nuttx.yml payload.bin hss-payload-generator -v -c hss-nuttx.yml payload.bin
@@ -59,7 +74,7 @@ GPIO Yes
MMUART Yes Uart mode only MMUART Yes Uart mode only
SPI Yes SPI Yes
I2C Yes I2C Yes
eMMC SD/SDIO Yes eMMC not fully tested eMMC SD/SDIO Yes No PHY training
Timers No Timers No
Watchdog No Watchdog No
RTC No RTC No