I am trying to use the latest FreeRTOS distribution instead of one shipped with CubeMX and wrapped around CMSIS.
I read the freertos guides and I understood how non-trivial is to deal with interrupts, and I think I followed all the steps (e.g. use 0 bits for sub-priority, don’t leave the default priority to 0 which is the higher, and so on) but here is yet another questions.
It seems that from CubeMX in the tab NVIC/Code Generation some tick boxes under the column “Generate IRQ Handler” shall be disable, otherwise one may incur in some double “already defined” error like the following:
C:/Users/yt75534/Documents/embedded/stm32_platform/Hello_World/freertos/portable/GCC/ARM_CM4F/port.c:252: multiple definition of `SVC_Handler’; build/stm32f4xx_it.o:C:/Users/yt75534/Documents/embedded/stm32_platform/Hello_World/Core/Src/stm32f4xx_it.c:154: first defined here
That is, by selecting “Generate IRQ Handler” a placeholder like the following (assume that I checked the box relative to EXTI10_15 interrupt):
void EXTI15_10_IRQHandler(void)
{
/* USER CODE BEGIN EXTI15_10_IRQn 0 */
/* USER CODE END EXTI15_10_IRQn 0 /
HAL_GPIO_EXTI_IRQHandler(B1_Pin);
/ USER CODE BEGIN EXTI15_10_IRQn 1 */
/* USER CODE END EXTI15_10_IRQn 1 */
}
is automatically added to Core/Src/stmf4xx_it.c.
Now my question are
-
how do we know which tick boxes under the column “Generate IRQ Handler” shall be disabled to be able to work with freertos and avoid the errors of above?
-
Shall we set the preemptive priorities >0 for ALL the listed interrupts?