1. 串口终端的使用
secureCRT(windows)
minicom(linux)
2. 修改开发板的配置文件
vi /etc/profile
vi /etc/init.d/rcS //启动脚本
=>
ifconfig eth0 down
ifconfig eth0 hw ether 08:90:00:A0:01:xx
ifconfig eth0 192.168.1.xx netmask 255.255.255.0 up
vi /etc/init.d/rcS
在最后加一行, 方便网络调试
telnetd &
3. 下载程序/文件到210开发板
(1)使用串口下载
Xmodern/Ymodern/Zmodern
(2) U盘
(3) 网络下载
ftp/tftp/nfs...
4. 交叉编译程序
4.1 把arm-2009q3.tar.bz2 放到虚拟机的主目录下面
4.2 把arm-2009q3.tar.bz2 解压到 /usr/local/arm目录
sudo mkdir -p /usr/local/arm
sudo tar jxvf arm-2009q3.tar.bz2 -C /usr/local/arm
4.3 建立链接文件
cd /usr/local/arm/arm-2009q3/bin
sudo ln -s arm-none-linux-gnueabi-gcc arm-linux-gcc
sudo ln -s arm-none-linux-gnueabi-as arm-linux-as
sudo ln -s arm-none-linux-gnueabi-g++ arm-linux-g++
sudo ln -s arm-none-linux-gnueabi-ld arm-linux-ld
sudo ln -s arm-none-linux-gnueabi-ar arm-linux-ar
4.4 交叉编译程序
vim hello.c
/usr/local/arm/arm-2009q3/bin/arm-linux-gcc hello.c -o hello
gcc hello.c -o hello
file hello #file命令用来查看文件的类型及属性
=〉
hello: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.16,
not stripped
cp hello /home/csgec/tftp #把可执行文件,拷贝到你的tftp服务的目录
tftp -g -r hello 192.168.10.204 #在开发板运行,把hello下载到开发板上
chmod +x hello
./hello
4.5 修改PATH
export PATH=$PATH:/usr/local/arm/arm-2009q3/bin/
把上面那句话加到
vim ~/.bashrc
最后一行。 (仅对当前用户有效)
如果把上面那句话加到
sudo vim /etc/profile
最后一行。(对系统所有用户有效)
=>
arm-linux-gcc hello.c -o hello
secureCRT(windows)
minicom(linux)
2. 修改开发板的配置文件
vi /etc/profile
vi /etc/init.d/rcS //启动脚本
=>
ifconfig eth0 down
ifconfig eth0 hw ether 08:90:00:A0:01:xx
ifconfig eth0 192.168.1.xx netmask 255.255.255.0 up
vi /etc/init.d/rcS
在最后加一行, 方便网络调试
telnetd &
3. 下载程序/文件到210开发板
(1)使用串口下载
Xmodern/Ymodern/Zmodern
(2) U盘
(3) 网络下载
ftp/tftp/nfs...
4. 交叉编译程序
4.1 把arm-2009q3.tar.bz2 放到虚拟机的主目录下面
4.2 把arm-2009q3.tar.bz2 解压到 /usr/local/arm目录
sudo mkdir -p /usr/local/arm
sudo tar jxvf arm-2009q3.tar.bz2 -C /usr/local/arm
4.3 建立链接文件
cd /usr/local/arm/arm-2009q3/bin
sudo ln -s arm-none-linux-gnueabi-gcc arm-linux-gcc
sudo ln -s arm-none-linux-gnueabi-as arm-linux-as
sudo ln -s arm-none-linux-gnueabi-g++ arm-linux-g++
sudo ln -s arm-none-linux-gnueabi-ld arm-linux-ld
sudo ln -s arm-none-linux-gnueabi-ar arm-linux-ar
4.4 交叉编译程序
vim hello.c
/usr/local/arm/arm-2009q3/bin/arm-linux-gcc hello.c -o hello
gcc hello.c -o hello
file hello #file命令用来查看文件的类型及属性
=〉
hello: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.16,
not stripped
cp hello /home/csgec/tftp #把可执行文件,拷贝到你的tftp服务的目录
tftp -g -r hello 192.168.10.204 #在开发板运行,把hello下载到开发板上
chmod +x hello
./hello
4.5 修改PATH
export PATH=$PATH:/usr/local/arm/arm-2009q3/bin/
把上面那句话加到
vim ~/.bashrc
最后一行。 (仅对当前用户有效)
如果把上面那句话加到
sudo vim /etc/profile
最后一行。(对系统所有用户有效)
=>
arm-linux-gcc hello.c -o hello