Skip to content

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

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

Closed
kittaakos opened this issue Mar 24, 2021 · 2 comments
Closed

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

kittaakos opened this issue Mar 24, 2021 · 2 comments
Labels
conclusion: resolved Issue was resolved type: imperfection Perceived defect in any part of project

Comments

@kittaakos
Copy link
Contributor

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

@ubidefeo
Copy link

@kittaakos
this error happens on the Zero, and it might have to do with how the Serial macro is defined.
It might require some rework on the core level, probably @facchinm and @cmaglie know what causes it

@per1234
Copy link
Contributor

per1234 commented Jun 23, 2022

Closing as fixed by #92

@per1234 per1234 closed this as completed Jun 23, 2022
@per1234 per1234 added type: imperfection Perceived defect in any part of project conclusion: resolved Issue was resolved labels Jun 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: resolved Issue was resolved type: imperfection Perceived defect in any part of project
Projects
None yet
Development

No branches or pull requests

3 participants