ptpatel wrote on Wednesday, September 05, 2018:

I am just adding the FreeRTOS to our existing project.

I have noticed that there are two places the SysTick_Handler is used, one in libchip provided by Atmel and another in FreeRTOS port.c file.

In the FreeRTOSConfig.h file, it is define as the following.

/* Redefine functions names to match the standard peripheral library */
`#define xPortSysTickHandler     SysTick_Handler`

Please guide me , what is the best approach to handle this?

Function SysTick_Handler() defined in the following two files:
“C:\MyProject\Atmel Provided\libchip\source\timetick.c”
“C:\MyProject\Third Party\RTOS\freertos\portable\iar\arm_cm7\r0p1\port.c”

Thank you.

rtel wrote on Wednesday, September 05, 2018:

I’m afraid I don’t know what libchip is doing with the interrupt, so I
don’t know if the interrupt is required or not. Normally FreeRTOS would
have exclusive use of the SysTick handler as it is intended for use by
an RTOS implementation. If the implementation in libchip is not
declared ‘weak’, and therefore replacable by the FreeRTOS
implementation, and it is essential that you use the implementation in
libchip (I don’t know what your application is or what resources it
needs) then you can share the interrupt by making use of the tick hook
function. To do that, install the FreeRTOS version of the systick
handler, then call the libchip handler function from
vApplicationTickHook(). See