Arduino IDE 1.x sorts the menu for each platform in Tools > Board (e.g., Tools > Board > Arduino AVR Boards) according to the order of occurrence of the name property for each board definition in the platform's boards.txt configuration file. This allows the platform developer to sort the boards in some logical order in the menu (e.g., putting commonly used boards at the top of the menu, or grouping related boards together).
Arduino IDE 2.x uses the arduino-cli to list the installed boards, which sorts them by alphabetical order, so it's not possible to get the order defined in boards.txt.
My request is to introduce a way to sort the boards as described in boards.txt (like adding a flag)
I believe the best behavior would be to make the boards.txt order the default one, and a flag to order the boards differently. This is because the platform developers are used to sorting the boards in some logical order, and that order is the best one for the CLI users to see.
Describe the current behavior
It looks like the CLI sorts the boards alphabetically.
Running
arduino-cli board search
I get the following output
Board Name FQBN Platform ID
Adafruit Circuit Playground arduino:avr:circuitplay32u4cat arduino:avr
Adafruit Circuit Playground Express arduino:samd:adafruit_circuitplayground_m0 arduino:samd
Analog ADI Arrow:samd
Arduino 101 Intel:arc32
Arduino BT arduino:avr:bt arduino:avr
Arduino Due arduino:sam
Arduino Duemilanove or Diecimila arduino:avr:diecimila arduino:avr
Arduino Edge Control arduino:mbed_edge:edge_control arduino:mbed_edge
Arduino Edge Control arduino:mbed
Arduino Esplora arduino:avr:esplora arduino:avr
Arduino Ethernet arduino:avr:ethernet arduino:avr
Arduino Fio arduino:avr:fio arduino:avr
Arduino Gemma arduino:avr:gemma arduino:avr
Arduino Industrial 101 arduino:avr:chiwawa arduino:avr
Arduino Leonardo arduino:avr:leonardo arduino:avr
Arduino Leonardo ETH arduino:avr:leonardoeth arduino:avr
Arduino M0 arduino:samd:mzero_bl arduino:samd
Arduino M0 Pro (Native USB Port) arduino:samd:mzero_pro_bl arduino:samd
Arduino M0 Pro (Programming Port) arduino:samd:mzero_pro_bl_dbg arduino:samd
Arduino MKR FOX 1200 arduino:samd:mkrfox1200 arduino:samd
Arduino MKR GSM 1400 arduino:samd:mkrgsm1400 arduino:samd
Arduino MKR NB 1500 arduino:samd:mkrnb1500 arduino:samd
Arduino MKR Vidor 4000 arduino:samd:mkrvidor4000 arduino:samd
Arduino MKR WAN 1300 arduino:samd:mkrwan1300 arduino:samd
Arduino MKR WAN 1310 arduino:samd:mkrwan1310 arduino:samd
Arduino MKR WiFi 1010 arduino:samd:mkrwifi1010 arduino:samd
Arduino MKR1000 arduino:samd:mkr1000 arduino:samd
Arduino MKRZERO arduino:samd:mkrzero arduino:samd
Arduino Mega ADK arduino:avr:megaADK arduino:avr
Arduino Mega or Mega 2560 arduino:avr:mega arduino:avr
Arduino Micro arduino:avr:micro arduino:avr
Arduino Mini arduino:avr:mini arduino:avr
Arduino NANO 33 IoT arduino:samd:nano_33_iot arduino:samd
Arduino NG or older arduino:avr:atmegang arduino:avr
Arduino Nano arduino:avr:nano arduino:avr
Arduino Nano 33 BLE arduino:mbed_nano:nano33ble arduino:mbed_nano
Arduino Nano 33 BLE arduino:mbed
Arduino Nano 33 BLE Sense arduino:mbed
Arduino Nano Every arduino:megaavr
Arduino Nano RP2040 Connect arduino:mbed
Arduino Nano RP2040 Connect arduino:mbed_nano:nanorp2040connect arduino:mbed_nano
Arduino Nicla Vision arduino:mbed
Arduino Portenta H7 arduino:mbed_portenta
Arduino Portenta H7 arduino:mbed
Arduino Portenta X8 arduino:mbed_portenta
Arduino Primo arduino:nrf52
Arduino Primo Core arduino:nrf52
Arduino Pro or Pro Mini arduino:avr:pro arduino:avr
Arduino Robot Control arduino:avr:robotControl arduino:avr
Arduino Robot Motor arduino:avr:robotMotor arduino:avr
Arduino Tian arduino:samd:tian arduino:samd
Arduino Uno arduino:avr:uno arduino:avr
Arduino Uno Mini arduino:avr:unomini arduino:avr
Arduino Uno WiFi arduino:avr:unowifi arduino:avr
Arduino Uno WiFi Rev2 arduino:megaavr
Arduino Yún arduino:avr:yun arduino:avr
Arduino Yún Mini arduino:avr:yunmini arduino:avr
Arduino Zero (Native USB Port) arduino:samd:arduino_zero_native arduino:samd
Arduino Zero (Programming Port) arduino:samd:arduino_zero_edbg arduino:samd
EMoRo 2560 emoro:avr:emoro2560 emoro:avr
Edison Intel:i686
Galileo Intel:i586
Industruino D21G industruino:samd
LilyPad Arduino arduino:avr:lilypad arduino:avr
LilyPad Arduino USB arduino:avr:LilyPadUSB arduino:avr
Linino One arduino:avr:one arduino:avr
Nicla Sense ME arduino:mbed
Nicla Sense ME arduino:mbed_nicla
Nicla Vision arduino:mbed_nicla
Raspberry Pi Pico arduino:mbed_rp2040
Raspberry Pi Pico arduino:mbed
SmartEverything Dragonfly Arrow:samd
SmartEverything Fox Arrow:samd
SmartEverything Fox3 Arrow:samd
SmartEverything Lion Arrow:samd
SmartTutto Arrow:samd
Windows 10 IoT Core Microsoft:win10
atmega168pb-xmini atmel-avr-xminis:avr
atmega328p-xmini atmel-avr-xminis:avr
atmega328pb-xmini atmel-avr-xminis:avr
littleBits w6 Arduino module littleBits:avr
Running
arduino-cli board listall
I get the following output
Board Name FQBN
Adafruit Circuit Playground arduino:avr:circuitplay32u4cat
Adafruit Circuit Playground Express arduino:samd:adafruit_circuitplayground_m0
Arduino BT arduino:avr:bt
Arduino Duemilanove or Diecimila arduino:avr:diecimila
Arduino Edge Control arduino:mbed_edge:edge_control
Arduino Esplora arduino:avr:esplora
Arduino Ethernet arduino:avr:ethernet
Arduino Fio arduino:avr:fio
Arduino Gemma arduino:avr:gemma
Arduino Industrial 101 arduino:avr:chiwawa
Arduino Leonardo arduino:avr:leonardo
Arduino Leonardo ETH arduino:avr:leonardoeth
Arduino M0 arduino:samd:mzero_bl
Arduino M0 Pro (Native USB Port) arduino:samd:mzero_pro_bl
Arduino M0 Pro (Programming Port) arduino:samd:mzero_pro_bl_dbg
Arduino MKR FOX 1200 arduino:samd:mkrfox1200
Arduino MKR GSM 1400 arduino:samd:mkrgsm1400
Arduino MKR NB 1500 arduino:samd:mkrnb1500
Arduino MKR Vidor 4000 arduino:samd:mkrvidor4000
Arduino MKR WAN 1300 arduino:samd:mkrwan1300
Arduino MKR WAN 1310 arduino:samd:mkrwan1310
Arduino MKR WiFi 1010 arduino:samd:mkrwifi1010
Arduino MKR1000 arduino:samd:mkr1000
Arduino MKRZERO arduino:samd:mkrzero
Arduino Mega ADK arduino:avr:megaADK
Arduino Mega or Mega 2560 arduino:avr:mega
Arduino Micro arduino:avr:micro
Arduino Mini arduino:avr:mini
Arduino NANO 33 IoT arduino:samd:nano_33_iot
Arduino NG or older arduino:avr:atmegang
Arduino Nano arduino:avr:nano
Arduino Nano 33 BLE arduino:mbed_nano:nano33ble
Arduino Nano RP2040 Connect arduino:mbed_nano:nanorp2040connect
Arduino Pro or Pro Mini arduino:avr:pro
Arduino Robot Control arduino:avr:robotControl
Arduino Robot Motor arduino:avr:robotMotor
Arduino Tian arduino:samd:tian
Arduino Uno arduino:avr:uno
Arduino Uno Mini arduino:avr:unomini
Arduino Uno WiFi arduino:avr:unowifi
Arduino Yún arduino:avr:yun
Arduino Yún Mini arduino:avr:yunmini
Arduino Zero (Native USB Port) arduino:samd:arduino_zero_native
Arduino Zero (Programming Port) arduino:samd:arduino_zero_edbg
EMoRo 2560 emoro:avr:emoro2560
LilyPad Arduino arduino:avr:lilypad
LilyPad Arduino USB arduino:avr:LilyPadUSB
Linino One arduino:avr:one
Describe the request
Arduino IDE 1.x sorts the menu for each platform in Tools > Board (e.g., Tools > Board > Arduino AVR Boards) according to the order of occurrence of the name property for each board definition in the platform's boards.txt configuration file. This allows the platform developer to sort the boards in some logical order in the menu (e.g., putting commonly used boards at the top of the menu, or grouping related boards together).
Arduino IDE 2.x uses the arduino-cli to list the installed boards, which sorts them by alphabetical order, so it's not possible to get the order defined in
boards.txt
.My request is to introduce a way to sort the boards as described in
boards.txt
(like adding a flag)I believe the best behavior would be to make the
boards.txt
order the default one, and a flag to order the boards differently. This is because the platform developers are used to sorting the boards in some logical order, and that order is the best one for the CLI users to see.Describe the current behavior
It looks like the CLI sorts the boards alphabetically.
Running
I get the following output
Running
I get the following output
Arduino CLI version
0.26.0-rc.1
Operating system
macOS
Operating system version
MacOS Monterey 12.3.1
Additional context
No response
Issue checklist