-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Description
Type: LanguageService
Describe the bug
- OS and Version: Linux x64 4.14
- VS Code Version: 1.31.1
- C/C++ Extension Version: 0.21.0
- Other extensions you installed (and if the issue persists after disabling them): vector-of-bool.cmake-tools, cheshirekow.cmake-format, platformio.platformio-ide
- A clear and concise description of what the bug is.
Processor specific command -mmcu=atmegaXX is not recognized properly.
https://www.microchip.com/webdoc/AVRLibcReferenceManual/using_tools_1using_avr_gcc_mach_opt.html
None of these macros are not present in IntelliSense.
To Reproduce
- Make
compile_commands.jsonfor example:
[
{
"arguments": {
"/usr/bin/avr-gcc",
"-mmcu=atmega16",
"-DF_CPU=1000000",
"-c",
"-o",
".../build/main.o",
".../src/main.c",
},
"directory": ".../src",
"file": ".../src/main.c"
}
]
- Add it to your configuration
compileCommands. - Try to check IntelliSense in any of files contined in your
compileCommands.. F_CPUmacro is recognized, hardware specific macros are not.
Expected behavior
I expect to have hardware specific defines such as __AVR_ATmega16__.
I expect to have properly recognized avr/io.h header. It is not because lack of define __AVR_ATmega16__.
Screenshots
Additional context