C Standard Library Functions with FatFS.

ChibiOS public support forum for all topics not covered by a specific support forum.

Moderators: RoccoMarco, lbednarz, tfAteba

Post Reply
thomash505
Posts: 5
Joined: Sun Jan 05, 2014 7:09 am

C Standard Library Functions with FatFS.

Post by thomash505 »

Hey,
I currently have FatFS running on an STM32F407 Discovery board with no issues, however I am wondering if its possible to find a neater way to integrate it into ChibiOS. I want to map FatFS straight to the standard library's implements of fopen(), fprintf()... in order to avoid the "duplication" that exists by using f_open(), f_printf()... supplied with FatFS + it makes it much more integrated into the RTOS IMHO.

This should be easy enough to integrate Petit Fat into a modified syscalls.c (which i've already modified to point stdout to a Virtual Serial Port) to get the functionality I want. Just curious if this is something that has been done before? If not, is this something that would be useful to add to main release when I get some working code?

Thanks, Thomas.
User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: C Standard Library Functions with FatFS.

Post by Giovanni »

Hi,

A better syscalls.c would be a good idea, it has been proposed multiple times in the past.

About the FS, there is a C++ wrapper around FatFS, search the forum.

Giovanni
Post Reply