Skip to content

Arduino blink example project shows nonsense 'problems' #54

@John-Titor

Description

@John-Titor

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions