这是一种启动文件报错,祖传项目中经常出现,原因在于多种编译版本不兼容
精髓在于第一选对编译器用6.x版本编译器;
第二在做好相关arm的设置
参考arm官网解决:ARMCC: error A1167E: Invalid line start, A1163E unknown opcode...
Article ID: KA002247
Applies To: Arm Compiler 5, Keil MDK
Confidentiality: Customer Non-confidential
Information in this knowledgebase article applies to:
-
Keil MDK 5
-
NXP example projects
SYMPTOM
I have selected one of the NXP example projects, offered by the Pack Installer of Keil MDK.
Building this project results in a list of errors messages like:
... error: A1167E: Invalid line start
... error: A1163E: Unknown opcode MIMXRT1062 , expecting opcode or Macro
CAUSE
Some default tool settings have been changed with Keil MDK 5.30, which causes an incompatibility to several NXP packs, offering, i.e. examples projects.
Those now contain a mixture of assembly source files using GNU Assembler syntax (e.g. startup_MIMXRT1062.s) and Arm syntax (e.g. irq_cm4f.s).
RESOLUTION
With MDK 5.30 (and later):
-
configure your project for the Assembler Option: armclang (Autoselect)
With an earlier version than MDK 5.30:
-
select the option Assemble by using ArmClang V6
-
configure Misc Controls to -masm=auto