arduino / arduino-cli

Arduino command line tool
https://arduino.github.io/arduino-cli/latest/
GNU General Public License v3.0
4.36k stars 382 forks source link

Portenta H7 (arduino-beta:mbed) - Hyphens in FQBN not supported? #771

Closed Dygear closed 4 years ago

Dygear commented 4 years ago

Bug Report

Trying to upload a sketch to the Portenta H7, but I get an invalid FQBN error. According to my searching around the internet, this seems to be a known issue. pert (Global Moderator - Arduino Forms) has mentioned that this is a known issue on the Pro IDE with a link to this issue there. https://github.com/arduino/arduino-pro-ide/issues/272 It seems that this is also a problem within the CLI interface as well.

Current behavior

arduino-cli core install arduino-beta:mbed arduino-cli core list

ID                Installed Latest Name                       
arduino-beta:mbed 1.2.0     1.2.0  Arduino mbed-enabled Boards

arduino-cli compile -b arduino-beta:mbed

Error during build: incorrect FQBN: invalid fqbn: arduino-beta:mbed

Arduino-CLI does not appear to support FQBN that have a hyphens in it's name.

Expected behavior

For the compile process to succeed.

Environment

Additional context

Does not work in IDE Pro either.

rsora commented 4 years ago

Hi @Dygear Thanks for your heads up!

the -b argument for the compile commands requires a board FQBN, which means a Fully Qualified Board Name.

the arduino-beta:mbed core supports 3 different boards (as you can see running arduino-cli board listall):

...
Arduino Nano 33 BLE              arduino-beta:mbed:nano33ble   
Arduino Portenta H7 (M4 core)    arduino-beta:mbed:envie_m4    
Arduino Portenta H7 (M7 core)    arduino-beta:mbed:envie_m7 
...

So, when you try to compile a sketch for the Portenta you should specify, for example,

arduino-cli compile -b arduino-beta:mbed:envie_m4

or

arduino-cli compile -b arduino-beta:mbed:envie_m7

Please let us know if it works your side :+1:

Dygear commented 4 years ago

Hey that works. Sorry for my confusion!