金牌会员
 
- 积分
- 1751
- 金钱
- 1751
- 注册时间
- 2014-7-11
- 在线时间
- 311 小时
|
3金钱
请问哪位遇见过这样的错误
assembling startup_gd32f30x_hd.s...
Library\Firmware\CMSIS\GD\GD32F30x\Source\ARM\startup_gd32f30x_hd.s(27): error: A1137E: Unexpected characters at end of line
Library\Firmware\CMSIS\GD\GD32F30x\Source\ARM\startup_gd32f30x_hd.s(28): error: A1137E: Unexpected characters at end of line
Library\Firmware\CMSIS\GD\GD32F30x\Source\ARM\startup_gd32f30x_hd.s(29): error: A1137E: Unexpected characters at end of line
Library\Firmware\CMSIS\GD\GD32F30x\Source\ARM\startup_gd32f30x_hd.s(30): error: A1137E: Unexpected characters at end of line
Library\Firmware\CMSIS\GD\GD32F30x\Source\ARM\startup_gd32f30x_hd.s(32): error: A1163E: Unknown opcode Default_Handler , expecting opcode or Macro
Library\Firmware\CMSIS\GD\GD32F30x\Source\ARM\startup_gd32f30x_hd.s(34): error: A1163E: Unknown opcode necessary , expecting opcode or Macro
Library\Firmware\CMSIS\GD\GD32F30x\Source\ARM\startup_gd32f30x_hd.s(35): error: A1163E: Unknown opcode _sidata , expecting opcode or Macro
Library\Firmware\CMSIS\GD\GD32F30x\Source\ARM\startup_gd32f30x_hd.s(36): error: A1163E: Unknown opcode _sdata , expecting opcode or Macro
Library\Firmware\CMSIS\GD\GD32F30x\Source\ARM\startup_gd32f30x_hd.s(37): error: A1163E: Unknown opcode _edata , expecting opcode or Macro
Library\Firmware\CMSIS\GD\GD32F30x\Source\ARM\startup_gd32f30x_hd.s(38): error: A1163E: Unknown opcode _sbss , expecting opcode or Macro
Library\Firmware\CMSIS\GD\GD32F30x\Source\ARM\startup_gd32f30x_hd.s(39): error: A1163E: Unknown opcode _ebss , expecting opcode or Macro
Library\Firmware\CMSIS\GD\GD32F30x\Source\ARM\startup_gd32f30x_hd.s(41): error: A1137E: Unexpected characters at end of line
Library\Firmware\CMSIS\GD\GD32F30x\Source\ARM\startup_gd32f30x_hd.s(42): error: A1137E: Unexpected characters at end of line
Library\Firmware\CMSIS\GD\GD32F30x\Source\ARM\startup_gd32f30x_hd.s(43): error: A1137E: Unexpected characters at end of line
Library\Firmware\CMSIS\GD\GD32F30x\Source\ARM\startup_gd32f30x_hd.s(45): error: A1163E: Unknown opcode reset , expecting opcode or Macro
Library\Firmware\CMSIS\GD\GD32F30x\Source\ARM\startup_gd32f30x_hd.s(46): error: A1167E: Invalid line start
Library\Firmware\CMSIS\GD\GD32F30x\Source\ARM\startup_gd32f30x_hd.s(47): error: A1105E: Area directive missing
Library\Firmware\CMSIS\GD\GD32F30x\Source\ARM\startup_gd32f30x_hd.s(47): warning: A1088W: Faking declaration of area AREA |$$$$$$$|
Library\Firmware\CMSIS\GD\GD32F30x\Source\ARM\startup_gd32f30x_hd.s(50): error: A1167E: Invalid line start
Library\Firmware\CMSIS\GD\GD32F30x\Source\ARM\startup_gd32f30x_hd.s(56): error: A1167E: Invalid line start
Library\Firmware\CMSIS\GD\GD32F30x\Source\ARM\startup_gd32f30x_hd.s(65): error: A1167E: Invalid line start
Library\Firmware\CMSIS\GD\GD32F30x\Source\ARM\startup_gd32f30x_hd.s(69): error: A1167E: Invalid line start
Library\Firmware\CMSIS\GD\GD32F30x\Source\ARM\startup_gd32f30x_hd.s(73): error: A1137E: Unexpected characters at end of line
Library\Firmware\CMSIS\GD\GD32F30x\Source\ARM\startup_gd32f30x_hd.s(75): error: A1137E: Unexpected characters at end of line
Library\Firmware\CMSIS\GD\GD32F30x\Source\ARM\startup_gd32f30x_hd.s(77): error: A1137E: Unexpected characters at end of line
Library\Firmware\CMSIS\GD\GD32F30x\Source\ARM\startup_gd32f30x_hd.s(80): error: A1163E: Unknown opcode Reset_Handler, , expecting opcode or Macro
Library\Firmware\CMSIS\GD\GD32F30x\Source\ARM\startup_gd32f30x_hd.s(82): error: A1137E: Unexpected characters at end of line
Library\Firmware\CMSIS\GD\GD32F30x\Source\ARM\startup_gd32f30x_hd.s(83): error: A1167E: Invalid line start
Library\Firmware\CMSIS\GD\GD32F30x\Source\ARM\startup_gd32f30x_hd.s(84): error: A1167E: Invalid line start
Library\Firmware\CMSIS\GD\GD32F30x\Source\ARM\startup_gd32f30x_hd.s(86): error: A1137E: Unexpected characters at end of line
Library\Firmware\CMSIS\GD\GD32F30x\Source\ARM\startup_gd32f30x_hd.s(88): error: A1137E: Unexpected characters at end of line
Library\Firmware\CMSIS\GD\GD32F30x\Source\ARM\startup_gd32f30x_hd.s(89): error: A1137E: Unexpected characters at end of line
Library\Firmware\CMSIS\GD\GD32F30x\Source\ARM\startup_gd32f30x_hd.s(91): error: A1167E: Invalid line start
Library\Firmware\CMSIS\GD\GD32F30x\Source\ARM\startup_gd32f30x_hd.s(92): error: A1137E: Unexpected characters at end of line
Library\Firmware\CMSIS\GD\GD32F30x\Source\ARM\startup_gd32f30x_hd.s(93): error: A1137E: Unexpected characters at end of line
Library\Firmware\CMSIS\GD\GD32F30x\Source\ARM\startup_gd32f30x_hd.s(94): error: A1137E: Unexpected characters at end of line
Library\Firmware\CMSIS\GD\GD32F30x\Source\ARM\startup_gd32f30x_hd.s(95): error: A1137E: Unexpected characters at end of line
Library\Firmware\CMSIS\GD\GD32F30x\Source\ARM\startup_gd32f30x_hd.s(96): error: A1137E: Unexpected characters at end of line
Library\Firmware\CMSIS\GD\GD32F30x\Source\ARM\startup_gd32f30x_hd.s(97): error: A1137E: Unexpected characters at end of line
Library\Firmware\CMSIS\GD\GD32F30x\Source\ARM\startup_gd32f30x_hd.s(98): error: A1137E: Unexpected characters at end of line
Library\Firmware\CMSIS\GD\GD32F30x\Source\ARM\startup_gd32f30x_hd.s(99): error: A1137E: Unexpected characters at end of line
Library\Firmware\CMSIS\GD\GD32F30x\Source\ARM\startup_gd32f30x_hd.s(100): error: A1137E: Unexpected characters at end of line
Library\Firmware\CMSIS\GD\GD32F30x\Source\ARM\startup_gd32f30x_hd.s(101): error: A1137E: Unexpected characters at end of line
Library\Firmware\CMSIS\GD\GD32F30x\Source\ARM\startup_gd32f30x_hd.s(102): error: A1137E: Unexpected characters at end of line
Library\Firmware\CMSIS\GD\GD32F30x\Source\ARM\startup_gd32f30x_hd.s(103): error: A1137E: Unexpected characters at end of line
Library\Firmware\CMSIS\GD\GD32F30x\Source\ARM\startup_gd32f30x_hd.s(104): error: A1137E: Unexpected characters at end of line
Library\Firmware\CMSIS\GD\GD32F30x\Source\ARM\startup_gd32f30x_hd.s(105): error: A1137E: Unexpected characters at end of line
Library\Firmware\CMSIS\GD\GD32F30x\Source\ARM\startup_gd32f30x_hd.s(106): error: A1137E: Unexpected characters at end of line
Library\Firmware\CMSIS\GD\GD32F30x\Source\ARM\startup_gd32f30x_hd.s(107): error: A1137E: Unexpected characters at end of line
Library\Firmware\CMSIS\GD\GD32F30x\Source\ARM\startup_gd32f30x_hd.s(109): error: A1137E: Unexpected characters at end of line
Library\Firmware\CMSIS\GD\GD32F30x\Source\ARM\startup_gd32f30x_hd.s(110): error: A1137E: Unexpected characters at end of line
我选了v6 后编译错误再选回来v5时,点击Project -> Clean Targets再执行 Project -> Rebuild all target files仍然时这个错误,
请问如何处理这个错误
|
-
最佳答案
查看完整内容[请看2#楼]
这个报错的原因很明确:汇编器不匹配。
错误本质
你的 startup_gd32f30x_hd.s 启动文件是用 GNU 汇编语法 写的(比如 .weak Default_Handler、.word Reset_Handler、IF EF: 等),但 Keil MDK 默认使用的是 ARM 公司的 armasm 汇编器(ARM Compiler 5/6 里都自带 armasm)。armasm 不认识 GNU 语法,所以出现一堆 Unknown opcode、Unexpected characters at end of line、Invalid line start。
你切换 V5/V6 只是换了 C ...
|