Template for C TDD that uses the cpputest framework/test harness. This template uses Makefiles instead of CMake
Find a file Use this template
2024-12-06 22:31:48 -08:00
.template_files
build
cpputest@c3625dc668
docs
inc Added and included the "inc" directory in the project root. Also added in line to include the mocks dir 2024-06-14 13:38:04 -07:00
mocks
src uncommented 2024-12-06 22:28:03 -08:00
tests
.gitignore
.gitmodules
ch32v20x-toolchain.cmake Added comment/todo item 2024-12-06 22:28:14 -08:00
CMakeLists.txt removed uneeded lines. Also changed template name parameter 2024-12-04 19:52:15 -08:00
compile_commands.json
Doxyfile
otto.sh
README.md Added items to the todo list. 2024-12-06 22:31:48 -08:00
setup.sh

CH32V20X TDD template

Description

This is a TDD focused template that uses the cpputest testing harness and CMAKE for the build system. The build system and testing is held together with the use of the otto.sh script.

Dependencies

  • CMAKE >= 3.20
  • CppUTest >= 3.8
  • Bash/Sh shell
  • wchisp and/or wlink(rust pgrm)

Hardware Specific

Given this template targets the whole range of CH32V20X chips you will want to define their memory layout to reflect the chip you have chosen.

Using the template

Change project configuration

Basic Steps:

  1. Change project name parameter in CMakeLists.txt in root dir.
  2. Edit the memory layout file.

Setting up dependencies

Running Tests

echo "1" | ./otto.sh

Building Binaries

Flashing Micro-Controller

TODO

  • check shared libraries build correctly.
  • check if all compile options are same for all parts.
  • Setup linker script inclusion.
  • Add flash target/command.
  • Add size target/command.