cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Anonymous
Not applicable
4,339 Views

ZYNQ PL Programming

Jump to solution

Hello, 

 

I would like to implement very simple two input AND gate on z-tun board 7020. I would like to connect inputs to SW0 (R19), and SW1 (T19) and the output to the Red RGB LED (R14). The switches SW0 and SW1, and the RGB LED are connected to the PL side of the ZYNQ. This application does not need ZYNQ PS. The I/O port connections are in attachment. I have generated bitstream which is bit file. I have copied the bit file to the SD card but the program does not work. The jumper settings are correct for booting z-turn from SD card. Am I missing anything here ? Do I need to include ZYNQ PS even I am not using it ?  

Untitled.png
0 Kudos
1 Solution

Accepted Solutions
Highlighted
Advisor
Advisor
8,804 Views
Registered: ‎10-10-2014

@Anonymous, I have seen the same issue as you have now : FSBL says 'DMA Done!', and then only a line of dots ... 

 

I have no real clue where the FSBL is stuck. but normally it shoud continue to spit out some messages, load your Hello World app, and finally you should see the 'hello world'.

 

I've seen the issue too a few times, but could not reproduce it in a systematic way. I 'fixed' this somehow by deleting the whole .sdk folder, and starting over from the .hdf export. But it's weird that this solved the issue. You can try that also.

 

I would recommend to keep a copy of your current project's status (archive / zip it), start a new topic, under 'Embedded Boot and Configuration' . As title you could say : Zynq FSBL stuck after 'DMA Done !' message. Shortly describe your problem, put a copy of the screenshot of the serial port in your post too, so people immediately see where the FSBL is stuck, and add your pdf with the detailed steps too. We need to know where the FSBL is stuck, and what the dots mean. Looks like a DMA hang / timeout to me. 

 

You could also try to add for example an AXI GPIO IP, and connect 1 output to a led, and see if that fixes something. It may sound weird, but maybe it has something to do with the 'almost empty' PL

** kudo if the answer was helpful. Accept as solution if your question is answered **

View solution in original post

55 Replies
Highlighted
Scholar
Scholar
4,224 Views
Registered: ‎03-22-2016

@Anonymous No you do not need unless you are using the zynq clock.

Can you share a screenshot of the design?

 

vitorian.com --- We do this for fun. Always give kudos. Accept as solution if your question was answered.
I will not answer to personal messages - use the forums instead.
0 Kudos
Highlighted
Anonymous
Not applicable
4,216 Views

The design is very simple, attached. Is it OK to copy the bit file in the SD card and adjust boot jumpers to boot from SD card ? Do I need BOOT.BIN or bit file is enough ? 

Untitled01.png
0 Kudos
Highlighted
Scholar
Scholar
4,214 Views
Registered: ‎03-22-2016

@Anonymous If you are booting from SD card you usually need FSBL+BIT = BOOT.BIN

https://www.xilinx.com/video/soc/create-zynq-boot-image-using-xilinx-sdk.html

But for these kind of small tests why don't you program through JTAG? It is immediate.

vitorian.com --- We do this for fun. Always give kudos. Accept as solution if your question was answered.
I will not answer to personal messages - use the forums instead.
0 Kudos
Highlighted
Anonymous
Not applicable
4,211 Views

Zturn board has JTAG connector (100 mil separated pins) but it need external JTAG programming cable. The board does not have USB-JTAG connector. Is it possible to get BOOT.BIN file in SDK by including BIT and FSBL even if ZYNQ PS is not included in the Vivado design ? 

0 Kudos
Highlighted
Scholar
Scholar
4,204 Views
Registered: ‎03-22-2016

@Anonymous I am afraid the zynq's BootROM will always boot FSBL in SD mode - see page 188 on UG585

https://www.xilinx.com/support/documentation/user_guides/ug585-Zynq-7000-TRM.pdf

 

 

vitorian.com --- We do this for fun. Always give kudos. Accept as solution if your question was answered.
I will not answer to personal messages - use the forums instead.
0 Kudos
Highlighted
Anonymous
Not applicable
4,202 Views

