Build target 'Target_1' "ARMM.s", line 1 (column 6): Error: A1163E: Unknown opcode tpl, , expecting opcode or Macro 1 00000000 AREA tpl, CODE, READONLY ^ "ARMM.s", line 2 (column 8): Error: A1163E: Unknown opcode __main , expecting opcode or Macro 2 00000000 EXPORT __main ^ "ARMM.s", line 4: Fatal error: A1355U: A Label was found which was in no AREA 4 00000000 __main 3 Errors, 0 Warnings armclang: error: armasm command failed with exit code 8 (use -v to see invocation) assembling ARMM.s... ".\Objects\ARM.axf" - 1 Error(s), 0 Warning(s).MY CODE AREA tpl, CODE, READONLYEXPORT __main__main MOV r1, #0x1234 LDR r1, =0x20000000 LDR r0, =0x80000000 LDR r2, =0xaaaaaaaa STR r0, [r1] ;ENDFOLLOWED FROM YOUTUBE STILL GOT AN ERROR
Hi Adam,
The issue is the presence of "MY CODE" in the above, which results in further errors as the assembler cannot resolve where the code begins.
The following builds for me without issue:
AREA tpl, CODE, READONLY EXPORT __main __main MOV r1, #0x1234 LDR r1, =0x20000000 LDR r0, =0x80000000 LDR r2, =0xaaaaaaaa STR r0, [r1] END
The format of assembler modules is very sensitive, especially regarding which lines begin on the first column. See the below documentation:
https://developer.arm.com/documentation/dui0473/m/structure-of-assembly-language-modules/syntax-of-source-lines-in-assembly-language
As an aside... this is our old assembler format. Modern Arm tools use gnu assembler format.
You can build with -masm=armasm (or =auto), though even this option is deprecated and will not be supported in the future.
See https://developer.arm.com/documentation/100068/0623/Migrating-from-armasm-to-the-armclang-Integrated-Assembler