一直以来都想把工作的环境完全的换到Linux下面,当然我现在用的发行版是Ubuntu 10.04.
主要还是做单片机的开发.Silicon Labs公司的C8051F系列是一款集成度很高,片上资源丰富的单片机.下面我是我的笔记:
--目前还是有问题,我正在读源码,希望可以解决.
1.ec2drv http://ec2drv.sourceforge.net/
Richy已经好像不再维护这个项目了.SVN中的最后更新在两年前.
1.1 安装ec2drv
apt-get install autoconf libtool libboost-dev libusb-dev libreadline5-dev subversion libboost-regx-dev
svn co https://ec2drv.svn.sourceforge.net/svnroot/ec2drv/ec2drv/trunk ec2drvcd ec2drv
Before building ec2drv, we need to run this command which performs the various GNU build system actions.
make -f Makefile.cvs
Now we can do the usual build stuff. Note again that make install must be run as root.
./configure 后,
修改libtool文件,在
ECHO="echo"
一行下添加
echo="echo",
make,出错,
添加 #include <cstdio> 到下面的文件中去,
src/newcdb/cmdcommon.cpp
src/newcdb/cmddisassemble.cpp
src/ec2tools/ec2test-any.cpp
src/debug-core/breakpointmgr.cpp
src/debug-core/target.cpp
src/debug-core/contextmgr.cpp
src/debug-core/symtab.cpp
src/debug-core/symbol.cpp
src/debug-core/targets51.cpp
src/debug-core/targetsilabs.cpp
src/debug-core/symtypetree.cpp
然后 make make install.一个俄国人的关于编译出错的说明 http://tuxotronic.org/wiki/silabs-ec2-driver-linux
2.试用
2.1 C8051F120
darwin@ubuntu:~/opt/ec2drv/bin$ sudo ./ec2writeflash --port=USB --eraseall --hex ../xx_xx.hex
port = USB********************************************************************** WARNING: Auto detection of mode may cause initialisation sequence ** to differ significantly from the SiLabs IDE. ** In the case of problems specify --mode=C2 or --mode=JTAG **********************************************************************ec2_GetDbgInfo(0x10c4,0x8044) 1Found EC3 debuggerec2_reset C2EC3 debugger firmware version = 0x17Warning: this version is newer than the versions tested by the developers,Please report success / failure and version via ec2drv.sf.netCurrently tested versions from 0x07 to 0x0eNOT C2, Trying JTAGec2_GetDbgInfo(0x10c4,0x8044) 1Found EC3 debuggerec2_reset C2Debug adaptor ver = 0x17FOUND:device : C8051F120mode : JTAGErasing entire flash Loaded 37303 bytes between: 0000 to 91B6Writing to flashstart=0x00000, end=0x091b6doneExiting nowDisconnect done2.2 C8051F340/F360
340无法下载 usb read -110错误
360无法认出