keil5 error: A1167E: Invalid line start 解决办法

在keil5  利用STM32F10x_StdPeriph_Lib_V3.5.0 库创建了stm32f103的工程

出现如下错误

CMSIS\startup\gcc_ride7\startup_stm32f10x_md.s(1): error: A1167E: Invalid line start
CMSIS\startup\gcc_ride7\startup_stm32f10x_md.s(2): error: A1137E: Unexpected characters at end of line
CMSIS\startup\gcc_ride7\startup_stm32f10x_md.s(3): error: A1159E: Label missing from line start
CMSIS\startup\gcc_ride7\startup_stm32f10x_md.s(4): error: A1159E: Label missing from line start
CMSIS\startup\gcc_ride7\startup_stm32f10x_md.s(5): error: A1159E: Label missing from line start
CMSIS\startup\gcc_ride7\startup_stm32f10x_md.s(6): error: A1159E: Label missing from line start

CMSIS\startup\gcc_ride7\startup_stm32f10x_md.s(7): error: A1159E: Label missing from line start

经过排查发现了问题的所在

在库文件如下的路径下       STM32F10x_StdPeriph_Lib_V3.5.0\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x    有一个startup文件夹,如下图所示




在startup文件夹下有根据不同的开发环境提供的不同版本的启动文件

如果采用的开发环境是keil ,那么应该选择arm文件夹下对应的启动文件,如下图所示