The following canonical Arduino 'blink' example:
#include <Arduino.h>
void setup() {
pinMode(LED_BUILTIN, OUTPUT);
}
void loop() {
digitalWrite(LED_BUILTIN, HIGH); delay(1000);
digitalWrite(LED_BUILTIN, LOW); delay(1000);
}
Set up for the Macchina M2 board (atmelsam) is plastered with error squiggles, due to each of the Arduino / Wiring function calls being marked with:
file: 'file:///.../Documents/PlatformIO/Projects/171125-213209-macchina2/src/main.cpp'
severity: 'Error'
message: 'expression preceding parentheses of apparent call must have (pointer-to-) function type'
at: '5,3'
source: ''
code: 'undefined'
Navigation to the definitions of the functions works, though they are also marked up with nonsense errors.
The problem appears to be due to this fragment in .vscode/c_cpp_properties.json:
"intelliSenseMode": "clang-x64",
"macFrameworkPath": [
"/System/Library/Frameworks",
"/Library/Frameworks"
]
It looks like Visual Studio recently added a new "intelliSenseMode": "gccarm" mode, but my VS Code installation (1.18.1) rejects it.
The following canonical Arduino 'blink' example:
Set up for the Macchina M2 board (atmelsam) is plastered with error squiggles, due to each of the Arduino / Wiring function calls being marked with:
Navigation to the definitions of the functions works, though they are also marked up with nonsense errors.
The problem appears to be due to this fragment in .vscode/c_cpp_properties.json:
It looks like Visual Studio recently added a new "intelliSenseMode": "gccarm" mode, but my VS Code installation (1.18.1) rejects it.