Skip to content
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

Not working with arduino-cli on MacOS #61

Open
Curs3W4ll opened this issue Jun 7, 2024 · 1 comment
Open

Not working with arduino-cli on MacOS #61

Curs3W4ll opened this issue Jun 7, 2024 · 1 comment
Labels

Comments

@Curs3W4ll
Copy link

Describe the bug
I tried using this plugin, using arduino-cli.

System information

  • OS: mac (Sonoma, 14.5 (23F79))
  • Vim: NVIM v0.11.0-dev-164+g3a1515bfe
  • Arduino: Not installed (not specified explicitely in the doc, should I?)
  • CLI version: arduino-cli Version: 0.35.3 Commit: 95cfd654 Date: 2024-02-19T13:15:51Z
  • ArduinoInfo:
Error detected while processing function arduino#GetInfo[1]..arduino#InitializeConfig[62]..ar
duino#ReloadBoards:
line   37:
Could not find any boards.txt or programmers.txt files. Please set g:arduino_dir and/or g:ard
uino_home_dir (see help for details)
Board         : arduino:avr:uno
Programmer    :
Port          : /dev/tty.usbmodem1101
Baud rate     : 9600
Hardware dirs : None
Verify command: arduino-cli compile -b arduino:avr:uno -p /dev/tty.usbmodem1101 --build-path
"/private/tmp/test/build" -v "/private/tmp/test/test.ino"

To Reproduce
Steps to reproduce the behavior:

  1. Install only arduino-cli only
  2. Install the plugin
  3. Open a .ino file
  4. See this error message
Error detected while processing BufReadPost Autocommands for "*":
Error executing lua callback: .../latest/nvim-macos-arm64/share/nvim/runtime/filetype.lua:35:
 Error executing lua: .../latest/nvim-macos-arm64/share/nvim/runtime/filetype.lua:36: BufReadPost Autocommands for "*"..FileType Autocommands for "*"..function <SNR>1_LoadFTPlugin[20]..script /Users/corentin/.local/share/nvim/lazy/vim-arduino/ftplugin/arduino.vim[5]..function arduino#InitializeConfig[62]..arduino#ReloadBoards, line 37: Vim(echoerr):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)
stack traceback:
        [C]: in function 'nvim_cmd'
        .../latest/nvim-macos-arm64/share/nvim/runtime/filetype.lua:36: in function <.../latest/nvim-macos-arm64/share/nvim/runtime/filetype.lua:35>
        [C]: in function 'nvim_buf_call'
        .../latest/nvim-macos-arm64/share/nvim/runtime/filetype.lua:35: in function <.../latest/nvim-macos-arm64/share/nvim/runtime/filetype.lua:10>
stack traceback:
        [C]: in function 'nvim_buf_call'
        .../latest/nvim-macos-arm64/share/nvim/runtime/filetype.lua:35: in function <.../latest/nvim-macos-arm64/share/nvim/runtime/filetype.lua:10>

Expected behavior
The plugin should work without any error?

Working command
This is not an issue with arduino-cli, so I don't think this is relevant?

@stevearc
Copy link
Owner

You shouldn't need an Arduino IDE installation for this to work, but the last time I tested it (several years at this point), arduino-cli had some bugs with listing board details

" TODO in the future if we're using arduino-cli we shouldn't have to do this,
" but at the moment I'm having issues where `arduino-cli board details
" adafruit:avr:gemma --list-programmers` is empty

I am very far away from a computer that has arduino-cli set up and won't be able to test this myself. If you're interested you could try checking if the commands work now, and refactor the logic to rely on that instead. You could even try just making it gracefully fall back to using the arduino-cli; it's not like that would be worse than failing entirely.

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

No branches or pull requests

2 participants