How Reliance Edge Supports FreeRTOS?

FreeRTOS does not include a virtual filesystem (VFS). This means a program using Reliance Edge must directly call the Reliance Edge public API’s instead of using a VFS interface such as fopen().

Similarly, FreeRTOS does not implement a block device abstraction layer. Reliance Edge must be configured to interact directly with the underlying storage media to perform block device I/O. Several example block device implementations are provided in the file os/freertos/services/osbdev.c to demonstrate how this is done. The example block device implementations include:

  • Atmel Studio Framework (ASF) SD/MMC implementation: allows Reliance Edge to access SD/MMC media on an Atmel platform using the ASF drivers
  • STM32 SDIO implementation: allows Reliance Edge to access SD/MMC media on an ST Microelectronics platform using the STM32Cube drivers
  • F_DRIVER implementation: bridge to use the FAT SL block device implementation
  • FatFs implementation: bridge to use the ChaN FatFs block device implementation
  • RAM disk implementation: allows Reliance Edge to run on a virtual volume created in RAM

Reliance Edge also integrates with FreeRTOS by using a FreeRTOS mutex to ensure thread safety. Reliance Edge will automatically use either xSemaphoreCreateMutex or xSemaphoreCreateMutexStatic, depending on which is available.

How does Reliance Edge compare to other file system used with this RTOS 

Besides Reliance Edge, the two popular filesystems used on FreeRTOS are FatFs, developed by ChaN, and FAT SL (Super Lean).

                                                                                                    

Reliance Edge

FatFs                 

FAT SL

File system API(s) POSIX-Like or file system essentials POSIX-like POSIX-Like
Supports multi-sector I/O                                    Yes Yes No
Minimum code size (ROM) ~12KB ~5KB 4KB
Minimum memory usage (RAM)                      ~4KB ~1KB <1KB
Transactional reliability Yes No No
CRC metadata protection Yes No No 
Configurability

File system API's and on-disk format highly configurable at compile time; transactional behavior configurable at runtime

File system API's and some behavior configurable at compile time                                         Minimally configurable at compile time                                       

For a generic comparison of Reliance Edge vs FAT and other file systems, see the Product Introduction of the Reliance Edge Developer's Guide.

Performance of Reliance Edge on FreeRTOS

FreeRTOS file system, Reliance Edge, delivers strong read and write performance, compared to FatFs and FAT SL on FreeRTOS. It also prevents data loss due to power interruption, something that that FatFs and FAT SL are vulnerable to.

The test used here was Datalight’s general purpose file system I/O test (FSIOTest), which measures a variety of file I/O types and works with virtually any file system. Each file system was configured to use a 4096-byte block size. In the real world, especially in IoT devices, I/O sizes are often small, so the performance advantage offered by Reliance Edge when the write sizes are smaller than the block size is particularly meaningful.

Reliance Edge was configured to transact on fsync, file close, disk full and volume dismount. For the Fat Fs file system, the “fast seek” feature was enabled, which caches many of the FAT entries to improve performance. FAT SL does not have that option, and overall performance suffered as a result.

Reliance Edge read performance  

Reliance Edge write performance

Reliance Edge Resources

Datasheet
Developers Guide
Tools
Licensing Options
 Kits Available For

The open source version of Reliance Edge is licensed under the terms of GNU General Public License, version 2.

 

 

F