I'm trying to write some wrapper functions for interacting with the SD Card on the 129x.
The problem is that when I compile my code it can't seem to find the f_puts, or f_printf methods. All the other ff methods I'm using don't cause any issues (f_open, f_close, f_lseek..). I'm wondering if there is some pre-processor definition I need to use the write functions? I didn't see anything like that when I scanned through ff.h/ff.c
I'm not certain if I've written this function properly at all because I can't test it with the f_puts but here is what I have.
uint8_t sdcardLogError(char* errorFileName, char* error) {
FRESULT fr;
fr = f_open(&g_sErrorFile, errorFileName, FA_WRITE);
// if error here return error number
if (fr != FR_OK) {
return 1; // Open file error
}
// Variable to hold the number of bytes written
int16_t bw;
// Move to the end of the file
fr = f_lseek(&g_sErrorFile, f_size(&g_sErrorFile));
// if error here return error number
if (fr != FR_OK) {
return 2; // Seek failure
}
// Write the line to the file
bw = f_puts((const TCHAR*)error, &g_sErrorFile);
// if error here return error number
if (bw == -1) {
return 3; // Write failed, end of file error
}
// No errors
return 0;
}
which results in
unresolved symbol f_puts, first referenced in ./customlib/sdcard/sdcardio.obj
If I comment out the f_puts line, it compiles fine.