MFS on SD card on M4 on Vybrid

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MFS on SD card on M4 on Vybrid

Jump to solution
750 Views
markwatson
Contributor III

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.

Labels (2)
0 Kudos
1 Solution
527 Views
markwatson
Contributor III

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.

View solution in original post

0 Kudos
4 Replies
527 Views
markwatson
Contributor III

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

0 Kudos
527 Views
markwatson
Contributor III

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

0 Kudos
527 Views
naoumgitnik
Senior Contributor V

Dear timesyssupport,

May you take a look and comment, please?

Thanks, Naoum Gitnik.

0 Kudos
528 Views
markwatson
Contributor III

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.

0 Kudos