[En-Nut-Discussion] xflash and write operations

José Vallet jose.vallet at hut.fi
Thu May 4 11:51:12 CEST 2006


Hello all.

I am trying to modify an already existing file within the xflash file 
system.

In

http://groups.google.com/group/osdeve_mirror_rtos_En-Nut-Discussion/browse_frm/thread/7dff964f77a57d5a/2ef3026b09469a91?q=xflash+&rnum=3#2ef3026b09469a91

we are told that we cannot create a new file that is not existing within 
the "xflash.bin" file. But it is not clear to me whether is possible or 
not to modify an existing one.

I can open an existing file for writing in binary mode, but after the 
modifications all the xflash file system seems to become a mess, the 
Ethernut reboots by itself and the httpserver hangs while getting the files.

I am using the functions fopen and _open. For example
...
fopen("XFLASH:calibration","w+b");
...
where "calibration" is the name of the existing file. This lets me 
modify the calibration file (or at least it finishes execution).
With the "_open" function and it does not allow me to open the file.

Should I assume that Xflash is a kind of read-only file system and once 
"xflash.bin" has been transfered to the flash it is not possible to 
modify it?

Is there any trick that I am missing?

Regards,
José







More information about the En-Nut-Discussion mailing list