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

No avr-g++ support #528

Open
Leon0402 opened this issue Sep 15, 2020 · 19 comments
Open

No avr-g++ support #528

Leon0402 opened this issue Sep 15, 2020 · 19 comments

Comments

@Leon0402
Copy link

Hi,

I tried to use clangd with my avr project using the avr-g++ compiler. The compile_command.json generated by cmake looks like this:

  "directory": "/home/leon/Dokumente/Projects/cmake-avr/build",
  "command": "/usr/bin/avr-g++     -D MCU=atmega328p -D F_CPU=16000000 -mmcu=atmega328p -Os -Wall -fno-threadsafe-statics -funsigned-char -funsigned-bitfields -fshort-enums -std=c++17 -o CMakeFiles/AvrProject.dir/src/main.cpp.o -c /home/leon/Dokumente/Projects/cmake-avr/src/main.cpp",
  "file": "/home/leon/Dokumente/Projects/cmake-avr/src/main.cpp"

but clangd doesn't find the avr libraries such as <avr/boot.h>. Also Port numbers are now known and other problems.
So it seems like clangd doesn't get the implicit include files from avr-g++?

@Leon0402 Leon0402 changed the title No avr.g++ support No avr-g++ support Sep 15, 2020
@sam-mccall
Copy link
Member

Can you try -query-driver=/usr/bin/avr-g++?

This will attempt to extract them, unfortunately it's off by default for security reasons.

@Leon0402
Copy link
Author

That works perfectly!

Any idea though how this could be done better? Perhaps a general option "I know what I'm doing, trust all compilers I specify" ;)

In general I think, that avr-g++ and avr-gcc could be added to the list by default, they are safe to use.

@Leon0402
Copy link
Author

I guess, I was a little bit to fast with saying it works. It does in deed find the headers like "avr/io.h" , but there are a couple of problems:

Clangd doesn't process these files correctly. When I jump into io.h for instance, it says it's not part of the compilation database ... while this is correct technically, I would that included files would kinda inherit the arguments?
Or should I manually add all avr header files to my compilation database?
Failed to find compilation database for /usr/avr/sys-root/include/avr/io.h

Secondly, things like "PORTD" are still not recogniced.
In avr/io.h

#elif defined (__AVR_ATmega328P__) || defined (__AVR_ATmega328__)
#  include <avr/iom328p.h>

When incluing <avr/iom328p.h>, it is found.

So either this is part of the first issue (clangd is not analyzing io.h) or "AVR_ATmega328P" is not set. Or possibly both.

The third issue I have is that the special keyword "EEMEM" is not regognized, it's for declaring EEPROM variables.

Thanks!

@HighCommander4
Copy link

When I jump into io.h for instance, it says it's not part of the compilation database ... while this is correct technically, I would that included files would kinda inherit the arguments?
Or should I manually add all avr header files to my compilation database?
Failed to find compilation database for /usr/avr/sys-root/include/avr/io.h

I recommend specifying the CDB directory explicitly with the --compile-commands-dir argument to clangd. This causes clangd to use this CDB to infer compiler commands for all files (including a header like this), not just files in the subtree of the directory containing the CDB file.

@Leon0402
Copy link
Author

@HighCommander4
I passed "--compile-commands-dir ." to it and it helped, I wonder though why it isn't the default?

The issues I have are:

EEMEM is not known:
image

Some macros are not set, leading to a few different issues.
image

image

image

image

Any suggestions?

@HighCommander4
Copy link

I passed "--compile-commands-dir ." to it and it helped, I wonder though why it isn't the default?

If you don't pass --compile-commands-dir, clangd will, for each open file, look for a CDB in the directory containing the file and its ancestors. That could result in different CDBs being used for different files. Without user direction, it's not clear that any particular one of these would be appropriate to use for files like this AVR header for which no CDB could be found using the search mechanism.

The issues I have are:

I think some of the remaining issues may be related to the fact that clang does not pick up the compiler's pre-defined macros (something I just discovered recently). I'm not sure how to work around that, sorry.

@Leon0402
Copy link
Author

If you don't pass --compile-commands-dir, clangd will, for each open file, look for a CDB in the directory containing the file and its ancestors. That could result in different CDBs being used for different files. Without user direction, it's not clear that any particular one of these would be appropriate to use for files like this AVR header for which no CDB could be found using the search mechanism.

Would you ever want that? --compile-commands-dir . would seem to me like the better default, but I might be wrong.

I think some of the remaining issues may be related to the fact that clang does not pick up the compiler's pre-defined macros (something I just discovered recently). I'm not sure how to work around that, sorry.

I think so too. Is there already an issue tracking that?

As a workaround: Is it possible to tell clangd what macros it should use? I might could find out what avr uses and set it manually, not pretty but better than nothing I guess.

@Leon0402
Copy link
Author

Leon0402 commented Sep 19, 2020

You can get a list of macros with the following command:

avr-g++ -mmcu=atmega168p -dM -E - < /dev/null

The value for mmcu should be taken from the CDB

@HighCommander4
Copy link

Would you ever want that? --compile-commands-dir . would seem to me like the better default, but I might be wrong.

There are a few issues here:

  • I assume by . you mean the project/workspace directory, but some clients (e.g. vim) don't really have a notion of a project/workspace.
  • Even for clients that have such a notion:
    • There may be subprojects in the workspace with their own CDB, and using --compile-commands-dir . would force clangd to look in the root CDB instead of the subproject's CDB for files inside the subproject.
    • There may be dependencies outside the workspace which also have their own CDB, and again --compile-commands-dir . would force clangd to use the workspace root CDB instead of the dependency's own CDB.

I think some of the remaining issues may be related to the fact that clang does not pick up the compiler's pre-defined macros (something I just discovered recently). I'm not sure how to work around that, sorry.

I think so too. Is there already an issue tracking that?

I filed #533 for it.

As a workaround: Is it possible to tell clangd what macros it should use? I might could find out what avr uses and set it manually, not pretty but better than nothing I guess.

