Page 1 of 1

Can't open a file created on a SDcard.

Posted: Wed Feb 01, 2012 11:16 am
by Odox00
Hi
I'm trying to learn how to store a log file in to a SD-card. All is fine until I want to check the file on my PC (Win7). When I open the card I can see the file in explorer but if I try open the file my computer says that it can't find the file.
The size of the file is 1kb so some information should be there.
I can't find any examples codes to test for ARM:s

note: I use Flowcode ARM v.4 with an ECIO.

/Jesper

Re: Can't open a file created on a SDcard.

Posted: Wed Feb 01, 2012 1:52 pm
by Steve
This is not my area of expertise, so I can only offer suggestions on how I would try to solve this issue.

You could try reading the SD card on the PC in some kind of raw format and compare it with a similar file that can be read properly. There is probably free software for this somewhere on the web.

Another thing I would try is to create a file on the card using the PC and then develop firmware on the chip to read it back. Once you have this working, you can try modifying the data within an existing file (using the chip) and reading it back on the PC. And then once this is ok, start creating files using the chip.

I hope this is of some use.

Re: Can't open a file created on a SDcard.

Posted: Wed Feb 01, 2012 2:02 pm
by JonnyW
Hello. This may be completely off but I remember an issue similar to this using a USB disk on a Linux-based embedded device.

When it came to read the file in Windows (using notepad) the file could not be read (it was a few years ago and I cant really remember but I might have had better luck in Wordpad?).

Anyway, the issue was that the file had not been closed properly, so although the filer was aware that the object existed, its contents could not be read.

I hope this helps,

Jonny

Re: Can't open a file created on a SDcard.

Posted: Wed Feb 01, 2012 2:58 pm
by Odox00
Thanks
It looks like the problem exists in the "create file" macro. If I create a blank file on my PC and store it on the SD card, I can then write to that file and also open it on my PC.