missing Arduino boards list
rikri opened this issue · 7 comments
vim-arduino attempts to load the boards from the same place that the Arduino IDE stores them. The error that you're seeing means that it can't find the board files for some reason. I have a few questions that might help me diagnose/reproduce the problem:
- What OS are you using?
- What version of Arduino IDE are you using?
- Look in your arduino directory (mine is in
/usr/local/share/arduino/) under thehardwaredirectory. Are there any files anywhere under there namedboards.txt? For example, I have one at/usr/local/share/arduino/hardware/arduino/avr/boards.txt - What is the output of
command -v arduino? - Inside of vim, what is the output of
:echo arduino#GetArduinoDir()?
- What OS are you using?
Arch Linux - What version of Arduino IDE are you using? 1.6.11
- Look in your arduino directory (mine is in /usr/local/share/arduino/) under the hardware directory. Are there any files anywhere under there named boards.txt? For example, I have one at /usr/local/share/arduino/hardware/arduino/avr/boards.txt
Mine is in /usr/share/arduino.
I have tried to add "let g:arduino_cmd = '/usr/share/arduino/arduino'" into my .vimrc but it didn't help. - What is the output of which arduino?
/usr/bin/arduino - Inside of vim, what is the output of :echo arduino#GetArduinoDir()?
/usr/bin
Thank you for your help!
Okay, I think I figured it out. I pushed a new commit to master which should have a fix for you. All you need to do is add this to your .vim/ftplugin/arduino.vim or .vimrc:
let g:arduino_dir = '/usr/local/share/arduino'
The problem was that I was searching for the arduino dir using the arduino executable found in the PATH. But that assumes that the file in the PATH is either in its original directory or is a symlink to the executable in that directory. If it was moved or copied into the PATH then we would fail to find the correct root directory for the arduino files.
It works! Excellent. :-)
Thank you.
Updated
I've figured it out after looking into autoload/arduino.vim
If anyone is using Vim on their Raspberry Pi these are the paths that I used for my configurations:
arduino_cmd = "/home/pi/arduino-1.8.8/arduino"
arduino_dir = "/home/pi/.arduino15"
arduino_home_dir = "/home/pi/.arduino15"
Hope that it helps.
Hi there, I started exploring vim just over the last few days. The last time I used vim was in school almost 17 years ago. Lol. Anyway, I recently had the suddenly spark/inspiration of wanting to pick up Vim again and I thought, "Why not try programming Arduino in Vim instead of the Arduino IDE?" Just me feeling adventurous
Anyway, I am currently using my Raspberry Pi as the development platform (MacBook went down recently so I'm trying to use the opportunity to learn new things about RPI and perhaps try to maximize it's potential).
I have set up my Vim like a powerful universal IDE, but one last thing I am stuck with is setting up the Plugin for Arduino.
Environment Details:
Raspbian Linux
Where the directories are located:
Packages & Boards 📦 :
/home/pi/.arduino15
|
|-- packages/
| | | | | |-- adafruit/
| | | | | |-- arduino/
| | | | | |-- chipKIT/
|-- staging
Main Application Dir:
/home/pi/arduino-1.8.8
|
|-- examples
|-- hardware
|-- java
|-- lib
| -- ...
Arduino CLI:
/usr/local/bin/arduino-cli (I followed the official Arduino CLI setup, even tried running the commands from my Konsole Terminal and it works.)
According to your Plugin's configurations, how should I set the values? When I leave everything as its defaults, it says it cannot find the g:arduino_dir.
And when I have set the g:arduino_dir configuration, when I launch the *.ino file and use the command :ArduinoChooseBoard, I get a message saying "==NO ENTRIES==".
I would really appreciate the help.
I believe putting this question here might be helpful to many youths or makers, or basically anyone that has a Raspberry Pi, wants to hack on the Arduino, and like me..crazy enough to want to use Vim when I have the IDE on the desktop. :P
Huh, that's odd...it should have been able to detect those settings automatically (unless maybe the arduino command wasn't in your PATH?). Glad you got it working!
On Mac I had to set:
vim.g.arduino_dir = '/Applications/Arduino.app/Contents/Java/'

