SoftConsole 4.0的“错误指令"汇编器 [英] SoftConsole 4.0 "bad instruction" assembler

查看:298
本文介绍了SoftConsole 4.0的“错误指令"汇编器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用MicroSemi SoftConsole 4.0尝试编译并运行FreeRTOS演示项目,并且遇到错误错误的指令'[每行代码]'".基本上,由于某种原因,整个文件没有被汇编.我的控制台看起来像这样:

Using MicroSemi SoftConsole 4.0 to try to get a FreeRTOS demo project compiled and running, and I've come across an error "bad instruction '[every line of code]'". Basically, the entire file is not being assembled for some reason. My Console looks like this:

Building file: ../FreeRTOS-Plus/WolfSSL/wolfcrypt/src/aes_asm.asm
Invoking: Cross ARM GNU Assembler
arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -O2  -g -x assembler-with-cpp -MMD -MP -MF"FreeRTOS-Plus/WolfSSL/wolfcrypt/src/aes_asm.d" -MT"FreeRTOS-Plus/WolfSSL/wolfcrypt/src/aes_asm.o" -c -o "FreeRTOS-Plus/WolfSSL/wolfcrypt/src/aes_asm.o" "../FreeRTOS-Plus/WolfSSL/wolfcrypt/src/aes_asm.asm"
../FreeRTOS-Plus/WolfSSL/wolfcrypt/src/aes_asm.asm: Assembler messages:
../FreeRTOS-Plus/WolfSSL/wolfcrypt/src/aes_asm.asm:37: Error: bad instruction `_text SEGMENT'
../FreeRTOS-Plus/WolfSSL/wolfcrypt/src/aes_asm.asm:38: Error: bad instruction `aes_cbc_encrypt PROC'
../FreeRTOS-Plus/WolfSSL/wolfcrypt/src/aes_asm.asm:46: Error: bad instruction `save rdi and rsi to rax and r11,restore before ret'
../FreeRTOS-Plus/WolfSSL/wolfcrypt/src/aes_asm.asm:47: Error: ARM register expected -- `mov rax,rdi'
../FreeRTOS-Plus/WolfSSL/wolfcrypt/src/aes_asm.asm:48: Error: immediate expression requires a # prefix -- `mov r11,rsi'
../FreeRTOS-Plus/WolfSSL/wolfcrypt/src/aes_asm.asm:50: Error: bad instruction `convert to what we had for att&t convention'
../FreeRTOS-Plus/WolfSSL/wolfcrypt/src/aes_asm.asm:51: Error: ARM register expected -- `mov rdi,rcx'
../FreeRTOS-Plus/WolfSSL/wolfcrypt/src/aes_asm.asm:52: Error: ARM register expected -- `mov rsi,rdx'
../FreeRTOS-Plus/WolfSSL/wolfcrypt/src/aes_asm.asm:53: Error: ARM register expected -- `mov rdx,r8'
../FreeRTOS-Plus/WolfSSL/wolfcrypt/src/aes_asm.asm:54: Error: ARM register expected -- `mov rcx,r9'
../FreeRTOS-Plus/WolfSSL/wolfcrypt/src/aes_asm.asm:55: Error: immediate expression requires a # prefix -- `mov r8,[rsp+40]'
../FreeRTOS-Plus/WolfSSL/wolfcrypt/src/aes_asm.asm:56: Error: ARM register expected -- `mov r9d,[rsp+48]'
../FreeRTOS-Plus/WolfSSL/wolfcrypt/src/aes_asm.asm:58: Error: bad instruction `end'
FreeRTOS-Plus/WolfSSL/wolfcrypt/src/subdir.mk:161: recipe for target 'FreeRTOS-Plus/WolfSSL/wolfcrypt/src/aes_asm.o' failed
make: *** [FreeRTOS-Plus/WolfSSL/wolfcrypt/src/aes_asm.o] Error 1

等等等.(这几乎使我所有的1000几行代码都出现了错误,我出于可读性考虑将其编辑掉了).可以注意到,我正在使用Cross ARM GNU汇编器(arm-none-eabi-gcc),而我的ARM汇编器选项是-x assembler-with-cpp.不知道我还需要包括什么,但是如果有人知道潜在的汇编器标志或选项,那么我可能会在命令行中某处丢失,那将非常有帮助.我什至都不100%自己确定这里发生了什么,因此任何有关可能出问题的解释也将有所帮助.我觉得这并不是一个真正的编码问题,而更像是缺乏兼容性的问题(也许是错误的汇编格式?即使我使用的是横臂汇编程序).谢谢!

etc. etc. (it gives me an error for just about all 1000ish lines of code, which I've edited out for legibility of course). As can be noted, I'm using the Cross ARM GNU Assembler (arm-none-eabi-gcc), and my ARM assembler option is -x assembler-with-cpp. Not sure what else I need to include, but if someone knows of a potential assembler flag or option I might be missing somewhere in the command line, that would be very helpful. I'm not even 100% sure what's going on here myself, so any explanation as to what might be going wrong would be helpful too. I feel like this isn't really a coding problem, but more like a lack of compatibility issue (perhaps incorrect assembly format? Even though I'm using a cross-arm assembler). Thank you!

推荐答案

看起来不像ARM asm代码.可能的英特尔代码.

Does not look like ARM asm code. Possible Intel code.

这篇关于SoftConsole 4.0的“错误指令"汇编器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