user82981: I would like to store an application's configuration in a file stored on the Circuit Playground Express (CPX) flash. The application itself needs to be able to update the configuration file. Things I need to store are basic, for example:

NeoPixel brightness (eg. brightness = 0.9)
NeoPixels on/off (eg. NP_enable = [0,0,1,0,1,0,1,1,1,1]

ArduinoJason seems appropriate, but I cannot even get to the point of writing files to the CPX. The TinyUSB libraries are supposed to give the ability to write to the CPX SPI Flash, but I cannot get any of the examples included with this library to compile.
I am trying to compile the msc_external_flash example provided with the TinyUSB library. I get the following 2 errors:
In file included from /home/pi/Arduino/libraries/Adafruit_TinyUSB_Library/examples/MassStorage/msc_external_flash/msc_external_flash.ino:28:0:
/home/pi/Arduino/libraries/Adafruit_TinyUSB_Library/src/Adafruit_TinyUSB.h:31:2: error: #error TinyUSB is not selected, please select it in "Tools->Menu->USB Stack"
#error TinyUSB is not selected, please select it in "Tools->Menu->USB Stack"
^~~~~
msc_external_flash:65:6: error: #error No QSPI/SPI flash are defined on your board variant.h !
#error No QSPI/SPI flash are defined on your board variant.h !
^~~~~

The board selected is SAMD-->Circuit Playground Express.
There is no Tools menu item for selecting the USB stack.
Regarding the second error,
From msc_external_flash.ino:
  #if defined(EXTERNAL_FLASH_USE_QSPI)
    Adafruit_FlashTransport_QSPI flashTransport;
  #elif defined(EXTERNAL_FLASH_USE_SPI)
    Adafruit_FlashTransport_SPI flashTransport(EXTERNAL_FLASH_USE_CS, EXTERNAL_FLASH_USE_SPI);
  #else
    #error No QSPI/SPI flash are defined on your board variant.h !
  #endif

of the files named variant.h, this looks like the best candidate:
/home/pi/.arduino15/packages/arduino/hardware/samd/1.8.12/variants/circuitplay/variant.h
but the file does not contain the string "EXTERNAL_FLASH", nor anything I see that is CPX specific.
Arduino version is 1.8.19, which I am running on a Raspberry Pi 3 B+ running Buster.
Thanks,
Scott

user82981: The problem was using the Arduino SAMD board core instead of the Adafruit SAMD board core. The Adafruit SAMD board core is not visible unless you add:
https://adafruit.github.io/arduino-board-index/package_adafruit_index.json
to the "Additional Boards Manager URLs:" field of the Arduino IDE preferences panel.
Once you do that...
Then install the "Adafruit SAMD Boards" from the Arduino IDE Boards Manager.
Then select the menu item:
Tools -->
Board: -->
Adafruit SAMD (32-bits ARM Cortext-M0+ and Cortext-M4) boards -->
Adafruit Circuit Playground Express (SAMD21)
I have not seen this procedure in any Adafruit documentation.

82981: <p>I would like to store an application's configuration in a file stored on the Circuit Playground Express (CPX) flash. The application itself needs to be able to update the configuration file. Things I need to store are basic, for example:</p>
<ul>
<li>NeoPixel brightness (eg. brightness = 0.9)</li>
<li>NeoPixels on/off (eg. NP_enable = [0,0,1,0,1,0,1,1,1,1]</li>
</ul>
<p>ArduinoJason seems appropriate, but I cannot even get to the point of writing files to the CPX. The TinyUSB libraries are supposed to give the ability to write to the CPX SPI Flash, but I cannot get any of the examples included with this library to compile.
I am trying to compile the msc_external_flash example provided with the TinyUSB library. I get the following 2 errors:</p>
<pre><code>In file included from /home/pi/Arduino/libraries/Adafruit_TinyUSB_Library/examples/MassStorage/msc_external_flash/msc_external_flash.ino:28:0:
/home/pi/Arduino/libraries/Adafruit_TinyUSB_Library/src/Adafruit_TinyUSB.h:31:2: error: #error TinyUSB is not selected, please select it in &quot;Tools-&gt;Menu-&gt;USB Stack&quot;
#error TinyUSB is not selected, please select it in &quot;Tools-&gt;Menu-&gt;USB Stack&quot;
^~~~~
msc_external_flash:65:6: error: #error No QSPI/SPI flash are defined on your board variant.h !
#error No QSPI/SPI flash are defined on your board variant.h !
^~~~~
</code></pre>
<p>The board selected is SAMD--&gt;Circuit Playground Express.
There is no Tools menu item for selecting the USB stack.</p>
<p>Regarding the second error,
From msc_external_flash.ino:</p>
<pre><code>  #if defined(EXTERNAL_FLASH_USE_QSPI)
    Adafruit_FlashTransport_QSPI flashTransport;
  #elif defined(EXTERNAL_FLASH_USE_SPI)
    Adafruit_FlashTransport_SPI flashTransport(EXTERNAL_FLASH_USE_CS, EXTERNAL_FLASH_USE_SPI);
  #else
    #error No QSPI/SPI flash are defined on your board variant.h !
  #endif
</code></pre>
<p>of the files named variant.h, this looks like the best candidate:
/home/pi/.arduino15/packages/arduino/hardware/samd/1.8.12/variants/circuitplay/variant.h</p>
<p>but the file does not contain the string &quot;EXTERNAL_FLASH&quot;, nor anything I see that is CPX specific.</p>
<p>Arduino version is 1.8.19, which I am running on a Raspberry Pi 3 B+ running Buster.</p>
<p>Thanks,
Scott</p>
 82981: <p>The problem was using the Arduino SAMD board core instead of the Adafruit SAMD board core. The Adafruit SAMD board core is not visible unless you add:
<a href="https://adafruit.github.io/arduino-board-index/package_adafruit_index.json" rel="nofollow noreferrer">https://adafruit.github.io/arduino-board-index/package_adafruit_index.json</a></p>
<p>to the &quot;Additional Boards Manager URLs:&quot; field of the Arduino IDE preferences panel.</p>
<p>Once you do that...
Then install the &quot;Adafruit SAMD Boards&quot; from the Arduino IDE Boards Manager.
Then select the menu item:
Tools --&gt;
Board: --&gt;
Adafruit SAMD (32-bits ARM Cortext-M0+ and Cortext-M4) boards --&gt;
Adafruit Circuit Playground Express (SAMD21)</p>
<p>I have not seen this procedure in any Adafruit documentation.</p>
