Re: [Energia] mspgcc in path with spaces -> linking issue
Peter Bigot <[email protected]>
| Newsgroups | gmane.comp.hardware.texas-instruments.msp430.gcc.user |
|---|---|
| Message-ID | <CAPOJ94POYx+fhga2HWH_NNeoEq-9AtcLUKPyMZBtOp2gTxZBOw@mail.gmail.com> |
Generally you should use msp430-gcc as the driver since it will add necessary additional linker flags. In this case, the simpler solution might be to use msp430-ld directly since what it adds doesn't work. I don't plan to investigate this but if anybody does: the issue is probably because msp430-gcc needs to extract the MCU from the command line and generate an additional parameter to the linker to tell it where to find mcu-specific files. This is done in file gcc/config/msp430/msp430-gcc.c in the gcc source, in function msp430_mculdscriptpaths. The resulting string is inserted into the GCC specs file and processed by the shared driver code. The syntax and processing of the specs file is described at http://gcc.gnu.org/onlinedocs/gcc-4.7.2/gcc/Spec-Files.html#Spec-Files It may be as simple as having msp430-mculdscriptpaths add quotes around the path value, but it may not as I don't recall seeing that specs file tokenization pays attention to quotes. If there's a way to represent a path that includes spaces, the specs file document should explain it. If a solution is found, please make sure the problem and solution are reported on the mspgcc project tracker so it can be reviewed for incorporation into any future releases. Peter On Fri, Mar 22, 2013 at 6:24 PM, Robert Wessels <[email protected]>wrote: > I am running into linking issues in Energia if Energia is placed in a > directory containing spaces. I have seen this happen on Windows and Mac and > will test linux later. > > Linking directly with ld seems to solve the issue. > 2 questions: > 1: Should I be calling the linker differently? > 2: Should I be linking directly with ld rather than msp430-gcc? > > This is the error we are seeing: > > /Users/rwessels/Desktop/Path With > Spaces/Energia.app/Contents/Resources/Java/hardware/tools/msp430/bin/msp430-gcc > -Os -Wl,-gc-sections,-u,main -mmcu=msp430g2553 -o > /var/folders/_2/jkjmx9g52rld63ptzv1j4w4h0000gn/T/build3435385133181233614.tmp/Blink.cpp.elf > /var/folders/_2/jkjmx9g52rld63ptzv1j4w4h0000gn/T/build3435385133181233614.tmp/Blink.cpp.o > /var/folders/_2/jkjmx9g52rld63ptzv1j4w4h0000gn/T/build3435385133181233614.tmp/core.a > -L/var/folders/_2/jkjmx9g52rld63ptzv1j4w4h0000gn/T/build3435385133181233614.tmp > -lm > /Users/rwessels/Desktop/Path With > Spaces/Energia.app/Contents/Resources/Java/hardware/tools/msp430/bin/../lib/gcc/msp430/4.6.3/../../../../msp430/bin/ld: > cannot open linker script file memory.x: No such file or directory > collect2: ld returned 1 exit status > > Cheers, > > Robert > > ------------------------------------------------------------------------------ > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_d2d_mar > _______________________________________________ > Mspgcc-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/mspgcc-users > ------------------------------------------------------------------------------ Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_mar _______________________________________________ Mspgcc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mspgcc-users