-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
AVR Assembler Errors (i.e. Arduino) #2377
Comments
Our IntelliSense parser doesn't have any special-case code for "Arduino compiler" mode, just clang/gcc/cl.exe modes -- I don't know if we'll be able to get the compiler to support non-standard features specific to Arduino. |
The Arduino functions call platform-specific macros. AVR-GCC needs to be given the correct platform identifier, e.g. This can be supported in vscode-tools by adding the correct option to the "compilerPath" string. For the original reporter, the correct entry is likely:
In short: not a vscode-cpptools bug, but it's pretty difficult for an end-user to determine what's wrong. It could conceivably be appropriate to document this here. When c_cpp_properties.json is automatically generated, it would be nice if the generator tools got this right. |
I know this is a rather old issue, but this doesn't sound like a bug to me, per se. We can't assume that the user does not want to use the default mode of the compiler that was specified. We cannot know if the '-mmcu' arg is needed, or what the user would like it to be set to. It needs to be specified by the user (or tool that generates |
Type: LanguageService
----- Input information below -----
Please review existing issues and our documentation at https://github.com/Microsoft/vscode-cpptools/tree/master/Documentation prior to filing an issue.
Describe the bug
vsciot-vscode.vscode-arduino, rockcat.avr-support
To Reproduce
Steps to reproduce the behavior:
Provide a code sample including configuration files such as c_cpp_properties.json
Expected behavior
Using common macros from Arduino (i.e. digitalPinToBitMask, digitalPinToPort, portOutputRegister) they get flagged as errors in the Problems tab with the message "unknown register name 'r0'". The following is my
c_cpp_properties.json
contents at this time.Screenshots
N/A
Additional context
N/A
The text was updated successfully, but these errors were encountered: