Comments (7)
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 thehardware
directory. 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()
?
from vim-arduino.
- 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!
from vim-arduino.
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.
from vim-arduino.
It works! Excellent. :-)
Thank you.
from vim-arduino.
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
from vim-arduino.
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!
from vim-arduino.
On Mac I had to set:
vim.g.arduino_dir = '/Applications/Arduino.app/Contents/Java/'
from vim-arduino.
Related Issues (20)
- Not working with vim under Ubuntu 18.04 HOT 4
- :ArduinoVerify fails HOT 2
- Command to change the debug serial baudrate HOT 5
- :ArduinoVerify executing job failed: Permission denied HOT 1
- Silent (or at least more discreet) compiles/uploads HOT 1
- ArduinoChoosePort Broken HOT 1
- ArduinoSerial doesn't exit cleanly HOT 2
- Not working with Ubuntu 20.04, fails in `chooser.vim` HOT 1
- How to stop Serial Monitor HOT 4
- ctags: no such file or directory HOT 2
- E716: Key not present in Dictionary: "boards" HOT 14
- avrdude: usbdev_open(): did not find any USB device "usb" (0x03eb:0x2104) HOT 3
- Uploading on a Uno board fails HOT 3
- Feature request: use sketch.json for per sketch fqbn and port HOT 4
- [question] how to set tmux for Serial? HOT 3
- ArduinoUploadAndSerial: screen: device or resource busy HOT 4
- Wrong baud rate, when trying to upload a sketch HOT 6
- :ArduinoChoose* commands do not work in Vim9 HOT 2
- Run SerialMonitor in another tmux pane HOT 1
- Commands not found after installing with lazy. HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vim-arduino.