English Readme | 中文说明
A SDK for WinnerMicro MCU W806.
wm-sdk-w806
├─app # User application code
├─bin # Compilation results
├─demo # Demos
├─include # SDK header files
├─ld # Link scripts
├─lib # Libraries
├─Makefile
├─platform # SDK source code
└─tools # Utilities
Extract the toolchains to proper folder -- be careful that the tar ball use ./
as top level path, move it to a seperate folder or specify a target folder for the uncompressing.
mkdir csky-elfabiv2-tools-x86_64-minilibc-20210423
tar xvf csky-elfabiv2-tools-x86_64-minilibc-20210423.tar.gz -C csky-elfabiv2-tools-x86_64-minilibc-20210423/
Then move it to somewhere, e.g. /opt/toolchains, set it read-only to normal users
cd /opt/toolchains/
sudo mv ~/Download/csky-elfabiv2-tools-x86_64-minilibc-20210423/ .
sudo chown -R root:root csky-elfabiv2-tools-x86_64-minilibc-20210423/
You don't need to add it to the system PATH variable.
Checkout this project
git clone https://github.com/IOsetting/wm-sdk-w806.git
Run menuconfig, configurate the toolchains path
cd wm-sdk-w806
make menuconfig
In menuconfig, navigate to Toolchain Configuration
, In the second line "the toolchain path", input the absolute path of the toolchains executables, e.g.
/opt/toolchains/csky-elfabiv2-tools-x86_64-minilibc-20210423/bin/
Leave other settings unchanged, save and exit menuconfig.
Then build the project
make
printf()
outputUSE_UART0_PRINT
controls whether use UART0 to send printf()
output, it is turned on by default. Note: This feature will occupy UART0, if any other devices are going to communicate with UART0, please turn it off.USE_UART0_AUTO_DL
controls enable/disable automatic download, it is turned off by default. When it is enabled, download tool will reset the board automatically before the downloading. Option USE_UART0_PRINT
should be enabled to make this work.Connect the development board to PC, get the USB port name by commands dmesg
, lsusb
and ls /dev/tty*
.
Run menuconfig to set the download port
cd wm-sdk-w806
make menuconfig
In menuconfig, navigate to Download Configuration
ttyUSB0
;115200
, 460800
, 921600
, 1000000
and 2000000
.Then save and exit menuconfig, download the hex file to development board
make flash
Press the Reset
key to start the downloading. If previously downloaded hex was built with USE_UART0_AUTO_DL
enabled, the board will start downloading automatically.
build finished!
connecting serial...
serial connected.
wait serial sync......... <--- Press the Reset key here
please manually reset the device. <--- (Or here)
.....
serial sync sucess.
mac CC-CC-CC-CC-CC-CC.
start download.
0% [###] 100%
download completed.
reset command has been sent.
When downloding finishes, the board will be reset automatically to run the new program. In case the auto-reset fails, you need to press the reset key manually to make it run.
Show serial ports
make list
Build, download and start serial monitor
make run
Start serial monitor only
make monitor
# Update all packages
pacman -Syu
# Install make
pacman -S msys/make
# Install automake
pacman -S msys/automake
# Install autoconf
pacman -S msys/autoconf
# Install gcc
pacman -S msys/gcc
# Install git
pacman -S msys/git
# Install dependencies
pacman -S msys/ncurses-devel
pacman -S msys/gettext-devel
Extract toolchains to specified folder
mkdir csky-elfabiv2-tools-mingw-minilibc-20210423
tar xvf csky-elfabiv2-tools-mingw-minilibc-20210423.tar.gz -C csky-elfabiv2-tools-mingw-minilibc-20210423/
Note down the full path of toolchain executables, e.g. /d/w806/csky-elfabiv2-tools-mingw-minilibc-20210423/bin/
.
Check out this SDK
git clone https://github.com/IOsetting/wm-sdk-w806.git
Configurate toolchains path in menuconfig
cd wm-sdk-w806
make menuconfig
In menuconfig, navigate to Toolchain Configuration -> toolchain path, input the path (including the tail slash '/'), e.g.
/d/w806/csky-elfabiv2-tools-mingw-minilibc-20210423/bin/
Leave other settings unchanged, save and exit menuconfig.
Then build the project
make
The result files are under bin/W806.
打开串口
下载
to start downloadReset
key to reset board, then it will start downloading.Reset
key again to make it run.Find the port name of connected board in Device Manager, e.g. COM5
.
Run menuconfig to set the download port
cd wm-sdk-w806
make menuconfig
In menuconfig, navigate to Download Configuration
COM5
;115200
, 460800
, 921600
, 1000000
and 2000000
.The rest are the same as operations in Linux, please refer to Linux - Download To Development Board
.
can not open serial make: *** [tools/w806/rules.mk:158: flash] Error 255
, check if any other applications are occupying the USB port, if yes, close it and retry.#define CONFIG_KERNEL_NONE 1
make clean
or make distclean
The code of WM-SDK-W806 is licensed under the Apache-2.0 license.
As WM-SDK-W806 includes code from many upstream projects it includes many copyright owners. WM-SDK-W806 makes NO claim of copyright on any upstream code. Patches to upstream code have the same license as the upstream project, unless specified otherwise. For a complete copyright list please checkout the source code to examine license headers.
Unless expressly stated otherwise all code submitted to the WM-SDK-W806 project (in any form) will be licensed under Apache-2.0 license. You are absolutely free to retain copyright. To retain copyright simply add a copyright header to each submitted code page. If you submit code that is not your own work it is your responsibility to resolve the conflicts and place a header stating the copyright.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。