工程使用keil5编译。其中startup_stm32f2xx.s文件总报错。
当下面代码不顶格编译时:
MODULE ?cstartup
;; Forward declaration of sections.
SECTION CSTACK:DATA:NOROOT(3)
SECTION .intvec:CODE:NOROOT(2)
EXTERN __iar_program_start
EXTERN SystemInit
PUBLIC __vector_table
DATA
__vector_table
报错:
EWARM\startup_stm32f2xx.s(39): error: A1163E: Unknown opcode MODULE , expecting opcode or Macro
EWARM\startup_stm32f2xx.s(42): error: A1163E: Unknown opcode SECTION , expecting opcode or Macro
EWARM\startup_stm32f2xx.s(44): error: A1163E: Unknown opcode SECTION , expecting opcode or Macro
EWARM\startup_stm32f2xx.s(48): error: A1163E: Unknown opcode PUBLIC , expecting opcode or Macro
EWARM\startup_stm32f2xx.s(50): error: A1159E: Label missing from line start
EWARM\startup_stm32f2xx.s(51): error: A1355U: A Label was found which was in no AREA
如果将上述代码顶格编译,代码如下:
MODULE ?cstartup
;; Forward declaration of sections.
SECTION CSTACK:DATA:NOROOT(3)
SECTION .intvec:CODE:NOROOT(2)
EXTERN __iar_program_start
EXTERN SystemInit
PUBLIC __vector_table
DATA
__vector_table
这样,报错只有一条:
EWARM\startup_stm32f2xx.s(51): error: A1355U: A Label was found which was in no AREA
网上有些说不能顶格编写,现在是否顶格都有错误,请大神指导下,如何解决这个问题,谢谢!!
|