Skip to content

Sketch has error diagnostics although I can compile and upload #75

Closed
@kittaakos

Description

@kittaakos

Bug Report

Current behavior

I have a compiler error in my sketch. I have restarted the LS, reloaded the window; it did not work.

Error:

No matching member function for call to 'println'

/Users/akos.kitta/Library/Arduino15/packages/arduino/hardware/samd/1.8.11/cores/arduino/api/Print.h:79:12:
note: candidate function not viable: no known conversion from 'Uart' to 'arduino::Print' for object argument

/Users/akos.kitta/Library/Arduino15/packages/arduino/hardware/samd/1.8.11/cores/arduino/api/Print.h:78:12:
note: candidate function not viable: no known conversion from 'Uart' to 'arduino::Print' for object argument

/Users/akos.kitta/Library/Arduino15/packages/arduino/hardware/samd/1.8.11/cores/arduino/api/Print.h:77:12:
note: candidate function not viable: no known conversion from 'Uart' to 'arduino::Print' for object argument

/Users/akos.kitta/Library/Arduino15/packages/arduino/hardware/samd/1.8.11/cores/arduino/api/Print.h:80:12:
note: candidate function not viable: no known conversion from 'Uart' to 'arduino::Print' for object argument

/Users/akos.kitta/Library/Arduino15/packages/arduino/hardware/samd/1.8.11/cores/arduino/api/Print.h:81:12:
note: candidate function not viable: no known conversion from 'Uart' to 'arduino::Print' for object argument

/Users/akos.kitta/Library/Arduino15/packages/arduino/hardware/samd/1.8.11/cores/arduino/api/Print.h:82:12:
note: candidate function not viable: no known conversion from 'Uart' to 'arduino::Print' for object argument

/Users/akos.kitta/Library/Arduino15/packages/arduino/hardware/samd/1.8.11/cores/arduino/api/Print.h:83:12:
note: candidate function not viable: no known conversion from 'Uart' to 'arduino::Print' for object argument

/Users/akos.kitta/Library/Arduino15/packages/arduino/hardware/samd/1.8.11/cores/arduino/api/Print.h:84:12:
note: candidate function not viable: no known conversion from 'Uart' to 'arduino::Print' for object argument

/Users/akos.kitta/Library/Arduino15/packages/arduino/hardware/samd/1.8.11/cores/arduino/api/Print.h:85:12:
note: candidate function not viable: no known conversion from 'Uart' to 'arduino::Print' for object argument

/Users/akos.kitta/Library/Arduino15/packages/arduino/hardware/samd/1.8.11/cores/arduino/api/Print.h:86:12:
note: candidate function not viable: no known conversion from 'Uart' to 'arduino::Print' for object argument

/Users/akos.kitta/Library/Arduino15/packages/arduino/hardware/samd/1.8.11/cores/arduino/api/Print.h:87:12:
note: candidate function not viable: no known conversion from 'Uart' to 'arduino::Print' for object argument

/Users/akos.kitta/Library/Arduino15/packages/arduino/hardware/samd/1.8.11/cores/arduino/api/Print.h:88:12:
note: candidate function not viable: no known conversion from 'Uart' to 'arduino::Print' for object argument

/Users/akos.kitta/Library/Arduino15/packages/arduino/hardware/samd/1.8.11/cores/arduino/api/Print.h:89:12:
note: candidate function not viable: no known conversion from 'Uart' to 'arduino::Print' for object argument

/Users/akos.kitta/Library/Arduino15/packages/arduino/hardware/samd/1.8.11/cores/arduino/api/Print.h:90:12:
note: candidate function not viable: requires 0 arguments, but 1 was provided

Sketch:

#include "other.h"
void setup() {
  bar();
  Serial.begin(9600);
}
void loop() {
  Serial.println("foo");
}

Other.h:

void bar() { }

Screen Shot 2021-03-24 at 16 43 57

I have selected my connected Zero board:

~/git/arduino-ide/arduino-ide-extension/build/arduino-cli board list --format json
[
  {
    "address": "/dev/cu.URT2",
    "protocol": "serial",
    "protocol_label": "Serial Port"
  },
  {
    "address": "/dev/cu.URT1",
    "protocol": "serial",
    "protocol_label": "Serial Port"
  },
  {
    "address": "/dev/cu.Bluetooth-Incoming-Port",
    "protocol": "serial",
    "protocol_label": "Serial Port"
  },
  {
    "address": "/dev/cu.usbmodem14602",
    "protocol": "serial",
    "protocol_label": "Serial Port (USB)",
    "boards": [
      {
        "name": "Arduino Zero (Programming Port)",
        "FQBN": "arduino:samd:arduino_zero_edbg",
        "VID": "0x03EB",
        "PID": "0x2157"
      }
    ],
    "serial_number": "3ZXXH6CNQ4ME0E3Q69HT"
  }
]

Screen Shot 2021-03-24 at 16 44 26

Expected behavior

Environment

  • Language Server version (commit hash):
  • CLI version used (output of arduino-cli version):
  • OS and platform:

Additional context

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions