The source file generated by STM32CubeMX can be accessed in the MDK project window, source group STM32CubeMX:Common Sources. These file require the following modifications.
Changes to 'stm32fxxx_it.c'
CMSIS-Driver and CMSIS-RTOS RTX implement their own interrupt handlers.
- For using CMSIS-RTOS RTX remove the code of the SysTick_Handler.
- For using CMSIS-Driver remove the code of the related Interrupt Handler.
- Note
- STM32CubeMX re-generates this file and it is required to remove the interrupt handlers after using Generate Code.
Changes to 'main.c'
- CMSIS-Driver initialize peripherals using dedicated functions that are called by middleware. Initialization code in 'main.c' for the related peripherals is therefore not required and may be removed.
- CMSIS-RTOS RTX requires initialization code. Refer to Add CMSIS-RTOS RTX for detailed information.