With clangd 11, you can use the config mechanism to automatically add flags of the form -DMACRO or -DMACRO=VALUE to all compile commands (see the example in the "CompileFlags" section).

@kadircet
Copy link
Member

It might also be worth keeping https://github.com/llvm/llvm-project/blob/master/clang/lib/Basic/Targets/AVR.cpp#L298 up to date with new AVR toolchains. I suppose the only problem is there's no one maintaining it.

@Leon0402
Copy link
Author

@kadircet I just saw that the linked code seems to set the correct macro for the mcu (which would be in my case the atmega168p). But as you can see from my above screenshots this doesn't seem to be the case (device type not found).

But I actually did have a look again:
image

And it is actually found today and all my other issues described above are resolved as well?! I had a look and all my issues had to do with missing macros (including the missing "keyword" EEMEN, which turned out to be a macro as well from eeprom.h).

So what happened? Why is this magically working now, even though I still use the same clang version (afaik)?

@Leon0402
Copy link
Author

I just had a look on my other machine and I still have the problem there. But it seems like there, the target "avr" is not picked up (which would explain a lot)

I[10:15:07.164] System include extractor: succesfully executed /usr/bin/avr-g++, got includes: "/usr/lib64/gcc/avr/10/include, /usr/lib64/gcc/avr/10/include-fixed, /usr/avr/sys-root/include"
I[10:15:07.164] --> textDocument/clangd.fileStatus
I[10:15:07.164] Updating file src/main.cpp with command inferred from src/main.cpp
[path/to/directory]
/usr/bin/avr-g++ --driver-mode=g++ -c -Wall -fno-threadsafe-statics -Os -mmcu=atmega168p -funsigned-char -funsigned-bitfields -fshort-enums -D F_CPU=8000000 -std=c++14 src/main.cpp -isystem /usr/lib64/gcc/avr/10/include -isystem /usr/lib64/gcc/avr/10/include-fixed -isystem /usr/avr/sys-root/include -fsyntax-only -resource-dir=/usr/lib64/clang/10.0.1

I don't get though why the target is not picked up though? It's the same code as on my other machine, the same CDB, the same arguments passed to clangd, the same clang and clang version (10.0.1), almost the same avr-g++ version (10.2.0 vs 10.2.1). And I use the same vscode-clangd extension (version 1.7.0).

The only difference I see is that it's a different Linux distro (this is open suse, the other one arch linux) and I use here VsCodium (but I installed the latest version of the vscode extension from the vs code marketplace)

Any ideas what happened here?

@kadircet
Copy link
Member

I am not sure, my first guess would be about these two having a different clangd version but according to your explanation that doesn't seem to be the case.

Could you share full clangd logs from both machines? Especially while passing -log=verbose to clangd.

@Leon0402
Copy link
Author

@kadircet

Working

