Xilinx FreeRTOS vApplicationIRQHandler()

Hi,

we are using Zynq7000 and FreeRTOS for a project. So far we could adapt everything in from the bsp for our needs but we need FPU safe interrupts. In the ‘portZynq7000.c’ there is a auto-genreated vApplicationIRQHandler() implementation. I do not see any possibly to get rid of this so we basically cannot get FPU safe interrupts with the xilinx FreeRTOS domain/bsp?

Another idea would be to compile FreeRTOS as a static library and use this in our “bare metal” C++ application but I cannot launch the resulting application this with Vitis TCF services (GDB is working).

Is there any way to get FPU safe interrupts using the xilinx FreeRTOS domain/bsp?

Thank you!

Sorry - I’m not familiar with this platform. Maybe this related documentation can give some hints ?

If the tool can’t generate the project with the necessary interrupt handler then you can create a baremetal/standalone BSP then add in the FreeRTOS files in manually. That is what the Zynq demo in the official FreeRTOS download does (still using XSDK). https://www.freertos.org/RTOS-Xilinx-Zynq.html

1 Like

Thank you for your quick replies.

The problem is that our application is in C++ (we are migrating from another OS). I do not think you can compile and link FreeRTOS and a C++ application as one project.

As you proposed, it is probably the only way adding the FreeRTOS files manually as a library to a baremetal C++ aplication.

@StefanBa Others and I have C++ apps and compile/link in FreeRTOS (C-)files.
The easiest and most common way of doing that is having different build/make rules resp. compile flags for *.c and *.cpp files.
But sure, you can also build a FreeRTOS library first as a separate build step.

1 Like

Thank you, I’ll look into it.

I realize this is a bit late, but when I run into this sort of thing, I have been going to the installed repository (/Vitis/2021.2/data/embedded/thirdparty/…) and making changes to the sources.
For this particular thing, I renamed their interrupt handler and added a #pragma to create a weak alias with the original name, then I defined my own in my code and the linker used mine rather than the default one.
This may not work well for all situations, and you have to make sure you make the change again if you upgrade the FreeRTOS version (or install a later version of Vitis). For the drivers, I was able to have a local repository, but I’ve had little luck with overriding the FreeRTOS location to pull from my own directories.