Vscode-arduino: Instructions for Linux incorrect

Created on 5 Apr 2018  路  3Comments  路  Source: microsoft/vscode-arduino

In the readme the instructions refer to a file that does not exist:

arduino.commandPath - Path to an executable (or script) relative to arduino.path. You can use a custom launch script to run Arduino by modifying this setting. (Requires a restart after change) Example: run-arduino.bat for Windows, Contents/MacOS/run-arduino.sh for Mac, bin/run-arduino.sh for Linux."

I have arduino 1.8.5. There is no bin folder and there is no file named run-arduino.sh. I also tried version 1.8.1 mentioned in the readme as well as 1.6.5, neither has this file.

In my 1.8.5 package I have an executable called arduino and another one called arduino-builder. I tried putting "arduino" in the arduino.commandPath and I was able to run the board manager and the serial port manager.

However trying to build (verify) a sketch I get:
[Starting] Verify sketch - Marlin/Marlin.ino
[Error] Exit with code=undefined

my arduino.json:

{
"board": "STM32:stm32:Nucleo_64",
"configuration": "pnum=NUCLEO_F446RE,upload_method=STLink,xserial=generic,usb=none,opt=osstd",
"sketch": "Marlin/Marlin.ino",
"port": "/dev/ttyACM0",
"output": "../build"
}

my settings.json:
{
"arduino.path": "/home/xxx/arduino-1.8.5",
"arduino.commandPath": "arduino",
"arduino.additionalUrls": "https://raw.githubusercontent.com/Lauszus/Sanguino/master/package_lauszus_sanguino_index.json,https://github.com/stm32duino/BoardManagerFiles/raw/master/STM32/package_stm_index.json",
"arduino.logLevel": "info",
"arduino.enableUSBDetection": true
}

Running Ubuntu 17.1 x64.
Using arduino extension 0.2.11
VS Code version 1.21.1

help wanted

Most helpful comment

Yes removing the arduino.commandPath solved the issue. It seems to be working now.

Two thing, you should probably update the instructions to mention the arduino.commandPath is optional and the run-arduino.sh/bat file is a defined by the user - probably provide an example - it is hard to guess what to put there.

Also when the arduino.commantPath is wrong it would be good idea to provide better error message, not just fail with a generic "something went wrong" error.

Thank you for the help.

All 3 comments

@alexsomesan Can you help out ? how to use the arduino.commandPath ?

@ghent360 As far as I know, the run-arduino.sh is a custom launch script which defined by user, it is not an exist file, so we can not find it , it is expected. if you want to use it , you can define this file by yourself.

For the error : Exit with code=undefined when run Arduino verify command.
I get the same error when arduino.path is not right. Can you delete the arduino.path setting and run command again ?

Yes removing the arduino.commandPath solved the issue. It seems to be working now.

Two thing, you should probably update the instructions to mention the arduino.commandPath is optional and the run-arduino.sh/bat file is a defined by the user - probably provide an example - it is hard to guess what to put there.

Also when the arduino.commantPath is wrong it would be good idea to provide better error message, not just fail with a generic "something went wrong" error.

Thank you for the help.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

khaled-hamam picture khaled-hamam  路  4Comments

clarkbremer picture clarkbremer  路  6Comments

boskoe picture boskoe  路  3Comments

kerrsmith picture kerrsmith  路  4Comments

mathieubrun picture mathieubrun  路  4Comments