I have a MKS GEN L v1.0 3dprinter board that works fine uploading using the IDE. But I need to install to it using the arduino-cli.
For some reason, the command arduino-cli board list
says that the board has an unknown FQBN. Which is fine, I guess. I guess I don't know how to compile & upload without the FQBN.
The options I need selected (which work in the IDE) are:
- Board: Arduino/Genuino Mega or Mega 2560
- Processor: ATmega2560
- Programmer: AVRISP mkII
I don't understand why these options aren't clearly available in the arduino-cli.
I ran these commands: arduino-cli core install arduino:avr and arduino-cli core install arduino:megaavr
I ran arduino-cli board list
. It says /dev/ttyUSB0, serial, Serial Port (USB), "Unknown" for FQBN....
I run arduino-cli compile Marlin
. It says "unknown FQBN".
So how do I install using the same parameters in the IDE?
1 Answer 1
I would guess, that the arduino-cli doesn't recognize your boards FQBN, since it is not a genuine Arduino board. My Arduino Nano clones (with the CH340 USB-Serial-chip) aren't recognized as Arduino Nanos either. For me that's the same with the Arduino IDE.
Though, since you already know what board you have, you can find the FQBN yourself by looking through the list in the output of
arduino-cli board listall
or if you want to narrow the list down a bit:
arduino-cli board listall avr
There you will find the line with the Megas FQBN:
Arduino Mega or Mega 2560 arduino:avr:mega
Then you need to know, which Serial interface/COM port your Arduino has. This is done analog to the Arduino IDE: Check the list of connected boards via
arduino-cli board list
If you cannot identify it directly from the list, you might want to disconnect and connect it again, to see, what entry in this list reappears again.
Then compile and upload can be done like this (be sure to input your own COM port/Serial interface, if it differs from this):
arduino-cli compile --fqbn arduino:avr:mega
arduino-cli upload --fqbn arduino:avr:mega --port /dev/ttyUSB0
while being in the sketch folder.
-
Thank you... I have been searching for an answer to this for years... It is not clear the "FQBN" would be the same as that sub menu in the IDEsteve antwan– steve antwan2023年06月26日 16:44:39 +00:00Commented Jun 26, 2023 at 16:44
arduino-cli core install arduino:avr
andarduino-cli core install arduino:megaavr
... Is there something else I should do?