This means that ZYNQ PS has to be included in the Vivado design to get BOOT.BIN file in SDK, right ? 

0 Kudos
Highlighted
Scholar
Scholar
4,179 Views
Registered: ‎03-22-2016

@Anonymous Do not take my word for it - I have not tried to do what you are doing. 

But by what the technical manual says, in SD card mode the BootROM is copied into OCM, then it starts loading the FSBL from SD card then it passes the command to the "processor". So yes, it assumes that there will be a processor but it is not necessary to have the PS in the project itself. 

I found this thread, but it is pretty old

https://forums.xilinx.com/t5/Embedded-Development-Tools/PL-only-Zynq/td-p/381199

UPDATE: so I did a quick test and yes, the PS HAS TO be included in the original project if you want SDK support. Otherwise the SDK will not allow you to create the FSBL project. 

Just the PS added without anything will do it. You can keep your logic and the PS totally separated, they do not need to interact but the ZYNQ block has to be there. I just tested - it works.

 

 

vitorian.com --- We do this for fun. Always give kudos. Accept as solution if your question was answered.
I will not answer to personal messages - use the forums instead.
0 Kudos
Highlighted
Anonymous
Not applicable
4,165 Views

In fact I have downloaded bit stream several times in ZedBoard for PL based application (means ZYNQ PS was not n the design), it works without the need of exporting the hardware to the SDK. In Vivado 2017.3 simply it need USB JTAG cable to download the bitstream to the PL part of the ZYNQ. The question here is how to Boot ZYNQ PL from SD card ? which is covered in the other post you have mentioned but if someone has an idea please do share here. Thanks in advance. 

0 Kudos
Highlighted
Anonymous
Not applicable
4,165 Views

I now added ZYNQ PS in the deign without doing anything, just enable SD card and UART and Fabric Clock 0 for M AXI GP0 but has nothing to do with the PL design which I actually need to run. I will check this program by exporting to SDK including bit stream and there I will create FSBL and generate BOOT.BIN using (BIT + FSBL). I will post here if it works. 

0 Kudos
Highlighted
Scholar
Scholar
3,870 Views
Registered: ‎03-22-2016

@Anonymous As I said before, PL works alone if you program through JTAG - but you said it could not be used.

To boot from SD card, you have to have the PS in the design, otherwise the FSBL will not work.

 

vitorian.com --- We do this for fun. Always give kudos. Accept as solution if your question was answered.
I will not answer to personal messages - use the forums instead.
0 Kudos
Highlighted
Anonymous
Not applicable
3,847 Views

The ZedBoard have USB-TJAG connector but zturn board need external JTAG cable which I don't have. Therefore, I want to boot the z-trun from SD card. 

I have added ZYNQ PS in the design and also added the block of logic_gate which is a simple AND gate in the Block Diagram. I have created BOOT.BIN using Hello_World Application and also initialize ps7_init(). The Hello_World application works in the serial interface but the logic_gate does not work with switches and RED RGB LED, the I/O map is attached. I see that the SW0 and SW1 are connected to BANK 34 and also RED RGB LED connected to Bank 34, but I am not sure which I/O Standard to use. I have also tried with LVCMOS33 it does not work. Any idea or suggestion ? 

Untitled02.png
Untitled.png
0 Kudos
Highlighted
Scholar
Scholar
3,838 Views
Registered: ‎03-22-2016

@Anonymous the manufacturer is supposed to give you the xdc file but I did not find anything - which is a big red flag to me. Never seen a board without xdc.  Looks like sloppy management.

I found this on GitHub from a community member struggling with the same issue

https://github.com/stv0g/zturn-stuff/tree/master/constraints 

 

set_property IOSTANDARD LVCMOS33 [get_ports {SW[3]}]
set_property IOSTANDARD LVCMOS33 [get_ports {SW[2]}]
set_property IOSTANDARD LVCMOS33 [get_ports {SW[1]}]
set_property IOSTANDARD LVCMOS33 [get_ports {SW[0]}]
vitorian.com --- We do this for fun. Always give kudos. Accept as solution if your question was answered.
I will not answer to personal messages - use the forums instead.
0 Kudos
Highlighted
Anonymous
Not applicable
3,830 Views