I[23:27:41.798] clangd version 10.0.1 
I[23:27:41.798] PID: 149378
I[23:27:41.798] Working directory: /home/leon/SampleProject
I[23:27:41.798] argv[0]: /usr/bin/clangd
I[23:27:41.798] argv[1]: --compile-commands-dir
I[23:27:41.798] argv[2]: .
I[23:27:41.798] argv[3]: --query-driver
I[23:27:41.798] argv[4]: /usr/bin/avr-g++
I[23:27:41.798] argv[5]: -log
I[23:27:41.798] argv[6]: verbose
I[23:27:41.798] Starting LSP over stdin/stdout
V[23:27:41.799] <<< {"id":0,"jsonrpc":"2.0","method":"initialize","params":{"capabilities":{"textDocument":{"callHierarchy":{"dynamicRegistration":true},"codeAction":{"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["","quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}},"dynamicRegistration":true,"isPreferredSupport":true},"codeLens":{"dynamicRegistration":true},"colorProvider":{"dynamicRegistration":true},"completion":{"completionItem":{"commitCharactersSupport":true,"deprecatedSupport":true,"documentationFormat":["markdown","plaintext"],"insertReplaceSupport":true,"preselectSupport":true,"resolveAdditionalTextEditsSupport":true,"snippetSupport":true,"tagSupport":{"valueSet":[1]}},"completionItemKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]},"contextSupport":true,"dynamicRegistration":true,"editsNearCursor":true},"declaration":{"dynamicRegistration":true,"linkSupport":true},"definition":{"dynamicRegistration":true,"linkSupport":true},"documentHighlight":{"dynamicRegistration":true},"documentLink":{"dynamicRegistration":true,"tooltipSupport":true},"documentSymbol":{"dynamicRegistration":true,"hierarchicalDocumentSymbolSupport":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]},"tagSupport":{"valueSet":[1]}},"foldingRange":{"dynamicRegistration":true,"lineFoldingOnly":true,"rangeLimit":5000},"formatting":{"dynamicRegistration":true},"hover":{"contentFormat":["markdown","plaintext"],"dynamicRegistration":true},"implementation":{"dynamicRegistration":true,"linkSupport":true},"onTypeFormatting":{"dynamicRegistration":true},"publishDiagnostics":{"complexDiagnosticCodeSupport":true,"relatedInformation":true,"tagSupport":{"valueSet":[1,2]},"versionSupport":false},"rangeFormatting":{"dynamicRegistration":true},"references":{"dynamicRegistration":true},"rename":{"dynamicRegistration":true,"prepareSupport":true},"selectionRange":{"dynamicRegistration":true},"semanticHighlightingCapabilities":{"semanticHighlighting":true},"semanticTokens":{"dynamicRegistration":true,"formats":["relative"],"requests":{"full":{"delta":true},"range":true},"tokenModifiers":["declaration","definition","readonly","static","deprecated","abstract","async","modification","documentation","defaultLibrary"],"tokenTypes":["namespace","type","class","enum","interface","struct","typeParameter","parameter","variable","property","enumMember","event","function","member","macro","keyword","modifier","comment","string","number","regexp","operator"]},"signatureHelp":{"contextSupport":true,"dynamicRegistration":true,"signatureInformation":{"activeParameterSupport":true,"documentationFormat":["markdown","plaintext"],"parameterInformation":{"labelOffsetSupport":true}}},"synchronization":{"didSave":true,"dynamicRegistration":true,"willSave":true,"willSaveWaitUntil":true},"typeDefinition":{"dynamicRegistration":true,"linkSupport":true}},"window":{"workDoneProgress":true},"workspace":{"applyEdit":true,"configuration":true,"didChangeConfiguration":{"dynamicRegistration":true},"didChangeWatchedFiles":{"dynamicRegistration":true},"executeCommand":{"dynamicRegistration":true},"symbol":{"dynamicRegistration":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]},"tagSupport":{"valueSet":[1]}},"workspaceEdit":{"documentChanges":true,"failureHandling":"textOnlyTransactional","resourceOperations":["create","rename","delete"]},"workspaceFolders":true}},"clientInfo":{"name":"vscode","version":"1.49.0"},"initializationOptions":{"clangdFileStatus":true,"fallbackFlags":[]},"processId":149228,"rootPath":"/home/leon/SampleProject","rootUri":"file:///home/leon/SampleProject","trace":"off","workspaceFolders":[{"name":"SampleProject","uri":"file:///home/leon/SampleProject"}]}}

I[23:27:41.799] <-- initialize(0)
I[23:27:41.799] --> reply:initialize(0) 0 ms
V[23:27:41.799] >>> {"id":0,"jsonrpc":"2.0","result":{"capabilities":{"codeActionProvider":{"codeActionKinds":["quickfix","refactor","info"]},"completionProvider":{"resolveProvider":false,"triggerCharacters":[".",">",":"]},"declarationProvider":true,"definitionProvider":true,"documentFormattingProvider":true,"documentHighlightProvider":true,"documentLinkProvider":{"resolveProvider":false},"documentOnTypeFormattingProvider":{"firstTriggerCharacter":"\n","moreTriggerCharacter":[]},"documentRangeFormattingProvider":true,"documentSymbolProvider":true,"executeCommandProvider":{"commands":["clangd.applyFix","clangd.applyTweak"]},"hoverProvider":true,"referencesProvider":true,"renameProvider":{"prepareProvider":true},"selectionRangeProvider":true,"semanticHighlighting":{"scopes":[["variable.other.cpp"],["variable.other.local.cpp"],["variable.parameter.cpp"],["entity.name.function.cpp"],["entity.name.function.method.cpp"],["entity.name.function.method.static.cpp"],["variable.other.field.cpp"],["variable.other.field.static.cpp"],["entity.name.type.class.cpp"],["entity.name.type.enum.cpp"],["variable.other.enummember.cpp"],["entity.name.type.typedef.cpp"],["entity.name.type.dependent.cpp"],["entity.name.other.dependent.cpp"],["entity.name.namespace.cpp"],["entity.name.type.template.cpp"],["storage.type.primitive.cpp"],["entity.name.function.preprocessor.cpp"],["meta.disabled"]]},"signatureHelpProvider":{"triggerCharacters":["(",","]},"textDocumentSync":2,"typeHierarchyProvider":true,"workspaceSymbolProvider":true}}}

V[23:27:41.804] <<< {"jsonrpc":"2.0","method":"initialized","params":{}}

I[23:27:41.804] <-- initialized
I[23:27:41.804] unhandled notification initialized
V[23:27:41.804] <<< {"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"languageId":"cpp","text":"#include <avr/io.h>\n\n// /home/leon/Documents/SampleProject/avr-g++\n\nint main() {\n    DDRD = (1 << PD1);\n    return 0;\n}","uri":"file:///home/leon/SampleProject/src/main.cpp","version":1}}}

I[23:27:41.804] <-- textDocument/didOpen
I[23:27:41.804] Enqueueing 1 commands for indexing
V[23:27:41.805] BackgroundIndex: building version 1 after loading index from disk
V[23:27:41.806] BackgroundIndex: serving version 1 (110956 bytes)
E[23:27:41.806] Background-index: Couldn't read /usr/avr/sys-root/include/stdint.h to validate stored index: No such file or directory
E[23:27:41.806] Background-index: Couldn't read /usr/avr/sys-root/include/avr/fuse.h to validate stored index: No such file or directory
E[23:27:41.806] Background-index: Couldn't read /usr/avr/sys-root/include/avr/version.h to validate stored index: No such file or directory
E[23:27:41.806] Background-index: Couldn't read /usr/avr/sys-root/include/avr/io.h to validate stored index: No such file or directory
E[23:27:41.806] Background-index: Couldn't read /usr/avr/sys-root/include/avr/common.h to validate stored index: No such file or directory
E[23:27:41.806] Background-index: Couldn't read /home/leon/Documents/SampleProject/src/main.cpp to validate stored index: No such file or directory
E[23:27:41.806] Background-index: Couldn't read /usr/avr/sys-root/include/inttypes.h to validate stored index: No such file or directory
E[23:27:41.806] Background-index: Couldn't read /usr/avr/sys-root/include/avr/lock.h to validate stored index: No such file or directory
E[23:27:41.806] Background-index: Couldn't read /usr/avr/sys-root/include/avr/sfr_defs.h to validate stored index: No such file or directory
E[23:27:41.806] Background-index: Couldn't read /usr/lib64/gcc/avr/10/include/stdint.h to validate stored index: No such file or directory
E[23:27:41.806] Background-index: Couldn't read /usr/avr/sys-root/include/avr/portpins.h to validate stored index: No such file or directory
V[23:27:41.828] System include extraction: adding  /usr/lib/gcc/avr/10.2.0/include
V[23:27:41.828] System include extraction: adding  /usr/lib/gcc/avr/10.2.0/include-fixed
V[23:27:41.828] System include extraction: adding  /usr/lib/gcc/avr/10.2.0/../../../../avr/include
I[23:27:41.828] System include extractor: succesfully executed /usr/bin/avr-g++, got includes: "/usr/lib/gcc/avr/10.2.0/include, /usr/lib/gcc/avr/10.2.0/include-fixed, /usr/lib/gcc/avr/10.2.0/../../../../avr/include"
I[23:27:41.828] --> textDocument/clangd.fileStatus
V[23:27:41.828] >>> {"jsonrpc":"2.0","method":"textDocument/clangd.fileStatus","params":{"state":"parsing includes","uri":"file:///home/leon/SampleProject/src/main.cpp"}}

I[23:27:41.828] Updating file /home/leon/SampleProject/src/main.cpp with command inferred from src/main.cpp
[/home/leon/Documents/SampleProject]
/usr/bin/avr-g++ -target avr --driver-mode=g++ -c -Wall -fno-threadsafe-statics -Os -mmcu=atmega328p -funsigned-char -funsigned-bitfields -fshort-enums -D F_CPU=8000000 -std=c++14 /home/leon/SampleProject/src/main.cpp -isystem /usr/lib/gcc/avr/10.2.0/include -isystem /usr/lib/gcc/avr/10.2.0/include-fixed -isystem /usr/lib/gcc/avr/10.2.0/../../../../avr/include -fsyntax-only -resource-dir=/usr/lib/clang/10.0.1
I[23:27:41.828] Couldn't set working directory when creating compiler invocation.
V[23:27:41.829] Ignored diagnostic. the clang compiler does not support '-funsigned-bitfields'
V[23:27:41.830] Driver produced command: cc1 -cc1 -triple avr -fsyntax-only -disable-free -disable-llvm-verifier -discard-value-names -main-file-name main.cpp -mrelocation-model static -mthread-model posix -mframe-pointer=all -fmath-errno -fno-rounding-math -masm-verbose -mconstructor-aliases -target-cpu atmega328p -dwarf-column-info -fno-split-dwarf-inlining -debugger-tuning=gdb -resource-dir /usr/lib/clang/10.0.1 -isystem /usr/lib/gcc/avr/10.2.0/include -isystem /usr/lib/gcc/avr/10.2.0/include-fixed -isystem /usr/lib/gcc/avr/10.2.0/../../../../avr/include -D F_CPU=8000000 -internal-isystem /usr/bin/../lib/gcc/avr/10.2.0/../../../../include/c++/10.2.0 -internal-isystem /usr/bin/../lib/gcc/avr/10.2.0/../../../../include/avr/c++/10.2.0 -internal-isystem /usr/bin/../lib/gcc/avr/10.2.0/../../../../include/avr/c++/10.2.0 -internal-isystem /usr/bin/../lib/gcc/avr/10.2.0/../../../../include/c++/10.2.0/backward -Os -Wall -std=c++14 -fdeprecated-macro -fdebug-compilation-dir /home/leon/SampleProject -ferror-limit 19 -fmessage-length 0 -fshort-enums -fno-signed-char -fgnuc-version=4.2.1 -fno-threadsafe-statics -fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option -vectorize-loops -vectorize-slp -faddrsig -x c++ /home/leon/SampleProject/src/main.cpp
V[23:27:41.830] Building first preamble for /home/leon/SampleProject/src/main.cpp
I[23:27:41.830] Couldn't set working directory when building the preamble.

Broken

I[23:19:43.446] clangd version 10.0.1 
I[23:19:43.447] PID: 22723
I[23:19:43.447] Working directory: /home/leon/Documents/SampleProject
I[23:19:43.447] argv[0]: /usr/bin/clangd
I[23:19:43.447] argv[1]: --compile-commands-dir
I[23:19:43.447] argv[2]: .
I[23:19:43.447] argv[3]: --query-driver
I[23:19:43.447] argv[4]: /usr/bin/avr-g++
I[23:19:43.447] argv[5]: -log
I[23:19:43.447] argv[6]: verbose
I[23:19:43.447] Starting LSP over stdin/stdout
V[23:19:43.447] <<< {"id":0,"jsonrpc":"2.0","method":"initialize","params":{"capabilities":{"textDocument":{"callHierarchy":{"dynamicRegistration":true},"codeAction":{"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["","quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}},"dynamicRegistration":true,"isPreferredSupport":true},"codeLens":{"dynamicRegistration":true},"colorProvider":{"dynamicRegistration":true},"completion":{"completionItem":{"commitCharactersSupport":true,"deprecatedSupport":true,"documentationFormat":["markdown","plaintext"],"insertReplaceSupport":true,"preselectSupport":true,"resolveAdditionalTextEditsSupport":true,"snippetSupport":true,"tagSupport":{"valueSet":[1]}},"completionItemKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]},"contextSupport":true,"dynamicRegistration":true,"editsNearCursor":true},"declaration":{"dynamicRegistration":true,"linkSupport":true},"definition":{"dynamicRegistration":true,"linkSupport":true},"documentHighlight":{"dynamicRegistration":true},"documentLink":{"dynamicRegistration":true,"tooltipSupport":true},"documentSymbol":{"dynamicRegistration":true,"hierarchicalDocumentSymbolSupport":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]},"tagSupport":{"valueSet":[1]}},"foldingRange":{"dynamicRegistration":true,"lineFoldingOnly":true,"rangeLimit":5000},"formatting":{"dynamicRegistration":true},"hover":{"contentFormat":["markdown","plaintext"],"dynamicRegistration":true},"implementation":{"dynamicRegistration":true,"linkSupport":true},"onTypeFormatting":{"dynamicRegistration":true},"publishDiagnostics":{"complexDiagnosticCodeSupport":true,"relatedInformation":true,"tagSupport":{"valueSet":[1,2]},"versionSupport":false},"rangeFormatting":{"dynamicRegistration":true},"references":{"dynamicRegistration":true},"rename":{"dynamicRegistration":true,"prepareSupport":true},"selectionRange":{"dynamicRegistration":true},"semanticHighlightingCapabilities":{"semanticHighlighting":true},"semanticTokens":{"dynamicRegistration":true,"formats":["relative"],"requests":{"full":{"delta":true},"range":true},"tokenModifiers":["declaration","definition","readonly","static","deprecated","abstract","async","modification","documentation","defaultLibrary"],"tokenTypes":["namespace","type","class","enum","interface","struct","typeParameter","parameter","variable","property","enumMember","event","function","member","macro","keyword","modifier","comment","string","number","regexp","operator"]},"signatureHelp":{"contextSupport":true,"dynamicRegistration":true,"signatureInformation":{"activeParameterSupport":true,"documentationFormat":["markdown","plaintext"],"parameterInformation":{"labelOffsetSupport":true}}},"synchronization":{"didSave":true,"dynamicRegistration":true,"willSave":true,"willSaveWaitUntil":true},"typeDefinition":{"dynamicRegistration":true,"linkSupport":true}},"window":{"workDoneProgress":true},"workspace":{"applyEdit":true,"configuration":true,"didChangeConfiguration":{"dynamicRegistration":true},"didChangeWatchedFiles":{"dynamicRegistration":true},"executeCommand":{"dynamicRegistration":true},"symbol":{"dynamicRegistration":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]},"tagSupport":{"valueSet":[1]}},"workspaceEdit":{"documentChanges":true,"failureHandling":"textOnlyTransactional","resourceOperations":["create","rename","delete"]},"workspaceFolders":true}},"clientInfo":{"name":"vscode","version":"1.49.0"},"initializationOptions":{"clangdFileStatus":true,"fallbackFlags":[]},"processId":22684,"rootPath":"/home/leon/Documents/SampleProject","rootUri":"file:///home/leon/Documents/SampleProject","trace":"off","workspaceFolders":[{"name":"SampleProject","uri":"file:///home/leon/Documents/SampleProject"}]}}

I[23:19:43.447] <-- initialize(0)
I[23:19:43.448] --> reply:initialize(0) 0 ms
V[23:19:43.448] >>> {"id":0,"jsonrpc":"2.0","result":{"capabilities":{"codeActionProvider":{"codeActionKinds":["quickfix","refactor","info"]},"completionProvider":{"resolveProvider":false,"triggerCharacters":[".",">",":"]},"declarationProvider":true,"definitionProvider":true,"documentFormattingProvider":true,"documentHighlightProvider":true,"documentLinkProvider":{"resolveProvider":false},"documentOnTypeFormattingProvider":{"firstTriggerCharacter":"\n","moreTriggerCharacter":[]},"documentRangeFormattingProvider":true,"documentSymbolProvider":true,"executeCommandProvider":{"commands":["clangd.applyFix","clangd.applyTweak"]},"hoverProvider":true,"referencesProvider":true,"renameProvider":{"prepareProvider":true},"selectionRangeProvider":true,"semanticHighlighting":{"scopes":[["variable.other.cpp"],["variable.other.local.cpp"],["variable.parameter.cpp"],["entity.name.function.cpp"],["entity.name.function.method.cpp"],["entity.name.function.method.static.cpp"],["variable.other.field.cpp"],["variable.other.field.static.cpp"],["entity.name.type.class.cpp"],["entity.name.type.enum.cpp"],["variable.other.enummember.cpp"],["entity.name.type.typedef.cpp"],["entity.name.type.dependent.cpp"],["entity.name.other.dependent.cpp"],["entity.name.namespace.cpp"],["entity.name.type.template.cpp"],["storage.type.primitive.cpp"],["entity.name.function.preprocessor.cpp"],["meta.disabled"]]},"signatureHelpProvider":{"triggerCharacters":["(",","]},"textDocumentSync":2,"typeHierarchyProvider":true,"workspaceSymbolProvider":true}}}

V[23:19:43.465] <<< {"jsonrpc":"2.0","method":"initialized","params":{}}

I[23:19:43.465] <-- initialized
I[23:19:43.465] unhandled notification initialized
V[23:19:43.465] <<< {"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"languageId":"cpp","text":"#include <avr/io.h>\n\n// /home/leon/Documents/SampleProject/avr-g++\n\nint main() {\n    DDRD = (1 << PD1);\n    return 0;\n}","uri":"file:///home/leon/Documents/SampleProject/src/main.cpp","version":1}}}

I[23:19:43.465] <-- textDocument/didOpen
I[23:19:43.466] Enqueueing 1 commands for indexing
V[23:19:43.467] BackgroundIndex: building version 1 after loading index from disk
V[23:19:43.468] BackgroundIndex: serving version 1 (110956 bytes)
V[23:19:43.478] System include extraction: adding  /usr/lib64/gcc/avr/10/include
V[23:19:43.478] System include extraction: adding  /usr/lib64/gcc/avr/10/include-fixed
V[23:19:43.478] System include extraction: adding  /usr/avr/sys-root/include
I[23:19:43.478] System include extractor: succesfully executed /usr/bin/avr-g++, got includes: "/usr/lib64/gcc/avr/10/include, /usr/lib64/gcc/avr/10/include-fixed, /usr/avr/sys-root/include"
I[23:19:43.478] --> textDocument/clangd.fileStatus
V[23:19:43.478] >>> {"jsonrpc":"2.0","method":"textDocument/clangd.fileStatus","params":{"state":"parsing includes","uri":"file:///home/leon/Documents/SampleProject/src/main.cpp"}}

I[23:19:43.478] Updating file /home/leon/Documents/SampleProject/src/main.cpp with command 
[/home/leon/Documents/SampleProject]
/usr/bin/avr-g++ --driver-mode=g++ -c -Wall -std=c++14 -fno-threadsafe-statics -Os -mmcu=atmega328p -funsigned-char -funsigned-bitfields -fshort-enums -D F_CPU=8000000 -o obj/main.o src/main.cpp -isystem /usr/lib64/gcc/avr/10/include -isystem /usr/lib64/gcc/avr/10/include-fixed -isystem /usr/avr/sys-root/include -fsyntax-only -resource-dir=/usr/lib64/clang/10.0.1
V[23:19:43.481] Ignored diagnostic. the clang compiler does not support '-funsigned-bitfields'
V[23:19:43.481] Ignored diagnostic. argument unused during compilation: '-mmcu=atmega328p'
V[23:19:43.482] Driver produced command: cc1 -cc1 -triple x86_64-unknown-linux-gnu -fsyntax-only -disable-free -disable-llvm-verifier -discard-value-names -main-file-name main.cpp -mrelocation-model static -mthread-model posix -mframe-pointer=none -fmath-errno -fno-rounding-math -masm-verbose -mconstructor-aliases -munwind-tables -target-cpu x86-64 -dwarf-column-info -fno-split-dwarf-inlining -debugger-tuning=gdb -resource-dir /usr/lib64/clang/10.0.1 -isystem /usr/lib64/gcc/avr/10/include -isystem /usr/lib64/gcc/avr/10/include-fixed -isystem /usr/avr/sys-root/include -D F_CPU=8000000 -internal-isystem /usr/bin/../lib64/gcc/x86_64-suse-linux/10/../../../../include/c++/10 -internal-isystem /usr/bin/../lib64/gcc/x86_64-suse-linux/10/../../../../include/c++/10/x86_64-suse-linux -internal-isystem /usr/bin/../lib64/gcc/x86_64-suse-linux/10/../../../../include/c++/10/backward -internal-isystem /usr/local/include -internal-isystem /usr/lib64/clang/10.0.1/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -Os -Wall -std=c++14 -fdeprecated-macro -fdebug-compilation-dir /home/leon/Documents/SampleProject -ferror-limit 19 -fmessage-length 0 -fshort-enums -fno-signed-char -fgnuc-version=4.2.1 -fno-threadsafe-statics -fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option -vectorize-loops -vectorize-slp -faddrsig -x c++ src/main.cpp
V[23:19:43.482] Building first preamble for /home/leon/Documents/SampleProject/src/main.cpp

I used the same code on both my machine with the same CDB. Clang and clangd are both 10.0.1

The difference seems to be in this line
Updating file /home/leon/SampleProject/src/main.cpp with command inferred from src/main.cpp ... it says here "inferrred from", which it doesn't say in the broken version?

@kadircet
Copy link
Member

so the only bugging thing i notice is, there's the mention of /home/leon/Documents/SampleProject in the working scenario. But AFAICT, there's no such path on that machine, Documents needs to be dropped, that's the reason for "inferred from" message in the first one. You shouldn't copy over the CDB as it is path and configuration sensitive.

But this doesn't explain why the Broken machine doesn't infer the -target flag. The only reason i can think of is for some reason avr target is not linked in the broken machine, hence clangd doesn't register it as a valid target. Can you execute strings /usr/bin/clangd | grep -i avrtarget on both machines and paste the output here?

@Leon0402
Copy link
Author

Ah I see, here is the correct output form the working one (where I changed the CDB accordingly)

I[16:58:02.956] clangd version 10.0.1 
I[16:58:02.957] PID: 245235
I[16:58:02.957] Working directory: /home/leon/SampleProject
I[16:58:02.957] argv[0]: /usr/bin/clangd
I[16:58:02.957] argv[1]: --compile-commands-dir
I[16:58:02.957] argv[2]: .
I[16:58:02.957] argv[3]: --query-driver
I[16:58:02.957] argv[4]: /usr/bin/avr-g++
I[16:58:02.957] argv[5]: -log
I[16:58:02.957] argv[6]: verbose
I[16:58:02.957] Starting LSP over stdin/stdout
V[16:58:02.958] <<< {"id":0,"jsonrpc":"2.0","method":"initialize","params":{"capabilities":{"textDocument":{"callHierarchy":{"dynamicRegistration":true},"codeAction":{"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["","quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}},"dynamicRegistration":true,"isPreferredSupport":true},"codeLens":{"dynamicRegistration":true},"colorProvider":{"dynamicRegistration":true},"completion":{"completionItem":{"commitCharactersSupport":true,"deprecatedSupport":true,"documentationFormat":["markdown","plaintext"],"insertReplaceSupport":true,"preselectSupport":true,"resolveAdditionalTextEditsSupport":true,"snippetSupport":true,"tagSupport":{"valueSet":[1]}},"completionItemKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]},"contextSupport":true,"dynamicRegistration":true,"editsNearCursor":true},"declaration":{"dynamicRegistration":true,"linkSupport":true},"definition":{"dynamicRegistration":true,"linkSupport":true},"documentHighlight":{"dynamicRegistration":true},"documentLink":{"dynamicRegistration":true,"tooltipSupport":true},"documentSymbol":{"dynamicRegistration":true,"hierarchicalDocumentSymbolSupport":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]},"tagSupport":{"valueSet":[1]}},"foldingRange":{"dynamicRegistration":true,"lineFoldingOnly":true,"rangeLimit":5000},"formatting":{"dynamicRegistration":true},"hover":{"contentFormat":["markdown","plaintext"],"dynamicRegistration":true},"implementation":{"dynamicRegistration":true,"linkSupport":true},"onTypeFormatting":{"dynamicRegistration":true},"publishDiagnostics":{"complexDiagnosticCodeSupport":true,"relatedInformation":true,"tagSupport":{"valueSet":[1,2]},"versionSupport":false},"rangeFormatting":{"dynamicRegistration":true},"references":{"dynamicRegistration":true},"rename":{"dynamicRegistration":true,"prepareSupport":true},"selectionRange":{"dynamicRegistration":true},"semanticHighlightingCapabilities":{"semanticHighlighting":true},"semanticTokens":{"dynamicRegistration":true,"formats":["relative"],"requests":{"full":{"delta":true},"range":true},"tokenModifiers":["declaration","definition","readonly","static","deprecated","abstract","async","modification","documentation","defaultLibrary"],"tokenTypes":["namespace","type","class","enum","interface","struct","typeParameter","parameter","variable","property","enumMember","event","function","member","macro","keyword","modifier","comment","string","number","regexp","operator"]},"signatureHelp":{"contextSupport":true,"dynamicRegistration":true,"signatureInformation":{"activeParameterSupport":true,"documentationFormat":["markdown","plaintext"],"parameterInformation":{"labelOffsetSupport":true}}},"synchronization":{"didSave":true,"dynamicRegistration":true,"willSave":true,"willSaveWaitUntil":true},"typeDefinition":{"dynamicRegistration":true,"linkSupport":true}},"window":{"workDoneProgress":true},"workspace":{"applyEdit":true,"configuration":true,"didChangeConfiguration":{"dynamicRegistration":true},"didChangeWatchedFiles":{"dynamicRegistration":true},"executeCommand":{"dynamicRegistration":true},"symbol":{"dynamicRegistration":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]},"tagSupport":{"valueSet":[1]}},"workspaceEdit":{"documentChanges":true,"failureHandling":"textOnlyTransactional","resourceOperations":["create","rename","delete"]},"workspaceFolders":true}},"clientInfo":{"name":"vscode","version":"1.49.0"},"initializationOptions":{"clangdFileStatus":true,"fallbackFlags":[]},"processId":245092,"rootPath":"/home/leon/SampleProject","rootUri":"file:///home/leon/SampleProject","trace":"off","workspaceFolders":[{"name":"SampleProject","uri":"file:///home/leon/SampleProject"}]}}

I[16:58:02.958] <-- initialize(0)
I[16:58:02.959] --> reply:initialize(0) 1 ms
V[16:58:02.959] >>> {"id":0,"jsonrpc":"2.0","result":{"capabilities":{"codeActionProvider":{"codeActionKinds":["quickfix","refactor","info"]},"completionProvider":{"resolveProvider":false,"triggerCharacters":[".",">",":"]},"declarationProvider":true,"definitionProvider":true,"documentFormattingProvider":true,"documentHighlightProvider":true,"documentLinkProvider":{"resolveProvider":false},"documentOnTypeFormattingProvider":{"firstTriggerCharacter":"\n","moreTriggerCharacter":[]},"documentRangeFormattingProvider":true,"documentSymbolProvider":true,"executeCommandProvider":{"commands":["clangd.applyFix","clangd.applyTweak"]},"hoverProvider":true,"referencesProvider":true,"renameProvider":{"prepareProvider":true},"selectionRangeProvider":true,"semanticHighlighting":{"scopes":[["variable.other.cpp"],["variable.other.local.cpp"],["variable.parameter.cpp"],["entity.name.function.cpp"],["entity.name.function.method.cpp"],["entity.name.function.method.static.cpp"],["variable.other.field.cpp"],["variable.other.field.static.cpp"],["entity.name.type.class.cpp"],["entity.name.type.enum.cpp"],["variable.other.enummember.cpp"],["entity.name.type.typedef.cpp"],["entity.name.type.dependent.cpp"],["entity.name.other.dependent.cpp"],["entity.name.namespace.cpp"],["entity.name.type.template.cpp"],["storage.type.primitive.cpp"],["entity.name.function.preprocessor.cpp"],["meta.disabled"]]},"signatureHelpProvider":{"triggerCharacters":["(",","]},"textDocumentSync":2,"typeHierarchyProvider":true,"workspaceSymbolProvider":true}}}

V[16:58:02.965] <<< {"jsonrpc":"2.0","method":"initialized","params":{}}

I[16:58:02.965] <-- initialized
I[16:58:02.965] unhandled notification initialized
V[16:58:02.965] <<< {"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"languageId":"cpp","text":"#include <avr/io.h>\n\n// /home/leon/Documents/SampleProject/avr-g++\n\nint main() {\n    DDRD = (1 << PD1);\n    return 0;\n}","uri":"file:///home/leon/SampleProject/src/main.cpp","version":1}}}

I[16:58:02.965] <-- textDocument/didOpen
I[16:58:02.966] Enqueueing 1 commands for indexing
V[16:58:02.966] Failed to load shard: /home/leon/SampleProject/src/main.cpp
V[16:58:02.979] System include extraction: adding  /usr/lib/gcc/avr/10.2.0/include
V[16:58:02.979] System include extraction: adding  /usr/lib/gcc/avr/10.2.0/include-fixed
V[16:58:02.979] System include extraction: adding  /usr/lib/gcc/avr/10.2.0/../../../../avr/include
I[16:58:02.979] System include extractor: succesfully executed /usr/bin/avr-g++, got includes: "/usr/lib/gcc/avr/10.2.0/include, /usr/lib/gcc/avr/10.2.0/include-fixed, /usr/lib/gcc/avr/10.2.0/../../../../avr/include"
I[16:58:02.979] --> textDocument/clangd.fileStatus
V[16:58:02.979] >>> {"jsonrpc":"2.0","method":"textDocument/clangd.fileStatus","params":{"state":"parsing includes","uri":"file:///home/leon/SampleProject/src/main.cpp"}}

I[16:58:02.979] Updating file /home/leon/SampleProject/src/main.cpp with command 
[/home/leon/SampleProject]
/usr/bin/avr-g++ -target avr --driver-mode=g++ -c -Wall -std=c++14 -fno-threadsafe-statics -Os -mmcu=atmega328p -funsigned-char -funsigned-bitfields -fshort-enums -D F_CPU=8000000 -o obj/main.o src/main.cpp -isystem /usr/lib/gcc/avr/10.2.0/include -isystem /usr/lib/gcc/avr/10.2.0/include-fixed -isystem /usr/lib/gcc/avr/10.2.0/../../../../avr/include -fsyntax-only -resource-dir=/usr/lib/clang/10.0.1
V[16:58:02.980] Indexing src/main.cpp (digest:=43B1DB03159FCB53)
V[16:58:02.981] Ignored diagnostic. the clang compiler does not support '-funsigned-bitfields'
V[16:58:02.981] Ignored diagnostic. the clang compiler does not support '-funsigned-bitfields'
V[16:58:02.981] Driver produced command: cc1 -cc1 -triple avr -fsyntax-only -disable-free -disable-llvm-verifier -discard-value-names -main-file-name main.cpp -mrelocation-model static -mthread-model posix -mframe-pointer=all -fmath-errno -fno-rounding-math -masm-verbose -mconstructor-aliases -target-cpu atmega328p -dwarf-column-info -fno-split-dwarf-inlining -debugger-tuning=gdb -resource-dir /usr/lib/clang/10.0.1 -isystem /usr/lib/gcc/avr/10.2.0/include -isystem /usr/lib/gcc/avr/10.2.0/include-fixed -isystem /usr/lib/gcc/avr/10.2.0/../../../../avr/include -D F_CPU=8000000 -internal-isystem /usr/bin/../lib/gcc/avr/10.2.0/../../../../include/c++/10.2.0 -internal-isystem /usr/bin/../lib/gcc/avr/10.2.0/../../../../include/avr/c++/10.2.0 -internal-isystem /usr/bin/../lib/gcc/avr/10.2.0/../../../../include/avr/c++/10.2.0 -internal-isystem /usr/bin/../lib/gcc/avr/10.2.0/../../../../include/c++/10.2.0/backward -Os -Wall -std=c++14 -fdeprecated-macro -fdebug-compilation-dir /home/leon/SampleProject -ferror-limit 19 -fmessage-length 0 -fshort-enums -fno-signed-char -fgnuc-version=4.2.1 -fno-threadsafe-statics -fobjc-runtime=gcc -fcxx-exceptions -fexceptions -fdiagnostics-show-option -vectorize-loops -vectorize-slp -faddrsig -x c++ src/main.cpp
V[16:58:02.981] Building first preamble for /home/leon/SampleProject/src/main.cpp
V[16:58:02.983] <<< {"id":1,"jsonrpc":"2.0","method":"textDocument/documentSymbol","params":{"textDocument":{"uri":"file:///home/leon/SampleProject/src/main.cpp"}}}

I[16:58:02.983] <-- textDocument/documentSymbol(1)
V[16:58:02.984] <<< {"id":2,"jsonrpc":"2.0","method":"textDocument/codeAction","params":{"context":{"diagnostics":[]},"range":{"end":{"character":0,"line":0},"start":{"character":0,"line":0}},"textDocument":{"uri":"file:///home/leon/SampleProject/src/main.cpp"}}}

I[16:58:02.984] <-- textDocument/codeAction(2)
V[16:58:02.984] <<< {"id":3,"jsonrpc":"2.0","method":"textDocument/documentLink","params":{"textDocument":{"uri":"file:///home/leon/SampleProject/src/main.cpp"}}}

I[16:58:02.984] <-- textDocument/documentLink(3)
I[16:58:02.992] Indexed src/main.cpp (35 symbols, 1118 refs, 12 files)
V[16:58:02.997] BackgroundIndex: building version 1 when background indexer is idle
V[16:58:02.999] index AST for src/main.cpp (main=false): 
  symbol slab: 1066 symbols, 259728 bytes
  ref slab: 0 symbols, 0 refs, 136 bytes
  relations slab: 0 relations, 24 bytes
V[16:58:03.005] BackgroundIndex: serving version 1 (225460 bytes)
V[16:58:03.009] Built preamble of size 177824 for file /home/leon/SampleProject/src/main.cpp
V[16:58:03.011] index AST for src/main.cpp (main=true): 
  symbol slab: 1 symbols, 4456 bytes
  ref slab: 3 symbols, 3 refs, 4304 bytes
  relations slab: 0 relations, 24 bytes
I[16:58:03.011] --> textDocument/publishDiagnostics
V[16:58:03.011] >>> {"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"diagnostics":[],"uri":"file:///home/leon/SampleProject/src/main.cpp"}}

I[16:58:03.011] --> textDocument/semanticHighlighting
V[16:58:03.011] >>> {"jsonrpc":"2.0","method":"textDocument/semanticHighlighting","params":{"lines":[{"isInactive":false,"line":4,"tokens":"AAAABAAEAAM="},{"isInactive":false,"line":5,"tokens":"AAAABAAEABEAAAARAAMAEQ=="}],"textDocument":{"uri":"file:///home/leon/SampleProject/src/main.cpp"}}}

I[16:58:03.011] --> reply:textDocument/documentSymbol(1) 27 ms
V[16:58:03.011] >>> {"id":1,"jsonrpc":"2.0","result":[{"kind":12,"name":"main","range":{"end":{"character":0,"line":7},"start":{"character":0,"line":4}},"selectionRange":{"end":{"character":8,"line":4},"start":{"character":4,"line":4}}}]}

I[16:58:03.011] --> reply:textDocument/codeAction(2) 27 ms
V[16:58:03.011] >>> {"id":2,"jsonrpc":"2.0","result":[]}

I[16:58:03.011] --> reply:textDocument/documentLink(3) 27 ms
V[16:58:03.011] >>> {"id":3,"jsonrpc":"2.0","result":[{"range":{"end":{"character":19,"line":0},"start":{"character":9,"line":0}},"target":"file:///usr/avr/include/avr/io.h"}]}

I[16:58:03.011] --> textDocument/clangd.fileStatus
V[16:58:03.011] >>> {"jsonrpc":"2.0","method":"textDocument/clangd.fileStatus","params":{"state":"idle","uri":"file:///home/leon/SampleProject/src/main.cpp"}}

The output of the command is LLVMInitializeAVRTargetInfo on the working machine and empty on the broken machine

@kadircet
Copy link
Member

The output of the command is LLVMInitializeAVRTargetInfo on the working machine and empty on the broken machine

Right, that's as I've feared. For some reason the clangd binary you are using on the "broken machine" is linked without avr support. You might want to file a bug against your distribution package maintainer.

In the meantime you can try:

@musteresel
Copy link

musteresel commented Jun 2, 2021

Just adding to this: I'm using (clangd 11.1.0) a .clangd file with

CompileFlags:
  Add: --target=avr

because that's not picked up from the (CMake generated) compile_commands.json (from where the -mmcu setting is read). With that (and allowing clangd to query the compiler) it works flawlessly so far.

@ubaldot
Copy link

ubaldot commented Dec 30, 2023

Just adding to this: I'm using (clangd 11.1.0) a .clangd file with

CompileFlags:
  Add: --target=avr

because that's not picked up from the (CMake generated) compile_commands.json (from where the -mmcu setting is read). With that (and allowing clangd to query the compiler) it works flawlessly so far.

Awesome! This works! But one has to consider that avr-gcc: error: unrecognized command line option '--target=avr'; did you mean '--target-help'?

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

6 participants