赞
踩
W806是32位MCU, 1MB flash, 288K内存, MCU部分是T-HEAD 800 系列的XT-E804
CSKY架构在2018年底被合并入Kernel. 关于这个架构, Bergmann的评论:
In commenting on C-SKY, Arnd Bergmann commented that C-SKY might end up being the last new CPU architecture added to the kernel… He rightfully points out that most vendors now not part of the ARM/x86/POWER bandwagon are pursuing RISC-V based designs, which is already part of the mainline kernel. For low-power devices ARM and RISC-V are likely the future and with those architectures there isn’t much of an advantage for hardware vendors to pursue their own architectures from scratch. On the high performance computing front, nothing is expected to unseat x86_64 and POWER anytime soon… If any new CPU targets are added to the Linux kernel in the coming years, it’s likely to be some virtual target. One more general comment: I think this may well be the last new CPU architecture we ever add to the kernel. Both nds32 and c-sky are made by companies that also work on risc-v, and generally speaking risc-v seems to be killing off any of the minor licensable instruction set projects, just like ARM has mostly killed off the custom vendor-specific instruction sets already. If we add another architecture in the future, it may instead be something like the LLVM bitcode or WebAssembly, who knows?
另一个评论:
While there isn’t anything preventing new architectures from being introduced, the general trend is that fewer and fewer architectures are being developed. x86, ARM, and now RISC-V are fulfilling more and more use cases. It’s much cheaper to tweak an existing processor or platform than to invent your own from nothing. With RISC-V, this becomes even more the case since there are no royalties involved. MIPS also went open source recently, which is popular in routers and embedded devices. AFAIK, C-SKY doesn’t exist for technical reasons, it only exists because the Chinese wanted their own architecture.
W806和Air103实质上是同一款芯片, 从pin脚定义可以看到是pin-pin对应的. 在合宙的WIKI上也注明了"本芯片与联盛德w806可互换".
封装
MCU 特性
供电
这个板子在淘宝上的实际售价差不多在8 RMB, 加上一些商家优惠, 可以真正做到低于0.99 USD, 这个价格的32位MCU, 性价比完胜STC的那些8位MCU了.
正面
背面
上面下载的tar.gz文件外层路径用的是./
目录, 建议放到一个单独的目录中解压, 或者指定解压目录解压目录, 参考命令如下
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/
移动到/opt下, 目录可以自己定, 设置权限禁止普通用户修改
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/
不需要添加系统路径
导出此项目
git clone https://github.com/IOsetting/wm-sdk-w806.git
运行menuconfig, 配置工具路径
cd wm-sdk-w806
make menuconfig
在menuconfig界面中, Toolchain Configuration -> 第二个toolchain path, 将刚才的路径填进去, 需要完整路径, 带最后的斜杆, 例如
/opt/toolchains/csky-elfabiv2-tools-x86_64-minilibc-20210423/bin/
其他不用动, Save后退出menuconfig
执行编译
make
首先通过dmesg
,lsusb
, ls /dev/tty*
等命令确定自己开发板在系统中对应的USB端口, 例如ttyUSB0
.
运行menuconfig, 配置端口名称
cd wm-sdk-w806
make menuconfig
在menuconfig界面中, Download Configuration -> download port, 填入开发板在你的系统中对应的USB端口, 例如ttyUSB0
, 注意这里只需要填纯端口名, 不需要用完整的路径. 可以调高波特率加快下载,只支持115200
, 460800
, 921600
, 1000000
, 2000000
, Save后退出menuconfig
执行烧录
make flash
根据输出的提示, 按一下reset键就会开始下载. 如果前一次写入的固件已经开启了USE_UART0_AUTO_DL
则不需要按键, 会自动开始下载
enerate compressed image completed.
build finished!
connecting serial...
serial connected.
wait serial sync......... <----- 这里按下reset
please manually reset the device. <----- 或者这里
....
serial sync sucess.
mac CC-CC-CC-CC-CC-CC.
start download.
0% [###] 100%
download completed.
reset command has been sent.
下载完成后, 下载工具会发送复位指令, 复位成功后程序会自动开始执行. 如果自动复位失败, 则需要按一下Reset键手工复位.
显示串口列表
make list
烧录并打开串口监视器
make run
只打开串口监视器
make monitor
如果出现can not open serial make: *** [tools/w806/rules.mk:158: flash] Error 255
错误, 检查一下是否有其他串口软件占用了这个端口, 如果有需要先关闭
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。