Difficulty with Arduino IDE using Sparkfun SAMD51 MicroMod

We have developed a custom circuit board that utilizes a Teensy MicroMod. The board includes SPI flash and I am unable to get the flash working. We have done similar boards for years using socketed Teensy 4.1 boards and before that Teensy 3.6. This is our first attempt to use Teensy MicroMod, as we are extremely space constrained. And the flash chips we have used for the past few years are no longer available, so we switched to what ought to be a compatible part in the same product line. (I think it is same product ID with different revision.) To try and determine if the Teensy MicroMod (or the libraries for the Teensy MicroMod) is the problem I bought a few other MicroMod boards to see if I can get the flash working with them.

I installed a Sparkfun SAMD51 MicroMod board and started the Arduino IDE (version 2.3.10) with Sparkfun SAMD Board (1.8.3). I cannot connect the serial terminal or compile any code. The error message is:

Invalid FQBN: getting build properties for board SparkFun:samd:micromod_samd51: invalid option ‘cache’

Compilation error: Invalid FQBN: getting build properties for board SparkFun:samd:micromod_samd51: invalid option ‘cache’

Searching for help, it seems every recommendation is derived from this bug report: Invalid FQBN used after updating to platform version without previously used custom board option · Issue #1762 · arduino/arduino-ide · GitHub. I have followed the recommended workaround and it does not help.

This is the first time I have tried using the SAMD51 MicroMod. However, we have used the Sparkfun SAMD21 Dev Breakout for many years. I tried switching the board definition to SAMD21 Dev Breakout and I can compile the code and connect to the serial monitor. (I did not try to flash SAMD21 executable onto the SAMD51 microcontroller.)

Any suggestions for getting the Arduino IDE working with the SAMD51 MicroMod?

(And bonus points for hints on the problems with flash!)

Thanks,
Jim

The SAMD51 requires using bootloader mode to upload code, are you attempting such? MicroMod SAMD51 Processor Board Hookup Guide - SparkFun Learn

As for the Teensy, since you’ve used teensy before I presume you have teensyduino installed…if not, please grab that MicroMod Teensy Processor Hookup Guide - SparkFun Learn and re-try

Thanks. The error is with the Arduino IDE when trying to use the SAMD51 MicroMod. I cannot open the USB serial terminal to the board, and I cannot compile any code. I get the error message referenced. So I have not been able to attempt to flash any code.

Yes I have the Board Support Packages installed for Sparkfun SAMD and Teensy and lots of other architectures. I have no problem compiling and loading code for lots of other boards. It is only this one board that is not working.

My suspicion is that by using a different board supported by the Sparkfun SAMD core, it set an option called “cache” which is not supported by the SAMD51 MicroMod and so it is failing. I have never used a SAMD51 MicroMod before, so it should not be a problem with an older version of the core setting a “cache” option which is no longer supported.

I created a new Ubuntu 26.04 virtual machine. I installed Arduino IDE 2.3.10. I added “Sparkfun SAMD” board package. I selected the SAMD51 MicroMod as the processor. I opened the basic blink example. I clicked to compile. I get the same error.

So this has nothing to do with past history or working with other Sparkfun boards. A completely fresh install shows this error. So there seems to be a bug in the SAMD51 MicroMod core software.

Can you double-check that the M.2 area has the processor completely flush? Sometimes it helps to re-seat it (requires phillips head screwdriver)

What are the LEDs on the board doing before and after plugging it in?

The board powers on and runs. It is identified by the computer as a USB serial device. The factory-installed blink program runs, and the blue LED on the MicroMod board blinks.

But the problem has nothing to do with the hardware. The SAMD51 MicroMod core software has a bug related to some sort of “cache” option. I should be able to select this board and compile code even with no board connected. Trying to compile fails with the FQBN error.

Ah, gotcha. Ok, I found another github issue that was similar and the workaround, here goes:

  1. Find the installed boards.txt:
    • Windows: %LOCALAPPDATA%\Arduino15\packages\SparkFun\hardware\samd\1.8.3\boards.txt
    • macOS: ~/Library/Arduino15/packages/SparkFun/hardware/samd/1.8.3/boards.txt
    • Linux: ~/.arduino15/packages/SparkFun/hardware/samd/1.8.3/boards.txt
  2. Near the top of the file, in the block of menu.xxx=Label declarations, add a line:
   menu.cache=Cache
  1. Save, then fully quit and relaunch Arduino IDE (a window reload isn’t enough — the IDE/arduino-cli caches parsed board metadata on launch)

Try the above and let me know how it goes :slight_smile:

Thanks, that fixed it. It was not clear exactly how to edit the file. I looked at Arduino_Boards/sparkfun/samd/boards.txt at main · sparkfun/Arduino_Boards · GitHub and that showed what I needed. With that change things look to be working.

Jim