2024-01-18 07:32 AM
Hi folks,
I have an assembly file with 2.5k lines and I'm facing a compiling issue.
It seems that the problem is about the syntax -
GNU compilation support a specific syntax while arm leagacy syntax is different.
In example:
name EQU 0xC
vs
.equ name 0xC
Is there any way to make the compiler work with 'legacy' arm code syntax, or it's must be rewritten? :(
Thanks in advance!
2024-01-18 10:21 AM
>>Is there any way to make the compiler work with 'legacy' arm code syntax, or it's must be rewritten? :(
You could use the ARMASM (KEIL/MDK) assembler to get an object file, and link at that level.
You might be able to use something like OBJCOPY to disassemble the code into a more GNU/GAS compliant format. I built my disassemblers to generate output that needed very little manual rework into ARMASM
I suppose one could make a script, in the scripting language of your choice, to trans-code the formats. For small amounts of code an editor with search-n-replace or macros might suffice.
2024-01-18 10:30 AM - edited 2024-01-18 10:31 AM
https://forums.raspberrypi.com/viewtopic.php?t=184771
https://github.com/bitbank2/gnu_asm
I believe others have built armasm2gas type tools/scripts. The syntax wars probably been going for 2+ decades