Description
Describe the request
When I use an older version of the platform, the CLI lists and installs it without any issues. However, it fails with a "bad CPU type in executable" error when I try to compile a sketch.
If the CLI could identify this issue, it would be helpful to mark such versions as "deprecated" (or something similar: https://arduino.github.io/arduino-cli/1.1/rpc/commands/#platformmetadata). This would inform users that these versions are not compatible and prevent them from being installed, ultimately reducing support requests.
Describe the current behavior
There is no way to see if an older version of the AVR core won't work on my environment.
Steps:
cat test_workspace/nested/minimal/minimal.ino
void setup() {}
void loop() {}
./arduino-cli version
arduino-cli Version: 1.1.1 Commit: fa6eafcb Date: 2024-11-22T09:31:36Z
./arduino-cli core list | grep "arduino:avr"
arduino:avr 1.6.3 1.8.6 Arduino AVR Boards
./arduino-cli core search "arduino:avr" --format json | jq '.platforms[].releases | to_entries[] | select(.key == "1.6.3").value'
{
"name": "Arduino AVR Boards",
"version": "1.6.3",
"types": [
"Arduino"
],
"installed": true,
"boards": [
{
"name": "Arduino Nano",
"fqbn": "arduino:avr:nano"
},
{
"name": "Arduino Mega or Mega 2560",
"fqbn": "arduino:avr:mega"
},
{
"name": "Arduino Robot Control",
"fqbn": "arduino:avr:robotControl"
},
{
"name": "Arduino Robot Motor",
"fqbn": "arduino:avr:robotMotor"
},
{
"name": "Arduino Yún",
"fqbn": "arduino:avr:yun"
},
{
"name": "Arduino Uno",
"fqbn": "arduino:avr:uno"
},
{
"name": "Arduino Mega ADK",
"fqbn": "arduino:avr:megaADK"
},
{
"name": "LilyPad Arduino USB",
"fqbn": "arduino:avr:LilyPadUSB"
},
{
"name": "Arduino Pro or Pro Mini",
"fqbn": "arduino:avr:pro"
},
{
"name": "Arduino Leonardo",
"fqbn": "arduino:avr:leonardo"
},
{
"name": "Arduino Esplora",
"fqbn": "arduino:avr:esplora"
},
{
"name": "Arduino Mini",
"fqbn": "arduino:avr:mini"
},
{
"name": "Arduino Ethernet",
"fqbn": "arduino:avr:ethernet"
},
{
"name": "Arduino BT",
"fqbn": "arduino:avr:bt"
},
{
"name": "Arduino Duemilanove or Diecimila",
"fqbn": "arduino:avr:diecimila"
},
{
"name": "Arduino Micro",
"fqbn": "arduino:avr:micro"
},
{
"name": "Arduino Fio",
"fqbn": "arduino:avr:fio"
},
{
"name": "LilyPad Arduino",
"fqbn": "arduino:avr:lilypad"
},
{
"name": "Arduino NG or older",
"fqbn": "arduino:avr:atmegang"
}
],
"help": {
"online": "http://www.arduino.cc/en/Reference/HomePage"
},
"compatible": true
}
There is no way to infer from the JSON if this platform version does not work 👆
"compatible": true
Why is it compatible?
./arduino-cli compile -b "arduino:avr:uno" test_workspace/nested/minimal/minimal.ino
Used platform Version Path
arduino:avr 1.6.3 /Users/akos.kitta/Library/Arduino15/packages/arduino/hardware/avr/1.6.3
Error during build: fork/exec /Users/akos.kitta/Library/Arduino15/packages/arduino/tools/avr-gcc/4.8.1-arduino3/bin/avr-g++: bad CPU type in executable
Arduino CLI version
1.1.1
Operating system
macOS
Operating system version
11.7.10
Additional context
No response
Issue checklist
- I searched for previous requests in the issue tracker
- I verified the feature was still missing when using the nightly build
- My request contains all necessary details