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

Support FAT32 #82

Closed
charlespax opened this issue Aug 28, 2014 · 11 comments
Closed

Support FAT32 #82

charlespax opened this issue Aug 28, 2014 · 11 comments
Assignees

Comments

@charlespax
Copy link
Member

Can the T400 support FAT32 filesystems. The library right now can only support FAT16. Maybe operate FAT32 cards in FAT16 mode?

See #34 #74 #75 for background.

@cibomahto
Copy link
Contributor

Possibly, but it is specifically using the Fat16 library at the moment. There's probably a tradeoff in library size to support a Fat32 one:

http://forum.arduino.cc/index.php?topic=128875.0

@cibomahto
Copy link
Contributor

Takes an extra 4k, see:
https://github.com/PaxInstruments/t400-firmware/tree/fat32

@cibomahto
Copy link
Contributor

(so no, not at the moment)

@charlespax
Copy link
Member Author

For the T400 there are only three things we care about: reading names of files on SD card, making new files, and appending data to the end of files. We do not need to read files. I wonder if removing the file-read functionality from the FAT32 library would shrink it to the point we can use it.

For now I'm moving this to the Firmware version :-)

@charlespax charlespax added this to the Firmware version :-) milestone Dec 26, 2014
@charlespax
Copy link
Member Author

It looks like we may be able to support FAT32 if we drip Arduino compatibility. FAT32 is waaay more important than Arduino compatibility. Let's do it if we can.

@charlespax charlespax modified the milestones: Firmware version 0.x MEMORY, Firmware version :-) Jan 28, 2015
@cibomahto
Copy link
Contributor

I'm estimating this will probably take 15+ hours to complete. I suggest moving this to a future release.

@charlespax
Copy link
Member Author

Darn!, that would have been awesome.

Is that fifteen hours because we would have to write a new library from scratch? Do we shorten that time if we free up memory by moving string and things to the SPI flash (#101)?

Moving to ice box.

@cibomahto
Copy link
Contributor

It's accounting for the effort that it will take to port the main code and libraries out of Arduino. Possible, but probably not the best use of effort at this time.

@cibomahto
Copy link
Contributor

So check this out- Arduino's SD library is way too big to fit, but by using the underlying library directly (SdFat, from: https://github.com/greiman/SdFat), Fat32 seems to fit no problem. Implemented in d1774e4. There's still some error checking that needs to be in, but it works with a card formatted for 8gb using os x disk utility.

With this included we're at:
Sketch uses 26,728 bytes (93%) of program storage space. Maximum is 28,672 bytes.
Global variables use 1,891 bytes (73%) of dynamic memory, leaving 669 bytes for local variables. Maximum is 2,560 bytes

@charlespax
Copy link
Member Author

OMFG!!! This is flipping awesome! I'm going to play with it right now...

Tested and working on a 1 GB microSD card formatted in OSX as FAT32. I'll have to find high capacity cards to test.

@charlespax
Copy link
Member Author

I had Pax Instruments for the SdFat library, so we can direct users to a know code base. I've updated the URL in README.md and in t400.ino.

See https://github.com/PaxInstruments/SdFat

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants