啟動(dòng)
-
格式化
拿到開發(fā)板,首先將SD卡插入電腦進(jìn)行格式化。格式化時(shí),要將SD卡格式化為FAT32文件系統(tǒng)。塊大小格式化為4096時(shí)后面會(huì)出現(xiàn)無法啟動(dòng)的情況,可以先試試將塊大小選擇為4096字節(jié),復(fù)現(xiàn)一下這個(gè)情況。
格式化SD卡 -
拷貝文件
然后將ZedBoard_OOB_Design文件夾下sd_image文件夾內(nèi)的文件拷貝進(jìn)格式化后的SD卡里。
sd_image文件夾內(nèi)容 -
查看串口號(hào)
zedboard開發(fā)板斷電,插上SD卡,將電源線和USB轉(zhuǎn)uart線接好,先不加電。然后打開設(shè)備管理器,查看分配好的串口號(hào)。
突然發(fā)現(xiàn)驅(qū)動(dòng)還沒安裝,好吧,先安裝驅(qū)動(dòng)。找到CP2102的驅(qū)動(dòng),安裝之。打開設(shè)備管理器一路next就行了,然后更新設(shè)備管理器,發(fā)現(xiàn)出現(xiàn)了串口號(hào)。安裝串口驅(qū)動(dòng)串口驅(qū)動(dòng)安裝成功 -
使用串口遠(yuǎn)程登錄
打開Putty軟件,選擇使用serial(串口)登錄,配置好串口號(hào)和波特率就行了,串口號(hào)設(shè)置COM3,波特率為115200。
putty軟件設(shè)置 -
啟動(dòng)zedboard
設(shè)置好后,點(diǎn)open,然后zedboard打開開關(guān)。
然后就會(huì)發(fā)現(xiàn)出現(xiàn)無法從分區(qū)中讀取文件,進(jìn)而導(dǎo)致啟動(dòng)失敗的情況。按下PS-RST按鈕復(fù)位一下,還是這種情況。下面我測試了另一種情況,將SD卡格式化時(shí),塊大小設(shè)置為8192字節(jié),重復(fù)上述步驟,可以看到能正常啟動(dòng)。開發(fā)板內(nèi)系統(tǒng)啟動(dòng)引導(dǎo)啟動(dòng)引導(dǎo)Linux系統(tǒng)啟動(dòng)接下來就和終端操作Linux別無二致了,只不過這是通過串口進(jìn)行通信的。測試發(fā)現(xiàn),格式化時(shí),塊大小設(shè)置上只要大于等于8192字節(jié)都可以啟動(dòng)成功,至于為什么4096字節(jié)的塊大小無法啟動(dòng),我也很納悶。
測試
-
以太網(wǎng)測試
啟動(dòng)后,即可進(jìn)行測試,首先測試以太網(wǎng)。用網(wǎng)線將zedboard和電腦直連,此時(shí)終端界面會(huì)提示以太網(wǎng)連接。
可以看出,這是一個(gè)千兆全速率的以太網(wǎng)連接,使用ifconfig工具查看網(wǎng)絡(luò)信息,zedboard的IP為192.168.1.10。終端提示以太網(wǎng)連接接下來通過SSH協(xié)議測試以太網(wǎng),使用putty軟件通過SSH協(xié)議連接zedboard。以太網(wǎng)信息登錄用戶名為root,密碼也為root。putty設(shè)置SSH協(xié)議連接SSH遠(yuǎn)程登錄 -
FTP測試
接下來測試FTP,打開文件管理器,輸入FTP地址,即可看到zedboard板上Linux的文件目錄,可以上傳和下載文件。
登錄FTPFTP訪問Linux系統(tǒng)文件 -
HTTP測試
接下來測試HTTP,打開瀏覽器,輸入http://192.168.1.10,即可打開zedboard內(nèi)置的http服務(wù)器主頁。
測試HTTP -
USB-OTG測試
測試USB-OTG,將USB-OTG線插入zedboard上的USB-OTG的microUSB接口,然后OTG線上插入一個(gè)U盤,在Linux中查看U盤。
可以看到有一個(gè)sda1設(shè)備,進(jìn)一步確定是否是U盤。列出設(shè)備可以看到有兩個(gè)16G的設(shè)備,其中mmcblk0是本機(jī)的SD卡,而sda1則是U盤,掛載之。查看設(shè)備信息掛載后即可讀寫U盤中的文件。掛載設(shè)備 -
VGA和HDMI測試
測試VGA和HDMI,這個(gè)就不放圖了,從網(wǎng)上找了一張圖,VGA會(huì)顯示兩只小企鵝,HDMI會(huì)顯示色帶,DIGILENT的logo會(huì)在屏幕上彈彈彈彈彈。
VGA和HDMI測試 -
讀取外設(shè)狀態(tài)程序測試
測試在Linux中讀取撥碼開關(guān)的狀態(tài)。
此時(shí)撥碼開關(guān)的狀態(tài)為0xc3,即二進(jìn)制的1100_0011,十進(jìn)制的195,與實(shí)際情況一致。讀取撥碼開關(guān)狀態(tài) -
寫外設(shè)狀態(tài)程序測試
在Linux中設(shè)置LED燈的亮滅狀態(tài)。
write_led 255即設(shè)置8個(gè)LED全亮,十進(jìn)制255對(duì)應(yīng)二進(jìn)制1111_1111,0xaf類似,只是用十六進(jìn)制表示而已。設(shè)置LED外設(shè)的狀態(tài) -
OLED顯示測試
在zedboard上有一個(gè)OLED顯示屏,就是下圖中的顯示屏,啟動(dòng)后OLED顯示屏上顯示的是DIGILENT的logo,此處就不放圖了。
測試OLED
結(jié)束
其實(shí)所有的測試內(nèi)容都在zedboard的README文檔內(nèi),該文檔在第一步往SD卡里復(fù)制文件時(shí)就可以發(fā)現(xiàn),在文件夾sd_image里。
readme文檔
上圖的README文檔即是測試指導(dǎo)文檔,文檔內(nèi)容如下:
------------------------------------------------
*** 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.
最后最后,記得關(guān)機(jī)下電之前使用poweroff指令關(guān)機(jī)。
關(guān)機(jī)
然后愉快收工。






















