This is an automated email from the ASF dual-hosted git repository. simbit18 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 6056fd61f317582c38fbda38bb6ed940d81db2a1 Author: Matteo Golin <[email protected]> AuthorDate: Thu Oct 23 10:34:36 2025 -0400 docs/platforms/risc-v/c906/boards/smartl-c906: Migrate README.txt Migrate README.txt to RST documentation format adhering to standard board documentation template. Signed-off-by: Matteo Golin <[email protected]> --- .../risc-v/c906/boards/smartl-c906/README-qemu.txt | 34 ------------ .../risc-v/c906/boards/smartl-c906/README.txt | 24 -------- .../risc-v/c906/boards/smartl-c906/index.rst | 64 ++++++++++++++++++++-- 3 files changed, 60 insertions(+), 62 deletions(-) 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. -- <mem name="smart_inst_mem" addr="0x0" size ="0x00020000" attr ="MEM_RAM"></mem> -+ <mem name="smart_inst_mem" addr="0x0" size ="0x00400000" attr ="MEM_RAM"></mem> -... -- 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 + + - <mem name="smart_inst_mem" addr="0x0" size ="0x00020000" attr ="MEM_RAM"></mem> + + <mem name="smart_inst_mem" addr="0x0" size ="0x00400000" attr ="MEM_RAM"></mem> + ... + - 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:<config> + +Where ``<config>`` is one of the configurations listed below. + +nsh +--- + +A simple configuration with the NSH shell.
