Skip to content

Command line invocation on Windows #2411

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
tschulz3016 opened this issue Nov 4, 2014 · 4 comments
Closed

Command line invocation on Windows #2411

tschulz3016 opened this issue Nov 4, 2014 · 4 comments
Labels
Component: CLI The Arduino IDE's command line interface Type: Bug

Comments

@tschulz3016
Copy link

The command line build does not work at all for me (1.5.8 and current nightly, on Windows 7).

I'm, running:

<path_to_arduino>\arduino.exe  myproject.ino

or:

cd <arduino_path>
arduino.exe  <some_path>\myproject.ino

The IDE produces a dialog box with "Cannot specify any sketch files".
Same happens if arduino_debug.exe is used. Option --verbose does not give any additional information.

Regards,

@matthijskooijman
Copy link
Collaborator

Are you sure you're not specifying any other options? Looking at the code, this error message should only be possible when specifying options (e.g. like --verbose). Without options and with just a .ino file, this should not happen.

@matthijskooijman matthijskooijman added Component: CLI The Arduino IDE's command line interface Type: Bug labels Nov 7, 2014
@tschulz3016
Copy link
Author

Right, that message "Cannot specify any sketch files" comes up only when called with -v.
When calling just like this:

\w\arduino-nightly-indows\arduino-nightly\arduino.exe mystep.ino

I'm getting a dialog with "Failed to open sketch: "mystep.ino". Then the IDE opens with a new sketch.

Same happens when I use --verify.
As I understand, I should be able to compile and upload the sketch from the command line? Let me know if I can assist. I would find the command line very useful indeed.

@matthijskooijman
Copy link
Collaborator

You'll need to provide a full path to your .ino file. When starting Arduino, the current directory is changed to the install directory for some java stuff to load properly. On Linux there is a workaround for this, but not for Windows or OSX yet. See #1493 for details about this issue.

@tschulz3016
Copy link
Author

Ok that seems to work for me now. Thank you.
It is worthwhile pointing out that the path to the project file needs to start with the drive letter like:

   \w\arduino-nightly-indows\arduino-nightly\arduino.exe  C:\Projects\arduino\mystep\mystep.ino 

This is although the current drive is already C: and there are no other drive letters in use on my machine. Without the drive letter, I'm still getting the error.

suculent pushed a commit to suculent/arduino-docker-build that referenced this issue May 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: CLI The Arduino IDE's command line interface Type: Bug
Projects
None yet
Development

No branches or pull requests

2 participants