Git Product home page Git Product logo

Comments (7)

stevearc avatar stevearc commented on May 18, 2024

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 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
  • What is the output of command -v arduino?
  • Inside of vim, what is the output of :echo arduino#GetArduinoDir()?

from vim-arduino.

rikri avatar rikri commented on May 18, 2024
  • 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.

stevearc avatar stevearc commented on May 18, 2024

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.

rikri avatar rikri commented on May 18, 2024

It works! Excellent. :-)
Thank you.

from vim-arduino.

shermannatrix avatar shermannatrix commented on May 18, 2024

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.

stevearc avatar stevearc commented on May 18, 2024

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.

WuerfelDev avatar WuerfelDev commented on May 18, 2024

On Mac I had to set:

vim.g.arduino_dir = '/Applications/Arduino.app/Contents/Java/'

from vim-arduino.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.