Double Definition of port interrupt handlers using CubeIDE with GCC on STM32F4

Thank you everybody for your answers. I understand all your points, relying on CubeMX is not the best idea in a productive enviroment. However, due to limited time, I’m kind of stuck with the comfort of CubeMX and I will continue using it.

With some help of a coworker I found the easiest and best solution to my problem:
CubeMX offers a function to disable the auto-generation of certain interrupt handlers (IRQ handlers). This can be found in CubeMX under System Core → NVIC → Code generation. By unchecking the

“Generate IRQ handler” box for the “System service call via SWI instruction” (maps to ‘SVC_Handler’),

“Pendable request for system service” (maps to ‘PendSV_Handler’) and

“System tick timer” (maps to ‘SysTick_Handler’),

CubeMX will no longer auto-generate these functions. This way the functions can be redefined in FreeRTOSConfig.h and no double definition is occuring!

4 Likes