If you haven’t tried other methods online, you can go directly to step four.1) After generating the project files from MX, open them in Keil5, compile, and you will encounter the following error:
01_FREETOS_my\01_FREETOS_my.sct(7): error: L6236E: No section matches selector - no section to be FIRST/LAST.
There is a missing startup file, but when MX generates the project files, there is actually a startup file located at\MDK-ARM\RTE\Device\STM32F103C8as shown in the image below, with a .s suffix file
2) There is a claim online that by checking the startup item in project management, the startup file will naturally appear in the file tree on the left.
After checking, I recompiled and found that it resulted in an error
01_FreeRTOS_my\01_FreeRTOS_my.axf: Error: L6200E: Symbol SystemCoreClock multiply defined (by system_stm32f10x.o and system_stm32f1xx.o).
3) After researching, it may be necessary to comment out these three segments of code in the startup file.
4) Still useless, I tried the second solution, adding the startup file here and unchecking the option from the previous step, then recompiling, and it worked √
5) In addition, it seems thatSTM32Cube v1.8.5 needs to be associated with CMSIS V2.0 to utilize the features and capabilities of CMSIS V2.0 during the development process, better adapting to the specific project requirements.