ld returned 1 exit status

Sysprogs forums Forums VisualGDB ld returned 1 exit status

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #7359
    bad
    Participant

    Hi

    When I try to build my embedded nRF51 project, I get an error from collect2.exe “ld returned 1 exit status” without any further information.

    I’m using the S110 Softdevice and the make file looks like this:

    #Generated by VisualGDB (http://visualgdb.com)
    #DO NOT EDIT THIS FILE MANUALLY UNLESS YOU ABSOLUTELY NEED TO
    #USE VISUALGDB PROJECT PROPERTIES DIALOG INSTEAD

    BINARYDIR := Debug

    #Additional flags
    PREPROCESSOR_MACROS := DEBUG
    INCLUDE_DIRS := src/6_global src/5_setup src/4_chal src/3_phal src/2_srv src/1_app src/1_app/ctrl src/1_app/mt src
    LIBRARY_DIRS :=
    LIBRARY_NAMES :=
    ADDITIONAL_LINKER_INPUTS :=
    MACOS_FRAMEWORKS :=
    LINUX_PACKAGES :=

    CFLAGS := -ggdb -ffunction-sections -O0
    CXXFLAGS := -ggdb -ffunction-sections -fno-exceptions -fno-rtti -O0
    ASFLAGS :=
    LDFLAGS := -Wl,-gc-sections
    COMMONFLAGS :=
    LINKER_SCRIPT := $(BSP_ROOT)/nRF51/LinkerScripts/nRF51422_XXAC_s110.lds

    START_GROUP := -Wl,–start-group
    END_GROUP := -Wl,–end-group

    #Additional options detected from testing the toolchain
    USE_DEL_TO_CLEAN := 1
    CP_NOT_AVAILABLE := 1

    ADDITIONAL_MAKE_FILES := nrf5x.mak
    GENERATE_BIN_FILE := 1
    GENERATE_IHEX_FILE := 0

     

    Any Ideas??

    #7366
    support
    Keymaster

    Please try adding -Wl,-verbose to the LDFLAGS and build your project again. Then check the build log for clues. If nothing helps, please try the black box approach – pick a project that links successfully and try eliminating the differences between that project and your current project one by one (source files, flags, softdevice, linker script) to see which one is causing the bug.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.