Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: TOC, formatting


Programming QSPI from U-boot ZC702

. Here

In this article, we shall be discussing how to program the QSPI from the U-boot running on the Cortex A9 on Xilinx ZC702 Development board

Table of Contents

.  Here, we will show how to build the uboot executable, and how

to configure the Zynq Processing Sub-system (PS), place the Image into DDR and boot uboot via XSCT in JTAG. Finally, how to use the uboot commands to program the image from DDR into QSPI

Table of Contents
Table of Contents

Step 1: Building the U-boot executable:


The recommended flow when creating any OS image is to use the Petalinux tool. However, here we shall be obtaining the xilinx branch of the u-boot from github and compiling
manually. For the complete OSL flow see the article here

Note: The uboot uses the Devicetre Complier (DTC) during compilation, so this is needed too. Also, the arm-xilinx-linux-gnueabi- compiler is needed too.

Code Block
themeMidnight
git clone https://git.kernel.org/pub/scm/utils/dtc/dtc.git
cd dtc
make
Add this to your PATH. For example
export PATH=$PATH:/<add the path here>/dtc/dtc
To test try dtc -help.
cd .. git clone git://github.com/Xilinx/u-boot-xlnx.git cd u-boot-xlnx
export CROSS_COMPILE=arm-xilinx-linux-gnueabi-
make zynq_zc702_config
make
The u-boot (to be renamed u-boot.elf) will be placed at u-boot-xlnx directory.

Step 2: Creating XSCT script:

Code Block
themeMidnight
connect
source ps7_init.tcl
targets -set -filter {name =~ "APU"}
ps7_init
ps7_post_config
targets -set -filter {name =~ "ARM Cortex-A9 MPCore #0"}
dow -data BOOT.BIN 0x08000000
dow u-boot.elf
con
Copy the contents above into a TCL file, and source this from XSCT (This is a SDK utility).
Note: I used the ps7_init.tcl. This can be generated in the SDK
This will boot uboot on a serial port (baud 15200)

Step 3: Using U-boot commands to program the QSPI

Code Block
themeMidnight
sf probe 0 0 0
sf erase <image file size in bytes (hex)>
sf write 0x08000000 <offset in hex> <image file size in bytes (hex)>
Change the Boot Mode and POR_B to test.

Related Links