After mounting the file system (I used f_mount() function) and calling the f_getlabel() function from ff.h header file(FatFs - Generic FAT Filesystem module R0.13 by ChanN), I see the following output on the serial terminal:
Code: Select all
Run demo program...
trigMCS vrSIdm rga..
etn ofgrto o P..
pr:(sm2gi_ )((it2t04000U x8000)+000U)niuain
SI_IOIPT:
i U
P1MS(UPT: ot (t3_pot*((un3_)x0000)+00000U x00)
i U
pn:1UTU) ot (t3_pot*((un3_)x0000)+00000U x00)
DCR EETIPT:3_pot*((un3_)x0000)+00000U xC0)
pr:(sm2gi_ )((it2t04000U x8000)+010U)
P u ofgrto:
Tyt onc ihteisre ad.OKWrn scret Bs PD
Mdaif:t is posil opromra n rt prtoso netdcr
lc iei ye:5
If I comment the invocation to the f_getlabel() function, the information is printed correctly. The code is:
Code: Select all
char lbl[12];
DWORD sn;
memset(lbl,0,sizeof(lbl));
FRESULT err = f_getlabel("", lbl, 0);
if (err != FR_OK) {
return;
}
In Makefile, I add the following:
Code: Select all
include $(CHIBIOS)/os/various/fatfs_bindings/fatfs.mk
I'm a bit lost. Why is this error occurring? How can I debug to find the bug?
Thank you.