Remove the other definitions which most probably should be in a file named like stmxxxxx_it.c
.
If you are using STM32Cube IDE, the best way to generate a FreeRTOS project is to follow the following steps:
- Enable FreeRTOS in the configuration tool:
Middleware --> FreeRTOS --> Interface
. - Change HAL Tick from SysTick to some other timer (say TIM6):
System Core --> SYS --> Timebase Source
.
If you follow these steps, the generated stmxxxxx_it.c
file will be correct and won’t have duplicate symbols.
If you then want to replace FreeRTOS with the latest version, you can replace in the Middlewares\Third_Party\FreeRTOS
directory in the generated source.
The default generated project will have CMSIS wrapper which is not necessary - you can delete it and directly use FreeRTOS APIs.
Thanks.