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

VFP register arguments issue

Hello,

      I am learning to create library in segger. I am using segger example https://wiki.segger.com/How_to_create_a_library_project_and_use_it_in_executable_project

       I have created a small library project in the blinky sdk example. SDK version 15.2. Using that project .a file created. The same file was included in the blinky example. made the function extern in the main.c. Tried compiling the project I received below error of VFC.

Building ‘blinky_pca10040_s132’ from solution ‘blinky_pca10040_s132’ in configuration ‘Debug’
1> 'Output/blinky_pca10040_s132 Debug/Obj/thumb_crt0.o' is up to date
2> 'Output/blinky_pca10040_s132 Debug/Obj/nrf_log_frontend.o' is up to date
1> 'Output/blinky_pca10040_s132 Debug/Obj/nrf_log_str_formatter.o' is up to date
3> 'Output/blinky_pca10040_s132 Debug/Obj/boards.o' is up to date
1> 'Output/blinky_pca10040_s132 Debug/Obj/app_error.o' is up to date
2> 'Output/blinky_pca10040_s132 Debug/Obj/app_error_handler_gcc.o' is up to date
1> 'Output/blinky_pca10040_s132 Debug/Obj/app_error_weak.o' is up to date
4> 'Output/blinky_pca10040_s132 Debug/Obj/app_util_platform.o' is up to date
1> 'Output/blinky_pca10040_s132 Debug/Obj/nrf_assert.o' is up to date
2> 'Output/blinky_pca10040_s132 Debug/Obj/nrf_atomic.o' is up to date
1> 'Output/blinky_pca10040_s132 Debug/Obj/nrf_balloc.o' is up to date
3> 'Output/blinky_pca10040_s132 Debug/Obj/nrf_fprintf.o' is up to date
1> 'Output/blinky_pca10040_s132 Debug/Obj/nrf_fprintf_format.o' is up to date
2> 'Output/blinky_pca10040_s132 Debug/Obj/nrf_memobj.o' is up to date
1> 'Output/blinky_pca10040_s132 Debug/Obj/nrf_ringbuf.o' is up to date
1> 'Output/blinky_pca10040_s132 Debug/Obj/nrf_section_iter.o' is up to date
2> 'Output/blinky_pca10040_s132 Debug/Obj/nrf_strerror.o' is up to date
1> 'Output/blinky_pca10040_s132 Debug/Obj/main.o' is up to date
1> 'Output/blinky_pca10040_s132 Debug/Obj/ses_startup_nrf52.o' is up to date
2> 'Output/blinky_pca10040_s132 Debug/Obj/ses_startup_nrf_common.o' is up to date
1> 'Output/blinky_pca10040_s132 Debug/Obj/system_nrf52.o' is up to date
4> 'Output/blinky_pca10040_s132 Debug/Obj/nrf_sdh.o' is up to date
1> 'Output/blinky_pca10040_s132 Debug/Obj/nrf_sdh_soc.o' is up to date
1> Output/Debug/Exe/blinky_pca10040_s132.elf does not exist.
1> Generating linker script ‘blinky_pca10040_s132.ld’
1> "C:/Program Files/SEGGER/SEGGER Embedded Studio for ARM 4.52c/bin/mkld" -memory-map-segments "FLASH RX 0x0 0x80000;RAM RWX 0x20000000 0x10000" -section-placement-file flash_placement.xml -check-segment-overflow -symbols __STACKSIZE__=8192;__STACKSIZE_PROCESS__=0;__HEAPSIZE__=8192 -section-placement-macros FLASH_PH_START=0x0;FLASH_PH_SIZE=0x80000;RAM_PH_START=0x20000000;RAM_PH_SIZE=0x10000;FLASH_START=0x26000;FLASH_SIZE=0x5a000;RAM_START=0x200057b8;RAM_SIZE=0xa848 "C:/Users/logicare/OneDrive - Lebenor Technologies Pvt Ltd/SDK/nRF5_SDK_15.2.0_9412b96/examples/peripheral/blinky/pca10040/s132/ses/Output/blinky_pca10040_s132 Debug/Obj/blinky_pca10040_s132.ld"
1> Linking blinky_pca10040_s132.elf
1> "C:/Program Files/SEGGER/SEGGER Embedded Studio for ARM 4.52c/gcc/arm-none-eabi/bin/ld" -X --omagic -eReset_Handler --defsym=__vfprintf=__vfprintf_long --defsym=__vfscanf=__vfscanf_int -EL --gc-sections "-TC:/Users/logicare/OneDrive - Lebenor Technologies Pvt Ltd/SDK/nRF5_SDK_15.2.0_9412b96/examples/peripheral/blinky/pca10040/s132/ses/Output/blinky_pca10040_s132 Debug/Obj/blinky_pca10040_s132.ld" -Map Output/Debug/Exe/blinky_pca10040_s132.map -u_vectors -o Output/Debug/Exe/blinky_pca10040_s132.elf --emit-relocs --start-group "@C:/Users/logicare/OneDrive - Lebenor Technologies Pvt Ltd/SDK/nRF5_SDK_15.2.0_9412b96/examples/peripheral/blinky/pca10040/s132/ses/Output/blinky_pca10040_s132 Debug/Obj/blinky_pca10040_s132.ind" --end-group
1> C:/Program Files/SEGGER/SEGGER Embedded Studio for ARM 4.52c/gcc/arm-none-eabi/bin/ld: error: Output/Debug/Exe/blinky_pca10040_s132.elf uses VFP register arguments, Library/Output/Debug/Exe/Library_1.a(Lib.o) does not
1> C:/Program Files/SEGGER/SEGGER Embedded Studio for ARM 4.52c/gcc/arm-none-eabi/bin/ld: failed to merge target specific data of file Library/Output/Debug/Exe/Library_1.a(Lib.o)
Build failed

Is my way of adding library file is correct? do I need to make some changes in linker? if so kindly suggests how?

Parents Reply Children
Related