Search code examples
openocdjtagmicroblaze

MicroBlaze without Vitis


Has anyone managed to connect a MicroBlaze instantiated in a Xilinx FPGA to anything other than the Xilinx tools (SDK or Vitis) for download and debugging?

I'm targeting a VCU29 and have licenses from Xilinx for Vivado etc; I have already extracted the libraries, source and GCC tools and constructed a makefile that will build my applications.

I'm resigned to using Vitis to load the initial bitfile but would really like to download the code and operate the JTAG from a tool that better matches SW development flow - Eclipse with OpenOCD? Perhaps over the built-in USB->Serial->JTAG interface? I believe I'd be content with just the interface offered through GDB.

I'd really like to know if anyone has tried this with either success or failure or maybe has one of those "Why don't you just..." lateral thinking ways of solving the problem.


Solution

  • Yes, my team does not use Vitis or SDK to build, deploy, or connect to MicroBlazes.

    If you generate your BSP and a linker script with Vitis, you can then build using mb-gcc and link with mb-ld directly. To get these into your PATH, just source the settings script that Xilinx provides with their tools in <Vitis_root>/settings64.sh.

    As for loading and debugging - if you source the same script, then you will have access to xsdb. Once you have XVC running (i.e. connecting to your board with Vivado HW manager), then you can launch xsdb and inside run connect or connect -xvc-url <host>::<port> if you are running on a different host. While connected, you can run targets to identify your MicroBlaze, and then select the MicroBlaze with target 5.

    While you have the MicroBlaze selected, you can load <path to elf> and run a number of debugging commands. Just run help while connected to see your options.