2019-02-20 12:28 AM
Hi.
I am trying to save .txt files to USB memory with USB HOST MSC and FATFS to STM32F401RB.
STM32F4-DISC and examples.
So I wrote the code with reference to CUBEMX and the examples I searched.
I entered USBH_Path in the * path of f_mount.
However, an error occurred during the build.
f_mount (& USBDISKFatFs, (TCHAR const *) USBH_Path, 0)
The above code is where the error occurs.
Error [Pe020]: identifier "USBH_Path" is undefined.
Please help me.
2019-02-20 12:36 AM
And you've defined it where in your code?
Look at the examples you copied it from. Grep the source.
2019-02-20 01:03 AM
As in the example, it's in the main function.
In Cubemx generated code "fatfs.c"
char USBHPath [4];
I found what was declared as.
The file added "ff_gen_drv.h" to usb_host.c.
What files should I include?