Creating an SDSoC Platform
Introduction
The SDSoC Platform Utility simplifies the creation of SDSoC platforms. The platform utility exists in two parts: a simple form-like GUI for entering platform data and locating platform files, and a command-line utility that produces the platform as defined by the options.
SDSoC Platform Utility
sdspfm -gui
- Base Info: The base information related to the platform name and the Vivado hardware project.
- Processor Information: Specifies the type of processor found in the platform as defined in the Vivado hardware design.
- Boot Info: As it relates to the Operating System data and the Compiler Settings for include paths and libraries to link against.
Figure:SDSoC Platform Utility
![](http://www.rushcopely.com/html_docs/xilinx2017_1/sdsoc_doc/topics/images/ug1146_images/sdsoc_platform_utility.png)
- Platform Name: Must match the name of the Vivado project and the IP Integrator block diagram. (REQUIRED)
- Output Directory: Specifies a top-level platform repository, where the newly created platform directory will be written. (REQUIRED)
- Vivado Project: Specifies the Vivado project file (
.xpr
) containing the hardware platform as defined inHardware Platform Creation. (REQUIRED) - Platform Tcl: Script file that contains the platform clocks and ports exposed to SDSoC as defined inSDSoC Tcl Commands in Vivado(REQUIRED)
- Samples Directory: A directory containing any sample applications associated with the platform and the user-created
template.xml
file as defined inPlatform Sample Applications. (OPTIONAL)
TheProcessor Informationdefines the available types of processors for the platform. The types of processors available is configured based on the device chosen in the Vivado project. For example, if a Zynq-7000 device such as the XC7Z020 part is chosen in the Vivado project then the GUI will only show an ARM Cortex-A9 processor type. However, if a Zynq MPSoC device such as the XCZU9 part is chosen then the GUI will show both ARM Cortex-A53 and ARM Cortex-R5 processor types. This allows the user to create a platform targeting just the A53 or R5 cores, or both as desired.
SDSoC only allows projects to be built targeting core #0 of any processor (Cortex-A9, Cortex-A53, or Cortex-R5). This means that you can have a standalone project on a9_0, but not a standalone project on a9_1. In another case, you can have Linux on both cores a9_0 and a9_1 but SDSoC doesn’t need to know that Linux also uses a9_1. This limitation is mainly due to the fact that the FSBL must run on core #0 to initialize all cores in the processor, regardless of which core your application/OS runs on.
- Config ID: The ID of the OS/Boot configuration. The SDSoC Platform Utility allows platform developers to produce platforms with multiple build configurations. Each build configuration specifies: an OS, a processor type, and a set of boot files/settings. The Config ID identifies the build configuration, and must be unique for each build configuration in the platform. The Config ID must be made up of an alphanumeric string with underscores or dashes only (no spaces or special characters). When creating an SDSoC Makefile project, this ID is passed into the option-sds-sys-config
. (All OSes) - Config Name: The name of the OS/Boot configuration. The user-defined Config Name must be unique for each build configuration in the platform. The Config Name must be made up of an alphanumeric string with spaces, parentheses, underscores or dashes only. When creating an SDSoC project in the SDSoC Development Environment IDE this name is displayed in the project creation wizard.
- BIF File: the Boot Information File (BIF) contains information such as which ELF file to load on which processor (ie. FSBL runs on core 0), how the bitstream should be loaded, and any other sub-programs which must run to configure the processor (such as the ARM Trust Zone bl31.elf, or u-boot.elf, etc.). It is assumed that any files referenced in the BIF file will be in the directory specified by theBoot Directoryfield.
- Readme File: This file is required by SDSoC to inform users of the platform how to boot an application for this boot configuration on the platform. It is a plain text file that contains instructions to the user, for setting the boot mode switches on the board for example.
- Image Directory: A directory containing any OS image files that must be copied to the SD card. This directory should include the
image.ub
file for Linux, or a set of Linux files:image.gz
,ramdisk
,devicetree.dtb
. This is required for Linux only. - Linker Script: A file that allows the programmer to control how the sections are merged in the ELF, and at what locations they are placed in memory. It also allows the user to specify how much of DDR memory is allocated for the stack and heap. This is required for FreeRTOS and Standalone Only.
- Boot Directory: A directory containing any files referenced in the BIF file such as the FSBL, U-Boot, ARM Trusted Firmware, etc.
Compiler Settings: For each OS Configuration, compiler settings for the platform can be specified with include paths, and libraries to link against. These directories and libraries will be copied locally into the output platform at the time of platform generation. Users can add multiple include paths and libraries .
Platform Generation
After configuring the settings for your SDSoC platform, click theGeneratebutton at the bottom of the SDSoC Platform Utility. This will start the process of copying and creating files, and generating metadata for your platform. If the output directory already exists, it will automatically be overwritten by the new platform files. You can regenerate the platform files as needed.
Utility Menus
- File: provides options for saving the current configuration, opening a previously saved configuration, , and exiting the utility.
- Export: provides an option to export the platform configuration as a Makefile. This takes all the data entered into the GUI and outputs a file containing a bare-minimum Makefile with the options to call the command-line utility to generate a platform. This option may be helpful for advanced users. The exported Makefile cannot be read back into the SDSoC Platform Utility, so you are advised to also save the configuration using the File > Save command in addition to exporting it to a Makefile.
Utility Command Line
Thesdspfm -help
command displays the following information:
Usage: sdspfm -xpr -pfmtcl [other options] Configuration Options: [-sds-cfg -sds-end] Required options: -arch : [cortex-a9, cortex-a53, cortex-r5, microblaze] -os : [standalone, freertos, linux] -name -id -bif -readme -boot -lscript : Only for Standalone/FreeRTOS OSes -image : Only for Linux OSes -inc : adds path to list of include paths (can use multiple times) -lib : adds path to list of library files (can use multiple times) -libfreertos : use custom FreeRTOS library,only for FreeRTOS OSes -incfreertos : use custom FreeRTOS includes, only for FreeRTOS OSes -qemu-args Optional Options: -o