To all the SD card users out there

Technical questions regarding the XTC tools and programming with XMOS.
User avatar
davelacey
Experienced Member
Posts: 104
Joined: Fri Dec 11, 2009 8:29 pm

Post by davelacey »

All done.

https://github.com/xcore/sc_sdcard

I've tidied it up a bit but haven't tested it at all (it does compile and that's all I know - I don't have an XDK near me at the moment).

@mculibrk: If you get a github username and sign the contributors agreement (see xcore.github.com for details), I can add you as a commiter to the repo.

Regards,
Dave


User avatar
Interactive_Matter
XCore Addict
Posts: 216
Joined: Wed Feb 10, 2010 10:26 am

Post by Interactive_Matter »

Cool,

thanks! Will try to get real SPI working.

BTW: What about the SD card based boot loader? Or is it too much inteleectual property right? I realy would like to use it since it makes updates on customer side much easier (esp. if you are not present at customer site ;) )
mculibrk
Active Member
Posts: 38
Joined: Tue Jul 13, 2010 2:57 pm

Post by mculibrk »

davelacey wrote:
@mculibrk: If you get a github username and sign the contributors agreement (see xcore.github.com for details), I can add you as a commiter to the repo.
Done!
I'm using the same username - mculibrk

I'll start working on this shortly as I have some deadlines to catch first. :?

regards,
mculibrk
User avatar
Interactive_Matter
XCore Addict
Posts: 216
Joined: Wed Feb 10, 2010 10:26 am

Post by Interactive_Matter »

I just checked the code and have little request when you are updating the code:
It nearly contains no comments in the code - so if you are analysing it - droping a line of comment or could help a lot ;)

BTW: I would also take the warning in the readme very serious: The long filename support seems to be patent protected - so we should really think if and how to integrate it to avoid patent lawsuits agains us or XMOS.
mculibrk
Active Member
Posts: 38
Joined: Tue Jul 13, 2010 2:57 pm

Post by mculibrk »

Interactive_Matter wrote:I just checked the code and have little request when you are updating the code:
It nearly contains no comments in the code - so if you are analysing it - droping a line of comment or could help a lot ;)
absolutely
BTW: I would also take the warning in the readme very serious: The long filename support seems to be patent protected - so we should really think if and how to integrate it to avoid patent lawsuits agains us or XMOS.
huh... patents, my dearest friends....
I took a quick look at the M$ FAT patent debates and as far as I can tell, the problem is in creating file name entries for long/short name combos. The Linux/Samba guys found a "shortcut" to solve the issue: here, here and here
I'll check this in more detail but if this is the "only issue" I think it will be easy enough to choose a workaround...

regards,
mculibrk
User avatar
Interactive_Matter
XCore Addict
Posts: 216
Joined: Wed Feb 10, 2010 10:26 am

Post by Interactive_Matter »

mculibrk wrote:

huh... patents, my dearest friends....
I took a quick look at the M$ FAT patent debates and as far as I can tell, the problem is in creating file name entries for long/short name combos. The Linux/Samba guys found a "shortcut" to solve the issue: here, here and here
So there is one good thing about those patents: They force the people to be more creative ;)
mculibrk wrote: I'll check this in more detail but if this is the "only issue" I think it will be easy enough to choose a workaround...
I think the rest of the problems are (hopefully) more technical - really looking forward to you contributions.

Marcus
User avatar
davelacey
Experienced Member
Posts: 104
Joined: Fri Dec 11, 2009 8:29 pm

Post by davelacey »

OK. So, it turns out that within XMOS towers there is some more promising (currently unreleased) sdcard + fat code that could be used as a starting point here. We'd like to put it up on github, so there are two options:

1) If you haven't done much work already you could use this as a starting point for sc_sdcard (i.e. we'd replace the current code in sc_sdcard. I think the newer version is better in practically all respects.

2) We could create a second sdcard repository for this other version.

Personally, I'd suggest 1) here since not much work has been done and there doesn't seem much need for duplication/divergence at this stage but I guess it is up to the repo maintainer. interactive-matter: Any thoughts?

Dave
Corin
Experienced Member
Posts: 66
Joined: Fri Dec 11, 2009 3:38 pm

Post by Corin »

For reference - I have written a quick port of the FatFs file system (http://elm-chan.org/fsw/ff/00index_e.html)

It's a bit slow as it just uses timers to talk to the card at the moment, but is a good a start...

Kind Regards,
Corin
User avatar
Interactive_Matter
XCore Addict
Posts: 216
Joined: Wed Feb 10, 2010 10:26 am

Post by Interactive_Matter »

davelacey wrote:OK. So, it turns out that within XMOS towers there is some more promising (currently unreleased) sdcard + fat code that could be used as a starting point here. We'd like to put it up on github, so there are two options:

1) If you haven't done much work already you could use this as a starting point for sc_sdcard (i.e. we'd replace the current code in sc_sdcard. I think the newer version is better in practically all respects.

2) We could create a second sdcard repository for this other version.

Personally, I'd suggest 1) here since not much work has been done and there doesn't seem much need for duplication/divergence at this stage but I guess it is up to the repo maintainer. interactive-matter: Any thoughts?

Dave
Hi Dave,

this sounds good. Is it really completely independent of the old implementation?
The easiest would be to copy it over the old stuff and just comit - git will take care of the rest - like checking if some files are just newer versions of new files.
As long as we get a more robust library everything is a good idea ;)
I did not have time lately to look into the SD card stuff.

Are you contributor to this repo? Should I make you one?

Marcus
Corin
Experienced Member
Posts: 66
Joined: Fri Dec 11, 2009 3:38 pm

Post by Corin »

Hi Interactive_Matter,

Please make me (xmos_corin) a contributor and I'll paste it over the top.

Cheers,
Corin