Trending

World technology news

→
MicroSD memory card and SD adapters.
crates.ioIn-depth report

sdmmc-async 0.2.0 adds FAT32 and exFAT writes to embedded Rust software

The embedded SD card library makes writing opt-in and reports a smaller mount future on the RP2040.

·crates.io
Reading progress0%

An optional write path

sdmmc-async 0.2.0 reached crates.io at 02:16:06 on November 29 in Istanbul. Docs.rs records the version independently of the download. The packaged changelog introduces an optional write feature for FAT32 and exFAT. It is disabled by default. A device that only reads its configuration has different needs from one that logs observations to a card. The archive describes separate layers for card blocks and filesystem operations. The distinction helps determine what each action changes.

A completed block is one part of a filesystem update

The package exposes an interface for 512-byte blocks. Writing a data block is different from updating a directory entry or extending a file. A logger may need to confirm that its data and relevant metadata are available after reopening the file. The changelog lists operations for writing and synchronizing files. Their presence does not establish a guarantee for every power interruption. The physical card, the moment of the interruption and the application’s write sequence affect the resulting state.

The reported size is for a particular target

The project changelog reports a mount future of about 3.7 KB on an RP2040, down from 15.5 KB. These are the project’s reported figures. This report did not reproduce them on hardware. The size refers to the memory represented by an in-progress asynchronous mount operation. It is not the full RAM requirement of the application. Record the compiler, hardware target and selected features when measuring the same operation in another configuration.

Test success and interruption separately

An environmental logger can add a short line to a test file, close it and read it again. A separate fixture can simulate a card becoming unavailable during a write. The package describes a memory-backed test card and a way to model power loss. This can help test error handling while a physical target test exercises an actual card. Keep the starting image and expected results with the fixture. The goal is to determine which records remain readable in the chosen case.

Record the build configuration with the result

A read-only device and a data logger can use the same package version with different features. Test the selected filesystem and the application’s intended operations. Note which build flags apply when filing a bug or comparing memory use. The registries and archive verify the availability of the new write support. They do not measure performance or crash resistance for a specific card. The photograph shows a microSD card and adapters and is illustrative. When a firmware team checks mounting after an interrupted write, keep the first readable file state as evidence. Record whether the card was mounted without changes and which application operation had completed when the interruption was simulated.

Photo · PiaCarrot / Wikimedia Commons. Resized and converted to WebP. ↗ · CC BY-SA 2.5

Sources and verification
Be the first reader ✎ Write a comment

Reader discussion

Discussion prompt

What would you change first for maintainability and testing in your own project?

No comments yet. Be the first to contribute.

Write a comment

Comments are real visitor contributions. Repeated, link-heavy or abusive submissions may be limited.