Jump to content
  • 0

Arty Z7: "zynq_flash" caused some problems


embeddedT

Question

Hi everybody,

two weeks ago I bought the ArtyZ7-Board with an XC7z020 (400-1C) on it and successfully launched some projects in VHDL to program the PL. After that, I started to integrate the ARM-processor into some projects to toggle a led or just implement a PWM-signal. For this I have gone the following steps:

1. Creating a block design for the processing system of the zynq in Vivado.

2. Synthesized it and generated the bitstream.

3. ''Export Hardware'' and launch SDK to create an application in C.

4. ''Program FPGA'' in Xilinx SDK 

5. Run as -> Launch on HW

After these steps, I was able to switch on a led or to control the brightness of it with the ARM. In addition to that, I read something about to program the Zynq with a binary file over QSPI. Hence, I created a Zynq Boot Image with Xilinx SDK (so I merged the bitstream with the .elf to get a bootable file, right?) and started "zynq_flash" with the following command:

"<path>\zynq_flash -f <path>\Boot.bin -offset 0 -flash_type qspi_single -cable type xilinx_tcf URL TCP:127.0.0.1:3121"

After that, the default settings of the board were gone (the standard led-sequence when you restart your board) and I'm not able to program the PS anymore. When I write a program in VHDL to program the FPGA everything is fine, but when I repeat the steps above, nothing will happen on the board. The "done" led is lit, but no functions are visible.

Can someone please explain me, what was happened and why? I'm a pretty beginner in the world of embedded systems - especially programming a Zynq.

My guess is that I accidentally have overwritten something important - maybe a specific bootloader? But if this really should be, how can I write a program, merge it with the .bit-file to a binary and flash it on the Zynq on a right way? 

 

I would be grateful for your patience and support. 

 

Best regards from Germany,

Thomas

Link to comment
Share on other sites

9 answers to this question

Recommended Posts

Hi @embeddedT,

I have reached out to my co-workers to look into your forum question. I am not experience with this way of programming the qspi with the zynq processor. With that being said, Here is a forum thread that might explain why you are not able to program from sdk currently. Here is a xilinx wiki that might help with the zynq_flash process.  

Link to comment
Share on other sites

Hi @jpeyron,

thanks for your fast reply and for these links.

In addition to my problem, I tried to boot from a microSD-card, which is a possible alternative on my board. But it didn't solve my problem as well and the board is still doing nothing. When I follow the steps under microSD Boot Mode and turn the board on, just the red led LD13 (?) will be shine - not even the "DONE"-led. But for the binary-file, I used a project, which has already worked on the board (before I tried to boot via "zynq_flash") according to the following steps at my first post.

If anyone has some ideas, which I can try, I would be happy.

 

Best regards,

Thomas

 

Link to comment
Share on other sites

Hi @embeddedT,

So for clarification. You are not able to boot from the SD card. Could you try the quick start guide here that uses the sd card. Also are you currently able to program the board using the JTAG? If not could you try the getting started with zynq tutorial here. I discuss the process and include a project in this thread. Make sure you have the jumper JP4 set to JTAG. Please post screen shots of errors if any.

cheers,

Jon

Link to comment
Share on other sites

Hi @embeddedT,

For Petalinux follow the petalinux quick start guide i attached a link to above and you will be able to boot into a pre-built linux image. Also If you want a shortcut, just copy these two files to a microSD (FAT formatted) and use it to boot the Arty Z7 into Linux attached below. This should be a quick way to test booting from your sd card.

cheers,

Jon

BOOT.BIN

image.ub

Link to comment
Share on other sites

Good morning @jpeyron,

thanks for your help and for providing these two files. Booting from microSD worked and I can read out the serial com port. That's fantastic! On the other hand, it implies that I was/am too incapable to create these bootable files by myself. But that's okay because I can work on it! :)

Additionally, I've tried the tutorial with JTAG. Even when I follow all steps and just add one AXI_GPIO for a led, it will not shine after running over SDK. Reading over the UART communication is not possible as well because the COM 13 is always "in use". Give me a minute for a screen shot. 

 

Edit:

I have attached an image which shows the current block design of the beginner project with the pinout and a c-file. This main task should actually bring a led to light up, but it happens nothing. 

 

Best regards,

Thomas

 

blockDesign.png

helloworld.c

Link to comment
Share on other sites

Hi @embeddedT,

Could you try my completed project that I attached below done in Vivado 2016.4. Have you installed the board files as described here? Also are you using the default setting for the Zynq processor? I see you running at 50MHz and I believe it should be 100Mhz. I have attached my helloworld.c as well.

helloworld.c

Arty_z7_led.zip

Arty_z7_RGB_switch.jpg

Link to comment
Share on other sites

Morning @jpeyron,

I have tried your project and it works. Thanks for that. :) 

It seems that you have not created a constraint file for any connection. Let that be a beginner question, but how does that work and how will you create or describe the connection between PL and the periphery. For instance, that switcher and the RGB led. Each time, after running the synthesis in my own projects, I've created a constraint file like : 

set_property PACKAGE_PIN L15 [get_ports {rgb_led_tri_io[0]}]
set_property PACKAGE_PIN N15 [get_ports {rgb_led_tri_io[1]}]
set_property IOSTANDARD LVCMOS33 [get_ports {rgb_led_tri_io[1]}]
set_property IOSTANDARD LVCMOS33 [get_ports {rgb_led_tri_io[0]}]
set_property IOSTANDARD LVCMOS33 [get_ports {sws_2bits_tri_i[1]}]
set_property IOSTANDARD LVCMOS33 [get_ports {sws_2bits_tri_i[0]}]
set_property PACKAGE_PIN M20 [get_ports {sws_2bits_tri_i[0]}]
set_property PACKAGE_PIN M19 [get_ports {sws_2bits_tri_i[1]}]

So what's wrong with that way? I'd used Vivado 2014.x to configure the HW and had to choose the xc07020-400-1C at the beginning of the creation of a project. So I didn't use the way to include the board files you mentioned because it is not possible. But finally, I do not understand the difference between both methods.

For example, let us use all four normal led's (R14, P14, N16, M14) to create a sequence dependent on the switcher's instead of one RGB led. How does this reconfiguration work? How can we reconfigure the pinout at the best? Maybe that could explain my problem at all....

Best regards and I really have to thank you for your help,

Thomas

 

 

Link to comment
Share on other sites

Hi @embeddedT,

Sorry, I didn't include the link for the board files for the older versions of Vivado here.  You can constrain the pins like you are showing above in a XDC instead of using the board files. The board files make the process easier. In your previous block diagram you are running the FCLK_CLKO at 50 Mhz instead of the 100 Mhz and I believe this is why your design did not work.

cheers,

Jon

Link to comment
Share on other sites

Hi @jpeyron,

I used your project to adapt mine and now it works. Additionally, I can read out the serial com port in all my projects.

I just had to change some minor details in Vivado (2014.x and 2016.x). 

  • memory-part: MT41J128M8 JP-125  to  MT41J256 RE-125
  • effective DRAM bus width: from 32 bit to 16 bit
  • UART0: EMIO to MIO 14..15
  • and the 100MHz, mentioned by you

Thank you for your help and especially for the patience.

Best regards,

Thomas 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...