Showing results for 
Show  only  | Search instead for 
Did you mean: 

Running your programs on the MicroZed – Adam Taylor’s MicroZed Chronicles, Part 4

Xilinx Employee
Xilinx Employee
0 2 148K

So far in this series we have looked at creating the hardware system on the MicroZed board, setting up the software environment, and understanding the “hello world” program example. After three blogs it is time to pull this all together and get something running on the MicroZed so that you can see the results. We can use one of two methods to do this. We can use SDK to download and run the application in the Zynq All Programmable SoC’s on-chip RAM over a JTAG link or we can program a non-volatile memory and use a boot loader running on the Zynq SoC to load our application.


To keep things nice and simple in this blog post, we will download the application to RAM over the JTAG link. That’s the simpler of the two options and it’s of more use during debugging, at least initially.


The first step is to create a new run configuration: “project explorer -> project -> run -> run”, accessed from the right-click menu. This new configuration is created under the C/C++ ELF type on the left side of the dialog box:



Figure 1 Creating a new project configuration.jpg




Once we have created a new configuration, we can define our STDIO connection as the serial port that we will use for the STDIO—if any—along with processor reset options and debug / profiling options. (I tend to use a standalone terminal program for debugging.)



Figure 2 Setting the Debug Options.jpg



Once we are happy with the configuration, we can apply and then close it. However, at this point we’re not yet ready to run anything. There’s one more step.


The final step is to connect the MicroZed board to our PC and program the Zynq by downloading the previously compiled software. First, we connect both the JTAG cable and the USB (RS232) power cable to the MicroZed. Following this we can program the hardware via the JTAG connection using the “Xilinx tools -> program FPGA” option, which checks that the bit file is the correct one and then programs the device.


Before we download the software we must ensure we have a terminal program open on the PC so that we can see communications from the MicroZed board. We set the UART to 115200 baud, no parity, and one stop bit.


Having completed the configuration we can now download our ELF file and try out our program. This is as simple as selecting our project within the project explorer, right clicking, selecting “Run As”, and then “Launch on Hardware.” If we had not previously built or compiled our code, this procedure would automatically build our design for us, provided it is error free.



Figure 3 Running the Program using Launch on Hardware.jpg




When you initiate the program launch, you will see a progress bar within SDK. Once the download completes, you should see the output from your application in the terminal window. Hopefully, it looks something like this:



Figure 4 Debug monitor in terminal window.jpg




In my next blog we will create a First Stage Boot Loader so that we can boot the MicroZed from non-volatile memory.



Note: Please see the previous entries in this series by Adam Taylor:


Zynq and MicroZed say “Hello World”-- Adam Taylor’s MicroZed Chronicles, Part 3


Adam Taylor’s MicroZed Chronicles: Setting the SW Scene


Bringing up the Avnet MicroZed with Vivado





Tags (2)