使用粤嵌GEC6818开发板进行开发
1. 使用nfs方式来调试代码
首先nfs是通过网络来进行通信的,所以需要保证开发板能够ping通ubuntu主机;
(1)安装nfs服务
sudo apt-get install nfs-common
(2)修改配置文件
sudo vim /etc/exports
添加如下内容表示ubuntu主机的/home目录支持nfs挂载:
/home *(rw,sync,no_root_squash)
(3)重启nfs服务
sudo /etc/init.d/nfs-kernel-server restart
如果出现 sudo: /etc/init.d/nfs-kernel-server: command not found,则需要执行
sudo apt-get install nfs-kernel-server
后再重启nfs服务;
(4)在开发板上执行以下命令将开发板的/mnt目录挂载到ubuntu的/home目录下
sudo mount -t nfs -o nolock localhost:/home /mnt
mount成功之后即可在开发板的/mnt目录看到ubuntu里面share_nfs目录的内容,也可以直接运行里面的程序了。