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
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!