riscv-mcu / rt-thread

RT-Thread is an open source IoT operating system from China.
http://www.rt-thread.io
Apache License 2.0
0 stars 0 forks source link

RT-Thread Branches For Nuclei RISC-V Processors #1

Open fanghuaqi opened 8 months ago

fanghuaqi commented 8 months ago

RT-Thread For Nuclei RISC-V Processor

About branch for Nuclei

Make sure you have pulled latest changes from desired branch.

How to use it, see bsp/nuclei/nuclei_fpga_eval/README.md in selected branch.

It can works on both Nuclei RISC-V Toolchain 2022.12 and 2024.02, if you want to use on 2024.02, please change it like this:

Default using Nuclei RISC-V Toolchain 2022.12 - gcc10

You can just download Nuclei Studio, which contains all prebuilt tools required, and setup environment required following the above README.md

diff --git a/bsp/nuclei/nuclei_fpga_eval/rtconfig.py b/bsp/nuclei/nuclei_fpga_eval/rtconfig.py
index 840071c62..8d6c3fa68 100644
--- a/bsp/nuclei/nuclei_fpga_eval/rtconfig.py
+++ b/bsp/nuclei/nuclei_fpga_eval/rtconfig.py
@@ -42,9 +42,9 @@ if PLATFORM == 'gcc':
     # toolchain settings
     # TODO: Choose proper toolchain prefix
     # using Nuclei GNU Toolchain <= 2022.12
-    PREFIX  = 'riscv-nuclei-elf-'
+    #PREFIX  = 'riscv-nuclei-elf-'
     # When Using Nuclei GNU Toolchain >= 2024.02
-    #PREFIX  = 'riscv64-unknown-elf-'
+    PREFIX  = 'riscv64-unknown-elf-'
fanghuaqi commented 8 months ago

LTS v3.1.x RT-Thread, sample sceenshot running on n300fd and nx900fd, both using Nuclei RISC-V Toolchain 2022.12:

n300fd

image

nx900fd

image

fanghuaqi commented 7 months ago

For sample build log in Windows, check rt_thread_build_lts_4.1.x.log

fanghuaqi commented 7 months ago

Just pushed changes to the above two nuclei/lts-* branches to fix build error when NUCLEI_SDK_SOC = "demosoc" changed to NUCLEI_SDK_SOC = "evalsoc" in bsp/nuclei/nuclei_fpga_eval/rtconfig.py

Error: board/board.c:18:14: fatal error: drv_uart.h: No such file or directory

image

fanghuaqi commented 2 months ago

This commit must be added https://github.com/Nuclei-Software/nuclei-sdk/commit/72519786feac93b7c0f2a93149c20941afd8df19 to fix rt-thread potential thread switch bug

fanghuaqi commented 2 months ago

Just apply patch 68e6149208b219904478a2c5414134331bc311cc to nuclei/lts-v4.1.x to fix task switch potential bug, for branch nuclei/lts-v3.1.x this patch is already in it.

image