ARM-Network和ftfp设置

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

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 1、交叉编译 由于嵌入式系统资源匮乏,一般不能像 PC 一样安装本地编译器和调试器,不能在本地编写、编译和调...
    不配野心阅读 2,156评论 0 4
  • qemu中uboot用tftp加载内核并用NFS作为根文件系统作者 codercjg 在 20 八月 2015, ...
    codercjg阅读 1,412评论 0 2
  • 回顾烧写过程 如果开发板里已经烧过了的话,就不需要再次进行烧写,只需要如下 插入有转接头的线,在终端中输入:ls ...
    帅碧阅读 361评论 1 2
  • $ ls -l /dev/ttyUSB0 $ sudo chmod 666 /dev/ttyUSB0 $ mini...
    Vvpl阅读 437评论 0 0
  • 本文整理了在实践过程中使用的Linux网络工具,这些工具提供的功能非常强大,我们平时使用的只是冰山一角,比如lso...
    老夫刘某阅读 3,587评论 0 7