Skip to content

Compile fails when sketch filename is specified in the command #51

Closed
@eduherminio

Description

@eduherminio

First of all, congrats on this project, it's just awesome.

I've just spent some time trying to use arduino-cli to compile a sketch for the first time.

I can now compile and upload sketches to my Uno and Duemilanove with no problems even though the boards themselves are not recognised.

Problem solved, not really worried about some of my boards not being recognized.

  • Secondly, and this is why I decided to open this issue, I wasn't able to make arduino-cli compile any sketch for any board.
    C:\Program Files (x86)\Arduino\examples\01.Basics\Blink>arduino-cli compile --fqbn arduino:avr:uno Blink.ino.
    After trying desperately different options with different boards (arduino-cli board listall is very useful!), I was about to open a real issue when I came back for a moment to README.md:

$ arduino-cli compile --fqbn arduino:samd:mkr1000 Arduino/MyFirstSketch

Not:

$ arduino-cli compile --fqbn arduino:samd:mkr1000 Arduino/MyFirstSketch/MyFirstSketch.ino

There it was my mistake,


I may not be the only or last person that tries to run arduino-cli over Arduino sketch rather than over its surrounding dir, so I suggest trying to detect this specific behavior when invoking arduino-cli compile or at least mentioning this explicitly in README.md instructions.

Disclaimer: I may be wrong, the pitfall I'm describing won't happen to anyone else and documenting it explicitly is worthless.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions