SDHC card filename

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 6.

Moderator: Benj

Post Reply
User avatar
petesmart
Valued Contributor
Valued Contributor
Posts: 395
Joined: Thu May 06, 2010 11:42 am
Location: Sydney, Australia
Has thanked: 187 times
Been thanked: 140 times
Contact:

SDHC card filename

Post by petesmart »

Hello,

A quick question. Is it possible to set the filename time and date info?... Using create file sets the file create time and date to a date in 1989.


Thanks

Pete
sorry about that Chief!

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: SDHC card filename

Post by Benj »

Hi Pete,

Looking at the FAT component the creation time and modify time should be the date and time of compilation but this does not seem to be happening. When I get some time I will see if I can get this fixed.

A way to change / override the values would also be nice so I have added a SetTimeAndDate macro which allows you to override the values.
FAT.fcpx
(63.74 KiB) Downloaded 223 times
This page details how the time and date values are formatted to work with the FAT file system. http://www.maverick-os.dk/FileSystemFor ... TimeFormat

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: SDHC card filename

Post by Benj »

I've now managed to fix it so the defaults will now be the compilation time and date.
FAT.fcpx
(64.17 KiB) Downloaded 248 times

User avatar
petesmart
Valued Contributor
Valued Contributor
Posts: 395
Joined: Thu May 06, 2010 11:42 am
Location: Sydney, Australia
Has thanked: 187 times
Been thanked: 140 times
Contact:

Re: SDHC card filename

Post by petesmart »

That's brilliant Ben,

I will try this out and come back to you...


Best

Pete
sorry about that Chief!

User avatar
petesmart
Valued Contributor
Valued Contributor
Posts: 395
Joined: Thu May 06, 2010 11:42 am
Location: Sydney, Australia
Has thanked: 187 times
Been thanked: 140 times
Contact:

Re: SDHC card filename

Post by petesmart »

Hi Ben,

Dropped the component into the FC 6 component folder and came across a problem which resulted in error messages on compile. If you update a component in an existing flowchart based on the original component is there anything specific that you must do in order to update that specific component within the flowchart? I'll explain further below



Loaded an existing flowchart based on the original FAT component. Hit the compile button and received the following error messages:

Code: Select all

ZTE test rev.fat test.c:300: error: 'FCVsz_07fa1_FAT1__FILE_HANDLE' undeclared here (not in a function)
ZTE test rev.fat test.c:308: error: 'FCVsz_07fa1_FAT1__SIM_FOLDER_PATH_4' undeclared here (not in a function)
ZTE test rev.fat test.c:310: error: 'FCVsz_07fa1_FAT1__SIM_FOLDER_PATH_3' undeclared here (not in a function)
ZTE test rev.fat test.c:313: error: 'FCVsz_07fa1_FAT1__SIM_FOLDER_PATH_2' undeclared here (not in a function)
ZTE test rev.fat test.c:314: error: 'FCVsz_07fa1_FAT1__SIM_FOLDER_PATH_1' undeclared here (not in a function)
ZTE test rev.fat test.c:316: error: 'FCVsz_07fa1_FAT1__SIM_FOLDER_PATH_0' undeclared here (not in a function)
With the original FAT component the flowchart compiled with no errors

Interestingly, I tried an experiment where I created a new flowchart. With just the FAT SDHC component it compiled with with the same errors

I'm using an ECIO40P16 - properties see below
SDHC config.JPG
SDHC config.JPG (41.24 KiB) Viewed 5409 times
Interested in your thoughts

All best

Pete
sorry about that Chief!

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: SDHC card filename

Post by Benj »

Hi Pete,

Thanks for letting me know. In changing the time and date to variables I forced all variables to be exported which for some reason also forced in the simulation variables into the output C code. I've had another pass and removed the sim variables again and it's compiling as expected again now.
FAT.fcpx
(64.28 KiB) Downloaded 241 times

User avatar
petesmart
Valued Contributor
Valued Contributor
Posts: 395
Joined: Thu May 06, 2010 11:42 am
Location: Sydney, Australia
Has thanked: 187 times
Been thanked: 140 times
Contact:

Re: SDHC card filename

Post by petesmart »

Thanks for the fast turn around...will give it a try and report back
sorry about that Chief!

User avatar
petesmart
Valued Contributor
Valued Contributor
Posts: 395
Joined: Thu May 06, 2010 11:42 am
Location: Sydney, Australia
Has thanked: 187 times
Been thanked: 140 times
Contact:

Re: SDHC card filename

Post by petesmart »

Hi Ben,

Almost there...not writing date/time as yet...

I have sent you a PM

Best

Pete
sorry about that Chief!

User avatar
petesmart
Valued Contributor
Valued Contributor
Posts: 395
Joined: Thu May 06, 2010 11:42 am
Location: Sydney, Australia
Has thanked: 187 times
Been thanked: 140 times
Contact:

Re: SDHC card filename

Post by petesmart »

Hi Ben,

Ok, got the numbers sorted re 16 bit format for time and date ... and wallah it works !!!

thanks for the mods on the FAT component... much appreciated

found this FAT tutorial link that is also useful http://www.tavi.co.uk/phobos/fat.html#file_time

all the best

Pete
sorry about that Chief!

Post Reply