Skip to content

Windows error '-DUSB_PRODUCT=Arduino Due': No such file or directory (spaces in defines not supported on windows) #263

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
real-artswan opened this issue May 25, 2015 · 4 comments

Comments

@real-artswan
Copy link

Got error when build
arm-none-eabi-g++: error: '-DUSB_PRODUCT=Arduino Due': No such file or directory
To workaround either fix the boards.txt file by changing
arduino_due_x_dbg.build.usb_product="Arduino Due"
to
arduino_due_x_dbg.build.usb_product=""Arduino Due""
(this will break original Arduino IDE)
or fix A.BUILD.USB_PRODUCT variable in the eclipse project properties

@real-artswan
Copy link
Author

forgot to say: to make workaround working platform.txt must be fixed too. Need to remove quotes around define parameters so line
build.usb_flags=-DUSB_VID={build.vid} -DUSB_PID={build.pid} -DUSBCON '-DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}'
must be replaced with
build.usb_flags=-DUSB_VID={build.vid} -DUSB_PID={build.pid} -DUSBCON -DUSB_MANUFACTURER={build.usb_manufacturer} -DUSB_PRODUCT={build.usb_product}

Issue confirmed with nightly 2015-05-26 and arduino 1.6.1

@jantje
Copy link
Member

jantje commented May 30, 2015

on my system the command states
'-DUSB_PRODUCT="Arduino Due"'

this is in my platform.txt
build.usb_flags=-DUSB_VID={build.vid} -DUSB_PID={build.pid} -DUSBCON '-DUSB_MANUFACTURER={build.usb_manufacturer}' '-DUSB_PRODUCT={build.usb_product}'

I checked my boards.txt
build.usb_product="Arduino Due"
So the quotes go missing when converting platform.txt to environment variables on windows.
Most likely the problem is in https://github.com./jantje/arduino-eclipse-plugin/blob/master/it.baeyens.arduino.core/src/it/baeyens/arduino/tools/ArduinoBoards.java
when triggered from the setTheEnvironmentVariablesAddtheBoardsTxt in
https://github.com./jantje/arduino-eclipse-plugin/blob/master/it.baeyens.arduino.core/src/it/baeyens/arduino/tools/ArduinoHelpers.java

Is there a volunteer with a windows machine to fix this?

@jantje
Copy link
Member

jantje commented May 30, 2015

looking a bit closer the place to start investigating is https://github.com./jantje/arduino-eclipse-plugin/blob/master/it.baeyens.arduino.core/src/it/baeyens/arduino/tools/ArduinoHelpers.java#L679
currentPair.getValue() may return a value without double quotes
or MakeEnvironmentString removes the quotes
or something after that

@jantje
Copy link
Member

jantje commented Sep 16, 2015

More investigation shows this is a problem with a different command line interpreter in the arduino IDE and the eclipse plugin.
I know a way to fix this and will fix it when the framework will be added.

@jantje jantje added Help wanted If you want to become a active contributor, start looking at this issue. and removed status: needs investigation We don't know what causes this labels Sep 16, 2015
@jantje jantje changed the title Windows error '-DUSB_PRODUCT=Arduino Due': No such file or directory Windows error '-DUSB_PRODUCT=Arduino Due': No such file or directory (spaces in defines not supported on windows) Sep 16, 2015
@jantje jantje closed this as completed Sep 29, 2015
@jantje jantje added status: fixed in 2.4 upgrade instructions: reconfigure plugin and removed Help wanted If you want to become a active contributor, start looking at this issue. labels Sep 30, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants