Skip to content
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

Cannot set output folder to absolute path #450

Closed
iFreilicht opened this issue Dec 10, 2017 · 5 comments
Closed

Cannot set output folder to absolute path #450

iFreilicht opened this issue Dec 10, 2017 · 5 comments
Assignees
Milestone

Comments

@iFreilicht
Copy link

iFreilicht commented Dec 10, 2017

So to me it seems sensible to but the build output folder into the %temp% directory (usually C:\Users\<user>\AppData\Local\Temp). This is how the Arduino IDE does it as well.

However, setting the output variable in arduino.json will lead to an error message when starting the build and upload:

arduino.json

{
    "sketch": "bcm_data_direction.ino",
    "board": "arduino:avr:micro",
    "port": "COM4",
    "output": "C:\\Users\\<user>\\AppData\\Local\\Temp\\ArduinoBuild"
}

Output

[Starting] Upload sketch - bcm_data_direction.ino
Looking for library 'user32'
Adding paths from jna.library.path: null
Trying user32.dll
Found library 'user32' at user32.dll
Looking for library 'shell32'
Adding paths from jna.library.path: null
Trying shell32.dll
Found library 'shell32' at shell32.dll
Looking for library 'Ole32'
Adding paths from jna.library.path: null
Trying Ole32.dll
Found library 'Ole32' at Ole32.dll
Loading configuration...
Initialising packages...
Preparing boards...
Verifying...
[Error] Exit with code=1

I also tried this with other absolute paths, and even on different drives. I get this very same error message every single time.

It does work perfectly when setting a relative path.

@frgazor
Copy link

frgazor commented Dec 16, 2017

I can confirm this. There is some other funky behavior:
"output": "../build" works fine, but "output": "build" will only compile my sketch for verify and won't compile for upload.

@iFreilicht
Copy link
Author

That is a different issue, though. The documentation specifically states that the build directory should not be inside the sketch directory as this can cause the build to fail.

In your example, "output": "build" is still a relative path, not an absolute one.

@Peter-B-
Copy link

Peter-B- commented Feb 5, 2018

When I use an absolute path, I get a InvalidPathException:

When I the following line to my arduino.json
"output": "d:\\temp\\arduino"

I see this error:
java.nio.file.InvalidPathException: Illegal char <:> at index 53: d:\Dokuments\Arduino\generated_examples\VoiceRecord\d:\temp\arduino

It looks like it is interpreted as a relative path. Is there a way to tell it, that this is a absolute path?

@liydu liydu added the bug label Feb 9, 2018
@liydu liydu added this to the Sprint 133 milestone Feb 9, 2018
@aster94
Copy link
Contributor

aster94 commented Feb 12, 2018

+1 and also #461

@czgtest
Copy link
Contributor

czgtest commented Apr 3, 2018

the version 0.2.12 support set output folder to absolute path

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

8 participants