This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Compatibility between GCC static library and armlink

Hi,

I have a static library built with arm-none-eabi-gcc (for Cortex-M4) that works fine when linked with ld.

But after I linked it using armlink, the functionality was broken.

I want to ask if some considerations need to be repected when supplying gcc obj code to armlink?

PS:

The static library uses hardware floating point and was built with the following options:

CFLAGS +=  -fdata-sections -ffunction-sections -fvisibility=hidden -Os

CFLAGS += -mlittle-endian -mthumb -mcpu=cortex-m4 -mthumb-interwork

CFLAGS += -mfloat-abi=hard -DFPV4_SP_D16 -mfp16-format=ieee -mfpu=fpv4-sp-d16

CFLAGS += -fsingle-precision-constant -ffast-math -DUSE_LIB_SQRTF

CFLAGS += -Wall -Wextra

>From Keil part, I use the following options:

for armcc:

--littleend --fp16_format=none --thumb --wchar32

for armlink:

--cpu=Cortex-M4 --remove

Thanks.