sparkfun / Arduino_Boards

Board definitions for SparkFun-manufactured AVR, ARM, and ESP-based Arduino boards.
270 stars 125 forks source link

Define custom cache menu title for SAMD51 boards #73

Closed per1234 closed 3 years ago

per1234 commented 3 years ago

The "SparkFun SAMD51 MicroMod" and "SparkFun SAMD51 Thing Plus" boards have a custom "cache" board option that controls flash caching: https://learn.adafruit.com/adafruit-grand-central/adapting-sketches-to-m0#cache-3026398-25

From the Arduino platform specification: https://arduino.github.io/arduino-cli/latest/platform-specification/#custom-board-options

We must first define a set of menu.MENU_ID=Text properties. Text is what is displayed on the GUI for every custom menu we are going to create and must be declared at the beginning of the boards.txt file:

This menu.cache property was missing (I guess it was not transferred over from Adafruit SAMD Boards): https://github.com/adafruit/ArduinoCore-samd/blob/1.6.5/boards.txt#L17

This resulted in the option not being controllable via a Tools > Cache menu in the Arduino IDE, as is normally the case for custom board options. More significant, it breaks Arduino IDE 2.x (which is more strict about specification-compliance) when one of those boards is selected.

Clipboard01

silvanocerza commented 3 years ago

@nseidle

Hello, I strongly suggest merging this PR as soon as possible.

I made a change on the Arduino CLI with arduino/arduino-cli#1326 that will stop loading boards from platform that may cause issues for certain commands if they don't respect the platforms specifications. There is more information in the PR description.

I know it might seem a bit extreme breaking the end users but I think that in the long run it will prevent other unforseen issues caused by that missing menu defition.

In the case of this platform only the SparkFun:samd:micromod_samd51, SparkFun:samd:samd51_thing_plus won't be loaded, so the users won't be able to use them when the release of the CLI containing that change is out and embedded in the new IDE.

Thanks if advance, if you need further clarifications feel free to ask.

edspark commented 3 years ago

I'll get this released soon, thanks @per1234 for the pull request, that makes things very easy and thank you @silvanocerza for bringing this back to our attention.

ubidefeo commented 3 years ago

thanks for merging @edspark

A while back @per1234 and I also worked on cleaning up your index but #70 was never merged. There were a few conflicting platforms when it comes to ESP32 so yours could override others. I'm not sure that is still the case, but being your package index very large maybe a reassessment of platforms/boards wouldn't be a bad idea. Thank you for all the amazing work you folks do. Good one, @silvanocerza