解决方案
In the design:
- In the Zynq TAB, PJTAG is routed to MIO 10 .. 13.
- FCLK_CLK0 is used to feed the EMIO port EMIOTRACECLK and a divided by two version of FCLK_CLK0 is used to feed the external port TRACECLK_pin. This is because ARM defines two separate clocks, TRACECLKIN and TRACECLK, where TRACECLK = TRACECLKIN/2. TRACECLKIN is the input clock to the CoreSight components, and TRACECLK is the output clock that goes to the Lauterbach debugger. On EMIO, the EMIOTRACECLK port is actually TRACECLKIN. You will need to generate your own divide-by-2 version of this clock in the PL, and output it to the TRACECLK_pin.
- The ucf constrains for the TRACE port needs to match the ZED board layout
Step-by-step instructions:
- Connect the XILINX HW-FMC-105-DEBUG board to the FMC connector on the ZED board
- Connect your TRACEr to the mictor connector on the XILINX HW-FMC-105-DEBUG board
- Connect the AVNET PMOD-7ZJTAG adapter to the MIO PMOD connector on the ZED board
- Connect your 20-pin DEBUG header to the 20-pin connector on the AVNET PMOD-7ZJTAG adapter
- Setup the boot mode jumpers to boot from SD card in Independent JTAG mode.
- Create a BOOT.bin ( to copy on your SD card ) that contains:
- the FSBL created from the attached SDK project
- the bitstream created from the attached XPS project
- the "Hello World" example created from the SDK project
- Boot from SD card and wait until the DONE LED lights up and "Hello World" prints on the terminal ( 115200, 8, 1, N, N )
Steps to set up the Vivado project:
1. Create a blank vivado project targeting the ZED board.
2. Type cd {<full directory of ar52095_bd_tcl.tcl>} in the Vivado tcl console.
3. Type source ar52095_bd_tcl.tcl in the tcl console.
4. After block design creation has completed, generate the output products for the block design.
5. After the product is generated, create the top HDL for the block design, and modify the width of TRACE_DATA to 16 like output [15:0]TRACE_DATA; wire [15:0]TRACE_DATA;.
6. Add the constraint file system.xdc to the Vivado project.
7. Generate the bitstream.
8. After the bitstream has been generated, open the implemented design.
9. In the File menu, click Export -> Export Hardware for SDK, and check all selections.
10. After SDK has launched, create fsbl and bsp.
11. Open ps7_init.c in fsbl, and comment every line of EMIT_MASKWRITE(0XF8803004, 0xFFFFFFFFU ,0x80000000U),.
12. Save ps7_init.c, and compile fsbl again.
13. Creat a hello world application.
14. We can generate BOOT.bin with the generated elf files of fsbl and hello world together with the bitstream.
Note: Normally steps 11 and 12 would not be needed. This is due to the issue described in (Xilinx Answer 61108).
Expected result:
- Using the Platform USB cable, the user can debug the PL with XILINX tools (e.g., ChipScope)
- Using a third-party 20-pin header, the user can debug the PS accessing the cortex-A9 CPUs
- Using a TRACEr, the user can profile the software application
Go to http://www.zedboard.org for more information about the ZED board and the PMOD-7ZJTAG adapter.