Skip to content

Define custom cache menu title for SAMD51 boards #73

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 17, 2021

Conversation

per1234
Copy link
Contributor

@per1234 per1234 commented Feb 20, 2021

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

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 Pro IDE (which is more strict about
specification-compliance) when one of those boards is selected.
@silvanocerza
Copy link

@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
Copy link
Contributor

edspark commented Jun 17, 2021

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.

@edspark edspark merged commit 40b6aa6 into sparkfun:main Jun 17, 2021
@per1234 per1234 deleted the board-menu-name branch June 17, 2021 21:33
@ubidefeo
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants