Https://community.platformio.org/t/architecture-or-board-not-supported-with-esp32-and-sd-library/37578

Apologies for referring to this link that has a solution, but I need some help please in understanding and implementing the solution.

My current project is using either a NEO-6M or BN-880 GPS device that I’m displaying on a TFT screen using a ESP32.

I’ve used code successfully from some example projects (Without a TFT display, serial printing lat,long readings) using an Arduino UNO and Arduino NANO to read and log the data to an SD card and use Google maps to display the route.

I’d like to log the results using the ESP with TFT display but keep running into the same issue.

Here is my platformio .ini file

[env:esp32doit-devkit-v1]
platform = espressif32
board = esp32doit-devkit-v1
framework = arduino
monitor_speed = 115200
lib_deps = 
	mikalhart/TinyGPSPlus@^1.1.0
	bodmer/TFT_eSPI@^2.5.43
	arduino-libraries/SD

And here is the PROBLEM result

[{
	"resource": "/c:/Users/derek/OneDrive/Documents/PlatformIO/Projects/ESP32 GPS Position Logger/.pio/libdeps/esp32doit-devkit-v1/SD/src/utility/Sd2PinMap.h",
	"owner": "cpp",
	"severity": 8,
	"message": "#error Architecture or board not supported.",
	"startLineNumber": 527,
	"startColumn": 2,
	"endLineNumber": 527,
	"endColumn": 2
}]

Thanks in advance for any help in teaching me how to solve this.

I’ve just tried this example in my platform.ini but get a fatal repository not found?

[env:esp32doit-devkit-v1]
platform = espressif32
board = esp32doit-devkit-v1
framework = arduino
monitor_speed = 115200
lib_deps = 
	mikalhart/TinyGPSPlus@^1.1.0
	bodmer/TFT_eSPI@^2.5.43
	;spressif arduino=esp32 SD
	https://github.com/espressif/arduino-esp32/tree/master/libraries/SD
	lib_ldf_mode = chain+

No, you cannot include the SD library like that. Since it’s a library built into the Arduino core, you don’t declare it at all. Just #include <SD.h> in your code and build the project, the library dependency finder (LDF) should find it.

This line is wrongly indented. There should be no spaces to the left.

Hi Max,

Thanks for the advice, I did find something that explains exactly what you say about the SD dependency and adjusted my code accordingly.

I can build the GPS on its own no problem and display the data, but still struggling when I add the SD card to my code.

I did have the SD card respond when I used a simple example code on its own but when I add it so that I write the GPS data to it kind of hangs up and doesn’t work? I’m sure I’ll find out what’s going on in the code.

Thanks for your reply Max.