3 Replies Latest reply on Apr 8, 2016 1:29 AM by jim.schimpf_1583906

    ld returned 1 exit status

    jim.schimpf_1583906

      Hi,

         

            I have a project with a number of files in subdirectories and a main holding it all together.  I have added a new c & h file in a new directory and when I try to build I get the above error on link.  There are no errors in any of the compiles. This is the output of the link line and the only error is the ld error.

         

      Why is the main.o in there twice and is that the problem ?  How would I fix that ?

         

      Thanks for the help

         

      --jim schimpf

         

      arm-none-eabi-gcc.exe -Wl,--start-group -o
      .\CortexM0\ARM_GCC_493\Debug\PneuTool.elf
      .\CortexM0\ARM_GCC_493\Debug\gCorder.o
      .\CortexM0\ARM_GCC_493\Debug\mma8451.o
      .\CortexM0\ARM_GCC_493\Debug\Sound.o
      .\CortexM0\ARM_GCC_493\Debug\EnvBoard.o
      .\CortexM0\ARM_GCC_493\Debug\main.o .\CortexM0\ARM_GCC_493\Debug\main.o
      .\CortexM0\ARM_GCC_493\Debug\cymetadata.o
      .\CortexM0\ARM_GCC_493\Debug\Cm0Start.o
      .\CortexM0\ARM_GCC_493\Debug\PneuTool.a "C:\Program Files
      (x86)\Cypress\PSoC Creator\3.3\PSoC
      Creator\psoc\content\cycomponentlibraryupdates\CyComponentLibraryUpdates
      .cylib\BLE_v3_10\Library\gccCyBLEStack_BLE_SOC_PERIPHERAL.a" "C:\Program
      Files (x86)\Cypress\PSoC Creator\3.3\PSoC
      Creator\psoc\content\cycomponentlibrary\CyComponentLibrary.cylib\
      CortexM0\ARM_GCC_493\Debug\CyComponentLibrary.a" -mcpu=cortex-m0 -mthumb
      -g -ffunction-sections -O0 -L Generated_Source\PSoC4
      -Wl,-Map,.\CortexM0\ARM_GCC_493\Debug/PneuTool.map -T
      Generated_Source\PSoC4\cm0gcc.ld -specs=nano.specs -Wl,--gc-sections
      -Wl,--end-group

         


      .\CortexM0\ARM_GCC_493\Debug\main.o: file not recognized: File format not recognized
      collect2.exe: error: ld returned 1 exit status