1_ZedBoard開發板測試

啓動

  1. 將SD卡插入電腦進行格式化

    瀏覽SD卡


    格式化時,要將SD卡格式化爲FAT32文件系統。塊大小格式化爲4096字節時後面會出現沒法啓動的狀況,能夠先復現一下這個錯誤。塊大小我選擇4096字節。

    格式化選項

  2. 而後將ZedBoard_OOB_Design文件夾下sd_image文件夾內的文件拷貝進格式化後的SD卡里。

    拷貝文件

  3. zedboard開發板斷電,插上SD卡,將電源線和USB轉uart線接好,先不加電。而後打開設備管理器,查看分配好的串口號。

    查看驅動


    忽然發現驅動還沒安裝,好吧,先安裝驅動。找到CP2102的驅動,安裝之。

    安裝驅動


    一路next就好了,而後更新設備管理器,發現出現了串口號。

    查看串口號

  4. 打開Putty軟件,選擇使用serial(串口)登陸,配置好串口號和波特率就好了,串口號設置COM3,波特率爲115200.

    PuTTY串口鏈接

  5. 設置好後,點open,而後zedboard打開開關。

    啓動失敗


    而後就會發現出現沒法從分區中讀取文件,進而致使啓動失敗的狀況。按下PS-RST按鈕復位一下,仍是這種狀況。
    下面測試另外一種狀況,將SD卡格式化時,塊大小設置爲8192,重複上述步驟,能夠看到能正常啓動。

    啓動信息


    啓動成功


    接下來就和終端操做Linux別無二致了,只不過這是經過串口進行的。
    測試發現,格式化時,塊大小設置上只要大於等於8192字節均可以啓動成功,至於爲何4096字節的塊大小沒法啓動,我也很納悶。

測試

  1. 啓動後,便可進行測試,首先測試以太網。用網線將zedboard和電腦直連,此時串口界面會提示以太網鏈接。

    以太網鏈接


    能夠看出,這是一個千兆全速率的以太網鏈接,使用ifconfig工具查看網絡信息,zedboard的IP爲192.168.1.10

    以太網鏈接信息

  2. 接下來測試以太網的SSH,使用putty軟件的SSH鏈接zedboard。

    PuTTY以SSH方式鏈接


    登陸用戶名爲root,密碼也爲root。

    SSH鏈接成功

  3. 接下來測試FTP,打開文件管理器,輸入FTP地址,便可看到zedboard板上Linux的文件目錄,能夠上傳和下載文件。

    FTP登陸


    FTP訪問文件

  4. 接下來測試HTTP,打開瀏覽器,輸入http://192.168.1.10,便可打開zedboard內置的http服務器主頁。

    HTTP訪問主頁

  5. 測試USB-OTG。將USB-OTG線插入zedboard上的USB-OTG的microUSB接口,而後OTG線上插入一個U盤,在Linux中查看U盤。

    查看設備信息


    能夠看到有一個sda1設備,進一步肯定是不是U盤。

    查看設備信息詳情


    能夠看到有兩個16G的設備,其中mmcblk0是本機的SD卡,而sda1則是U盤,掛載之。

    掛載U盤


    掛載後便可讀寫U盤中的文件。
  6. 測試VGA和HDMI,這個就不放圖了,從網上找了一張圖,VGA會顯示兩隻小企鵝,HDMI會顯示色帶,DIGILENT的logo會在屏幕上彈彈彈彈彈。

    VGA和HDMI測試

  7. 測試在Linux中讀取撥碼開關的狀態。

    應用程序讀取撥碼開關值


    此時撥碼開關的狀態爲0xc3,即二進制的1100_0011,十進制的195,與實際狀況一致。
  8. 在Linux中設置LED燈的狀態。

    應用程序設置LED值


    Write_led 255即設置8個LED全亮,十進制255對應二進制1111_1111,0xaf相似,只是用十六進制表示而已。
  9. 測試OLED,在zedboard上有一個OLED顯示屏,就是下圖中的顯示屏,啓動後OLED顯示屏上顯示的是DIGILENT的logo,此處就不放圖了。

    OLED測試

結語

其實全部的測試內容都在zedboard文檔內,該文檔在第一步往SD卡里複製文件時就能夠發現,在文件夾sd_image裏。
web

readme文件


上圖的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指令關機。
瀏覽器

關機

而後愉快收工。
相關文章
相關標籤/搜索