MFS on SD card on M4 on Vybrid

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

MFS on SD card on M4 on Vybrid

跳至解决方案
1,486 次查看
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.

标签 (2)
0 项奖励
回复
1 解答
1,263 次查看
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 项奖励
回复
4 回复数
1,263 次查看
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 项奖励
回复
1,263 次查看
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 项奖励
回复
1,263 次查看
naoumgitnik
Senior Contributor V

Dear timesyssupport,

May you take a look and comment, please?

Thanks, Naoum Gitnik.

0 项奖励
回复
1,264 次查看
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 项奖励
回复