# SAMD51 Thing Plus Arduino Cache Error

**URL:** <https://community.sparkfun.com/t/samd51-thing-plus-arduino-cache-error/46341>\
**Category:** Development Boards\
**Tags:** samd\
**Created:** [October 11, 2023, 4:23am UTC](https://community.sparkfun.com/t/samd51-thing-plus-arduino-cache-error/46341 "2023-10-11T04:23:30Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![batten44](https://avatars.discourse-cdn.com/v4/letter/b/e9c0ed/32.png) [@batten44](https://community.sparkfun.com/u/batten44)\
**Post date:** [October 11, 2023, 4:23am UTC](https://community.sparkfun.com/t/samd51-thing-plus-arduino-cache-error/46341/1 "2023-10-11T04:23:30Z")

</div>

I couldn’t get the ATSAM51 Thing Plus Sparkfun board to work with the Arduino IDE 2.2.1. I followed the instructions on the Sparkfun website but got the following error:

_Invalid FQBN: getting build properties for board SparkFun:samd:samd51\_thing\_plus: invalid option ‘cache’_

After some poking around I found the boards file in _AppData\Local\Arduino15\packages\SparkFun\hardware\samd\1.8.3\boards.txt_

Looking through the file I found 4 lines that list cache:

_samd51\_thing\_plus.menu.cache.on=Enabled_  
_samd51\_thing\_plus.menu.cache.on.build.cache\_flags=-DENABLE\_CACHE_  
_samd51\_thing\_plus.menu.cache.off=Disabled_  
_samd51\_thing\_plus.menu.cache.off.build.cache\_flags=_

Removing those lines from the file and restarting the IDE fixes the error and allows the code to compile successfully and it seems to run as expected.

What is going on?

---

<div class="post-metadata">

**Author:** ![TS-Russell](https://yyz1.discourse-cdn.com/sparkfun/user_avatar/community.sparkfun.com/ts-russell/32/6092_2.png) [@TS-Russell](https://community.sparkfun.com/u/TS-Russell)\
**Post date:** [October 11, 2023, 4:49pm UTC](https://community.sparkfun.com/t/samd51-thing-plus-arduino-cache-error/46341/2 "2023-10-11T16:49:23Z")

</div>

It looks like there are probably some leftover SAMD board definitions left over from 1.8.3 in your local files; uninstalling & wiping the arduino15 folder like so [https://support.arduino.cc/hc/en-us/art … rduino-IDE](https://support.arduino.cc/hc/en-us/articles/360021325733-Uninstall-Arduino-IDE) should help things - be _sure_ to perform the “Removing additional files” steps, then try re-installing/starting over with installing the board definitions

---

<div class="post-metadata">

**Author:** ![batten44](https://avatars.discourse-cdn.com/v4/letter/b/e9c0ed/32.png) [@batten44](https://community.sparkfun.com/u/batten44)\
**Post date:** [October 12, 2023, 3:30am UTC](https://community.sparkfun.com/t/samd51-thing-plus-arduino-cache-error/46341/3 "2023-10-12T03:30:40Z")

</div>

My install was on a computer that had never had the Arduino IDE installed before BUT I believe I am using board package 1.8.3.

I followed the instructions ([https://learn.sparkfun.com/tutorials/sa … rduino-ide](https://learn.sparkfun.com/tutorials/samd51-thing-plus-hookup-guide/setting-up-the-arduino-ide)) that asked to add [https://raw.githubusercontent.com/spark … index.json](https://raw.githubusercontent.com/sparkfun/Arduino_Boards/master/IDE_Board_Manager/package_sparkfun_index.json) to the additional board managers list. This causes “SparkFun SAMD Boards (dependency: Arduino SAMD Boards 1.8.1) by SparkFun Electronics” to show up. The latest version available is 1.8.3. I’m using that with “Arduino SAMD Boards (32-bits ARM Cortex-M0+) by Arduino” version 1.8.1. So, yes I guess I’m using definitions from 1.8.3 - not exactly left over though. 🙂

Is there a later version that I should be using? If so, how do I find it?

---

<div class="post-metadata">

**Author:** ![paulvha](https://avatars.discourse-cdn.com/v4/letter/p/65b543/32.png) [@paulvha](https://community.sparkfun.com/u/paulvha)\
**Post date:** [October 12, 2023, 1:03pm UTC](https://community.sparkfun.com/t/samd51-thing-plus-arduino-cache-error/46341/4 "2023-10-12T13:03:48Z")

</div>

The link in the tutorials is to ‘master’

````auto
https://raw.githubusercontent.com/sparkfun/Arduino_Boards/master/IDE_Board_Manager/package_sparkfun_index.json.
``` The latest version for the SAMD51 board driver is 1.8.3

Try this link instead in 'additional board references' in preferences. It uses 'main' instead of 'master':

````

[https://raw.githubusercontent.com/sparkfun/Arduino\_Boards/main/IDE\_Board\_Manager/package\_sparkfun\_index.json](https://raw.githubusercontent.com/sparkfun/Arduino_Boards/main/IDE_Board_Manager/package_sparkfun_index.json).

```The

Sometime ago Sparkfun changed the link from 'master' to 'main' and it looks the tutorial needs an update.

You want SAMD51 caching enabled. The Cache memory function sits between data flash memory and the processor. When disabled the SAMD51 functions slower.
```

---

<div class="post-metadata">

**Author:** ![batten44](https://avatars.discourse-cdn.com/v4/letter/b/e9c0ed/32.png) [@batten44](https://community.sparkfun.com/u/batten44)\
**Post date:** [October 12, 2023, 2:12pm UTC](https://community.sparkfun.com/t/samd51-thing-plus-arduino-cache-error/46341/5 "2023-10-12T14:12:46Z")

</div>

Thank you, Paul!
