Skip to content

Silent (or at least more discreet) compiles/uploads #37

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

Closed
benswinburne opened this issue Apr 27, 2021 · 1 comment
Closed

Silent (or at least more discreet) compiles/uploads #37

benswinburne opened this issue Apr 27, 2021 · 1 comment

Comments

@benswinburne
Copy link

benswinburne commented Apr 27, 2021

I was wondering if there is a way to suppress the Arduino IDE splash screen running every time I build or upload. I saw you mentioned it here #6 (comment)

I found this arduino/Arduino#1970 which appears it's not necessarily a result of vim-arduino but the ide tooling itself.

I noticed a couple of things

  1. When running the commands from this plugin, it starts the JVM etc with this option

    JVMOptions=..."-splash:$APP_ROOT/Contents/Java/lib/splash.png"...)

I wonder if that can be changed?

  1. The previous URL I posted refers to https://arduino.github.io/arduino-cli/latest/installation/ a new arduino cli. I have installed it using homebrew and it installs arduino-cli to my path.

I dug through the vim-arduino code and spotted g:arduino_executable which I figured I could just change to arduino-cli but this doesn't work. Commands subsequently result in

executing job failed: No such file or directory

and on vim start up i get

Error detected while processing BufRead Autocommands for ".ino"..FileType Autocommands for ""..function 15_LoadFTPlugin[17]..scri
pt /Users/ben/.dotfiles/.vim/plugged/vim-arduino/ftplugin/arduino.vim[7]..function arduino#InitializeConfig[49]..arduino#ReloadBoards:
line 33:
Could not find any boards.txt or programmers.txt files. Please set g:arduino_dir and/or g:arduino_home_dir (see help for details)

If I run ArduinoInfo however, I get

... Verify command: arduno-cli --verify --board ...

Which obviously is using the correct binary.

Having dug into the error above with why I might need to be setting the arduino_dir too, the cli doesn't have boards.txt etc as far as i can tell so I needed to still point the path back to

let g:arduino_dir = '/Applications/Arduino.app/Contents/Java/'

(Working out I needed Java/ on the end took more digging.)

I appear to have cleared up the above errors now... but none of the vim-arduino commands exist... Obviously this is more likely my vim but I've reinstalled vim-arduino and removed everything relating to it from my .vimrc and simply can't get any of the commands registering.

Edit:

Having gone back to vim after a short period the commands are available. Obviously something odd going on. Anyway, now that the commands are back, if i try and run :ArduinoVerify for example, I get

executing job failed: No such file or directory

TLDR:

  • arduino-cli exists and 🤞 stops the splash screen issue. can we get it to work?
  • if we can get it to work, is there a simpler way of doing so than i have done?
  • why might using the cli have broken my vim-arduino plugin? are there any caches i should clear or anything?
@stevearc
Copy link
Owner

stevearc commented May 2, 2021

Last time I checked out arduino-cli, it didn't really work at all. I tried it again today and it's come a long way! I had to wrestle with it a bit and the support for 3rd party boards isn't perfect, but it works! I've updated this plugin to automatically use arduino-cli if it detects it in the PATH. Could you update and give it a try?

I've also updated the :ArduinoInfo command to show the arduino-cli command that we run to compile the sketch. If you run into problems, try running that command directly on the command line and see if you can massage it into a form that works. Or see if you can find a working arduino-cli compile command and diff it with the one from this plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants