ISSUE:Keil5新建STM32项目,编译时报错

  • “stm32f10x_conf.h”: No such file or directory

    C:\Keil_v5\ARM\PACK\Keil\STM32F1xx_DFP\2.1.0\Device\Include\stm32f10x.h(8302): error: #5: cannot open source input file “stm32f10x_conf.h”: No such file or directory

  • Could not open file .\objects\demo.o

    .\Objects\demo.axf: error: L6002U: Could not open file .\objects\demo.o: No such file or directory

  • no section to be FIRST/LAST.

    .\Objects\demo.sct(7): error: L6236E: No section matches selector - no section to be FIRST/LAST.

  • Cannot find argument ‘Reset_Handler’.

    .\Objects\demo.axf: Error: L6320W: Ignoring —entry command. Cannot find argument ‘Reset_Handler’.

以上所有的问题,都是因为新建项目时选择组件库时忘记添加Device下的Startup组件了,如图:
Keil5中添加Startup组件库