Has anyone successfully used MFS/MQX running on the M4 core on a Vybrid? I am attempting to do so with no luck. I am wondering if the boot partition used by U-boot is confusing MFS. It gets to here and fails:
/* Open partition */
partition_handle = fopen(partition_name, NULL);
if (partition_handle != NULL)
{
printf("Installing MFS over partition...\n");
/* Validate partition */
error_code = _io_ioctl(partition_handle, IO_IOCTL_VAL_PART, NULL);
if (error_code != MFS_NO_ERROR)
{
printf("Error validating partition: %s\n", MFS_Error_text((uint32_t)error_code)); <---------------------------------------------------
printf("Not installing MFS.\n");
continue;
}
Thanks.
Solved! Go to Solution.
Thanks Naoum,
We have figured it out - sort of. It seems that the FAT32 partition must be formated on a Windows machine in order to be accepted by MFS. Now that we have started doing that we are able to have a Uboot section (not a partition), a Linux partition and a Fat32 DOS partition on the SD card and MFS is working happily with the FAT32 partition.
To clarify, I am running the example project under MQX 4.1/mfs/examples/sdcard/build.iar/mfs_sdcard_twrvf65gs10_m4.
I have now stepped through far enough to see it properly identify the card as ESDHC, find the number of blocks, etc. so it seems to be talking via the hardware OK.
Thanks,
Mark
In Demo.c it seems that IO_IOCTL_VAL_PART is not a valid command for the io_ctl call: _io_ioctl(partition_handle, IO_IOCTL_VAL_PART, NULL); I have substituted the call: io_part_mgr_ioctl(partition_handle, IO_IOCTL_VAL_PART, NULL); which seems to behave properly. What I have found is that it is opening the Linux partition (type code 0x83) and it doesn't care for that. This SD card also has a DOS partition, but I am unsure of how to select it instead of the Linux partition.
Mark
Thanks Naoum,
We have figured it out - sort of. It seems that the FAT32 partition must be formated on a Windows machine in order to be accepted by MFS. Now that we have started doing that we are able to have a Uboot section (not a partition), a Linux partition and a Fat32 DOS partition on the SD card and MFS is working happily with the FAT32 partition.