解决方案
Building PMU Firmware using SDK
- Open XSDK
- Create a new application with the following settings:
- Name your project / Board support package
- OS Platform : Standalone
- Hardware Platform : ZynqMP_ZCU102_hw_platform
- Processor : psu_pmu_0
- Click next. You will see "ZynqMP PMU Firmware" in the available templates.
- Click on Finish to generate the PMUFW.
- Connect to the local board and test the connection. You should see a pop-up showing that the connection was established successfully.
Connect to the COM port on the terminal to view the UART prints.
Note: PMUFW uses psu_uart_0 as the default STDOUT. This can be changed to other UARTs using the "Modify BSP Settings" dialogue.
To disable debug prints from PMUFW, undef/remove/comment out the line "#define DEBUG_MODE" in the file xpfw_config.h file from the PMUFW source code.
- In the XSCT Console, Connect to the board and Run the PMU firmware.
- View the PMU firmware prints on the Terminal console.
Debugging the PMU FW using SDK
- Right click the application, select "Debug As" and click on Debug Configurations.
- Right click System Debugger and Click "New". You should see "New Configuration". Click Debug.
- Choose the Debug perspective. Click OK.
- You will now see the debug perspective and PMU firmware will run.
- Place the break points to control the flow and rerun for debugging.
Loading PMU Firmware in SD boot mode
Note: When PMUFW is loaded in a non-JTAG Boot mode on 1.0 Silicon, an error message "Error: Unhandled IPI received" might be logged by PMUFW at startup.
This can be safely ignored. This issue is due to the IPI0 ISR not being cleared by PMU ROM. it is fixed in versions 2.0 and later of the Silicon.
Using FSBL to load the PMU Firmware:
- You should already have the pmufw.elf file. ( See building the PMU Firmware at the top of this page)
- Build an FSBL in the SDK for A53. ( R5 can also be used)
- Create a hello_world example for A53. Right Click on the "hello_world example" project and select "Create a boot image"
- Create a new bif file with the following setting:
- Architecture : ZynqMP
- You will see the A53 FSBL and hello_world example by default in partitions. You will also need the PMUFW.
- Click on Add, then provide the pmufw.elf path. Set Partition type: datafile, Destination device : PS, Destination CPU : PMU
- Click OK.
- After adding pmufw as a partition, click on the PMUFW partition and click UP.
- Make sure the partition order is as follows:
- A53 FSBL
- PMUFW
- hello world App
- Click on Create Image. You will see BOOT.bin created in a new folder called "bootimage" in your example project.
- View the .BIF file to confirm the partition order.
- Now copy this BOOT.bin to the SD card.
- Boot the ZCU102 board in SD boot mode. You can see the fsbl -> pmufw ->hello_world example prints in a sequence.
Using CBR to load PMUFW:
When the PMUFW is loaded by CBR, it is executed prior to FSBL.
As a result, the MIOs, Clocks and other initializations are not done at this point and this means that the PMUFW banner and other prints might not be seen prior to FSBL.
Post FSBL execution, the PMUFW prints can be seen as usual.
- To make CBR load the PMUFW, we just need to change the BOOT.bin boot partitions.
- First follow the first three steps listed above under Using FSBL to load the PMU Firmware:
- Create a new bif file.
- Select Architecture : ZynqMP
- You will see the A53 FSBL, and hello_world example by default in partitions. You will also need the PMUFW.
- Click on Add, then provide the pmufw.elf path. Also set Partition type: pmu (loaded by BootROM).
- Click OK.
- Click on Create Image. You will see BOOT.bin created in a new folder "bootimage" in your example project.
- You can also view the .bif file to confirm the partition order.
- Now copy this BOOT.bin to the SD card.
- Boot the ZCU102 board in SD boot mode. You can see the pmufw -> fsbl ->hello_world example prints in a sequence.