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

nRF58122 GCC S120 Softdevice Build failure - Collect2.exe

I am experiencing an error in the final linking stage of my build.

_build/blinky_gcc_xxaa_s120_xxaa.bin: file not recognized: File format not recognized collect2.exe: error: ld returned 1 exit status make: *** [debug] Error 1 (See attached buildlog.txt file for full log output)

I can't understand what this error concerns. I see the file [_build/blinky_gcc_xxaa_s120_xxaa.bin] exists

I am attempting to build a copy of the experimental S120 app found in nrf51822\Board\nrf6310\s120\experimental\ble_app_multilink_central but having it run on a pca10001 Evaluation Kit, using GCC.

I have experience this on both SDK 5.1, and the newest SDK 5.2

Any help/thoughts are appreciated.

Regards, Martin

buildlog.txt

Parents
  • I haven't solved this issue, but some extra observations:

    The problem is the last nonsensical gcc operation ...

    "C:/Program Files/GNU Tools ARM Embedded/4.8 2013q4/bin/arm-none-eabi-gcc" -mcpu=cortex-m0 -mthumb -mabi=aapcs -DNRF51 -DBOARD_PCA10001 -DNRF51822_QFAA_CA --std=gnu99 -Wall -Werror -Wno-unused-local-typedefs -mfloat-abi=soft -DDEBUG -g3 -O0 -L"C:/Program Files/GNU Tools ARM Embedded/4.8 2013q4/arm-none-eabi/lib/armv6-m" -L"C:/Program Files/GNU Tools ARM Embedded/4.8 2013q4/lib/gcc/arm-none-eabi/4.8.3/armv6-m" -I"C:/NordicSemi_nRF51SDK/nrf51822/Include/app_common" -I"C:/NordicSemi_nRF51SDK/nrf51822/Include/sd_common" -I"C:/NordicSemi_nRF51SDK/nrf51822/Include/ble" -I"C:/NordicSemi_nRF51SDK/nrf51822/Include/ble/ble_services" -I"C:/NordicSemi_nRF51SDK/nrf51822/Include/s120" -I"../" -I"C:/NordicSemi_nRF51SDK/nrf51822/Include" -I"C:/NordicSemi_nRF51SDK/nrf51822/Include/gcc" -I"C:/NordicSemi_nRF51SDK/nrf51822/Include/ext_sensors" -Xlinker -Map=_build/blinky_gcc_xxaa_s120_xxaa.map -mcpu=cortex-m0 -mthumb -mabi=aapcs -L C:/NordicSemi_nRF51SDK/nrf51822//Source//templates/gcc/ -Tgcc_nrf51_s120_xxaa.ld ../debug.c _build/blinky_gcc_xxaa_s120_xxaa.bin _build/blinky_gcc_xxaa_s120_xxaa.hex -o debug

    I noticed if I do "make release", then my build is fine. If I do "make debug", then I get this last rogue gcc operation.

    Notably, if I continue to run my application with the .out file, it runs fine.

    It appears to be a makefile build rule causing this last gcc operation.

    After playing with it for a while, I was not able to solve it. Maybe someone else will stumble upon this, and see the same issue. I have included the various app Makefile, and gcc Makefile/Makefile.windows for analysis.

    To work around the issue, I moved over to using the pure-gcc Makefile operations, and everything works very fine now. Builds cleaner, faster and easier to understand.

    Thx.

    Makefile.txt

    Makefile.common.txt

    Makefile.windows.txt

Reply
  • I haven't solved this issue, but some extra observations:

    The problem is the last nonsensical gcc operation ...

    "C:/Program Files/GNU Tools ARM Embedded/4.8 2013q4/bin/arm-none-eabi-gcc" -mcpu=cortex-m0 -mthumb -mabi=aapcs -DNRF51 -DBOARD_PCA10001 -DNRF51822_QFAA_CA --std=gnu99 -Wall -Werror -Wno-unused-local-typedefs -mfloat-abi=soft -DDEBUG -g3 -O0 -L"C:/Program Files/GNU Tools ARM Embedded/4.8 2013q4/arm-none-eabi/lib/armv6-m" -L"C:/Program Files/GNU Tools ARM Embedded/4.8 2013q4/lib/gcc/arm-none-eabi/4.8.3/armv6-m" -I"C:/NordicSemi_nRF51SDK/nrf51822/Include/app_common" -I"C:/NordicSemi_nRF51SDK/nrf51822/Include/sd_common" -I"C:/NordicSemi_nRF51SDK/nrf51822/Include/ble" -I"C:/NordicSemi_nRF51SDK/nrf51822/Include/ble/ble_services" -I"C:/NordicSemi_nRF51SDK/nrf51822/Include/s120" -I"../" -I"C:/NordicSemi_nRF51SDK/nrf51822/Include" -I"C:/NordicSemi_nRF51SDK/nrf51822/Include/gcc" -I"C:/NordicSemi_nRF51SDK/nrf51822/Include/ext_sensors" -Xlinker -Map=_build/blinky_gcc_xxaa_s120_xxaa.map -mcpu=cortex-m0 -mthumb -mabi=aapcs -L C:/NordicSemi_nRF51SDK/nrf51822//Source//templates/gcc/ -Tgcc_nrf51_s120_xxaa.ld ../debug.c _build/blinky_gcc_xxaa_s120_xxaa.bin _build/blinky_gcc_xxaa_s120_xxaa.hex -o debug

    I noticed if I do "make release", then my build is fine. If I do "make debug", then I get this last rogue gcc operation.

    Notably, if I continue to run my application with the .out file, it runs fine.

    It appears to be a makefile build rule causing this last gcc operation.

    After playing with it for a while, I was not able to solve it. Maybe someone else will stumble upon this, and see the same issue. I have included the various app Makefile, and gcc Makefile/Makefile.windows for analysis.

    To work around the issue, I moved over to using the pure-gcc Makefile operations, and everything works very fine now. Builds cleaner, faster and easier to understand.

    Thx.

    Makefile.txt

    Makefile.common.txt

    Makefile.windows.txt

Children
No Data
Related