minimal working project with instruct step debugging infrastructure in place

This commit is contained in:
2025-07-13 19:57:20 +02:00
parent a794dac7d4
commit 9ab135672b
10 changed files with 99 additions and 236 deletions
+24 -11
View File
@@ -1,18 +1,31 @@
# ch32v203-examples
# ch32v203-bms
- SWDIO: PA13
- SWCLK: PA14
A simple battery management controller software.
## Boards
## Building
### FlappyBoard - CH32V203G6
``` sh
cargo build --release
```
Link: <https://github.com/metro94/FlappyBoard>
## Flash
### nanoCH32V203 - CH32V203C8T6
``` sh
wchip wchisp flash target/riscv32imc-unknown-none-elf/release/bms
```
Link: <https://github.com/wuxx/nanoCH32V203>
## Debugging
- HSE: 8MHz
- LSE: 32.768kHz
- LED: PA15
For debugging purposes a container file is provided together with wrapper scripts to start the containerized `openocd` and `riscv-gdb` transparently. The wrapper scripts assume that `podman` is setup.
Starting Debug server
```
./bin/openocd
```
Connecting with gdb for interactive debugging
```
./bin/gdb -f target/riscv32imc-unknown-none-elf/release/bms
```