Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

How to perform Flash Programming of the ZC706 with our own design files and bitstrea

Status
Not open for further replies.

msdarvishi

Full Member level 4
Joined
Jul 30, 2013
Messages
230
Helped
1
Reputation
2
Reaction score
1
Trophy points
18
Activity points
2,349
Hi friends,



I am working with Vivado 2017.3 targeting a ZYNQ ZC706 board.



I followed the procedure for flash programming of the ZC706 through SD Card in page 13 if this document, and I could successfully see the Xilinx Device in lspci of the Ubuntu terminal.



Now, I am wondering how can I program the Flash memory of the ZC706 with my own design file, bitstream? There is no explanation for that in the documentation.



Kind replies and helps are in advace appreciated.







Besrs,

Daryon
 


Please show the printscreens with steps and the printsceen when it fails showing the ERROR message.
 

Please show the printscreens with steps and the printsceen when it fails showing the ERROR message.

Hi,
Here are my steps and the relevant printscreens:

1. Implemented design in vivado and generated bitstream

2. export hardware including bitstream and launch sdk

3. Create new application with Zynq FSBL (figure below)

Screenshot from 2018-10-18 10-16-06.png

4. From Xilinx/ Create Boot Image, I have defined the path for the new boot file and named it BOOT.bif.Then I added the other files from this link. I doubt that I did a good job at this step or not?! I assumed that the files in this link are pre-built by Xilinx to bring up the processor and they're design independent! So, I just copied them for my design (figure below).

Screenshot from 2018-10-18 10-46-01.png

5.SDK Console reported the successful job by bootgen(figure below)

Screenshot from 2018-10-18 10-47-29.png

6. The BOOT.bin file was generated beside my other files (figure below)

Screenshot from 2018-10-18 11-05-07.png

7. Then I executed the following commands in XSCT Console and loaded my BOOT.bin file into the ARM processor, Core #0.

Code:
xsct% connect   

xsct% targets
  1  APU  
     2  ARM Cortex-A9 MPCore #0 (Running)
     3  ARM Cortex-A9 MPCore #1 (Running)
  4  xc7z045
  5  whole scan chain (board power off)

xsct% targets 2 

xsct% dow -data BOOT.bin 0x08000000                                             
100%   28MB   0.5MB/s  00:55                                                    
Successfully downloaded /home/mostafa/Documents/Xilinx/test_designs/ZYNQ_zc706/ZC706_PCIe/ZC706_PCIe.sdk/upload/BOOT.bin

xsct%

In the next step when downloding the u-boot.elf file, I received this message:

Code:
xsct% dow u-boot.elf                                                            
Downloading Program -- /home/mostafa/Documents/Xilinx/test_designs/ZYNQ_zc706/ZC706_PCIe/ZC706_PCIe.sdk/upload/boot_image/u-boot.elf
	section, .text: 0x04000000 - 0x040422db
	section, .rodata: 0x040422dc - 0x04051bec
	section, .hash: 0x04051bf0 - 0x04051c1b
	section, .data: 0x04051c1c - 0x040541af
	section, .got.plt: 0x040541b0 - 0x040541bb
	section, .u_boot_list: 0x040541bc - 0x04054aa3
	section, .rel.dyn: 0x04054aa4 - 0x0405df6b
	section, .bss_start: 0x04054aa4 - 0x04054aa3
	section, .bss: 0x04054aa4 - 0x046a991f
	section, .bss_end: 0x046a9920 - 0x046a991f
100%    0MB   0.5MB/s  00:00                                                    
Setting PC to Program Start Address 0x04000000
Successfully downloaded /home/mostafa/Documents/Xilinx/test_designs/ZYNQ_zc706/ZC706_PCIe/ZC706_PCIe.sdk/upload/boot_image/u-boot.elf
xsct% Info: ARM Cortex-A9 MPCore #0 (target 2) Stopped at 0xffffff28 (Suspended)
__image_copy_start() at arch/arm/lib/vectors.S: 51
51: couldn't open "/scratch/skarandikar/fpga-zynq-staging_zctest/common/u-boot-xlnx/arch/arm/lib/vectors.S": no such file or directory
xsct% con                                                                       
Info: ARM Cortex-A9 MPCore #0 (target 2) Running                                
xsct%

So, I supposed that my program was written into the processor, so I turned off the board and host PC, inserted the zc706 inside the PCI bus of the PC motherboard, then reastarted both zc706 and PC. When execusing lspci, the ZC706 was not recognized bt the host PCIe bus.



Am I doing something wrong? Unfortunately, the exampled inside the internet are very limited and vague! Can you please help me by this issue?



Thanks and Regards,

Daryon
 

From UG1046 (U-Boot chapter) and UG821 (Figure 3-15: Zynq-7000 AP SoC Example Linux Boot Image Partitions) we have the proper boot image partitions sequence for Linux (according point 4 from post #5):
FSBL Partition
Bitstream Partition
U-boot Partition
Linux zImage (Kernel) Partition
Linux Device Tree Partition
Linux Disk Image Partition

So your actual sequence is wrong and you are missing Linux kernel image (zImage).
 
From UG1046 (U-Boot chapter) and UG821 (Figure 3-15: Zynq-7000 AP SoC Example Linux Boot Image Partitions) we have the proper boot image partitions sequence for Linux (according point 4 from post #5):
FSBL Partition
Bitstream Partition
U-boot Partition
Linux zImage (Kernel) Partition
Linux Device Tree Partition
Linux Disk Image Partition

So your actual sequence is wrong and you are missing Linux kernel image (zImage).

Hi
Thank you for your reply and nice explanation. Just as a question, should we generate the following files every time in our design or they are some pre-built files and can be downloaded and used for any design? I see these files on github ready for download. I mean these files:

FSBL Partition
U-boot Partition
Linux zImage (Kernel) Partition
Linux Device Tree Partition
Linux Disk Image Partition

Thanks again,
Daryon
 

You need to analyze every partition one by one and it depends.

Assuming that you always use ZC706 board and Linux then:
* FSBL can be unchanged;
* Bitstream can be unchanged only if PL part is unchanged;
* U-boot Partition can be unchanged;
* Linux zImage (Kernel) Partition can be unchanged only if you don't want to change parts of the kernel (e.g. changing preinstalled drivers);
* Linux Device Tree Partition can be unchanged only if you don't change PS and PL parts of the Zynq;
* Linux Disk Image Partition can be unchanged (you can copy additional files to this partition after power-up e.g. through ssh).
 
You need to analyze every partition one by one and it depends.

Assuming that you always use ZC706 board and Linux then:
* FSBL can be unchanged;
* Bitstream can be unchanged only if PL part is unchanged;
* U-boot Partition can be unchanged;
* Linux zImage (Kernel) Partition can be unchanged only if you don't want to change parts of the kernel (e.g. changing preinstalled drivers);
* Linux Device Tree Partition can be unchanged only if you don't change PS and PL parts of the Zynq;
* Linux Disk Image Partition can be unchanged (you can copy additional files to this partition after power-up e.g. through ssh).


Hi niciki,
Such a nice explanation! Thank you! I learnt from that. I have encouraged and marked your post as "helpful" becuse you helped me out by your descriptions.

Bests,
Daryon
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top