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: 
Highlighted
Observer etexley
Observer
299 Views
Registered: ‎09-20-2017

How to select SD-0/1 as primary in FSBL on Zynq 7000 SOC?

Jump to solution

Hi to those concerned,

I'm trying to force FSBL to make SD Controller {0,1} number 1 primary on boot.  I'm loading my FSBL from QPI boot mode, and booting from a low-speed eMMC card.

In my project, first I export the HDF from vivado.  Then i take these steps:

1)  Open HW design (pointing at the exported HDF File.)

2)  xsct:  hsi create_sw_design sw_design_1 -proc ps7_cortexa9_0

3)  Include FFS Library: hsi add_library xilffs

4)  MMC Boot Mode: hsi set_property -name APP_COMPILER_FLAGS -value "-DMMC_SUPPORT" -objects [hsi current_sw_design]

5)  Export the FSBL COde

6)  Make.  Everything builds.

But how do i enforce SD 1 not 0? I looked at the source carefully, it's not obvious to me.  There is a function InitSD("0:")  which is called with a string.  is this string pointing at the controller?

 

Thanks and regards, Eric T

0 Kudos
1 Solution

Accepted Solutions
Observer etexley
Observer
212 Views
Registered: ‎09-20-2017

Re: How to select SD-0/1 as primary in FSBL on Zynq 7000 SOC?

Jump to solution

Well that took some digging through the FSBL source.  As of this release:

xilffs_v3_7

In addition to settting MMC_SUPPORT, in this file:

zynq_fsbl_bsp/ps7_cortexa9_0/libsrc/xilffs_v3_7/src/ff.c

I forcibly map the SD partition to the #1 controller (0 based)

fs->fs_type = 0U; /* Clear the file system object */
fs->drv = 1;
stat = disk_initialize(fs->drv); /* Initialize the physical drive */

Bango!  Now I can split my out my FSBL to QSPI and the rest of my partitions to eMMC.

Since every reference design I see has the emmc mapped to the 1st controller (MIO 10-15) I would think this would be documented somewhere?

 

0 Kudos
2 Replies
Observer etexley
Observer
267 Views
Registered: ‎09-20-2017

Re: How to select SD-0/1 as primary in FSBL on Zynq 7000 SOC?

Jump to solution

I generated the FSBL code twice with Petalinux...once with SD Controller 1, the other with SD Controller 2.  I diffed the code bases, but I don't see a difference.  Is there a compiler switch being used that I'm not seeing?

0 Kudos
Observer etexley
Observer
213 Views
Registered: ‎09-20-2017

Re: How to select SD-0/1 as primary in FSBL on Zynq 7000 SOC?

Jump to solution

Well that took some digging through the FSBL source.  As of this release:

xilffs_v3_7

In addition to settting MMC_SUPPORT, in this file:

zynq_fsbl_bsp/ps7_cortexa9_0/libsrc/xilffs_v3_7/src/ff.c

I forcibly map the SD partition to the #1 controller (0 based)

fs->fs_type = 0U; /* Clear the file system object */
fs->drv = 1;
stat = disk_initialize(fs->drv); /* Initialize the physical drive */

Bango!  Now I can split my out my FSBL to QSPI and the rest of my partitions to eMMC.

Since every reference design I see has the emmc mapped to the 1st controller (MIO 10-15) I would think this would be documented somewhere?

 

0 Kudos