Menu

#69 Linker fails with space in path to linker script file

Next release
closed-fixed
None
5
2014-08-25
2013-12-23
No

I'm using the GNU ARM Eclipse plugins Version 1.1.7-201312221905 with Windows7 64bit and Eclipse Kepler.

I faced a problem with a path to the linker file using spaces (linker -T option).
My project is in
C:\ProgramData\Processor Expert\CWMCU_PE5_00\Examples\FRDM-KL25Z\FRDM-KL25Z_GNU_Arm_Eclipse
(note the space between "Processor" and "Expert")

I tried to double quote the path in the linker settings (Project > Properties > C/C++ Build > Settings > Cross ARM C Linker > General > Script Files (-T):
"${ProjDirPath}/linker/MKL25Z128_flash.ld"
but this did not help (the plugin removes the double quotes? See console output below:

'Building target: FRDM-KL25Z_GNU_Arm_Eclipse.elf'
'Invoking: Cross ARM C Linker'
arm-none-eabi-gcc -mcpu=cortex-m0plus -mthumb -O0 -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -Wall -g3 -T C:/ProgramData/Processor Expert/CWMCU_PE5_00/Examples/FRDM-KL25Z/FRDM-KL25Z_GNU_Arm_Eclipse/linker/MKL25Z128_flash.ld -nostartfiles -Xlinker --gc-sections -Wl,-Map,"FRDM-KL25Z_GNU_Arm_Eclipse.map" -o "FRDM-KL25Z_GNU_Arm_Eclipse.elf" ./startup/kinetis_sysinit.o ./startup/startup.o ./src/main.o ./src/sa_mtb.o
arm-none-eabi-gcc: error: Expert/CWMCU_PE5_00/Examples/FRDM-KL25Z/FRDM-KL25Z_GNU_Arm_Eclipse/linker/MKL25Z128_flash.ld: No such file or directory
make: *** [FRDM-KL25Z_GNU_Arm_Eclipse.elf] Error 1

Discussion

  • Liviu Ionescu (ilg)

    • status: open --> open-accepted
    • assigned_to: Liviu Ionescu (ilg)
     
  • Liviu Ionescu (ilg)

    thank you for the report, I'll investigate it as soon as possible.

    it must be similar to the other one (as it seems, using Macs for development has disadvantages too...)

     
  • Liviu Ionescu (ilg)

    the problem was related to the order of operations, the macro substitution was performed after the whitespace quoting, and the substituted paths remained unquoted.

    I added the macro substitution call before the whitespace quoting and on OS X the problem seems solved.

    please check on Windows and confirm.

    the new version is available from the updates-test site.

     
  • Erich Styger

    Erich Styger - 2013-12-24

    I have this specfied:
    "${ProjDirPath}/linker/MKL25Z128_flash.ld"
    but this gave me this (error):

    'Building target: FRDM-KL25Z_GNU_Arm_Eclipse.elf'
    'Invoking: Cross ARM C Linker'
    arm-none-eabi-gcc -mcpu=cortex-m0plus -mthumb -O0 -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -Wall -g3 -T C:/ProgramData/Processor\ Expert/CWMCU_PE5_00/Examples/FRDM-KL25Z/FRDM-KL25Z_GNU_Arm_Eclipse/linker/MKL25Z128_flash.ld -nostartfiles -Xlinker --gc-sections -Wl,-Map,"FRDM-KL25Z_GNU_Arm_Eclipse.map" -o "FRDM-KL25Z_GNU_Arm_Eclipse.elf" ./startup/kinetis_sysinit.o ./startup/startup.o ./src/main.o ./src/sa_mtb.o
    arm-none-eabi-gcc: error: Expert/CWMCU_PE5_00/Examples/FRDM-KL25Z/FRDM-KL25Z_GNU_Arm_Eclipse/linker/MKL25Z128_flash.ld: No such file or directory
    make: *** [FRDM-KL25Z_GNU_Arm_Eclipse.elf] Error 1

    So I see it escapes the space with Processor\ Expert, but still fails (because not quoted).
    Removing the double quotes was the same.

    So still something is missing?

     
  • Liviu Ionescu (ilg)

    hmmm, it looks like the windows make program does not process '\ ' properly and it really needs double quoting.

    a new version is available from the updates-test site; I tried it on a virtual machine and it seems to work with the make borrowed from the code sourcery distribution.

     
  • Erich Styger

    Erich Styger - 2013-12-24

    Hi Liviu,
    good news: now it works :-)

     
  • Liviu Ionescu (ilg)

    • status: open-accepted --> closed-fixed
     
  • Liviu Ionescu (ilg)

    fixed in 1.1.7-201312241058

     
MongoDB Logo MongoDB