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!

Adam Taylor’s MicroZed Chronicles: Setting the SW Scene

by Xilinx Employee ‎10-07-2013 10:33 AM - edited ‎02-06-2014 01:11 PM (42,431 Views)

By Adam Taylor – APTaylor@theiet.org

 

In my last blog (Bringing up the Avnet MicroZed with Vivado) I focused upon creating the MicroZed system using the Vivado Design suite. I’d progressed as far as creating the bit file, which is needed for device configuration. The next step is to export the system hardware definition to the Software Design Kit (SDK) to allow the software engineering team to write the application code for the processing system side of the Zynq All Programmable SoC.

 

This is a very simple task, achieved by using the export function under the File->Export->Export Hardware for SDK Option as seen below:

 

Photo 1 File Export Hardware screen.jpg 

 

 

The “Export Hardware” function creates a folder under the SDK_Export directory within your project that defines the hardware definition of the system. This should automatically be imported into SDK but if it is not, you can create a new hardware specification underneath the File->New->Other option, which allows you to point it to your exported hardware definition.

 

 

Photo 2 Hardware Platform Specification screen.jpg 

 

A project within the SDK designed to run upon the Zynq requires three different definitions:

 

  • Hardware Definition (uzed_hw), which defines the system hardware definition. This definition contains a file called system.xml that defines the makeup of your system: the address map, IP blocks present, and the device type. You will also see the configuration bit file that we will need later when we discuss configuration.

 

  • Board Support Package (uzed_bsp), which contains the drivers needed to support the IP block within the design. The BSP mainly consists of C include files. Here the file system.mss defines the BSP settings. This file will also contain links to the drivers for the IP blocks and provides examples of how to use them. Within the include file here you will find Xparameters.h, which defines your system in great detail.

 

  • The application itself (uzed_app). This is where you will actually put the software application.

 

The project definitions reference each other in progression with the Hardware Definition being the lowest level. The Hardware Definition is referenced by the BSP which in turn is referenced by the application.

 

Once we have imported the hardware project, we need to create a new BSP for our MicroZed. The simplest way to do this is by selecting File->New->Board Support Package, which allows you to select the name of the BSP, the processor upon which the application will run, and most importantly the hardware platform definition that you just imported.

 

 

Photo 3 BSP Project screen.jpg

 

 

Having created the Hardware Platform definition and the BSP, we’re ready to create the main application program using File->New->Application Project.

 

 

Photo 4 Application Project screen.jpg

 

 

This screen lets you select the project name, the hardware platform and processor to be used, along with the board support package selection we created earlier. As this is a bare-metal implementation, we leave the OS Platform as standalone.

 

 

Photo 5 Template screen.jpg

 

The next stage is to select the project type we want. Selecting the simple “Hello World” application will automatically create all that you need to get the Zynq up and running on the MicroZed board.

 

Under the application project (used_app) within the SRC directory, you will notice a number of files. The one named helloworld.c contains the program main function which initializes the platform and runs the application.

 

It is this file we will be modifying in the next blog so that we can finally run it on the MicroZed.

 

 

 

Labels
About the Author
  • Be sure to join the Xilinx LinkedIn group to get an update for every new Xcell Daily post! ******************** Steve Leibson is the Director of Strategic Marketing and Business Planning at Xilinx. He started as a system design engineer at HP in the early days of desktop computing, then switched to EDA at Cadnetix, and subsequently became a technical editor for EDN Magazine. He's served as Editor in Chief of EDN Magazine, Embedded Developers Journal, and Microprocessor Report. He has extensive experience in computing, microprocessors, microcontrollers, embedded systems design, design IP, EDA, and programmable logic.