if your board is the one David describes at http://www.ulisp.com/show?2AJI – there is one solution shown on that page (patch the arduino file 'pins_arduino.h), but this will only work with my version of ulisp if you comment out the SDCARD_xx_yy defines at line 240.
I recommend to use the defines around line 240; they will be used in the SPI.begin() call (line 1657) :
#define SDCARD_SS_PIN 13 /* Kaef sdcard: 5 */
#define SDCARD_CLK_IO 14 /* Arduino standard: 18 */
#define SDCARD_MISO_IO 2 /* Arduino standard: 19 */
#define SDCARD_MOSI_IO 15 /* Arduino standard: 23 */
I inserted the values which should work for your board (of cause I didn’t test it because I don’t have the wemos board) (you have to enter ESP32-GPIO-numbers here, not PIN numbers!)
The sd-card must be formatted with fat-16 or fat-32 filesystem. On some boards you can only use “small” cards with 2GB or 4GB; I don’t know which sizes are supported by the wemos board.
You may copy some files to the card and enable the define SD_CARD_DEBUG (line 87). When starting ulisp the files from the sd-card should be listed (or you get an error-message).
If this works be sure that the filename given to (with-sd-card) starts with a leading “/”; if omitting the “/” you get the “SD card error” when try to read or write a file. (ie. (with-sd-card (str “/Greeting.txt” 2), not (with-sd-card (str “Greeting.txt” 2) )
Here’s a log from my esp32:
uLisp 2.4a -- forked and extended by Kaef (https://github.com/kaef)
(c) by David Johnson-Davies - www.technoblogy.com
reset reason: 1 wakeup cause: 0
compiled: Nov 23 2018 09:21:43
Features: resetautorun printfreespace serialmonitor sdcardsupport SD_CARD_DEBUG LARGE_WORKSPACE_SETUP
initworkspace PSRAM 524281(512k - 7) cons allocated.
SDCARD_SS_PIN = 5
SD Card Size: 1886MB
Listing directory: /
FILE: /lisp.txt SIZE: 48
FILE: /foo.txt SIZE: 13
FILE: /hello.txt SIZE: 11
Free Heap: 233728