Working on example program of MFS sdcard example that represents my case but it doesn't work:
Platfrom : MQX 4.0.2GA build
Controller : K60
char filesystem_name[] = "a:";
char partman_name[] = "pm:";
char partition_name[] = "pm:1";
/* Open the device which MFS will be installed on */
sdcard_handle = fopen("sdcard:", 0);
...
/* Install partition manager over SD card driver */
error_code = _io_part_mgr_install(sdcard_handle, partman_name, 0);
..
/* Open partition */
partition_handle = fopen(partition_name, NULL); -->return Error
By step into debug mode i see that error is generated in
int_32 _pmgr_get_part_info
(
PART_MGR_STRUCT_PTR pm_struct_ptr, /*[IN] the partition manager information */
PMGR_PART_INFO_STRUCT_PTR host_entry /*[IN]/[OUT] the entry to read from disk */
)
............
_pmgr_disk_to_host(disk_entry + host_entry->SLOT - 1, host_entry);
if (host_entry->TYPE == 0 || host_entry->START_SECTOR == 0 || host_entry->LENGTH == 0)
{
error_code = PMGR_INVALID_PARTITION;
}
.........
}
Please folks worked on SD card example program please puit the lime light ,