I have added these IO Standards in the constraint XDC file. The Hello World Application works in serial terminal when I press the reset button but the FPGA INIT DONE LED on the Zturn board does not turn on, means that FPGA is not programmed. I also check the voltages on the pin 39 of CN1 connector because the Red LED is connected to the IO_L6N_T0_34 which is pin 39 of CN1 connector. It reads 1.9 volts but the pin 40 and pin 42 reads 1.3 volts which is Blue and Green RGB LEDs.  I have connected the output to Red RGB LED which does not change the state with SW0 and SW1. 

0 Kudos
Highlighted
Scholar
Scholar
3,828 Views
Registered: ‎03-22-2016

@Anonymous Did you create the FSBL?

vitorian.com --- We do this for fun. Always give kudos. Accept as solution if your question was answered.
I will not answer to personal messages - use the forums instead.
0 Kudos
Highlighted
Anonymous
Not applicable
3,821 Views

Actually not. Thanks for asking. I have created Hello World Application in the SDK and copy the ps7_init.c and ps7_init.h in the src directory of the ZYNQ Hello. I added the header file ps7_init.h in the helloworld.c file and call the function ps7_init(), please see attachment. The BOOT.BIN is generated from ZYNQ_Hello.elf and design1_wrapper.bit. In this way Hello World Application works when I set-up serial terminal and press reset button on the zturn 7020 board. 

 

I do not know why it is not working the other way ,i.e, if I create ZYNQ FSBL using FSBL template and then create Hello World (without including header file and calling ps7_init() function in the helloworld.c file) and obtain BOOT.BIN from ZYNQ_FSBL.elf and ZYNQ_Hello.elf and design1_wrapper.bit. In this way I do not know why, even the Hello World does not work on the serial terminal.   

Untitled03.png
0 Kudos
Highlighted
Scholar
Scholar
3,818 Views
Registered: ‎03-22-2016

@Anonymous You can't run the ELF and bin alone. That is not how it works. 

Read the links I gave in the beginning of this post. 

vitorian.com --- We do this for fun. Always give kudos. Accept as solution if your question was answered.
I will not answer to personal messages - use the forums instead.
0 Kudos
Highlighted
Anonymous
Not applicable
3,785 Views

I have looked at the link in which someone has shared a tutorial some years ago to program ZC706 PL from SD card by having ZYNQ PS in the design doing nothing.

 

I have added ZYNQ PS in the Block Diagram and also added the logic_gate in the Block Diagram and made it's port External. The logic_gate program itself and also the Block Diagram has been shared already in previous post. It's same. I have generated bit stream using LVCMOS33 I/O standard and exported the hardware to SDK. I have created ZYNQ FSBL using FSBL template. Latter I have generated BOOT.BIN using ZYNQ_FSBL.elf, ZYNQ_Hello.elf and design1_wrapper.bit. The Hello World application does not work on the serial terminal. Am I missing anything here ? At least Hello World should work but it does not work. The FPGA DONE LED is also off. 

 
0 Kudos
Highlighted
Scholar
Scholar
3,779 Views
Registered: ‎03-22-2016

@Anonymous what you did looks correct. Are you sure all the switches in the board are set for SD boot?

vitorian.com --- We do this for fun. Always give kudos. Accept as solution if your question was answered.
I will not answer to personal messages - use the forums instead.
0 Kudos
Highlighted
Anonymous
Not applicable
3,776 Views

Yes they are correct because I run some other applications on the same board in which I have ZYNQ PS in the design. I use BOOT.BIN in the SD card to program the ZYNQ device. 

0 Kudos
Highlighted
Advisor
Advisor
3,853 Views
Registered: ‎10-10-2014

@Anonymous, I see you're using a Zedboard : is it an option for you to program the bitstream in the SPI flash instead of on the SD-card? I believe I tried something similar as you try to achieve in my very first Zynq steps, but I programmed it in QSPI.

