asm file for an STM32L4 mcu:
.syntax unified
.cpu cortex-m4
.thumb
.align
.global t_byte_swap_32
.global t_byte_swap_16
.global t_bit_swap_32
.thumb
.thumb_func
t_byte_swap_32:
rev r0, r0
bx lr
t_byte_swap_16:
rev16 r0, r0
bx lr
t_bit_swap_32:
rbit r0, r0
bx lr
compiles fine using the following command:
arm-none-eabi-as -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16
but when I call this function from within other c codefiles, the linker produces the following error:
arm-none-eabi/bin/ld: release/obj/utils_asm.o(t_byte_swap_16): Unknown destination type (ARM/Thumb) in release/obj/main.o
In the past it seemed to work fine, I don't know what changed, maybe because I use a later version of the compiler...
$ arm-none-eabi-gcc --version
arm-none-eabi-gcc (Arm GNU Toolchain 14.3.Rel1 (Build arm-14.174)) 14.3.1 20250623
Any ideas about what I'm doing wrong?