I am trying to build a project based on MAC57D54H (for M4 core). For this i have added basic freertos code. after successfully compiling 'c' code i am facing asm file compilation error. Could you please check this.
-------------------------------------------------------------------------------------------------------------------------------------------------------------
arm-none-eabi-gcc "@src/Demo/CORTEX_M4F_NXP_MAC57D5xx_MULTI/src_hello/common/m4_cache.args" -MMD -MP -MF"src/Demo/CORTEX_M4F_NXP_MAC57D5xx_MULTI/src_hello/common/m4_cache.d" -MT"src/Demo/CORTEX_M4F_NXP_MAC57D5xx_MULTI/src_hello/common/m4_cache.o" -c -o "src/Demo/CORTEX_M4F_NXP_MAC57D5xx_MULTI/src_hello/common/m4_cache.o" "../src/Demo/CORTEX_M4F_NXP_MAC57D5xx_MULTI/src_hello/common/m4_cache.c"
../src/Source/portable/MULTI/MAC57D5xx/portasm.s: Assembler messages:
../src/Source/portable/MULTI/MAC57D5xx/portasm.s:72: Error: unknown pseudo-op: `.export'
../src/Source/portable/MULTI/MAC57D5xx/portasm.s:73: Error: unknown pseudo-op: `.export'
../src/Source/portable/MULTI/MAC57D5xx/portasm.s:74: Error: unknown pseudo-op: `.export'
../src/Source/portable/MULTI/MAC57D5xx/portasm.s:87: Error: junk at end of line, first unrecognized character is `-'
../src/Source/portable/MULTI/MAC57D5xx/portasm.s:93: Error: junk at end of line, first unrecognized character is `-'
../src/Source/portable/MULTI/MAC57D5xx/portasm.s:102: Error: junk at end of line, first unrecognized character is `-'
../src/Source/portable/MULTI/MAC57D5xx/portasm.s:114: Error: unshifted register required -- `tst lr,#0x10'
../src/Source/portable/MULTI/MAC57D5xx/portasm.s:116: Error: selected processor does not support Thumb mode `vstmdbeq r0!,{s16-s31}'
../src/Source/portable/MULTI/MAC57D5xx/portasm.s:119: Error: instruction not allowed in IT block -- `stmdb r0!,{r4-r11,r14}'
Finished building: ../src/Source/portable/MemMang/heap_5.c
../src/Source/portable/MULTI/MAC57D5xx/portasm.s:124: Error: lo register required -- `stmdb sp!,{r3}'
../src/Source/portable/MULTI/MAC57D5xx/portasm.s:133: Error: lo register required -- `ldmia sp!,{r3}'
../src/Source/portable/MULTI/MAC57D5xx/portasm.s:140: Error: lo register required -- `ldmia r0!,{r4-r11,r14}'
../src/Source/portable/MULTI/MAC57D5xx/portasm.s:144: Error: unshifted register required -- `tst r14,#0x10'
../src/Source/portable/MULTI/MAC57D5xx/portasm.s:146: Error: selected processor does not support Thumb mode `vldmiaeq r0!,{s16-s31}'
Finished building: ../src/Source/portable/MULTI/MAC57D5xx/port.c
../src/Source/portable/MULTI/MAC57D5xx/portasm.s:148: Error: instruction not allowed in IT block -- `msr psp,r0'
../src/Source/portable/MULTI/MAC57D5xx/portasm.s:152: Error: junk at end of line, first unrecognized character is `-'
../src/Source/portable/MULTI/MAC57D5xx/portasm.s:161: Error: lo register required -- `ldmia r0!,{r4-r11,r14}'
../src/Source/portable/MULTI/MAC57D5xx/portasm.s:168: Error: junk at end of line, first unrecognized character is `-'
../src/Source/portable/MULTI/MAC57D5xx/portasm.s:185: Error: junk at end of line, first unrecognized character is `-'
../src/Source/portable/MULTI/MAC57D5xx/portasm.s:190: Error: unexpected character `w' in type specifier
../src/Source/portable/MULTI/MAC57D5xx/portasm.s:190: Error: bad instruction `ldr.w r0,CPACRConst'
../src/Source/portable/MULTI/MAC57D5xx/portasm.s:194: Error: unshifted register required -- `orr r1,r1,#(0xf<<20)'
../src/Source/portable/MULTI/MAC57D5xx/portasm.s:98: Error: invalid offset, value too big (0xFFFFFFE8)
../src/Source/portable/MULTI/MAC57D5xx/portasm.s:110: Error: invalid offset, value too big (0xFFFFFFCC)
../src/Source/portable/MULTI/MAC57D5xx/portasm.s:125: Error: invalid offset, value too big (0xFFFFFFC8)
../src/Source/portable/MULTI/MAC57D5xx/portasm.s:157: Error: invalid offset, value too big (0xFFFFFF94)
../src/Source/portable/MULTI/MAC57D5xx/portasm.s:173: Error: invalid offset, value too big (0xFFFFFF6C)
make: *** [src/Source/portable/MULTI/MAC57D5xx/portasm.o] Error 1
make: *** Waiting for unfinished jobs....
Finished building: ../src/Demo/CORTEX_M4F_NXP_MAC57D5xx_MULTI/src_hello/common/m4_cache.c
-------------------------------------------------------------------------------------------------------------------------------------------------------------
-Prashant
Portasm.s is attached.. current port is for IAR compiler, I am trying to port it on arm-none-eabi-gcc.
Would be helpful if you could point out the PATH to proceed, I am new to asm (only long back worked on ASM).
Error :-
=========================================================================
../src/FreeRtos/Source/portable/CORTEX_M4_MAC57D54H/portasm.s: Assembler messages:
../src/FreeRtos/Source/portable/CORTEX_M4_MAC57D54H/portasm.s:94: Error: unshifted register required -- `tst lr,#0x10'
../src/FreeRtos/Source/portable/CORTEX_M4_MAC57D54H/portasm.s:96: Error: selected processor does not support Thumb mode `vstmdbeq r0!,{s16-s31}'
../src/FreeRtos/Source/portable/CORTEX_M4_MAC57D54H/portasm.s:99: Error: instruction not allowed in IT block -- `stmdb r0!,{r4-r11,r14}'
../src/FreeRtos/Source/portable/CORTEX_M4_MAC57D54H/portasm.s:104: Error: lo register required -- `stmdb sp!,{r3}'
../src/FreeRtos/Source/portable/CORTEX_M4_MAC57D54H/portasm.s:112: Error: lo register required -- `ldmia sp!,{r3}'
../src/FreeRtos/Source/portable/CORTEX_M4_MAC57D54H/portasm.s:119: Error: lo register required -- `ldmia r0!,{r4-r11,r14}'
../src/FreeRtos/Source/portable/CORTEX_M4_MAC57D54H/portasm.s:123: Error: unshifted register required -- `tst r14,#0x10'
../src/FreeRtos/Source/portable/CORTEX_M4_MAC57D54H/portasm.s:125: Error: selected processor does not support Thumb mode `vldmiaeq r0!,{s16-s31}'
../src/FreeRtos/Source/portable/CORTEX_M4_MAC57D54H/portasm.s:127: Error: instruction not allowed in IT block -- `msr psp,r0'
../src/FreeRtos/Source/portable/CORTEX_M4_MAC57D54H/portasm.s:147: Error: lo register required -- `ldmia r0!,{r4-r11,r14}'
../src/FreeRtos/Source/portable/CORTEX_M4_MAC57D54H/portasm.s:173: Error: unexpected character `w' in type specifier
../src/FreeRtos/Source/portable/CORTEX_M4_MAC57D54H/portasm.s:173: Error: bad instruction `ldr.w r0,=0xE000ED88'
../src/FreeRtos/Source/portable/CORTEX_M4_MAC57D54H/portasm.s:177: Error: unshifted register required -- `orr r1,r1,#(0xf<<20)'
=========================================================================
Thanks,
Prashant
Hi Prashant,
I'd suggest you to add the assembler directive into portasm.s:
.syntax unified
https://sourceware.org/binutils/docs/as/ARM_002dInstruction_002dSet.html#ARM_002dInstruction_002dSet
enable floating point ABI: hard
FPU Type: "fpv4-sp-d16"
Hope it helps.
Stan
Hi Prashant,
The GNU assembler (known as GAS) directives may differ from the ones located in your assembly file.
I'd suggest to use:
.global instead of .export
.extern instead of .import
Could you attach your portasm.s if it does not help ?
Thanks.
Stan