Hi,
The USB key was formated with windows 7 in FAT32.
I tried with many key from small size to bigger.
I can try to format with MQX but How do?
Because the shell command "format" need a drive label and supposed file system is already installed?
Currently, the code make like following:
ErrorCode = (int32_t)_io_usb_mfs_install(block_device_name, 0, (void *)usb_handle);
usb_fs_ptr->DEV_NAME = block_device_name;
usb_fs_ptr->DEV_FD_PTR = fopen(block_device_name, 0);
io_ioctl(usb_fs_ptr->DEV_FD_PTR, IO_IOCTL_SET_BLOCK_MODE, NULL);
...
ErrorCode = _io_part_mgr_install(usb_fs_ptr->DEV_FD_PTR, partition_manager_name, 0);
usb_fs_ptr->PM_NAME = partition_manager_name;
usb_fs_ptr->PM_FD_PTR = fopen(partition_manager_name, NULL);
partition_number = 1;
ErrorCode = _io_ioctl(usb_fs_ptr->PM_FD_PTR, IO_IOCTL_SEL_PART, &partition_number);
if (ErrorCode == MFS_NO_ERROR)
{
//: don't pass here, but in the "else"
printf("Installing MFS over partition...\n");
....
}
else
{
printf("Installing MFS over USB device...\n");
/* Install MFS over USB device driver */
ErrorCode = (int32_t)_io_mfs_install(usb_fs_ptr->DEV_FD_PTR, file_system_name, 0);
usb_fs_ptr->FS_NAME = file_system_name;
usb_fs_ptr->FS_FD_PTR = fopen(file_system_name, NULL);
ErrorCode = ferror(usb_fs_ptr->FS_FD_PTR);
//>>>>>Then here ErrorCode return -1 like indicated in my previous post
Then where and what code added to format USB?