42 lines
1.8 KiB
Markdown
42 lines
1.8 KiB
Markdown
# minichlink
|
|
|
|
A free, open mechanism to use the CH-LinkE $4 programming dongle for the CH32V003.
|
|
|
|
If on Linux, be sure to type make sure to install the `99-WCH-LinkE.rules` build rule to `/etc/udev/rules.d/`
|
|
|
|
On Windows, if you need to you can install the WinUSB driver over the WCH interface 1.
|
|
|
|
The exe here is about 12kB and contains everything except for the libusb driver. In Linux you need `libusb-1.0-dev`.
|
|
|
|
## Usage
|
|
|
|
```
|
|
Usage: minichlink [args]
|
|
single-letter args may be combined, i.e. -3r
|
|
multi-part args cannot.
|
|
-3 Enable 3.3V
|
|
-5 Enable 5V
|
|
-t Disable 3.3V
|
|
-f Disable 5V
|
|
-u Clear all code flash - by power off (also can unbrick)
|
|
-b Reboot out of Halt
|
|
-e Resume from halt
|
|
-a Place into Halt
|
|
-D Configure NRST as GPIO
|
|
-d Configure NRST as NRST
|
|
-s [debug register] [value]
|
|
-g [debug register]
|
|
-w [binary image to write] [address, decimal or 0x, try0x08000000]
|
|
-r [output binary image] [memory address, decimal or 0x, try 0x08000000] [size, decimal or 0x, try 16384]
|
|
Note: for memory addresses, you can use 'flash' 'launcher' 'bootloader' 'option' 'ram' and say "ram+0x10" for instance
|
|
For filename, you can use - for raw or + for hex.
|
|
-T is a terminal. This MUST be the last argument.
|
|
```
|
|
# Kizarm NOTES
|
|
Software je převzato z https://github.com/cnlohr/ch32v003fun/tree/master , projekt je živý, ale chyby
|
|
v komunikaci s gdb nejsou opraveny. Ty, co mi nejvíce vadily - pro CH32V203 je špatně nastavena paměť,
|
|
jak RAM, tak flash, takže se na některé proměnné prostě nedostanete - hlavně na zásobník.
|
|
Pro ukázku, co chybí je zde 3564ce8b030428153a53003d6be79729463fa63b.patch pro revizi danou názvem.
|
|
Nebudu se do toho autorům montovat, chtělo by to kompletně předělat pro různé verze čipů a v tom
|
|
se vůbec nevyznám a z čínské dokumentace se toho taky moc nedozvíte.
|
|
|