Hi,
i'm testing the MFS in MQX 4.2 for a data-logger application.
Starting from the sd-card demo a simple function writes multiple files in multiple folders whith indexed names: every 200ms a row is added to the current file in the current directory and so on for 100 rows, 4000 files in 4000 folders.
Problems:
1) it's not possible to create a root sub-folder with the volume name.
2) using LFN long names "a:/log/FOLDER_##########/FILE_##########.csv" after 340 files the add file to cluster function returns a write error (the short name collide with an existing file).
Note: using a short name format "a:/log/####/log_####.csv" the test passed.
this is the log:
Shell (build: Jun 12 2015)
Copyright (c) 2013 Freescale Semiconductor;
shell>
shell> Installing MFS over partition...
SD card installed to a:
shell> dir
TEST 0 05-14-2015 12:32:12 V TEST
LOG 0 01-01-1980 00:00:00 D LOG
shell> mkdir test
Error creating directory test --> error: TEST is the volume name
shell> write test
Error, unable to open file test. --> error: TEST is the volume name
shell>
shell> cd log
shell> dir
. 0 01-01-1980 00:00:00 D .
.. 0 01-01-1980 00:00:00 D ..
FOLDER~1 0 01-01-1980 00:00:00 D FOLDER_0000000000
shell> cd FOLDER_0000000000
shell> dir
. 0 01-01-1980 00:00:00 D .
.. 0 01-01-1980 00:00:00 D ..
FILE_0~1.CSV 111217 01-01-1980 00:00:10 A FILE_0000000000.csv
FILE_0~2.CSV 111217 01-01-1980 00:00:20 A FILE_0000000001.csv
FILE_0~3.CSV 55617 01-01-1980 00:00:24 A FILE_0000000002.csv
FILE_0~4.CSV 111217 01-01-1980 00:00:10 A FILE_0000000003.csv
FILE_0~5.CSV 111217 01-01-1980 00:00:18 A FILE_0000000004.csv
FILE_0~6.CSV 111217 01-01-1980 00:00:28 A FILE_0000000005.csv
FILE_0~7.CSV 111217 01-01-1980 00:00:36 A FILE_0000000006.csv
FILE_0~8.CSV 111217 01-01-1980 00:00:44 A FILE_0000000007.csv
FILE_0~9.CSV 111217 01-01-1980 00:00:54 A FILE_0000000008.csv
FILE_~10.CSV 111217 01-01-1980 00:01:02 A FILE_0000000009.csv
FILE_~11.CSV 111217 01-01-1980 00:01:10 A FILE_0000000010.csv
... (other files)
FILE~336.CSV 111217 01-01-1980 01:15:06 A FILE_0000000335.csv
FILE~337.CSV 111217 01-01-1980 01:15:26 A FILE_0000000336.csv
FILE~338.CSV 111217 01-01-1980 01:15:48 A FILE_0000000337.csv
FILE~339.CSV 111217 01-01-1980 01:16:10 A FILE_0000000338.csv
FILE~340.CSV 0 01-01-1980 01:28:02 A FILE_0000000339.csv
FILE_000.000 808464432 01-16-2004 06:01:32 DA FILE_000.000
shell> write FILE_0000000340.csv
Error, unable to open file FILE_0000000340.csv.
the LFN to SFN function retuns an error or a collision in file names.
a wrong FILE_000.000 is created
shell> write FILE_0000000341.csv
shell> write FILE_NEW
shell> dir
.... (all the old files)
FILE~342.CSV 0 01-01-1980 01:39:18 A FILE_0000000341.csv
FILE_NEW 0 01-01-1980 00:12:48 A FILE_NEW
changing names or skipping a number in the sequence allows to create new files.
it's better to move to KSDK 1.2 and fatfs?
Regard
Francesco Contin