美文网首页
ARM-Network和ftfp设置

ARM-Network和ftfp设置

作者: Vvpl | 来源:发表于2017-01-08 18:55 被阅读32次

3.Network

networkcable between Host and Target.

[root@FriendlyARM/]# ifconfig eth0 192.168.0.230

$watch sudo ifconfig eth0192.168.0.1

newa terminal.

$ping 192.168.0.230

4.TFTP

Switchto ShangQian LAN.

$sudo apt-get install tftpd-hpa

$sudo apt-get install tftp-hpa

Switchto Host-Target LAN.

$sudo vim /etc/default/tftpd-hpa


TFTP_DIRECTORY="/tftpboot"

TFTP_ADDRESS="0.0.0.0:69"


$cd /

$sudo mkdir tftpboot

$sudo chmod 777 /tftpboot/

$cd tftpboot/

$vi tftptest

$sudo service tftpd-hpa restarti


tftpd-hpastop/waiting

tftpd-hpastart/running, process 30278


$netstat -anu|grep 69

udp 0 0 0.0.0.0:69 0.0.0.0:*

[root@FriendlyARMplg]# cd /home/plg/

[root@FriendlyARMplg]# ifconfig eth0 192.168.0.230

[root@FriendlyARMplg]# ping 192.168.0.1

[root@FriendlyARMplg]# tftp -r tftptest -g 192.168.0.1

[root@FriendlyARMplg]# cat tftptest

5.Embed development process

(1)source code

(2)cross compile

onX86 platform, compile a program which run on ARM platform.

(3)download to board

(4)run

$cd ~/sq1612/

$mkdir 02

$cd 02/

$vi hello.c

$gcc -o hello1 hello.c

$./hello1

$cp hello1 /tftpboot/

[root@FriendlyARMplg]# ifconfig eth0 192.168.0.230

[root@FriendlyARMplg]# tftp -r hello1 -g 192.168.0.1

[root@FriendlyARMplg]# chmod u+x hello1

[root@FriendlyARMplg]# ./hello1

$file hello1

$pwd

/home/xfliao/sq1612

$cp ~/ForStudent/Src/arm-linux-gcc-4.4.3.tar.gz.

$tar zxvf arm-linux-gcc-4.4.3.tar.gz

$cd 4.4.3/bin/

$pwd

/home/xfliao/sq1612/4.4.3/bin

$cd ~

$vi .bashrc


exportPATH=$PATH:/home/xfliao/sq1612/4.4.3/bin


newa terminal. Then:

$arm-linux-gcc -v

---64bit OS------------------

$sudo apt-get install lib32z1

如果缺少

lib32stdc++6

的库,装一个就行。

or:

$cd~/ForStudent/apt/x64/arm-linux-gcc-apt

$sudo dpkg -i lib32z1_1%3a1.2.8.dfsg-2ubuntu4_amd64.deb


$cd ~/sq1612/02/

$arm-linux-gcc -o hello2 hello.c

$file hello2

$cp hello2 /tftpboot/

[root@FriendlyARMplg]# tftp -r hello2 -g 192.168.0.1

[root@FriendlyARMplg]# chmod u+x hello2

相关文章

网友评论

      本文标题:ARM-Network和ftfp设置

      本文链接:https://www.haomeiwen.com/subject/cdtcbttx.html