title: Problems with arm-none-eabi linker in Eclipse using GNU MCU Eclipse Plugin
body: <p>I am having a problem with a project that I'm trying to set up for my new STM32F7 Nucleo Board. I freshly installed the <a href="https://launchpad.net/gcc-arm-embedded" rel="nofollow noreferrer">GNU ARM Embedded toolchain</a>, <a href="http://www.st.com/en/embedded-software/stm32cubef7.html" rel="nofollow noreferrer">STM32CubeF7</a> and the <a href="https://gnu-mcu-eclipse.github.io/" rel="nofollow noreferrer">GNU MCU Eclipse Plugin</a>, with which I set up a new Project on my Windows 7 machine at work. I have previously done that at home on my Ubuntu Laptop without issues.
  After I set up the project, I added the HAL and the CMSIS libraries and used a template project from STM32CubeF7. So far the compilation works fine, but when linking I get the following error: </p>
  
  <pre><code>c:/program files (x86)/gnu tools arm embedded/5.4 2016q2/bin/../lib/gcc/arm-none-eabi/5.4.1/../../../../arm-none-eabi/bin/ld.exe: cannot find -lc_p-lc_p
  </code></pre>
  
  <p>To my understanding the issue here is that some library with a very strange name can not be found. Unfortunately the only <a href="https://www.kharkovforum.com/showthread.php?t=3532032" rel="nofollow noreferrer">page that I found where the same error is described</a> is in Russian, which I don't speak at all.</p>
  
  <p>At first glance, to me it looks like the generated makefile is corrupted, and a library called c_p is trying to be linked, but it is done twice without a space in between. So it could be an issue with Eclipse or the Eclipse GNU MCU Plugin.</p>
  
  <p><strong>Things that I tried to get rid of the error:</strong> </p>
  
  <ul>
  <li>Update Eclipse</li>
  <li>Downgrade to several old versions of the GNU ARM Embedded toolchain</li>
  <li>Turn off/on the following linker options:
  
  <ul>
  <li><code>--specs=nano.specs</code></li>
  <li><code>-nodefaultlibs</code></li>
  <li><code>-nostdlib</code></li>
  </ul></li>
  <li>Install the toolchain in a folder without any spaces</li>
  </ul>
  
  <p>Here's the automatically generated makefile:</p>
  
  <pre><code>################################################################################
  # Automatically-generated file. Do not edit!
  ################################################################################
  
  -include ../makefile.init
  
  RM := rm -rf
  
  # All of the sources participating in the build are defined here
  -include sources.mk
  -include system/src/subdir.mk
  -include system/HAL/Src/subdir.mk
  -include system/subdir.mk
  -include src/subdir.mk
  -include subdir.mk
  -include objects.mk
  
  ifneq ($(MAKECMDGOALS),clean)
  ifneq ($(strip $(CC_DEPS)),)
  -include $(CC_DEPS)
  endif
  ifneq ($(strip $(C++_DEPS)),)
  -include $(C++_DEPS)
  endif
  ifneq ($(strip $(C_UPPER_DEPS)),)
  -include $(C_UPPER_DEPS)
  endif
  ifneq ($(strip $(CXX_DEPS)),)
  -include $(CXX_DEPS)
  endif
  ifneq ($(strip $(ASM_DEPS)),)
  -include $(ASM_DEPS)
  endif
  ifneq ($(strip $(S_UPPER_DEPS)),)
  -include $(S_UPPER_DEPS)
  endif
  ifneq ($(strip $(C_DEPS)),)
  -include $(C_DEPS)
  endif
  ifneq ($(strip $(CPP_DEPS)),)
  -include $(CPP_DEPS)
  endif
  endif
  
  -include ../makefile.defs
  
  # Add inputs and outputs from these tool invocations to the build variables 
  SECONDARY_FLASH += \
  stm32Template.hex \
  
  SECONDARY_SIZE += \
  stm32Template.siz \
  
  
  # All Target
  all: stm32Template.elf secondary-outputs
  
  # Tool invocations
  stm32Template.elf: $(OBJS) $(USER_OBJS)
      @echo 'Building target: $@'
      @echo 'Invoking: GNU ARM Cross C++ Linker'
      arm-none-eabi-g++ -mcpu=cortex-m7 -mthumb -mfloat-abi=soft -O0 -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -ffreestanding -fno-move-loop-invariants -Wall -Wextra  -g3 -p -pg -T mem.ld -T libs.ld -T sections.ld -nostartfiles -L"../ldscripts" -Wl,-Map,"stm32Template.map" --specs=nano.specs -o "stm32Template.elf" $(OBJS) $(USER_OBJS) $(LIBS)
      @echo 'Finished building target: $@'
      @echo ' '
  
  stm32Template.hex: stm32Template.elf
      @echo 'Invoking: GNU ARM Cross Create Flash Image'
      arm-none-eabi-objcopy -O ihex "stm32Template.elf"  "stm32Template.hex"
      @echo 'Finished building: $@'
      @echo ' '
  
  stm32Template.siz: stm32Template.elf
      @echo 'Invoking: GNU ARM Cross Print Size'
      arm-none-eabi-size --format=berkeley "stm32Template.elf"
      @echo 'Finished building: $@'
      @echo ' '
  
  # Other Targets
  clean:
      -$(RM) $(CC_DEPS)$(C++_DEPS)$(OBJS)$(C_UPPER_DEPS)$(CXX_DEPS)$(SECONDARY_FLASH)$(SECONDARY_SIZE)$(ASM_DEPS)$(S_UPPER_DEPS)$(C_DEPS)$(CPP_DEPS) stm32Template.elf
      -@echo ' '
  
  secondary-outputs: $(SECONDARY_FLASH) $(SECONDARY_SIZE)
  
  .PHONY: all clean dependents
  
  -include ../makefile.targets
  </code></pre>
  
  <p>Does anybody have any inputs with this for me?</p>
  
  <p><strong>EDIT:</strong>
  GNU MCU Eclipse Plugin provides a template for new projects, even with this I get the same error.</p>