Skip to main content

VxWorks DosFS on FMQL45T900: eMMC Storage with VxBus and XBD

·620 words·3 mins
VxWorks FMQL45T900 EMMC DosFS VxBus XBD Embedded Storage
Table of Contents

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)
  • 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
#

  1. Application issues file operation
  2. iosLib routes request
  3. DosFS translates to block operations
  4. XBD handles caching and queuing
  5. 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
#

  1. Create device:

    blkXbdDevCreate()
    
  2. Attach to XBD:

    xbdAttach()
    
  3. 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_DOSFS
  • INCLUDE_XBD
  • INCLUDE_DEVICE_MANAGER
  • INCLUDE_FS_MONITOR

Verification
#

After boot:

  • vxBusShow → confirms device binding
  • devs → 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.

Related

Designing a Reliable File System on FMQL45T900 with VxWorks
·802 words·4 mins
VxWorks Embedded Systems File System EMMC SoC RTOS
Designing a High-Reliability VxWorks BSP: From Reset Vector to VxBus
·959 words·5 mins
VxWorks BSP RTOS Embedded Systems Device Tree VxBus
VxWorks BSP Development Handbook: Boot, Drivers, MMU, and SMP
·1738 words·9 mins
VxWorks BSP Development RTOS Embedded Systems VxBus Device Tree SMP MMU Interrupt Handling