Unknown target CPU atmega4809
required by megaAVR boards
#112
Labels
type: imperfection
Perceived defect in any part of project
atmega4809
required by megaAVR boards
#112
Describe the problem
When specifying the
arduino:megaavr:uno2018
platform core as the FQBN, whether as part of the original language server command or inside of asketch.json
file for a given project, the language server is able to run but isn't functional due to multiple errors. When thearduino:avr:uno
platform core is specified instead, the language server works as expected.I'm specifically running the language server with the built-in Neovim LSP but I've seen the same type of issue reported by users in the context of the Arduino IDE. I’m opening an issue here as the problem seems to be focused on the language server itself. Some of the relevant errors are included below:
[ERROR][2022-06-12 10:09:26] .../vim/lsp/rpc.lua:420 "rpc" "/Users/bcushing/go/bin/arduino-language-server" "stderr" "V[10:09:26.721] Ignored diagnostic. unknown target CPU 'atmega4809'\nV[10:09:26.721] Ignored diagnostic. unknown target CPU 'atmega4809'\n"
[ERROR][2022-06-12 10:09:26] .../vim/lsp/rpc.lua:420 "rpc" "/Users/bcushing/go/bin/arduino-language-server" "stderr" "V[10:09:26.714] Ignored diagnostic. unknown target CPU 'atmega4809'\nV[10:09:26.714] Ignored diagnostic. valid target CPU values are: avr1, avr2, avr25, ..., atiny104\n"
[ERROR][2022-06-12 10:09:29] .../vim/lsp/rpc.lua:420 "rpc" "/Users/bcushing/go/bin/arduino-language-server" "stderr" "E[10:09:29.213] Could not build a preamble for file /private/var/folders/cl/h4959ym96wn_dd1zg6v7tdl00000gq/T/arduino-language-server1483186440/sketch/practice.ino.cpp version 4: CreateTargetInfo() return null\n"
[ERROR][2022-06-12 10:09:29] .../vim/lsp/rpc.lua:420 "rpc" "/Users/bcushing/go/bin/arduino-language-server" "stderr" "E[10:09:29.213] Failed to prepare a compiler instance: valid target CPU values are: avr1, avr2, avr25, ..., attiny104\nI[10:09:29.213] --> textDocument/publishDiagnostics\n"
To reproduce
arduino_language_server
usingnvim-lspconfig
cmd
to be used for running the language server-fqbn
flag to bearduino:megaavr:uno2018
ino
file in a buffer and monitor log outputExample language server setup showing command:
Expected behavior
The
arduino:megaavr:uno2018
platform core can be specified as the FQBN and the language server is functioning similarly to how it does for FQBNs that are supported likearduino:avr:uno
.Arduino Language Server version
v0.0.0-20220608154818-2554452cd205
Arduino CLI version
arduino-cli Version: 0.23.0 Commit: 899dc91b Date: 2022-06-06T08:13:52Z
Operating system
macOS
Operating system version
Version 12.4 (21F79)
Additional context
No response
Issue checklist
The text was updated successfully, but these errors were encountered: