This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Link error while compiling prebuilt segger project library.

Hi, I am getting link time error in segger when i building a pre-built library with zephyr for NRF5340.

Error says,

c:/gnuarmemb/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld.exe: error: xyz.a(xyz.o) uses VFP register arguments, zephyr\zephyr_prebuilt.elf does not
1> c:/gnuarmemb/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld.exe: failed to merge target specific data of file xyz.a(xyz.o)
[.......]

I tried to import arm_fp_abi to hard and arm_fpu_type by adding 

zephyr_link_libraries(-mfloat-abi=hard)
zephyr_link_libraries(-mfpu=fpv5-sp-d16)

to cmakelistfile these are same configuration used to build the xyz.a lib as well

I also added 

CONFIG_NEWLIB_LIBC=y in 

CONFIG_FLOAT=y
CONFIG_FP_HARDABI=y

in the prj.conf file but then the solution was unable to open with some java errors.

Please advise how to configure to build the library along with zephyr.

Related