From 33aebc0198dcd6c8df967ba5213a77ec95438c96 Mon Sep 17 00:00:00 2001 From: jake Date: Thu, 6 Mar 2025 17:50:29 -0800 Subject: [PATCH] Updated readme file --- README.md | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/README.md b/README.md index e69de29..66fae2c 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,64 @@ +# CH32v003 Cmake + CppUTest Template + + +## Goal + +Be a flexable template repo for working with ch32v003 controllers while aslo +inegrating TDD scripts using Cmake. + + +## Requirements + +- CMake +- Sh, Bash or compatible shell +- Make/GMake/BSDMake/etc +- clang/gcc +- clangd +- CppUTest(for unit tests) +- NewLIB/newlib-nano + + +## Installing toolchain + +**FreeBSD:** + +```sh +sudo pkg install gawk gsed + +git clone https://github.com/riscv-collab/riscv-gnu-toolchain.git +cd ./riscv-gnu-toolchain + +git submodule update --init --recursive + +mkdir ./build && cd ./build + +# Setup to build newlib. +./configure --prefix=/usr/local/ +make -j4 newlib + +# Some Example options below. +make -j4 build-gcc1 +make -j4 build-gcc2 +make -j4 build-gdb +make -j4 build-libc +make -j4 build-llvm +make -j4 build-uclibc +make -j4 build-binutils +``` + +**Linux:** + +Pretty much the same as FreeBSD, just follow the toolchain's `README.md` files +instructions. + + +## TODO + +- [ ] Add NewLib finding/functionality +- [ ] Add NewLib-nano finding/functionality +- [X] Add ch32v003fun sources. +- [X] Add example blinky default main. +- [ ] Add useful test examples. +- [ ] Add useful mock examples. +- [ ] Get Blinky to run on hardware. +