Hi!
I'm trying to use a precompiled library of TVOC sensor ZMOD4410 in a project based on the azure_iot_hub from Nordic, running it over a nrf9160 board.
This library is called lib_iaq_2nd_gen.a and It was compiled in configuration to use the Virtual Floating Point (VFP) register, to use soft floating point computation. The point is that the Nordic's samples are compiled with -mfloat-abi=hard, which returns a compilation error due to mixing incompatible compilation flags like next one:
c:/users/angel.delacalle/ncs/v1.5.1/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: failed to merge target specific data of file ../src/drivers/zmod4410/lib_iaq_2nd_gen.a(iaq_2nd_gen.c.o)
c:/users/angel.delacalle/ncs/v1.5.1/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: error: zephyr\zephyr_prebuilt.elf uses VFP register arguments, ../src/drivers/zmod4410/lib_iaq_2nd_gen.a(iaq_2nd_gen_V6_nnet.c.o) does not
c:/users/angel.delacalle/ncs/v1.5.1/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: failed to merge target specific data of file ../src/drivers/zmod4410/lib_iaq_2nd_gen.a(iaq_2nd_gen_V6_nnet.c.o)
c:/users/angel.delacalle/ncs/v1.5.1/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: error: zephyr\zephyr_prebuilt.elf uses VFP register arguments, ../src/drivers/zmod4410/lib_iaq_2nd_gen.a(iaq_2nd_gen_nnet.c.o) does not
c:/users/angel.delacalle/ncs/v1.5.1/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: failed to merge target specific data of file ../src/drivers/zmod4410/lib_iaq_2nd_gen.a(iaq_2nd_gen_nnet.c.o)
c:/users/angel.delacalle/ncs/v1.5.1/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: app/libapp.a(zmod4410.c.obj): in function `zmod4410_init':
I've tried to modify the compilation flag in the CMakeFile of my project adding next options without succeeding.
1.- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mfloat-abi=softfp")
- Trying to combine soft and hard option (same issue as before).
2.- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mfloat-abi=hard")
- Trying to force hard option (same issue as before as it was already being compiled this way from scratch).
3.- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mfloat-abi=soft")
- Trying to force soft option (the compilation of all the project complains that "arm-none-eabi-gcc.exe: error: -mfloat-abi=soft and -mfloat-abi=hard may not be used together")
I've tried to avoid too the compilation error adding the flag --no-warn-mismatch for permitting the error without results.
Assuming that I cannot find the precompiled library built for hard-float,
do you know what I could do for adding this library to my project?
Many thanks in advance,
Ángel