VxWorks DosFS on FMQL45T900: eMMC Storage with VxBus and XBD
Reducing reliance on external silicon while maintaining high reliability is a key goal in modern embedded systems. This article presents a production-grade eMMC file system implementation on the FMQL45T900 SoC using VxWorks, combining a VxBus-based block device driver, the XBD caching layer, and the DosFS file system.
The result is a modular, high-performance storage stack with full read/write capability and strong reusability.
🔍 Platform Context: FMQL45T900 and VxWorks #
The FMQL45T900 is a programmable SoC integrating:
- Quad-core ARM Cortex-A7
- FPGA fabric for custom logic
- Rich peripheral interfaces
- SMP support
With an available VxWorks BSP, it provides a solid foundation for building reliable storage subsystems.
VxWorks Storage Stack Overview #
VxWorks organizes storage into layered components:
-
Application Layer
- POSIX APIs (
open,read,write,close)
- POSIX APIs (
-
File System Layer
- DosFS (FAT16/FAT32 support)
-
Block Layer
- XBD (Extended Block Device)
-
Driver Layer
- VxBus-based eMMC driver
This separation ensures clean abstraction and portability.
🛠️ eMMC Hardware Interface and Configuration #
The system uses an eMMC 5.1 device configured in SDR mode.
Key Characteristics #
- Bus Width: 4-bit
- Clock: 25 MHz
- Signals:
EMMC_CLK,EMMC_CMD,EMMC_D[0:3]
- Power Domains:
VCC(NAND array)VCCQ(controller I/O)
Device Tree Configuration #
mmc0: dwmmc@e0043000 {
compatible = "fmsh,psoc-dw-mshc";
reg = <0xe0043000 0x1000>;
clocks = <&clkc NCLK_AHB_SDIO0>, <&clkc NCLK_SDIO0>;
clock-names = "biu", "ciu";
bus-width = <4>;
cap-mmc-highspeed;
status = "okay";
};
This enables the controller and binds it to the VxWorks driver infrastructure.
📐 Storage Architecture: DosFS + XBD + Driver #
At system initialization, the storage stack is brought online through:
usrDosfsInit()dosFsCacheLibInit()xbdInit()fsMonitorInit()
Data Flow #
- Application issues file operation
iosLibroutes request- DosFS translates to block operations
- XBD handles caching and queuing
- Driver executes hardware access
Core Structures #
struct xbd {
struct device xbd_dev;
struct xbd_funcs *xbd_funcs;
unsigned xbd_blocksize;
sector_t xbd_nblocks;
};
struct bio {
device_t bio_dev;
sector_t bio_blkno;
unsigned bio_bcount;
void *bio_data;
unsigned bio_resid;
};
XBD abstracts block devices and optimizes I/O throughput.
🔧 Block Device Driver Design #
The eMMC driver follows VxWorks block device conventions and integrates via VxBus.
Initialization Steps #
-
Create device:
blkXbdDevCreate() -
Attach to XBD:
xbdAttach() -
Register strategy functions:
mmcStorageBlkRead()mmcStorageBlkWrite()
🔄 Read/Write Execution Flow #
Read Path (CMD17) #
- Configure block length (512 bytes)
- Issue single-block read
- Receive data + CRC
- Send stop command (CMD12)
- Validate CRC16
Write Path (CMD24) #
- Configure block length
- Issue write command
- Transmit data + CRC
- Wait for DATA0 busy release
- Send CMD12
Key Properties #
- Sector size: 512 bytes
- FAT compatibility: ensured
- Data integrity: CRC validation
🔌 VxBus Integration and System Registration #
The driver is registered through hwconf.c with:
- Base address
- Interrupt configuration
Required Components #
INCLUDE_DOSFSINCLUDE_XBDINCLUDE_DEVICE_MANAGERINCLUDE_FS_MONITOR
Verification #
After boot:
vxBusShow→ confirms device bindingdevs→ shows/mmc0:0
✅ Validation and Testing #
A full validation suite confirms functionality and stability.
Test Scenarios #
- FTP file upload to mounted volume
- Application-level
read()verification - Direct driver read comparison
- Write tests with incremental patterns
Results #
- Data consistency across all layers
- Stable repeated read/write cycles
- No observed corruption or mismatch
This validates correctness, robustness, and performance.
🚀 Performance and Reliability Considerations #
Strengths #
- Modular architecture
- Efficient caching via XBD
- Low-latency block access
- Clean driver abstraction
Optimization Opportunities #
- HS400 mode enablement
- DMA tuning for higher throughput
- Advanced wear-leveling strategies
🧠 Final Thoughts #
This implementation demonstrates a complete and production-ready storage stack for VxWorks on FMQL45T900. By combining VxBus, XBD, and DosFS, it achieves a balance of performance, modularity, and maintainability.
The design serves as a strong reference for:
- Embedded storage system development
- BSP-level driver integration
- High-reliability industrial platforms
Future enhancements can extend performance and adaptability, but the current solution already provides a solid, deployable foundation for modern embedded systems.
Reference: VxWorks DosFS on FMQL45T900: eMMC Storage with VxBus and XBD