After the Arduino IDE is installed, support for Arduino SAMD Boards (32-bits ARM Cortex-M0+)
and Adafruit SAMD Boards
have to be installed in the Boards Manager before the computer could interface with the Adafruit Metro M4 development board.
Before the flash memory could be used for data file storage, it must be properly formatted as a file allocation table (FAT). The SdFat_format.ino
sketch formats the flash memory. This file can be found in the Examples folder of the Adafruit's SPI Flash
code library, which must be included in the source code. A custom-tailored SD Fat
code library from Adafruit must also be downloaded to support the SPI Flash
package. After an experiment, this flash memory can be accessed using Adafruit's CircuitPython
USB Flashing Format file.
To install the libraries, follow these steps:
Adafruit SPIFlash
library.SdFat – Adafruit Fork
library.To prepare the Arduino IDE to execute sketches on the Metro M4, follow these instructions.
Before we can run the motion control sketch on the Adafruit Metro M4, we need to format the QSPI flash memory chip on the microcontroller board. To do this, we need to upload the sketch SdFat_format.ino
to the Metro M4. All files in the website (diskio.h, ff.c, ff.h, ffconf.h
) must be downloaded to the same folder the SdFat_format
sketch is in.
Figure V.D.5: Drag the USB flashing format file to the METROM4BOOT icon.
METROM4BOOT
will appear in this window. This is the Metro M4’s drive.adafruit-circuitpython-metro_m4_express-en_US-4.1.0.uf2
]. METROM4BOOT
drive icon in Explorer. METROM4BOOT
drive will be renamed Usb Drive
. This will display the flash memory’s contents. Right click on Usb Drive
and click Format.SdFat_format.ino
in the Arduino IDE.his sketch will ERASE ALL DATA on the flash chip and format it with a new filesystem!
Flash chip successfully formatted with new empty filesystem!
Once again, here is a link to the manual for the Adafruit Metro M4, which contains detailed instructions on how to configure your Arduino IDE.
https://cdn-learn.adafruit.com/downloads/pdf/adafruit-metro-m4-express-featuring-atsamd51.pdf