** kudo if the answer was helpful. Accept as solution if your question is answered **
0 Kudos
Highlighted
Anonymous
Not applicable
3,847 Views

@ronnywebers, I have Ztrun 7020 and I want to program PL based application using SD card. 

 

I have described all the steps in attachment. Could you please look in attached PDF and let me know if I am missing anything ?  

 

The strange thing is that if I don't create ZYNQ_FSBL in the SDK and copy the ps7_init.c and ps7_init.h in the src directory of the Hello World and add the header file ps7_init.h in the helloworld.c file and simply call the function ps7_init(), then the Hello World Application works by putting BOOT.BIN (generated from ZYNQ_Hello.elf and design1_wrapper.bit) in the SD card

0 Kudos
Highlighted
Advisor
Advisor
3,818 Views
Registered: ‎10-10-2014

@Anonymous, I checked the steps you take, I cannot see an obvious error. I have no datasheet of your board, so I'm not sure about the jumper settings, but I guess you double checked that.

 

Can you try to turn on FSBL debugging, as described here on page 34 (FSBL_DEBUG). Then check your uart if the FSBL puts out a message that tells you more. You can check in the source code of the FSBL what messages to expect. Let me know about the result.

 

 

** kudo if the answer was helpful. Accept as solution if your question is answered **
Highlighted
Advisor
Advisor
3,813 Views
Registered: ‎10-10-2014

@Anonymous, you can also check this detailed Xilinx video to make sure you have the boot image right . Looks like you have, but double check it.

** kudo if the answer was helpful. Accept as solution if your question is answered **
Highlighted
Anonymous
Not applicable
3,796 Views

I set the FSBL_DEBUG flag and click Apply and OK, kindly see attachment. 

 

I edit this post. The console output is is attached. 

 

 

Untitled08.png
Untitled09.png
0 Kudos
Highlighted
Advisor
Advisor
3,786 Views
Registered: ‎10-10-2014

@Anonymous, I think you must add the '-D' flag (debug) before FLAG_DEBUG, so it becomes : '-DFLAG_DEBUG' (a bit strange there is no space in between the -D and FLAG_DEBUG :-)

 

debug flags.png

** kudo if the answer was helpful. Accept as solution if your question is answered **
Highlighted
Anonymous
Not applicable
3,763 Views

I edit the previous post with '-DFSBL_DEBUG'  

0 Kudos
Highlighted
Advisor
Advisor
3,755 Views
Registered: ‎10-10-2014

@Anonymous, if I get this clear from your log, your ZYNQ_FSBL application fails to build, it goes wrong during linking ?

 

 

If your FSBL does not build, we can't proceed to the actual issue you had. 

 

Not sure what's going on here, can you delete the entire SDK folder, and start over from the export from Vivado? (you could also try to delete the fsbl and fsbl_bsp, and re-generate them, but your hello world application might complain about a missing bsp. So I recommend you to start over. 

 

Let me know if you can build your FSBL, helloworld, and create a boot image.

 

From there on we'll proceed with your issue. Note that the FSBL should output some messages on the serial console

** kudo if the answer was helpful. Accept as solution if your question is answered **
Highlighted
Advisor
Advisor
3,747 Views
Registered: ‎10-10-2014

@Anonymous before deleting the entire SDK folder, you could try 'Project -> Clean -> Clean all projects' and see if that helps. If not, the easiest way is to start over, your procedure in the pdf should work.

** kudo if the answer was helpful. Accept as solution if your question is answered **
Highlighted
Anonymous
Not applicable
3,742 Views

I close SDK and delete the folder zturn_pl.sdk in the project directory. I Export Hardware to SDK from Vivado 2017.3 and have created BOOT.BIN in two different ways in SDK which are described in attachment. The RGB RED LED does not change it's state with SW0 and SW1 buttons in both methods. The FPGA DONE LED remain OFF in both methods. However Hello World application works in one method but not in the other. Kindly see PDFs in attachment. Thanks !! 

0 Kudos