This document describes how to program MicroBlaze using Xilinx Vitis. It serves as the follow-up of the Part 1 guide, as well as a guide to run SoftECI program after building the bitstream using Vivado.
Target Vitis 2022.1. Vitis 2023.1 Unified IDE has different layout, while switching to the old layout is possible.
Create project and application
The following tutorial video (starting from 9:30) gives a concise tutorial of creating a Vitis Platform Project. A quick summary:
- Create a Platform Project. Use the .xsa file exported from Vivado.
- Nov 26, 2023: If Vitis GUI doesn't respond when "create platform project" is clicked, create an application project instead. During the process, there is a chance to create a platform with the .xda file.
- Use the default domain. Right click on the platform in the Explorer to build the project.
- Create an Application Project. Use the existing domain.
From the hello world template project as described in the video.
Change the UART Baud Rate to 115200 in platform.c:
Add enzian-gateway as the Hardware Manager
The tutorial video runs the application with the FPGA connected locally. For Enzian, the FPGA sits remotely.
On the top tool bar, click “Launch Target Connections”. Add a remote hardware manager of enzian-gateway.
Program FPGA bitstream
The video above shows how to program FPGA using menu Xilinx - Program Device. When doing that for Enzian, you need to select the correct device, or you can accidentially re-program others’ FPGAs!
The list of devices can take a while to show.
The list of the machines, their hostnames, JTAG IDs and their configuration: Cluster Info
Add run/debug configuration
Run/Debug
Switch to the Debug layout on top right corner of Vitis, you could see debug console on bottom right. There should be hello wolrd message display if you enable JTAG UART.
On enzian-gateway, you should see the console output if you already ran the command "console zuestollxx-fpga".
To avoid doing this using GUI (where you might get other people's breakpoint info on the same JTAG server), you could try using XSCT, and its TCL scripts to automate the process, detailed here.