System call service

Hello,
I´m trying to implement a svc stm32cubeide but vPortSVCHandler functions only sends (when it is called) the svc number 0
__asm volatile (
" ldr r3, pxCurrentTCBConst2 \n" /* Restore the context. /
" ldr r1, [r3] \n" /
Use pxCurrentTCBConst to get the pxCurrentTCB address. /
" ldr r0, [r1] \n" /
The first item in pxCurrentTCB is the task top of stack. /
" ldmia r0!, {r4-r11, r14} \n" /
Pop the registers that are not automatically saved on exception entry and the critical nesting count. /
" msr psp, r0 \n" /
Restore the task stack pointer. */
" isb \n"
" mov r0, #0 \n"
" msr basepri, r0 \n"
" bx r14 \n"
" \n"
" .align 4 \n"
“pxCurrentTCBConst2: .word pxCurrentTCB \n”
);
When I don´t use the Freertos I can implement my SVC routine and all the process works.
Should I modify the vPortSVCHandler?? Thank you

You would have to modify the code to use a service call interface. You can see an example of how to do that in the ports that support memory protection here:

https://sourceforge.net/p/freertos/code/HEAD/tree/trunk/FreeRTOS/Source/portable/GCC/ARM_CM4_MPU/port.c#l241

https://sourceforge.net/p/freertos/code/HEAD/tree/trunk/FreeRTOS/Source/portable/GCC/ARM_CM4_MPU/port.c#l260