Hi ,i have created a file stm32.txt by porting fatfs into flash and verified write and read baremetal,now can this file be visible to my pc if i bring up and add an usb interface msc device config.Is this possible .
I have done this:
1) created a file using fatfs on flash open and read ,it is working.
2) created a usb interface configured as msc device,when plugged into pc, new drive gets created, however it asks to format it. I have added only
read functionality of flash to this:
STORAGE_Read_FS(uint8_t lun, uint8_t *buf, uint32_t blk_addr, uint16_t blk_len) . not added write functionality.
/////////////////////////////////////main.c//////////////////////////////////////////
USBD_Init(&hUsbDeviceFS, &FS_Desc, DEVICE_FS);
USBD_RegisterClass(&hUsbDeviceFS, &USBD_MSC);
USBD_MSC_RegisterStorage(&hUsbDeviceFS,&USBD_Storage_Interface_fops_FS);
USBD_Start(&hUsbDeviceFS);
if( FATFS_LinkDriver(&USER_Driver, USERPath)== 0)
{
/*##-2- Init the SD Card #################################################*/
#if FATFS_MKFS_ALLOWED
FRESULT res;
res = f_mkfs(USERPath, FM_ANY, 0, workBuffer, 4096);
if (res != FR_OK)
{
Error_Handler();
}
#endif
FS_FileOperations();
the usb does not detect the file stm32.txt created , fs_fileoperation also fails .
what is wrong ,thanks in advance.
