Can I force SD-card support for Metro M4?


#1

Hello, @johnsondavies,

I would like to know: are there any problems to be expected if I enable SD card support for the Adafruit Metro M4? I KNOW it has flash, but the SD-card basically will provide me with “unlimited storage”. I see it lacks a few variables, like the pin definition, but I am simply going to copy over all the stuff from the Arduino Due definitions.

EDIT: If I plan to use A LOT of symbols, should I adjust the symboltablesize, too, e.g. to 2048 or 4096 or thelike?

Anything beyond that? - Thank you for your time and help, as always!


#2

Hi Aeneas,

If you uncomment:

#define sdcardsupport

you will get the SD card routines, and with-sd-card should work as expected, although I haven’t tested it on the Arduino M4 boards.

In the ARM version of uLisp the SD card takes priority over using the DataFlash for (save-image) and (load-image), but this could be changed to leave the DataFlash for that function.

Assuming you’re using an external SD card shield you may have to define:

#define SDCARD_SS_PIN 10

to whatever pin is used for the SD card select pin.

To increase the space for symbols increase the size of:

#define SYMBOLTABLESIZE 1024

Let me know how you get on!

David


#3

Dear David,

The SD-card works marvelously, I just tested it - I LOVE it! I wanted it EXACTLY for saving images on the SD card.

THANK YOU!


#4

Great - thanks for confirming it works!


#5

Hi

To david ans Aeneas

I tested this and it works !
This because I didn’t know in the beginning that the board had on board dataflash :-( and that it was supported …
Edit the changes as David says and you will see it working

Regards
Ronny Suy


#6