energia / Energia

Fork of Arduino for the Texas Instruments LaunchPad's
http://energia.nu
Other
793 stars 673 forks source link

Energia issue converting directory to 8.3 format #174

Closed brunompena closed 11 years ago

brunompena commented 11 years ago

Hello,

I have initially installed Energia on a Windows 7 x64 inside the folder C:\Program Files (x86) but quickly found out that I was unable to compile any of the included examples:

Cannot run program "C:\PROGRA~1\ENERGIA\HARDWARE\TOOLS\MSP430\BIN\msp430-g++": CreateProcess error=2, The system cannot find the file specified

C:\PROGRA~1\ENERGIA\HARDWARE\TOOLS\MSP430\BIN\msp430-g++ -c -g -Os -Wall -ffunction-sections -fdata-sections -mmcu=msp430g2553 -DF_CPU=16000000L -MMD -DARDUINO=101 -DENERGIA=9 -IC:\Program Files (x86)\Energia\hardware\msp430\cores\msp430 -IC:\Program Files (x86)\Energia\hardware\msp430\variants\launchpad D:\Users\Bruno\AppData\Local\Temp\build5451903351792073962.tmp\Blink.cpp -o D:\Users\Bruno\AppData\Local\Temp\build5451903351792073962.tmp\Blink.cpp.o 

By looking at the output of dir /X Energia should be using C:\PROGRA~2 instead of C:\PROGRA~1:

C:\>dir /X
 Volume in drive C is Windows
 Volume Serial Number is 1CBE-3C11

 Directory of C:\

14-07-2009  03:20    <DIR>                       PerfLogs
13-01-2013  11:36    <DIR>          PROGRA~1     Program Files
13-01-2013  11:36    <DIR>          PROGRA~2     Program Files (x86)
02-01-2013  16:05    <DIR>                       Windows
               0 File(s)              0 bytes
               4 Dir(s)  23.104.094.208 bytes free

As a quick fix I moved the Energia folder to C:\Program Files and it started to work:

