-
Notifications
You must be signed in to change notification settings - Fork 236
please add "__AVR_ATmega328P__" to c_cpp_properties.json when the selected board is arduino uno #1279
Comments
Does Not work, because cpp.properties.json will be overwritten from Verifying. |
That's the obvious reason why I opened this ticket, I ask for "AVR_ATmega328P" automatic generation. |
I suggest adding that for all boards... For example: For ATtiny85 should be added |
This needs to be fixed in the cocopa package this code uses. See issue elektronikworkshop/cocopa#7 |
The repo you referenced hasn't been updated in over a year, but has a pull request which you mentioned may fix the issue. Wouldn't it be worth pulling that code into this extension, or forking the repo, applying the pull request, and then closing out this issue? |
I'm having this issue too. I have a humble suggestion: could we add This affords a lot of freedom by allow the end user to specify entries in the settings.json in |
A workaround is to first create your project, pick your board and allow the intellisense to generate the .vscode/c_cpp_properties.json and then disable the overwriting of it by setting "intelliSenseGen": "disable" in .vscode/arduino.json. After this you can just add AVR_ATmega328P or whatever you need for your board to .vscode/c_cpp_properties.json. It's what @lozziboy already suggested above, but I thought people might like the detailed steps. |
I came back to this issue again after many months and forgot how to do the workaround so I'll leave this more detailed walkthrough of the workaround @NetworkAndSoftware and @lozziboy mentioned here just in case I or anyone else need it in the future: You can have
Make sure you use the configuration we just generated by searching and running At this point, most of your intellisense errors should be fixed but if you're using any IO port definitions you'll still get an error. To fix this, add a line to
Lastly, add Your intellisense should now work! |
I open this ticket to make a request: add the following define to the automatically generated file c_cpp_properties.json when the selected board is arduino uno
"__AVR_ATmega328P__"
this is required to avoid intellisense wrong errors detection with the chip registers name

The text was updated successfully, but these errors were encountered: