diff --git a/ch32v-insert-coin/build-run.sh b/ch32v-insert-coin/build-run.sh new file mode 100755 index 0000000..ad28a11 --- /dev/null +++ b/ch32v-insert-coin/build-run.sh @@ -0,0 +1,2 @@ +#!/bin/bash +docker run --privileged -it --rm -v "$PWD":/usr/src/app -w /usr/src/app ch32-env:latest cargo +nightly run --release diff --git a/ch32v-insert-coin/init.sh b/ch32v-insert-coin/init.sh new file mode 100755 index 0000000..193536f --- /dev/null +++ b/ch32v-insert-coin/init.sh @@ -0,0 +1,9 @@ +#!/bin/bash +DIR=${PWD} +mkdir ${PWD}/tmp +cd tmp +git clone ssh://git@git.glyphs.tech:222/sigil-03/docker-devtools.git +cd docker-devtools/ch32 +docker build --tag ch32-env . +cd $DIR +rm -rf tmp diff --git a/notes.md b/notes.md index 8883403..733a006 100644 --- a/notes.md +++ b/notes.md @@ -1,3 +1,14 @@ +# ENVIRONMENT +there is a docker image that contains the entire toolchain + flashing utility. first, you need to build the base docker image with the following script located in the ch32v-insert-coin directory: +```shell +$ ./init.sh +``` +once built, you won't need to build this again. for the remainder of your development, you can use the following script: +```shell +$ ./build-run.sh +``` +this will build the firmware image, and attempt to upload it to the board using `wlink`. once uploaded, it will attach a serial debugger. + # FLASHING flashing is done using the [`wlink`](https://github.com/ch32-rs/wlink?tab=readme-ov-file#install) utility. `probe-rs` also works, but can be flaky, and does not support SDI prints very well.