Go to file Use this template
Yilin Sun 5dbbc97dae
Updated SDK and FreeRTOS.
Signed-off-by: Yilin Sun <imi415@imi.moe>
2024-03-12 22:49:13 +08:00
Ld Updated SDK and FreeRTOS. 2024-03-12 22:49:13 +08:00
SDK@d18c9d0146 Updated SDK and FreeRTOS. 2024-03-12 22:49:13 +08:00
include Initial FreeRTOS support. 2022-05-01 21:45:10 +08:00
lib Updated SDK and FreeRTOS. 2024-03-12 22:49:13 +08:00
src Updated SDK and FreeRTOS. 2024-03-12 22:49:13 +08:00
.clang-format Updated SDK and FreeRTOS. 2024-03-12 22:49:13 +08:00
.gitignore Initial commit 2022-04-30 10:07:26 +00:00
.gitmodules Updated SDK and FreeRTOS. 2024-03-12 22:49:13 +08:00
CMakeLists.txt Updated SDK and FreeRTOS. 2024-03-12 22:49:13 +08:00
LICENSE Initial commit 2022-04-30 10:07:26 +00:00
LICENSE.wch Initial commit 2022-04-30 10:07:26 +00:00
README.md Updated misc project config. 2022-05-02 23:13:55 +08:00
riscv64-elf.cmake Updated FreeRTOS and CMake files. 2023-04-10 23:59:21 +08:00

README.md

FreeRTOS demo for WCH CH32V30x series MCU

How to use

  • Write your own CMake toolchain file (see riscv64-elf.cmake for example)
  • Configure project and build as usual. (see below for a simple test)

Sample usage

mkdir build && cd build
cmake -DCMAKE_TOOLCHAIN_FILE=riscv64-elf.cmake ..
make -j${nprocs}

Notes

Startup files

There are two versions of startup assembly files, located at

  • BSP/Startup/startup_ch32v30x_D8.S
  • BSP/Startup/startup_ch32v30x_D8C.S

The first file is used for CH32V303 devices, which lacks of the following peripherals:

  • Ethernet
  • CAN2
  • USBHS
  • DVP

*** Change the startup file to the correct version for the hardware in use. ***

Compilers

These MCUs uses something called "RISC-V4F" core with Chinese documentation provided:

  • Implemented RV32IMAFC ABI

Here is the list of features proprietary or incompatible with upstream toolchain:

  • Fast IRQ handlers: uses a special attribute of interrupt, which value is WCH-Interrupt-fast