SD driver: follow the upstream report, and drop our copy when it's fixed #39
Open
opened 2026-10-05 21:16:17 +00:00 by twisla
·
0 comments
No Branch/Tag Specified
Labels
Clear labels
area/apps
area/audio
area/build
area/cluster
area/gemini
area/gitea
area/gnss
area/ir
area/irc
area/lora
area/ota-debug
area/power
area/scripting
area/ssh
area/storage
area/ui
area/vpn
area/website
area/wifi
concern/memory
concern/security
Launcher and the apps in src/apps
Microphone, speaker, the codec, recording and playback
PlatformIO, Docker, scripts, partitions, sdkconfig
AtomS3 co-processors on Grove and the link protocol
GeminiService, the Gemini App, Saved Pages
The Gitea client: issues, releases, its TLS and its token
GnssService, the GNSS App, Tracks
The infrared LED and the IR Remote
IrcService and the IRC App
The Cap LoRa-1262 radio and the mesh
Updates, Probation, Safe Mode, Debug Console, crash reports
Battery, PowerService, sleep
Lua Apps from the SD card and their API
The SSH client and its terminal
StorageService, the SD card, Storage page
Canvas, widgets, dialogs, Toasts, fonts, keyboard
The WireGuard tunnel
The project website and its docs
WifiService, Wi-Fi Settings, Wi-Fi Tools
May push the heap towards its floors; measure on the device
TLS, signing, the debug token, trust on first use
kind
bug
Something that doesn't work as it should
kind
chore
Refactors, tooling, CI, scripts
kind
docs
README, CONTEXT, milestones, ADRs
kind
feature
Something new the device can do
priority
high
Next up
priority
low
Some day
priority
medium
Soon
status
blocked
Waiting on something else
status
needs-design
Needs a question round (Qnn) before code
status
ready
Designed; can be started
Milestone
No items
No Milestone
S1 System basics
Assignees
twisla (Clément Martin)
Clear assignees
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: twisla/roro9stack#39
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
What
Follow the report made to Arduino-ESP32 about its SD driver, and drop our copy of the library when the fix is in a release we use.
Upstream: https://github.com/espressif/arduino-esp32/issues/12970 (filed 2026-10-05)
Why
Fixing #21 meant taking a copy of the framework's
SDlibrary into the project (lib/SD, ADR 0007), with two bytes added tosd_diskio.cppand a record of why a write fails. A copy of a framework library has to be kept in step with the framework by hand; the clean end is for the fix to land upstream.Done so far (in v0.6.1)
lib/SD: Arduino-ESP32 3.3.12's SD library as it comes (3ee7ae1), then our change on top (3f2650c), so the difference is one readable commit.sd card: the card's type, size and identity register, read by our driver and decoded by a host-tested parser (370f067). Added because the upstream report needed the card's make and nothing else here could read it: a Samsung 8 GB SDHC from June 2013 (manufacturer 0x1B, OEM "SM", product "00000").To do
lib/SDtaken out of the build.platformio.ini): comparelib/SDwith the newlibraries/SD/src, and carry theroro:changes over.lib/SD, keep or drop the fault record depending on whether upstream logs failures by then, and update ADR 0007.infoever shows write faults again, read the step fromput's log first: aDataTokenfault would be the second defect, live.Related
#21,
docs/adr/0007-own-copy-of-the-sd-driver.md,lib/SD/src/sd_diskio.cpp,lib/SD/src/sd_fault.h,lib/storage_model/src/sd_card_id.h.