fsbl是什么
first stage bootloader。简单理解就是一个BootLoader。
xilinx zynq MPsoc启动需要多级加载启动,所以有这么一个fsbl。
fsbl生成
fsbl可以建立工程自动生成,不需要添加修改任何代码,但是还是需要建立一个工程来生成。
sdk->new->applicant project
工程名就为fsbl,然后点击next选择fsbl 模板程序。
这个过程在uart hello world工程中有详细说明。
https://mp.csdn.net/editor/html/115321575
修改fsbl启动打印信息
fsbl不做任何修改,可以工作,只是启动的过程被影藏。如果想要了解fsbl启动引导过程,可以把内部详细流程信息打印出来。只需要添加一行代码。
如果想了解更多,可以详细阅读下fsbl源码。
fsbl工程中,在源码debug文件中,添加一个宏定义,打印启动详细信息:
fsbl打印全部详细信息,启动信息如下:
Xilinx Zynq MP First Stage Boot Loader
Release 2017.4 Mar 31 2021 - 10:49:42
Reset Mode : System Reset
Platform: Silicon (4.0), Cluster ID 0x80000000
Running on A53-0 (64-bit) Processor, Device Name: XCZU9EG
Board Configuration successful
Processor Initialization Done
================= In Stage 2 ============
SD1 with level shifter Boot Mode
SD: rc= 0
File name is BOOT.BIN
Multiboot Reg : 0x0
Image Header Table Offset 0x8C0
*****Image Header Table Details********
Boot Gen Ver: 0x1020000
No of Partitions: 0x3
Partition Header Address: 0x440
Partition Present Device: 0x0
Initialization Success
======= In Stage 3, Partition No:1 =======
UnEncrypted data Length: 0x65216F
Data word offset: 0x65216F
Total Data word length: 0x65216F
Destination Load Address: 0xFFFFFFFF
Execution Address: 0x0
Data word offset: 0x72E0
Partition Attributes: 0x26
Destination Device is PL, changing LoadAddress
Non authenticated Bitstream download to start now
DMA transfer done
PL Configuration done successfully
Partition 1 Load Success
======= In Stage 3, Partition No:2 =======
UnEncrypted data Length: 0x5012
Data word offset: 0x5012
Total Data word length: 0x5012
Destination Load Address: 0x0
Execution Address: 0x0
Data word offset: 0x659450
Partition Attributes: 0x116
Partition 2 Load Success
All Partitions Loaded
================= In Stage 4 ============
Protection configuration applied
Running Cpu Handoff address: 0x0, Exec State: 0
Exit from FSBL #这里正式推出FSBL程序,跳转到app程序运行。
Hello World