C:\PROGRA~1\ENERGIA\HARDWARE\TOOLS\MSP430\BIN\msp430-g++ -c -g -Os -Wall -ffunction-sections -fdata-sections -mmcu=msp430g2553 -DF_CPU=16000000L -MMD -DARDUINO=101 -DENERGIA=9 -IC:\Program Files\Energia\hardware\msp430\cores\msp430 -IC:\Program Files\Energia\hardware\msp430\variants\launchpad D:\Users\Bruno\AppData\Local\Temp\build8296635518794366316.tmp\Blink.cpp -o D:\Users\Bruno\AppData\Local\Temp\build8296635518794366316.tmp\Blink.cpp.o 
C:\PROGRA~1\ENERGIA\HARDWARE\TOOLS\MSP430\BIN\msp430-gcc -c -g -Os -Wall -ffunction-sections -fdata-sections -mmcu=msp430g2553 -DF_CPU=16000000L -MMD -DARDUINO=101 -DENERGIA=9 -IC:\Program Files\Energia\hardware\msp430\cores\msp430 -IC:\Program Files\Energia\hardware\msp430\variants\launchpad C:\Program Files\Energia\hardware\msp430\cores\msp430\random.c -o D:\Users\Bruno\AppData\Local\Temp\build8296635518794366316.tmp\random.c.o 
C:\PROGRA~1\ENERGIA\HARDWARE\TOOLS\MSP430\BIN\msp430-gcc -c -g -Os -Wall -ffunction-sections -fdata-sections -mmcu=msp430g2553 -DF_CPU=16000000L -MMD -DARDUINO=101 -DENERGIA=9 -IC:\Program Files\Energia\hardware\msp430\cores\msp430 -IC:\Program Files\Energia\hardware\msp430\variants\launchpad C:\Program Files\Energia\hardware\msp430\cores\msp430\twi.c -o D:\Users\Bruno\AppData\Local\Temp\build8296635518794366316.tmp\twi.c.o 
C:\PROGRA~1\ENERGIA\HARDWARE\TOOLS\MSP430\BIN\msp430-gcc -c -g -Os -Wall -ffunction-sections -fdata-sections -mmcu=msp430g2553 -DF_CPU=16000000L -MMD -DARDUINO=101 -DENERGIA=9 -IC:\Program Files\Energia\hardware\msp430\cores\msp430 -IC:\Program Files\Energia\hardware\msp430\variants\launchpad C:\Program Files\Energia\hardware\msp430\cores\msp430\usci_isr_handler.c -o D:\Users\Bruno\AppData\Local\Temp\build8296635518794366316.tmp\usci_isr_handler.c.o 
C:\PROGRA~1\ENERGIA\HARDWARE\TOOLS\MSP430\BIN\msp430-gcc -c -g -Os -Wall -ffunction-sections -fdata-sections -mmcu=msp430g2553 -DF_CPU=16000000L -MMD -DARDUINO=101 -DENERGIA=9 -IC:\Program Files\Energia\hardware\msp430\cores\msp430 -IC:\Program Files\Energia\hardware\msp430\variants\launchpad C:\Program Files\Energia\hardware\msp430\cores\msp430\WInterrupts.c -o D:\Users\Bruno\AppData\Local\Temp\build8296635518794366316.tmp\WInterrupts.c.o 
C:\PROGRA~1\ENERGIA\HARDWARE\TOOLS\MSP430\BIN\msp430-gcc -c -g -Os -Wall -ffunction-sections -fdata-sections -mmcu=msp430g2553 -DF_CPU=16000000L -MMD -DARDUINO=101 -DENERGIA=9 -IC:\Program Files\Energia\hardware\msp430\cores\msp430 -IC:\Program Files\Energia\hardware\msp430\variants\launchpad C:\Program Files\Energia\hardware\msp430\cores\msp430\wiring.c -o D:\Users\Bruno\AppData\Local\Temp\build8296635518794366316.tmp\wiring.c.o 
C:\PROGRA~1\ENERGIA\HARDWARE\TOOLS\MSP430\BIN\msp430-gcc -c -g -Os -Wall -ffunction-sections -fdata-sections -mmcu=msp430g2553 -DF_CPU=16000000L -MMD -DARDUINO=101 -DENERGIA=9 -IC:\Program Files\Energia\hardware\msp430\cores\msp430 -IC:\Program Files\Energia\hardware\msp430\variants\launchpad C:\Program Files\Energia\hardware\msp430\cores\msp430\wiring_analog.c -o D:\Users\Bruno\AppData\Local\Temp\build8296635518794366316.tmp\wiring_analog.c.o 
C:\PROGRA~1\ENERGIA\HARDWARE\TOOLS\MSP430\BIN\msp430-gcc -c -g -Os -Wall -ffunction-sections -fdata-sections -mmcu=msp430g2553 -DF_CPU=16000000L -MMD -DARDUINO=101 -DENERGIA=9 -IC:\Program Files\Energia\hardware\msp430\cores\msp430 -IC:\Program Files\Energia\hardware\msp430\variants\launchpad C:\Program Files\Energia\hardware\msp430\cores\msp430\wiring_digital.c -o D:\Users\Bruno\AppData\Local\Temp\build8296635518794366316.tmp\wiring_digital.c.o 
C:\PROGRA~1\ENERGIA\HARDWARE\TOOLS\MSP430\BIN\msp430-gcc -c -g -Os -Wall -ffunction-sections -fdata-sections -mmcu=msp430g2553 -DF_CPU=16000000L -MMD -DARDUINO=101 -DENERGIA=9 -IC:\Program Files\Energia\hardware\msp430\cores\msp430 -IC:\Program Files\Energia\hardware\msp430\variants\launchpad C:\Program Files\Energia\hardware\msp430\cores\msp430\wiring_pulse.c -o D:\Users\Bruno\AppData\Local\Temp\build8296635518794366316.tmp\wiring_pulse.c.o 
C:\PROGRA~1\ENERGIA\HARDWARE\TOOLS\MSP430\BIN\msp430-gcc -c -g -Os -Wall -ffunction-sections -fdata-sections -mmcu=msp430g2553 -DF_CPU=16000000L -MMD -DARDUINO=101 -DENERGIA=9 -IC:\Program Files\Energia\hardware\msp430\cores\msp430 -IC:\Program Files\Energia\hardware\msp430\variants\launchpad C:\Program Files\Energia\hardware\msp430\cores\msp430\wiring_shift.c -o D:\Users\Bruno\AppData\Local\Temp\build8296635518794366316.tmp\wiring_shift.c.o 
C:\PROGRA~1\ENERGIA\HARDWARE\TOOLS\MSP430\BIN\msp430-g++ -c -g -Os -Wall -ffunction-sections -fdata-sections -mmcu=msp430g2553 -DF_CPU=16000000L -MMD -DARDUINO=101 -DENERGIA=9 -IC:\Program Files\Energia\hardware\msp430\cores\msp430 -IC:\Program Files\Energia\hardware\msp430\variants\launchpad C:\Program Files\Energia\hardware\msp430\cores\msp430\HardwareSerial.cpp -o D:\Users\Bruno\AppData\Local\Temp\build8296635518794366316.tmp\HardwareSerial.cpp.o 
C:\PROGRA~1\ENERGIA\HARDWARE\TOOLS\MSP430\BIN\msp430-g++ -c -g -Os -Wall -ffunction-sections -fdata-sections -mmcu=msp430g2553 -DF_CPU=16000000L -MMD -DARDUINO=101 -DENERGIA=9 -IC:\Program Files\Energia\hardware\msp430\cores\msp430 -IC:\Program Files\Energia\hardware\msp430\variants\launchpad C:\Program Files\Energia\hardware\msp430\cores\msp430\main.cpp -o D:\Users\Bruno\AppData\Local\Temp\build8296635518794366316.tmp\main.cpp.o 
C:\PROGRA~1\ENERGIA\HARDWARE\TOOLS\MSP430\BIN\msp430-g++ -c -g -Os -Wall -ffunction-sections -fdata-sections -mmcu=msp430g2553 -DF_CPU=16000000L -MMD -DARDUINO=101 -DENERGIA=9 -IC:\Program Files\Energia\hardware\msp430\cores\msp430 -IC:\Program Files\Energia\hardware\msp430\variants\launchpad C:\Program Files\Energia\hardware\msp430\cores\msp430\new.cpp -o D:\Users\Bruno\AppData\Local\Temp\build8296635518794366316.tmp\new.cpp.o 
C:\PROGRA~1\ENERGIA\HARDWARE\TOOLS\MSP430\BIN\msp430-g++ -c -g -Os -Wall -ffunction-sections -fdata-sections -mmcu=msp430g2553 -DF_CPU=16000000L -MMD -DARDUINO=101 -DENERGIA=9 -IC:\Program Files\Energia\hardware\msp430\cores\msp430 -IC:\Program Files\Energia\hardware\msp430\variants\launchpad C:\Program Files\Energia\hardware\msp430\cores\msp430\Print.cpp -o D:\Users\Bruno\AppData\Local\Temp\build8296635518794366316.tmp\Print.cpp.o 
C:\PROGRA~1\ENERGIA\HARDWARE\TOOLS\MSP430\BIN\msp430-g++ -c -g -Os -Wall -ffunction-sections -fdata-sections -mmcu=msp430g2553 -DF_CPU=16000000L -MMD -DARDUINO=101 -DENERGIA=9 -IC:\Program Files\Energia\hardware\msp430\cores\msp430 -IC:\Program Files\Energia\hardware\msp430\variants\launchpad C:\Program Files\Energia\hardware\msp430\cores\msp430\Stream.cpp -o D:\Users\Bruno\AppData\Local\Temp\build8296635518794366316.tmp\Stream.cpp.o 
C:\PROGRA~1\ENERGIA\HARDWARE\TOOLS\MSP430\BIN\msp430-g++ -c -g -Os -Wall -ffunction-sections -fdata-sections -mmcu=msp430g2553 -DF_CPU=16000000L -MMD -DARDUINO=101 -DENERGIA=9 -IC:\Program Files\Energia\hardware\msp430\cores\msp430 -IC:\Program Files\Energia\hardware\msp430\variants\launchpad C:\Program Files\Energia\hardware\msp430\cores\msp430\TimerSerial.cpp -o D:\Users\Bruno\AppData\Local\Temp\build8296635518794366316.tmp\TimerSerial.cpp.o 
C:\PROGRA~1\ENERGIA\HARDWARE\TOOLS\MSP430\BIN\msp430-g++ -c -g -Os -Wall -ffunction-sections -fdata-sections -mmcu=msp430g2553 -DF_CPU=16000000L -MMD -DARDUINO=101 -DENERGIA=9 -IC:\Program Files\Energia\hardware\msp430\cores\msp430 -IC:\Program Files\Energia\hardware\msp430\variants\launchpad C:\Program Files\Energia\hardware\msp430\cores\msp430\Tone.cpp -o D:\Users\Bruno\AppData\Local\Temp\build8296635518794366316.tmp\Tone.cpp.o 
C:\PROGRA~1\ENERGIA\HARDWARE\TOOLS\MSP430\BIN\msp430-g++ -c -g -Os -Wall -ffunction-sections -fdata-sections -mmcu=msp430g2553 -DF_CPU=16000000L -MMD -DARDUINO=101 -DENERGIA=9 -IC:\Program Files\Energia\hardware\msp430\cores\msp430 -IC:\Program Files\Energia\hardware\msp430\variants\launchpad C:\Program Files\Energia\hardware\msp430\cores\msp430\Wire.cpp -o D:\Users\Bruno\AppData\Local\Temp\build8296635518794366316.tmp\Wire.cpp.o 
C:\PROGRA~1\ENERGIA\HARDWARE\TOOLS\MSP430\BIN\msp430-g++ -c -g -Os -Wall -ffunction-sections -fdata-sections -mmcu=msp430g2553 -DF_CPU=16000000L -MMD -DARDUINO=101 -DENERGIA=9 -IC:\Program Files\Energia\hardware\msp430\cores\msp430 -IC:\Program Files\Energia\hardware\msp430\variants\launchpad C:\Program Files\Energia\hardware\msp430\cores\msp430\WMath.cpp -o D:\Users\Bruno\AppData\Local\Temp\build8296635518794366316.tmp\WMath.cpp.o 
C:\PROGRA~1\ENERGIA\HARDWARE\TOOLS\MSP430\BIN\msp430-g++ -c -g -Os -Wall -ffunction-sections -fdata-sections -mmcu=msp430g2553 -DF_CPU=16000000L -MMD -DARDUINO=101 -DENERGIA=9 -IC:\Program Files\Energia\hardware\msp430\cores\msp430 -IC:\Program Files\Energia\hardware\msp430\variants\launchpad C:\Program Files\Energia\hardware\msp430\cores\msp430\WString.cpp -o D:\Users\Bruno\AppData\Local\Temp\build8296635518794366316.tmp\WString.cpp.o 
C:\PROGRA~1\ENERGIA\HARDWARE\TOOLS\MSP430\BIN\msp430-ar rcs D:\Users\Bruno\AppData\Local\Temp\build8296635518794366316.tmp\core.a D:\Users\Bruno\AppData\Local\Temp\build8296635518794366316.tmp\random.c.o 
C:\PROGRA~1\ENERGIA\HARDWARE\TOOLS\MSP430\BIN\msp430-ar rcs D:\Users\Bruno\AppData\Local\Temp\build8296635518794366316.tmp\core.a D:\Users\Bruno\AppData\Local\Temp\build8296635518794366316.tmp\twi.c.o 
C:\PROGRA~1\ENERGIA\HARDWARE\TOOLS\MSP430\BIN\msp430-ar rcs D:\Users\Bruno\AppData\Local\Temp\build8296635518794366316.tmp\core.a D:\Users\Bruno\AppData\Local\Temp\build8296635518794366316.tmp\usci_isr_handler.c.o 
C:\PROGRA~1\ENERGIA\HARDWARE\TOOLS\MSP430\BIN\msp430-ar rcs D:\Users\Bruno\AppData\Local\Temp\build8296635518794366316.tmp\core.a D:\Users\Bruno\AppData\Local\Temp\build8296635518794366316.tmp\WInterrupts.c.o 
C:\PROGRA~1\ENERGIA\HARDWARE\TOOLS\MSP430\BIN\msp430-ar rcs D:\Users\Bruno\AppData\Local\Temp\build8296635518794366316.tmp\core.a D:\Users\Bruno\AppData\Local\Temp\build8296635518794366316.tmp\wiring.c.o 
C:\PROGRA~1\ENERGIA\HARDWARE\TOOLS\MSP430\BIN\msp430-ar rcs D:\Users\Bruno\AppData\Local\Temp\build8296635518794366316.tmp\core.a D:\Users\Bruno\AppData\Local\Temp\build8296635518794366316.tmp\wiring_analog.c.o 
C:\PROGRA~1\ENERGIA\HARDWARE\TOOLS\MSP430\BIN\msp430-ar rcs D:\Users\Bruno\AppData\Local\Temp\build8296635518794366316.tmp\core.a D:\Users\Bruno\AppData\Local\Temp\build8296635518794366316.tmp\wiring_digital.c.o 
C:\PROGRA~1\ENERGIA\HARDWARE\TOOLS\MSP430\BIN\msp430-ar rcs D:\Users\Bruno\AppData\Local\Temp\build8296635518794366316.tmp\core.a D:\Users\Bruno\AppData\Local\Temp\build8296635518794366316.tmp\wiring_pulse.c.o 
C:\PROGRA~1\ENERGIA\HARDWARE\TOOLS\MSP430\BIN\msp430-ar rcs D:\Users\Bruno\AppData\Local\Temp\build8296635518794366316.tmp\core.a D:\Users\Bruno\AppData\Local\Temp\build8296635518794366316.tmp\wiring_shift.c.o 
C:\PROGRA~1\ENERGIA\HARDWARE\TOOLS\MSP430\BIN\msp430-ar rcs D:\Users\Bruno\AppData\Local\Temp\build8296635518794366316.tmp\core.a D:\Users\Bruno\AppData\Local\Temp\build8296635518794366316.tmp\HardwareSerial.cpp.o 
C:\PROGRA~1\ENERGIA\HARDWARE\TOOLS\MSP430\BIN\msp430-ar rcs D:\Users\Bruno\AppData\Local\Temp\build8296635518794366316.tmp\core.a D:\Users\Bruno\AppData\Local\Temp\build8296635518794366316.tmp\main.cpp.o 
C:\PROGRA~1\ENERGIA\HARDWARE\TOOLS\MSP430\BIN\msp430-ar rcs D:\Users\Bruno\AppData\Local\Temp\build8296635518794366316.tmp\core.a D:\Users\Bruno\AppData\Local\Temp\build8296635518794366316.tmp\new.cpp.o 
C:\PROGRA~1\ENERGIA\HARDWARE\TOOLS\MSP430\BIN\msp430-ar rcs D:\Users\Bruno\AppData\Local\Temp\build8296635518794366316.tmp\core.a D:\Users\Bruno\AppData\Local\Temp\build8296635518794366316.tmp\Print.cpp.o 
C:\PROGRA~1\ENERGIA\HARDWARE\TOOLS\MSP430\BIN\msp430-ar rcs D:\Users\Bruno\AppData\Local\Temp\build8296635518794366316.tmp\core.a D:\Users\Bruno\AppData\Local\Temp\build8296635518794366316.tmp\Stream.cpp.o 
C:\PROGRA~1\ENERGIA\HARDWARE\TOOLS\MSP430\BIN\msp430-ar rcs D:\Users\Bruno\AppData\Local\Temp\build8296635518794366316.tmp\core.a D:\Users\Bruno\AppData\Local\Temp\build8296635518794366316.tmp\TimerSerial.cpp.o 
C:\PROGRA~1\ENERGIA\HARDWARE\TOOLS\MSP430\BIN\msp430-ar rcs D:\Users\Bruno\AppData\Local\Temp\build8296635518794366316.tmp\core.a D:\Users\Bruno\AppData\Local\Temp\build8296635518794366316.tmp\Tone.cpp.o 
C:\PROGRA~1\ENERGIA\HARDWARE\TOOLS\MSP430\BIN\msp430-ar rcs D:\Users\Bruno\AppData\Local\Temp\build8296635518794366316.tmp\core.a D:\Users\Bruno\AppData\Local\Temp\build8296635518794366316.tmp\Wire.cpp.o 
C:\PROGRA~1\ENERGIA\HARDWARE\TOOLS\MSP430\BIN\msp430-ar rcs D:\Users\Bruno\AppData\Local\Temp\build8296635518794366316.tmp\core.a D:\Users\Bruno\AppData\Local\Temp\build8296635518794366316.tmp\WMath.cpp.o 
C:\PROGRA~1\ENERGIA\HARDWARE\TOOLS\MSP430\BIN\msp430-ar rcs D:\Users\Bruno\AppData\Local\Temp\build8296635518794366316.tmp\core.a D:\Users\Bruno\AppData\Local\Temp\build8296635518794366316.tmp\WString.cpp.o 
C:\PROGRA~1\ENERGIA\HARDWARE\TOOLS\MSP430\BIN\msp430-gcc -Os -Wl,-gc-sections,-u,main -mmcu=msp430g2553 -o D:\Users\Bruno\AppData\Local\Temp\build8296635518794366316.tmp\Blink.cpp.elf D:\Users\Bruno\AppData\Local\Temp\build8296635518794366316.tmp\Blink.cpp.o D:\Users\Bruno\AppData\Local\Temp\build8296635518794366316.tmp\core.a -LD:\Users\Bruno\AppData\Local\Temp\build8296635518794366316.tmp -lm 
C:\PROGRA~1\ENERGIA\HARDWARE\TOOLS\MSP430\BIN\msp430-objcopy -O ihex -R .eeprom D:\Users\Bruno\AppData\Local\Temp\build8296635518794366316.tmp\Blink.cpp.elf D:\Users\Bruno\AppData\Local\Temp\build8296635518794366316.tmp\Blink.cpp.hex 
Binary sketch size: 589 bytes (of a 16.384 byte maximum)

The problem seems to be inside Base.java that is blindly appending ~1 to any long filename.

A possible solution for this would be to call GetShortPathName. An implementation in Java of the call is available here

eried commented 11 years ago

Yeah, I also noticed this, it is a problem in the original IDE too. I have fixed this, first tried to use non 8.3 format (because is being deprecated) but the Energia toolkit requires 8.3 to work properly in Windows, then with that library but I didn't liked to call that function every time.

robertinant commented 11 years ago

Address with commit 808b43038a7e608e469a3394a3a0fdaef5c25c37

Thanks Eried!!!