Page 1 of 1

C Standard Library Functions with FatFS.

Posted: Thu Jan 16, 2014 12:53 am
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.

Re: C Standard Library Functions with FatFS.

Posted: Thu Jan 16, 2014 9:30 am
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