Tool/software: TI C/C++ Compiler
Hi,
I'm using CCS9.0 with TI v18.12.1.LTS compiler.
I'm trying to port assembler AES library written for ARM Cortex-M3 and M4 to RM42L432. I am not very experienced in assembler, especially for ARM.
I have a problem with instruction:
ldr.w r12, =AES_Td0
Which loads an array address from AES_Td0 to r12.
I know that it is unsupported pseudo instruction, as per this thread: https://e2e.ti.com/support/tools/ccs/f/81/t/418070.
I wrote the suggested macro as:
LDR_REPLACE .macro dst, src movw dst, #(src & 0xffff) movt dst, #((src>>16)&0xffff) .endm
When I use it as:
LDR_REPLACE r12, AES_Td0
I get, among others:
- [W1500] warning: relocation template 267 not found; returning OFR_INVALID - [E0004] Expression must evaluate to an absolute constant - [R0001] After symbol substitution the line became:
So relocation is not supported since this macro was suggested i suppose.
I also tried:
movw dst, #:lower16:src movt dst, #:upper16:src
But it also desn't work.
How could i fix this issue?