CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

FatFs - FAT File System Module - CCS Port

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
madcat



Joined: 30 Jul 2008
Posts: 17

View user's profile Send private message

FatFs - FAT File System Module - CCS Port
PostPosted: Tue Dec 30, 2008 11:49 pm     Reply with quote

Hi everyone!

I was wondering if there is a port of FatFs for CCS out there ?
http://elm-chan.org/fsw/ff/00index_e.html

I'm trying to use FAT for MMC cards and nothing seems to work (direct spi R/W is ok). Found this library and it looks well written and promising.
They have an example for PIC but it does not look like CCS.

It looks like not too difficult task so I've tried to do it myself but having some compilation errors i can't figure out. Is there somth ready or can someone help me please ?
crystal_lattice



Joined: 13 Jun 2006
Posts: 164

View user's profile Send private message

PostPosted: Wed Dec 31, 2008 3:20 am     Reply with quote

Hi, I've tried the same thing, but with my limited programming knowledge I did not suceed. The lib does look very promising indeed and would make a very nice addition to the CCS code lib if a few good programmers teamed up and took the time to convert it.

Brush electronics sells a CCS port of the code but unfortunately it is based on a rather old version of the FS and since then some very nice additions has been made to the original ELM Chan code.

If you are seriously wanting to convert the new version to CCS I could share my attempts with you. It would be nice though to get some more programmers involved but unfortunately everybody wants a FAT FS but nobody seems to want to put the effort in to help make one work with CCS...
madcat



Joined: 30 Jul 2008
Posts: 17

View user's profile Send private message

PostPosted: Wed Dec 31, 2008 9:10 am     Reply with quote

Actually i was surprised no one did it so far. And with all the

Initially i thought that it wont be too hard. It is written in ANSI C. The low level MMC access library from CCS works fine. So i thought i just have to link both... But i haven't even reached that point. It does not compile at all :(


I've modified the integer.h but they used some CCS keywords as BYTE CHAR etc... looks like making CCS case sensitive by adding #CASE solves some of these... but then i get many more errors i don't know how to fix...
My programming knowledge is limited but i'm still under impression that it should not be a big problem to someone who has a better knowledge.

But looks like all the programmers are celebrating the new year now Laughing
dyeatman



Joined: 06 Sep 2003
Posts: 1924
Location: Norman, OK

View user's profile Send private message

PostPosted: Wed Dec 31, 2008 10:11 am     Reply with quote

According to an email I got from CCS a little while back they are working to make version 4.100 compile the Microchip TCP/IP stack code with no modifications. Overall there seems to be a lot of new things coming in version 4.100 Hopefully, with those changes, porting C18 and ANSI code to CCS will be much easier

Last edited by dyeatman on Wed Dec 31, 2008 1:28 pm; edited 2 times in total
asmallri



Joined: 12 Aug 2004
Posts: 1634
Location: Perth, Australia

View user's profile Send private message Send e-mail Visit poster's website

PostPosted: Wed Dec 31, 2008 12:54 pm     Reply with quote

crystal_lattice wrote:
Brush electronics sells a CCS port of the code but unfortunately it is based on a rather old version of the FS and since then some very nice additions has been made to the original ELM Chan code.


What feature specifically are you looking for? The initial port was based on an earlier code base but since then I have enhanced the software providing functions not included in the original ELM code.

The new ELM software does support multiple SD cards to be used simultaneously I have no plan to support this because I do not think it is a useful feature with PICs with limited RAM.
_________________
Regards, Andrew

http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!!
madcat



Joined: 30 Jul 2008
Posts: 17

View user's profile Send private message

PostPosted: Wed Dec 31, 2008 2:00 pm     Reply with quote

Hi, Andrew
My project is for educational and non commerical use, so paid software is not an option for me.
For such use It would be nice to have a free open source version....
asmallri



Joined: 12 Aug 2004
Posts: 1634
Location: Perth, Australia

View user's profile Send private message Send e-mail Visit poster's website

PostPosted: Wed Dec 31, 2008 3:56 pm     Reply with quote

madcat wrote:
Hi, Andrew
My project is for educational and non commerical use, so paid software is not an option for me.
For such use It would be nice to have a free open source version....


No problem. Several of my customers have been university students doing final year projects as well as university departments. They treat the software the same way they treat buying hardware components.
_________________
Regards, Andrew

http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!!
crystal_lattice



Joined: 13 Jun 2006
Posts: 164

View user's profile Send private message

PostPosted: Thu Jan 01, 2009 11:20 am     Reply with quote

Quote:

they are working to make version 4.100 compile the Microchip TCP/IP stack code with no modifications.... porting C18 and ANSI code to CCS will be much easier...


This sounds very promising, will have to wait and see if the improvements are aimed at TCP/IP Stack specifically or a broader ANSI compatibility.

I've somewhat solved the integer.h problems but am not familiar with the 'higher/complex' syntax used in some of the code which makes it very hard to understand and ultimately convert. Unfortunately i do not know anybody with expert knowledge/interest of/in ANSI C AND CCS C to ask for advice.

We will have to see if we can get PCM Programmer and others involved...

...or if CCS will move towards ANSI C compatibility...
asmallri



Joined: 12 Aug 2004
Posts: 1634
Location: Perth, Australia

View user's profile Send private message Send e-mail Visit poster's website

PostPosted: Sat Jan 03, 2009 10:49 am     Reply with quote

[quote="crystal_lattice"]
Quote:

they are working to make version 4.100 compile the Microchip TCP/IP stack code with no modifications.... porting C18 and ANSI code to CCS will be much easier...


This sounds very promising, will have to wait and see if the improvements are aimed at TCP/IP Stack specifically or a broader ANSI compatibility.

Anyone that has used PCD and C30 will realize that this "goal" is a long way from reality. There is not a snow balls chance in hell of PCD compiling Microchips TCP/IP stack without significant modifications.
_________________
Regards, Andrew

http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!!
raiderbg



Joined: 28 Jun 2012
Posts: 1

View user's profile Send private message

PostPosted: Thu Jun 28, 2012 2:23 am     Reply with quote

Hello everyone,
I successfully compile the FatFs R0.09 under CCS!
Now I doing the hardest work, to make it work Very Happy
Tom-H-PIC



Joined: 08 Sep 2003
Posts: 105
Location: New Castle, DE

View user's profile Send private message

PostPosted: Fri Jul 27, 2012 8:25 pm     Reply with quote

Hello
raiderbg did you get the FatFs to work?
If so would you please share?

Thanks Tom
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group