Connect the WCH RISC-V or ARM development board to the computer with the WCH-LinkE dongle. Look for 3 or 4 wires to connect: 3v3, ground and DI data in programming pin. A fourth CLK pin may or may not be present.
The programming pin may be labled DIO or SWDIO and is PD1 on CH32V003 boards. The same pins can carry different labels and the built-in LED can be on different pins.
If there is a CLK pin then connect to SWCLK on the USB dongle. These boards work with a range of voltages from 3 volts up to 5.
Some boards need a jumper wire to connect the built in LED. You may have to modify code to toggle the right IO for the LED.
Which Pins Where?The WCH-Link user manual for the software gives this table.
Download from the LinkUtility webpage. Locate the file, unzip and double click the WCH-LinkUtility exec file.
This will resolve issues with Windows serial drivers for the programmer.
In project Program CH32V003 RISC-V Chip with Arduino IDE we generated a .bin executable file. Menu File->Open and navigate to your Arduino folder, filter for .bin files and not .hex.
In Program CH32V003 Embedded RISC-V Chip with Embeetle IDE we uploaded the .elf copy to run our board. We also created .bin and .hex files that WCH-LinkUtility can upload.
Keyboard [F10] or pull down Target menu. This downloads our file into the flash of our board. Watch the progress bar and read the output messages at the bottom. The board will stop and the programmer will blink.
Easy to miss. We have to reset the board to restart the processor running the program from flash memory. Keyboard [F12] or Target menu.
If the board worked in Arduino, Embeetle or MounRiver IDE then this flash file should blink the built-in LED on the board. Remember, different boards have lamps on different pins.
Three ways. Click last icon in toolbar. Keyboard Alt+F8.
Or menu View->Read Chip Flash. Hex code fills a window on the panel.
Right click on the panel. Choose a name and location for the firmware download.
WCH-LinkUtility is a sophisticated electronic tool. Use it to read the flash memory and store that file to your computer. The dongle also works with a software called openocd for debugging embedded programs.
Comments
Please log in or sign up to comment.