UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Visitor neildharris
Visitor
17,319 Views
Registered: ‎02-25-2016

Zynq QSPI Flash - How can I program stand-alone (w/o SDK)

I've finished my development cycle, and have a .BIN file that works.  I'd like to send it over to production with the necessary software tools and a JTAG cable so they can program the QSPI Flash on our production units.  Platform is Windows7, and I would like to keep it as simple as possible (avoid installation of Vivado/SDK, etc.).  Tried program_flash at the command line with no success.  Anyone have any success doing this?

0 Kudos
11 Replies
Scholar sampatd
Scholar
17,293 Views
Registered: ‎09-05-2011

Re: Zynq QSPI Flash - How can I program stand-alone (w/o SDK)

Are you unable program the flash or can program the flash and not boot from it?

What commands did you use ?
0 Kudos
Visitor neildharris
Visitor
17,272 Views
Registered: ‎02-25-2016

Re: Zynq QSPI Flash - How can I program stand-alone (w/o SDK)

There is no problem programming the flash memory if I issue the command (see below) from within the SDK.  I don't want to put SDK out on the production floor, so I'm looking to create a simple, (one-step?) procedure that will program the flash via JTAG, but without installing or invoking the full SDK.  Is there a way to utilize the batch files or shell scripts without bringing up the IDE?  Any help would be greatly appreciated.

 

The command I use within SDK is:

 

cmd /C program_flash -f BOOT.BIN -offset 0 -flash_type qspi_dual_parallel -blank_check -verify -cable type xilinx_tcf url TCP:127.0.0.1:3121

0 Kudos
17,142 Views
Registered: ‎03-01-2016

Re: Zynq QSPI Flash - How can I program stand-alone (w/o SDK)

I am experiencing a similar issue, so a reply would also be appreciated.
One alternative to program the QSPI flash "lighter" than the SDK is the Lab Tools application, but it does not directly accept a .BIN file.
0 Kudos
Visitor eurecam2005
Visitor
17,049 Views
Registered: ‎02-04-2016

Re: Zynq QSPI Flash - How can I program stand-alone (w/o SDK)

You could program flash without starting GUI using utilities which are bundled with SDK.

 

In Linux utilities required are installed in /opt/Xilinx/SDK/2015.4/bin/

Some adaptations might be required for Windows

 

You need first to start an hardware server :

/opt/Xilinx/SDK/2015.4/bin/xsdb

 

Connect to the target :

xsdb% connect arm hw

 

Then you could program your flash with program_flash

The nice thing is you could run the command inside xsdb (at least in Linux) which avoid starting a second shell. For example :

xsdb% /opt/Xilinx/SDK/2015.4/bin/program_flash -f BOOT.bin -flash_type qspi_single -verify

 

Finally disconnect from xsdb :

xsdb% exit

 

To make everything work in a script I had to add exec to run program_flash and puts to display results of the programming :

connect arm hw
set ff [exec /opt/Xilinx/SDK/2015.4/bin/program_flash -f BOOT.bin -flash_type qspi_single -verify]
puts $ff
exit

 

This solution certainly could be improved

Xilinx Employee
Xilinx Employee
16,992 Views
Registered: ‎07-23-2012

Re: Zynq QSPI Flash - How can I program stand-alone (w/o SDK)

If you want to avoid both Vivado & SDK installation then you can go for U-boot.

So, you need to load U-boot on Zynq PS and then you can program QSPI through U-boot.

Please refer to http://www.wiki.xilinx.com/Zynq-7000+AP+SoC+Boot+-+Multiboot+Tech+Tip for help.
-----------------------------------------------------------------------------------------------
Please mark the post as "Accept as solution" if the information provided answers your query/resolves your issue.

Give Kudos to a post which you think is helpful.
0 Kudos
Explorer
Explorer
13,023 Views
Registered: ‎05-15-2014

Re: Zynq QSPI Flash - How can I program stand-alone (w/o SDK)

I don't feel like any of the answers given address the question at all.  I am preparing for the same thing. 

 

I don't want SDK on the production computer, just a simple little program.

 

