2024-12-05 03:33:10 +00:00
|
|
|
# CH32V20X TDD template
|
|
|
|
|
|
|
|
## Description
|
|
|
|
|
2024-12-05 03:37:47 +00:00
|
|
|
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.
|
2024-12-05 03:33:10 +00:00
|
|
|
|
|
|
|
## Dependencies
|
|
|
|
|
2024-12-05 03:37:47 +00:00
|
|
|
- CMAKE >= 3.20
|
|
|
|
- CppUTest >= 3.8
|
|
|
|
- Bash/Sh shell
|
2024-12-07 06:29:38 +00:00
|
|
|
- wchisp and/or wlink(rust pgrm)
|
2024-12-05 03:37:47 +00:00
|
|
|
|
|
|
|
|
|
|
|
## 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.
|
2024-12-05 03:33:10 +00:00
|
|
|
|
|
|
|
## Using the template
|
|
|
|
|
2024-12-07 03:38:42 +00:00
|
|
|
### Change project configuration
|
|
|
|
|
|
|
|
*Basic Steps:*
|
|
|
|
1. Change project name parameter in `CMakeLists.txt` in root dir.
|
|
|
|
2. Edit the memory layout file.
|
|
|
|
|
|
|
|
|
2024-12-05 03:33:10 +00:00
|
|
|
### Setting up dependencies
|
|
|
|
|
|
|
|
### Running Tests
|
|
|
|
|
2024-12-05 03:37:47 +00:00
|
|
|
```sh
|
|
|
|
echo "1" | ./otto.sh
|
|
|
|
```
|
|
|
|
|
2024-12-05 03:33:10 +00:00
|
|
|
### Building Binaries
|
|
|
|
|
2024-12-05 03:37:47 +00:00
|
|
|
|
2024-12-05 03:33:10 +00:00
|
|
|
### Flashing Micro-Controller
|
2024-12-05 03:37:47 +00:00
|
|
|
|
2024-12-07 06:31:48 +00:00
|
|
|
|
|
|
|
## 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.
|
|
|
|
- [ ]
|