Skip to content
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

Upload code to Arduino does not work with IDE 2.x or Arduino-cli #4010

Open
failiz opened this issue Mar 10, 2023 · 1 comment
Open

Upload code to Arduino does not work with IDE 2.x or Arduino-cli #4010

failiz opened this issue Mar 10, 2023 · 1 comment

Comments

@failiz
Copy link
Contributor

failiz commented Mar 10, 2023

Current Behaviour

In Fritzing 0.9.10 (Windows), the upload to Arduino does not work with Arduino IDE 2.x or the recent version of Arduno-cli.
Selecting the Arduino.exe (the IDE), the upload just gives you a very short message: "upload failed with exit code -1, 0" (This was also reported in #4001)

Selecting the arduino-cli, it outputs more info:

Running C:/Users/anfv/Downloads/arduino-cli.exe --board arduino:avr:uno --port \\.\COM15 --upload C:\Users\anfv\AppData\Roaming\Fritzing\fzz\39a6a07cb8608549653ac9b134609861\Blink_TMP\Blink_TMP.ino
Error: unknown flag: --board

Usage:
  arduino-cli [command]

Examples:
  C:\Users\anfv\Downloads\arduino-cli.exe <command> [flags...]

Available Commands:
  board           Arduino board commands.
  burn-bootloader Upload the bootloader.
  cache           Arduino cache commands.
  compile         Compiles Arduino sketches.
  completion      Generates completion scripts
  config          Arduino configuration commands.
  core            Arduino core operations.
  daemon          Run as a daemon on port: 50051
  debug           Debug Arduino sketches.
  help            Help about any command
  lib             Arduino commands about libraries.
  monitor         Open a communication port with a board.
  outdated        Lists cores and libraries that can be upgraded
  sketch          Arduino CLI sketch commands.
  update          Updates the index of cores and libraries
  upgrade         Upgrades installed cores and libraries.
  upload          Upload Arduino sketches.
  version         Shows version number of Arduino CLI.

Flags:
      --additional-urls strings   Comma-separated list of additional URLs for the Boards Manager.
      --config-file string        The custom config file (if not specified the default will be used).
      --format string             The output format for the logs, can be: text, json, jsonmini, yaml (default "text")
  -h, --help                      help for arduino-cli
      --log-file string           Path to the file where logs will be written.
      --log-format string         The output format for the logs, can be: text, json
      --log-level string          Messages with this level and above will be logged. Valid levels are: trace, debug, info, warn, error, fatal, panic
      --no-color                  Disable colored output.
  -v, --verbose                   Print the logs on the standard output.

Use "arduino-cli [command] --help" for more information about a command.

unknown flag: --board

Upload failed with exit code 1, 0

Thus, it seems that the commands have changed and the "--" needs to be removed.

Steps to reproduce:

  • Open blink example
  • Set the Arduino 2.x or a new version of arduino-cli as platform in preferences->code view
  • Program arduino

Expected Behaviour

The Arduino is uploaded

@vanepp
Copy link
Contributor

vanepp commented Mar 14, 2023

Looks from the usage message that we need to change the --command to -command which should be fairly easy to do. I expect when you fix the first one the next two will then fail as well (unless we do all three and any others we use all at once). We may need to add code to check for the IDE version as I believe this works on older versions of the IDE and we probably don't want to break that.

failiz added a commit to failiz/fritzing-app that referenced this issue Oct 1, 2024
…xisting users. Arduino IDE 2.x seems to not support comand line commands. Fixes fritzing#4010
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants