You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
imi415 c4d41ac812
Updated misc project config.
3 weeks ago
BSP Rewrite startup for D8. 3 weeks ago
include Initial FreeRTOS support. 3 weeks ago
lib Initial FreeRTOS support. 3 weeks ago
src Fixed stack unbalance. 3 weeks ago
.gitignore Initial commit 3 weeks ago
.gitmodules Initial FreeRTOS support. 3 weeks ago
CMakeLists.txt Updated misc project config. 3 weeks ago
LICENSE Initial commit 3 weeks ago
LICENSE.wch Initial commit 3 weeks ago
README.md Updated misc project config. 3 weeks ago
riscv64-elf.cmake Initial commit 3 weeks ago

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