wch-link在ubuntu下面需要安装驱动才能进入固件的下载与调式。
1、下载wch-link驱动包:wget http://file.mounriver.com/tools/MRS_Toolchain_Linux_x64_V1.50.tar.xz
2、下载后创建目录MRS:mkdir MRS
3、将下载好的驱动解压到MRS:tar -xf MRS_Toolchain_Linux_x64_V1.50.tar.xz -C MRS
4、进入/MRS/beforeinstall$ ,然后执行./start.sh安装。
5、按装完后接入wch-link执行pyocd list就可以看到wch-link已经被识别了:
lugl@lugl-virtual-machine:~/CW32L/cw32l083_gcc$ pyocd list
-----------------------------------------------
0 wch.cn WCH-Link 0001A0000001 n/a
6、执行make flash就可以下载固件了:
lugl@lugl-virtual-machine:~/CW32L/cw32l083_gcc$ make flash
-e Start pyOCD
0000430 I Loading /home/lugl/CW32L/cw32l083_gcc/build_exec/template.elf [load_cmd]
[==================================================] 100%
0001061 I Erased 0 bytes (0 sectors), programmed 0 bytes (0 pages), skipped 2048 bytes (4 pages) at 3.17 kB/s [loader]
|