1_ZedBoard开发板测试

启动

  1. 将SD卡插入电脑进行格式化

![ 浏览SD卡 ](https://img2018.cnblogs.com/blog/1882203/201911/1882203-20191127223938027-1065092233.png)

格式化时,要将SD卡格式化为FAT32文件系统。**块大小格式化为4096字节时后面会出现无法启动的情况,可以先复现一下这个错误。块大小我选择4096字节。**

![格式化选项](https://img2018.cnblogs.com/blog/1882203/201911/1882203-20191127224311692-1833051063.png)

2. 然后将ZedBoard_OOB_Design文件夹下sd_image文件夹内的文件拷贝进格式化后的SD卡里。

![拷贝文件](https://img2018.cnblogs.com/blog/1882203/201911/1882203-20191127225542458-2041801661.png)

3. zedboard开发板断电,插上SD卡,将电源线和USB转uart线接好,先不加电。然后打开设备管理器,查看分配好的串口号。

![查看驱动](https://img2018.cnblogs.com/blog/1882203/201911/1882203-20191127225625872-1677659396.png)

突然发现驱动还没安装,好吧,先安装驱动。找到CP2102的驱动,安装之。

![安装驱动](https://img2018.cnblogs.com/blog/1882203/201911/1882203-20191127225657500-672330494.png)

一路next就行了,然后更新设备管理器,发现出现了串口号。

![查看串口号](https://img2018.cnblogs.com/blog/1882203/201911/1882203-20191127225916999-230738929.png)

4. 打开Putty软件,选择使用serial(串口)登录,配置好串口号和波特率就行了,串口号设置COM3,波特率为115200.

![PuTTY串口连接](https://img2018.cnblogs.com/blog/1882203/201911/1882203-20191127225947152-1493369832.png)

5. 设置好后,点open,然后zedboard打开开关。

![启动失败](https://img2018.cnblogs.com/blog/1882203/201911/1882203-20191127230025347-1957997448.png)

然后就会发现出现无法从分区中读取文件,进而导致启动失败的情况。按下PS-RST按钮复位一下,还是这种情况。 **下面测试另一种情况,将SD卡格式化时,块大小设置为8192,重复上述步骤,可以看到能正常启动。**

![启动信息](https://img2018.cnblogs.com/blog/1882203/201911/1882203-20191127230127584-342973103.png)

![启动成功](https://img2018.cnblogs.com/blog/1882203/201911/1882203-20191127230141504-1279297078.png)

接下来就和终端操作Linux别无二致了,只不过这是通过串口进行的。 测试发现,格式化时,块大小设置上只要大于等于8192字节都可以启动成功,至于为什么4096字节的块大小无法启动,我也很纳闷。

测试

  1. 启动后,即可进行测试,首先测试以太网。用网线将zedboard和电脑直连,此时串口界面会提示以太网连接。

![以太网连接](https://img2018.cnblogs.com/blog/1882203/201911/1882203-20191127230351470-1209187850.png)

可以看出,这是一个千兆全速率的以太网连接,使用ifconfig工具查看网络信息,zedboard的IP为192.168.1.10

![以太网连接信息](https://img2018.cnblogs.com/blog/1882203/201911/1882203-20191127230420254-1678044838.png)

2. 接下来测试以太网的SSH,使用putty软件的SSH连接zedboard。

![PuTTY以SSH方式连接](https://img2018.cnblogs.com/blog/1882203/201911/1882203-20191127230509891-1528468996.png)

登录用户名为root,密码也为root。

![SSH连接成功](https://img2018.cnblogs.com/blog/1882203/201911/1882203-20191127230619451-1911247897.png)

3. 接下来测试FTP,打开文件管理器,输入FTP地址,即可看到zedboard板上Linux的文件目录,可以上传和下载文件。

![FTP登录](https://img2018.cnblogs.com/blog/1882203/201911/1882203-20191127230711402-205596159.png)

![FTP访问文件](https://img2018.cnblogs.com/blog/1882203/201911/1882203-20191127230738112-236149451.png)

4. 接下来测试HTTP,打开浏览器,输入http://192.168.1.10,即可打开zedboard内置的http服务器主页。

![HTTP访问主页](https://img2018.cnblogs.com/blog/1882203/201911/1882203-20191127230831763-1153232006.png)

5. 测试USB-OTG。将USB-OTG线插入zedboard上的USB-OTG的microUSB接口,然后OTG线上插入一个U盘,在Linux中查看U盘。

![查看设备信息](https://img2018.cnblogs.com/blog/1882203/201911/1882203-20191127230922322-585588469.png)

可以看到有一个sda1设备,进一步确定是否是U盘。

![查看设备信息详情](https://img2018.cnblogs.com/blog/1882203/201911/1882203-20191127230947559-600942088.png)

可以看到有两个16G的设备,其中mmcblk0是本机的SD卡,而sda1则是U盘,挂载之。

![挂载U盘](https://img2018.cnblogs.com/blog/1882203/201911/1882203-20191127231037152-97702305.png)

挂载后即可读写U盘中的文件。 6. 测试VGA和HDMI,这个就不放图了,从网上找了一张图,VGA会显示两只小企鹅,HDMI会显示色带,DIGILENT的logo会在屏幕上弹弹弹弹弹。

![VGA和HDMI测试](https://img2018.cnblogs.com/blog/1882203/201911/1882203-20191127231125862-916923366.png)

7. 测试在Linux中读取拨码开关的状态。

![应用程序读取拨码开关值](https://img2018.cnblogs.com/blog/1882203/201911/1882203-20191127231215544-1146293573.png)

此时拨码开关的状态为0xc3,即二进制的1100_0011,十进制的195,与实际情况一致。 8. 在Linux中设置LED灯的状态。

![应用程序设置LED值](https://img2018.cnblogs.com/blog/1882203/201911/1882203-20191127231305862-1924551480.png)

Write_led 255即设置8个LED全亮,十进制255对应二进制1111_1111,0xaf类似,只是用十六进制表示而已。 9. 测试OLED,在zedboard上有一个OLED显示屏,就是下图中的显示屏,启动后OLED显示屏上显示的是DIGILENT的logo,此处就不放图了。

![OLED测试](https://img2018.cnblogs.com/blog/1882203/201911/1882203-20191127231422684-1388424681.png)

结语

其实所有的测试内容都在zedboard文档内,该文档在第一步往SD卡里复制文件时就可以发现,在文件夹sd_image里。

![readme文件](https://img2018.cnblogs.com/blog/1882203/201911/1882203-20191127231518773-70967835.png)

上图的README文档即是测试指导文档。 文档内容如下: ``` ------------------------------------------------ *** ZED DEMONSTRATION IMAGE *** ------------------------------------------------ *this document is meant to be viewed as a monospaced font

The files on this SD card may be used to boot a simple Linux image with
functionality that demonstrates the basic capabilities of the ZED board.

To boot this image, first insert the SD card into the ZED board, and
ensure that the jumpers are set as follows:

MIO 6: set to GND
MIO 5: set to 3V3
MIO 4: set to 3V3
MIO 3: set to GND
MIO 2: set to GND

VADJ Select: Set to 1V8

JP6: shorted
JP2: shorted

All other jumpers should be left unshorted.

Attach a computer running a terminal emulator to the UART port with a
USB micro cable. Configure the terminal emulator as follows:

Baud : 115200
8 data bits
1 stop bit
no parity

Attach a 12 V power supply to the ZED board and power it on. Connect to
the appropriate COM port in the terminal emulator. The boot process
should finish in about a minute. You will know boot-up has completed
when pressing return at the terminal presents you with a red "zynq>"
prompt.

When you are done using Linux, you should run the command:

poweroff

and then switch off the ZED board.


  • FEATURES *

USB-OTG: To use USB devices with the ZED board, first connect a hub
to the USB-OTG port. USB devices attached to this hub can then be
accessed in Linux. USB thumbdrives attached in this manner can be
mounted with read/write access.

ETHERNET: After boot-up a dropbear ssh server, fttpd FTP server, and
a httpd HTTP server will be running. Refer to the documentation on
these servers if you are interested in using them. A default website
is hosted on the httpd server that can be reached at the static IP:
192.168.1.10.

VGA: A test pattern is output on the VGA connector by the programmable
logic.

SWITCHES/LEDS: Scripts are included for writing to the LEDs and reading
the state of the switches. To read the state of the switches, run the
command:

read_sw

It will return the state of the switches as both hexadecimal and decimal.
A script for changing the state of the LEDs is also included. To turn all
8 LEDs on, run one of the following two commands:

write_led 255
write_led 0xFF

LD9 is used to indicate read/write activity on the SD card.

OLED DISPLAY: A default image is displayed on the OLED after Linux
has finished booting. In order to prolong the life of the OLED display,
the manufacturer suggests that a specific powerdown sequence be used.
Running the poweroff command before switching the ZED board off will
ensure that this procedure is correctly followed.

最后最后,记得关机下电之前使用poweroff指令关机。
<center><p>![关机](https://img2018.cnblogs.com/blog/1882203/201911/1882203-20191127231725195-784151676.png)</p></center>
然后愉快收工。
posted @ 2019-11-27 23:35  hw4fun  阅读(701)  评论(0编辑  收藏  举报