UBoot is not a solution.  FIrst, my application is bare mettle, so UBoot serves no other purpose.  But more importantly, SDK is still required to put UBoot on the board to begin with, and the point is to program boards on the production line that have never been in the lab.  Its this little thing some of us do called manufacturing.  Surely there must be a simple stand alone utility that an assembly line tech can run 50 times a day.  In my case it needs to recognize a JTAG-HS3 and a .mcs file and put the latter on a QSPI using the former.  I recognize that the details get a bit messier, as it involves loading a program into OCM and running it as an "interface", but it is still a relatively simple task that should not require Gigabytes of disk space and an arcane command line or ten layers into a complex program designed to do much more and capable of creating mistakes on the assembly line.

 

SDK isn't even terribly viable in production, because one has to have a project before one can flash a PROM.

 

And just to forestall any other boondoggle side trips, at least my application does not have an SD socket, so bootstrapping via SD isn't a viable approach.  Also, although it shouldn't matter, at least some of our projects don't have DRAM.  We're talking some small boards with little besides a PS, QSPI and Zynq.

0 Kudos
Observer zafirhafeez
Observer
12,887 Views
Registered: ‎05-16-2015

Re: Zynq QSPI Flash - How can I program stand-alone (w/o SDK)

Hello,
Did you managed to find a solution to the problem. I am facing exactly the same situation like you have mentioned and require a small utility for downloading the bin file to spi flash on production line boards. The need to install huge vivado software just for downloading bin file seems absolutely absurd. Is there a better solution?

Thanks.
0 Kudos
Observer ganaylor
Observer
10,129 Views
Registered: ‎03-28-2008

Re: Zynq QSPI Flash - How can I program stand-alone (w/o SDK)

It is surprising that after so long, this issue does not have an acceptable answer - nor has Xilinx stepped in to inform us on how to perform what must be a very frequently required task (like for every deployed Zynq based device!). Reassuringly however, there does appear to be an answer. The recent versions of Vivado Lab solutions (at least from 2016.2) do allow a BOOT.bin to be loaded on to the configuration flash memory from the GUI by selecting 'Open Hardware Manger', click on 'Open Target' in the green bar and then choosing the 'Tools' menu bar tab and then 'Add Configuration Memory device' > <ref to Zynq chip>. Select the flash family/part to be programmed (including the correct spi width) and then OK,OK. Select the correct boot.bin file with the ... button level with Configuration file (don't need fsbl if the fsbl is already in the .bin file). Leave erase, program and verify checked, OK - done....

Explorer
Explorer
8,419 Views
Registered: ‎05-15-2014

Re: Zynq QSPI Flash - How can I program stand-alone (w/o SDK)

Thanks for that tip.  I have downloaded it and it appears to be exactly what I'm looking for.  (Well a bit more than I'm looking for, but certainly meets the requirement).

 

0 Kudos
Visitor jrbrizo
Visitor
4,717 Views
Registered: ‎03-07-2018

Re: Zynq QSPI Flash - How can I program stand-alone (w/o SDK)

Hi,

 

I have the same problem. I'm trying to look for a way to program Zynq without installing the SDK. I tried the recent version of Vivado Lab solutions but it does not support the SDK where we did the development (2014.3 - and we have no plan to use the latest). Is there any other way to do it? I did a script to automate the flashing but it relies on the SDK. 

 

Thanks.

0 Kudos
Explorer
Explorer
4,563 Views
Registered: ‎10-19-2017

Re: Zynq QSPI Flash - How can I program stand-alone (w/o SDK)

In Vivado 2017.3 Hardware Manager, you do need to include fsbl; it will not allow you to leave it blank, even if the fsbl is included in boot.bin.

 

Yours is the method I am using to try to boot, but my question is more related on how to generate boot.bin. If I have an fsbl, a bitstream image, a u-boot.elf, a rootfs.tar.gz, and a bootable kernel image zImage, how can I generate a working boot.bin from that?

 

I generated a bif file to create this binary that looks like this

image : {
        [bootloader]zynq_fsbl.elf
        u-boot.elf
        [load=0x2a00000]system.dtb
        [load=0x2000000]rootfs.ext4.gz
        [load=0x3000000]zImage.bin   // currently bootgen requires a file extension. this is just a renamed uImage
}

I tried loading boot.bin as the configuration file (.bin) in the Hardware Manager and the zynq_fsbl.elf as the fsbl. The INIT LED went green, but it never hit u-boot and the green DONE LED never went on. In the terminal there were no messages displayed, neither u-boot or kernel.

 

0 Kudos