I am using FreeRTOS with STM32G0 series. I created two tasks in the beginning it goes to two task but after couple of times it always stuck in one task

The startup code will contain a “Weak” definition for the vector that the code should be overriding. If the vector that got loaded still points to the weak one in the startup code, then your code didn’t replace the vector because it didn’t get the right name.

For interrupt handlers to get the right name, they need to be compiled as a “C” function, either being in code compiled as a .c file using a C compiler, or within a

extern "C" {

section of code. The SVC_Handler should be from the port.c file compiled with a C compiler.

The same is true of any function called by name by FreeRTOS, like with the “Application” prefix.

Thanks a lot @richard-damon the solution you provided helped and made it work .

Thank you @aggarg for your fast replies and the help .