add build scripts + docker build env + notes on how to use
This commit is contained in:
parent
a71c7986e6
commit
09ba2415d0
3 changed files with 22 additions and 0 deletions
2
ch32v-insert-coin/build-run.sh
Executable file
2
ch32v-insert-coin/build-run.sh
Executable file
|
|
@ -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
|
||||
9
ch32v-insert-coin/init.sh
Executable file
9
ch32v-insert-coin/init.sh
Executable file
|
|
@ -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
|
||||
11
notes.md
11
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.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue