diff --git a/Documentation/platforms/risc-v/c906/boards/smartl-c906/README-qemu.txt b/Documentation/platforms/risc-v/c906/boards/smartl-c906/README-qemu.txt deleted file mode 100644 index 3427cf5ed49..00000000000 --- a/Documentation/platforms/risc-v/c906/boards/smartl-c906/README-qemu.txt +++ /dev/null @@ -1,34 +0,0 @@ -1. Download and install toolchain - - https://occ.t-head.cn/community/download - -2. Download and install qemu - - https://occ.t-head.cn/community/download - -3. Modify defconfig - - CONFIG_C906_WITH_QEMU=y - -4. Configure and build NuttX - - $ make distclean - $ ./tools/configure.sh smartl-c906:nsh - $ make -j - -5. Run the nuttx with qemu - - Modify the soc config file "smarth_906_cfg.xml", enlarge the RAM size. -- -+ -... -- smart_inst_mem, Start: 0x0, Length: 0x20000 -+ smart_inst_mem, Start: 0x0, Length: 0x400000 - - Then launch QEMU: - $ ./cskysim -soc $PATH_TO_SOCCFG/smarth_906_cfg.xml -nographic -kernel $PATH_TO_NUTTX_BUILD_DIR/nuttx - -6. TODO - - Support protect mode via PMP - Support RISC-V User mode diff --git a/Documentation/platforms/risc-v/c906/boards/smartl-c906/README.txt b/Documentation/platforms/risc-v/c906/boards/smartl-c906/README.txt deleted file mode 100644 index 317b5498a37..00000000000 --- a/Documentation/platforms/risc-v/c906/boards/smartl-c906/README.txt +++ /dev/null @@ -1,24 +0,0 @@ -1. Download and install toolchain - - https://occ.t-head.cn/community/download - -2. Download and install qemu - - https://occ.t-head.cn/community/download - -3. Modify defconfig - -4. Configure and build NuttX - - $ make distclean - $ ./tools/configure.sh smartl-c906:nsh - $ make -j - -5. Run the nuttx by downloading elf to RAM via HW debugger - -6. TODO - - Support FPU - Support ELF based file applications - Support RISC-V User mode - diff --git a/Documentation/platforms/risc-v/c906/boards/smartl-c906/index.rst b/Documentation/platforms/risc-v/c906/boards/smartl-c906/index.rst index c0e9cd01095..3528fc47f46 100644 --- a/Documentation/platforms/risc-v/c906/boards/smartl-c906/index.rst +++ b/Documentation/platforms/risc-v/c906/boards/smartl-c906/index.rst @@ -2,8 +2,64 @@ smartl-c906 =========== -.. include:: README.txt - :literal: +.. tags:: arch:riscv, experimental -.. include:: README-qemu.txt - :literal: +.. todo:: + + There is currently no support for the FPU, ELF-based file applications, + protected mode with PMP or RISC-V User mode. + +Installation +============ + +Download and install the toolchain from +https://occ.t-head.cn/community/download. + +If you're planning on using NuttX in QEMU for this board, install QEMU from +https://occ.t-head.cn/community/download. + +Building NuttX +============== + +.. note:: + + If configuring to run on QEMU, enable the option ``CONFIG_C906_WITH_QEMU=y`` + in the Kconfig menu (``make menuconfig``). + +Flashing +======== + +Run NuttX by downloading the produced ELF to RAM via a HW debugger. + +If running on QEMU, first modify the config file ``smarth_906_cfg.xml`` to +enlarge the RAM size with this patch: + +.. code:: diff + + - + + + ... + - smart_inst_mem, Start: 0x0, Length: 0x20000 + + smart_inst_mem, Start: 0x0, Length: 0x400000 + +Then, you can launch QEMU using the following command: + +.. code:: console + + $ ./cskysim -soc $PATH_TO_SOCCFG/smarth_906_cfg.xml -nographic -kernel $PATH_TO_NUTTX_BUILD_DIR/nuttx + +Configurations +============== + +You can select a configuration using the following command: + +.. code:: console + + $ ./tools/configure.sh smartl-c906: + +Where ```` is one of the configurations listed below. + +nsh +--- + +A simple configuration with the NSH shell.