[En-Nut-Discussion] Problems with PHAT on MMC with ethernut 3, NutOS 4.4.0
Harald Kipp
harald.kipp at egnite.de
Tue Feb 12 14:59:22 CET 2008
Ole Reinhardt schrieb:
>
> mmc_volume = _open("MMC0:1/PHAT0", _O_RDWR | _O_BINARY);
>
> later closed with:
>
> _close(mmc_volume);
Any reason for not leaving it open? I'm not sure about closing volumes.
> Reading the root directory seem to work, reading a just created
> directory only shows:
>
> Mounting mmc volume0, partition0 as PHAT filesystem... ok.
> Filename: .
> Filename: ..
> Entry == NULL
>
> Which meens that I only get the . and .. entry even if the directory is
> full with files.
You mean full of files
1. created by Nut/OS
or
2. created on another computer?
In case 1 the card may have been removed without flushing the buffer
contents. In case 2 there might be a format incompatibility (although I
never saw any MMC with FAT not readable by Nut/OS).
> Trying to create a new directory corrupts the filesystem. Here is my code:
>
> if (mkdir(dirname, 0755) != 0) {
> ERROR("Could not create directory %s : error %d\r\n", dirname, errno);
> }
I'm sure it won't. Did you try the ftpserv sample?
Even this sample is quite complex and not really usable for bug
approval. Can you please send a stripped down sample via private email?
I'll also send a small test application directly to you.
> I found the following just closed bug in the tracker:
>
> https://sourceforge.net/tracker/?func=detail&aid=1714704&group_id=34079&atid=410687
This had been automatically closed, after I asked for a simpler example
and there had been no response within 14 days.
> Complete test code can be provided!
See above. But please keep it as simple as possible.
Harald
More information about the En-Nut-Discussion
mailing list