From 0a622188871831beb65bd7df19e9aa31cac07442 Mon Sep 17 00:00:00 2001 From: per1234 Date: Sat, 20 Feb 2021 13:06:38 -0800 Subject: [PATCH] Define custom cache menu title for SAMD51 boards 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. --- sparkfun/samd/boards.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sparkfun/samd/boards.txt b/sparkfun/samd/boards.txt index 8ff84155..7d91bfe3 100644 --- a/sparkfun/samd/boards.txt +++ b/sparkfun/samd/boards.txt @@ -14,6 +14,8 @@ # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +menu.cache=Cache + samd21_dev.name=SparkFun SAMD21 Dev Breakout samd21_dev.vid.0=0x1B4F samd21_dev.pid.0=0x8D21