RTOS runs in debugger not in bitstream

I have a freeRTOS build targeting a microblaze controller on a KCU105 development board. When I run it through Vitis in debug mode it works perfectly, however if I try to include the .elf file in Vivado, rebuild the bitstream, and download to the FPGA I get no output.

There seems to be plenty of information on how to get freeRTOS up and running in SDK/Vitis, but not a lot on how to build a release version. Is there an obvious step I’m missing?

I’ve stripped it back to the freertos_helloworld application that comes with Vitis/SDK but still no luck with including it in a bitstream.


I am not familiar with that particular processor, but one thing to watch out for is that the ‘release’ build includes all needed initialization in the boot code. When debugging, there is a lot of processor setup that the debugger does in order to connect, you need to make sure that the startup code that is used before main starts does this.

One good first step is first make a new project with just some very simple program that doesn’t use FreeRTOS and make sure that it can startup and run, to make sure you have the basic tools configured right.

Not sure about Microblaze, but on the Zynq there is a setup function that is executed by the debugger when you start the code via the debugger that must instead be executed by the C startup code when you execute the code ‘standalone’. I think it is called ps2_init(), or something like that - so in that case specific to the Zynq but maybe there is an equivalent?

Need to learn how to create a FreeRTOS project in Vitas. With the older tools I could just use the SDK and pre-build hardware images without needing to touch the FPGA tools.

Thanks for the suggestions.

It turns out the automatically generated linker script was putting the whole program in external DDR4 rather than local memory. Thich was fine with the debugger there to write to the DDR, but without the debugger it needed a bootloader to copy the RTOS image across.