本次參考爲Zedborad開發板
Flash原理圖:
根據Flash原理圖,管腳配置如下:
SD卡原理圖:
根據SD卡原理圖,管腳配置如下:
本次要固化的程序作用是打印串口和點亮PL端的8個led燈和MIO7腳的led燈,SDK工程目錄如下:
詳細配置流程:
第一步:
1.Right click on hello_world_bsp and click Board Support Package Settings.
2.Tick to include xilffs click OK (This is required for the next step to create the FSBL).
第二步:Create a first stage bootloader (FSBL).
1.Select File > New > Application Project.
2.Enter zynq_fsbl as the project name, select the Use existing standalone Board Support Package option with hello_world_bsp, and click Next.
3.Select Zynq FSBL in the Available Templates pane and click Finish.
(A zynq_fsbl project will be created which will be used in creating the BOOT.bin or MCS file.)
第三步:
1.可以新建一個文件夾,比如叫image,用來保存boot文件。
2.In the SDK, select Xilinx > Create Boot Image.
3.選擇輸出bif和bin(MCS)文件路徑與文件。
注意:Boot image partitions中的三個文件的順序和設置要弄好,沒弄好也會有提示。
第四步:(Flash)
1.若是固化到Flash中,先將跳線設置爲JTAG模式。
2.Select Xilinx > Program Flash.
3.選擇Image File,offset設爲0,Flash Type,FSBL File,點擊Program。
Blank check after erase和Verify after flash可選,弄個寂寞。
在Console裏會顯示很多有用信息:
4.此時,程序已經固化成功了,將跳線設置到Flash啓動模式,就能行了。
第四步:(SD卡)
SD卡操作只有一步:
1.將產生的bin文件拷貝到SD卡中,跳線設置爲SD卡啓動模式,就行了。
注意:只需要拷貝bin文件就行,有時候有必要將SD卡格式化(FAT32 formatted)。
附錄:
Zedboard跳線設置
下面是zynq白皮書中的介紹,我覺得更方便參考。詳細參考官方文檔。
PS:在實驗文檔中,還能用SD卡或Flash引導多應用程序啓動,這部分個人感覺用處不大😀,不寫了。