Go to file
imi415 a25b896bb0
Added README.md and .gitignore.
2022-03-29 00:21:16 +08:00
BSP Initial commit with WCH drivers. 2022-03-29 00:08:02 +08:00
include Initial commit with WCH drivers. 2022-03-29 00:08:02 +08:00
src Initial commit with WCH drivers. 2022-03-29 00:08:02 +08:00
.gitignore Added README.md and .gitignore. 2022-03-29 00:21:16 +08:00
CMakeLists.txt Initial commit with WCH drivers. 2022-03-29 00:08:02 +08:00
README.md Added README.md and .gitignore. 2022-03-29 00:21:16 +08:00
riscv64-elf.cmake Initial commit with WCH drivers. 2022-03-29 00:08:02 +08:00

README.md

Template 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. **