[STM32F2]

报错A Label was found which was in no AREA,求指点,谢谢!

[复制链接]
3336|1
手机看帖
扫描二维码
随时随地手机跟帖
qiankunpzh|  楼主 | 2017-11-16 09:34 | 显示全部楼层 |阅读模式
工程使用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

网上有些说不能顶格编写,现在是否顶格都有错误,请大神指导下,如何解决这个问题,谢谢!!
john_lee| | 2017-11-16 15:18 | 显示全部楼层
你这是想用 keil MDK来编译 iar 的文件吗?

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

13

主题

41

帖子

0

粉丝