After creating the
initialization PDI, use the following steps to program the eMMC.
- Open the AMD Vivado™ Hardware Manager and connect to a hardware target as described in the previous sections.
- After connecting to the hardware target, add the configuration
memory device by right-clicking the hardware target and selecting Add Configuration Memory Device.
- When the Add Configuration Memory Device dialog box appears,
select the appropriate memory device and click OK.
- The configuration memory device is now added to the hardware target. To continue, the Vivado device manager prompts "Do you want to program the configuration memory device now?". Click OK to continue.
- In the Program Configuration Memory Device window, set the
fields in this dialog box appropriately:
- Files to load
- Boot images go here. You can create these files by using the Vivado IDE or Bootgen/Vitis IDE/PetaLinux (if adding Software partitions). The Vivado IDE warns if the name of the file is anything other than the recommended boot.bin.
- Initialization PDI
- The path to the PDI to boot the device before programming. It is recommended to use a small size, simple PDI. In the design, you must configure the CIPS-MIO for the appropriate eMMC primary boot.
- Partition type
- Specifies which physical partition of the eMMC
device the image is written to. eMMC devices expose three distinct
addressable partition regions:
- FAT32
- The User Partition is formatted with a
FAT32 file system partition. The boot image is stored as
a named file (for example, boot.bin) within this partition. The Vivado IDE uses the
U-Boot
fatwritecommand to place the file. This is the most common configuration for Zynq UltraScale+ and Versal designs because it allows the file to be updated or replaced without raw block addressing. The BootROM or U-Boot can locate it by filename. Also specify a partition size to define the size of the FAT32 partition. - RAW_BOOT_1
- The dedicated Boot Partition 1 (BOOT1) of the eMMC device. eMMC devices include two small, dedicated hardware boot partitions (BOOT1 and BOOT2) that are separate from the user partition. These partitions are fixed in size (vendor-defined, typically 4–16 MB) and can be selected as the boot source in the eMMC Extended CSD register. The SoC BootROM reads directly from BOOT1 at power-on when the eMMC is configured as the primary boot device. Data is written as raw binary blocks and no filesystem is used.
- RAW_BOOT_2
- The dedicated Boot Partition 2 (BOOT2) of the eMMC device. Structurally identical to BOOT1 but accessed as a separate partition. BOOT2 serves as a redundant or golden image backup. The SoC boot mode register can be configured to prefer BOOT1 or BOOT2. Some production flows write identical images to both for failsafe boot.
- RAW_USER
- The User Partition accessed as raw blocks without any filesystem. The image is written as a contiguous binary starting at block 0 of the user area (or at the byte offset specified by PROGRAM.BIN_OFFSET). Used when a custom partition layout is required, when the BootROM is configured to boot from a raw image in the user area, or when writing a redundant copy at a specific offset that does not correspond to either boot partition.
- Partition size
- Applies to FAT32 partition type only. Specifies the size of the FAT32 partition to be created in the eMMC user partition. Select a size that comfortably fits all the files that will reside in the partition (boot image, any additional binaries), with some headroom.
- Erase
- eMMC is based on NAND flash but presents a block device interface managed by an internal controller. The eMMC controller handles internal erase and wear leveling transparently. The host is not required to pre-erase blocks before writing. The erased state of eMMC blocks is 0x00 (not 0xFF as with NOR flash).
- Blank Check
- Checks the configuration memory device to make sure the device is void of data before programming.
- Program
- Programs the configuration memory device with the selected device image (PDI).
- Verify
- Verifies the configuration memory device contents match the selected device image (PDI).
- Click OK to start the
selection operations on the configuration memory device. Note: Clicking Apply stores the configuration memory settings but does not program the configuration memory device.