Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-add original SD FAT info access methods #6092

Merged
merged 8 commits into from
May 19, 2019

Conversation

earlephilhower
Copy link
Collaborator

Fixes #6081

The SD rewrite blanked out some of the internal FAT info.. Restore the
function calls and return proper values.

Fixes esp8266#6081

The SD rewrite blanked out some of the internal FAT info.. Restore the
function calls and return proper values.
@earlephilhower earlephilhower added this to the 2.6.0 milestone May 14, 2019
Copy link
Collaborator

@d-a-v d-a-v left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@luc-github mentionned the fact that size() is limited to 4GB.
I am not a SD specialist (SDHC, SDXC, SDwhatever w/ MMC protocol),
and I know little about SdFat compatibility with them.

Approving since it restores the old behaviour, maybe a new issue needs to be opened about bigger cards.

libraries/SD/src/SD.h Outdated Show resolved Hide resolved
Support reporting proper size for >4GB SD cards.
Because size() is used in many printf()s, we can't just change its
return type to uint64.  Instead, when size is > size-max, return
size-max.

Add size64 which can be used by new apps who care about >4GB cards.
@earlephilhower
Copy link
Collaborator Author

Actually, can't change size() to return 64b, it breaks printf() and other existing apps. Added the size64() (which I think we're going to have for FS)...

libraries/SD/src/SD.h Outdated Show resolved Hide resolved
@earlephilhower earlephilhower modified the milestones: 2.6.0, 2.5.2 May 16, 2019
libraries/SD/src/SD.h Outdated Show resolved Hide resolved
libraries/SD/src/SD.h Outdated Show resolved Hide resolved
@earlephilhower
Copy link
Collaborator Author

Debug output shown w/a blank 32GB card:

SDK:2.2.1(cfd48f3)/Core:2.5.1-17-g9223b622=20501017/lwIP:STABLE-2_1_2_RELEASE/glue:1.1-7-g82abda3/BearSSL:a143020
Initializing SD card...initialization done.
WARNING: SD card size overflow (31998345216>= 4GB).  Please update source to use size64().
total size: 1933574144
done!

@earlephilhower earlephilhower merged commit b556075 into esp8266:master May 19, 2019
@earlephilhower earlephilhower deleted the sd-fat-access branch May 19, 2019 15:43
earlephilhower added a commit to earlephilhower/Arduino that referenced this pull request May 20, 2019
Changes since 2.5.1 (to 2.5.2)

Core
----
* Add explicit Print::write(char) (esp8266#6101)

Build system
----
* Fix typo in elf2bin for QOUT binary generation (esp8266#6116)
* Support PIO Wl-T and Arduino -T linking properly (esp8266#6095)
* Allow *.cc files to be linked into flash by default (esp8266#6100)
* Use custom "ElfToBin" builder for PIO (esp8266#6091)
* Fail if generated JSON file cannot be read (esp8266#6076)
* Moved 'Dropping' print from stdout to stderr in drop_versions.py (esp8266#6071)
* Fix PIO issue when build environment contains spaces (esp8266#6119)

Libraries
----
* Remove deadlock when server is not acking our data (esp8266#6107)
* Bugfix for stuck in write method of WiFiClient and WiFiClientSecure until the remote peer closed connection (esp8266#6104)
* Re-add original SD FAT info access methods (esp8266#6092)
* Make FILE_WRITE append in SD.h wrapper (esp8266#6106)
* Drop X509 after connection, avoid hang on TLS broken (esp8266#6065)
@earlephilhower earlephilhower mentioned this pull request May 20, 2019
earlephilhower added a commit that referenced this pull request May 20, 2019
Changes since 2.5.1 (to 2.5.2)

Core
----
* Add explicit Print::write(char) (#6101)

Build system
----
* Fix typo in elf2bin for QOUT binary generation (#6116)
* Support PIO Wl-T and Arduino -T linking properly (#6095)
* Allow *.cc files to be linked into flash by default (#6100)
* Use custom "ElfToBin" builder for PIO (#6091)
* Fail if generated JSON file cannot be read (#6076)
* Moved 'Dropping' print from stdout to stderr in drop_versions.py (#6071)
* Fix PIO issue when build environment contains spaces (#6119)

Libraries
----
* Remove deadlock when server is not acking our data (#6107)
* Bugfix for stuck in write method of WiFiClient and WiFiClientSecure until the remote peer closed connection (#6104)
* Re-add original SD FAT info access methods (#6092)
* Make FILE_WRITE append in SD.h wrapper (#6106)
* Drop X509 after connection, avoid hang on TLS broken (#6065)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

In new SD library several functions are now disabled
3 participants