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

unable to compile ex_fat

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



Joined: 02 Jan 2006
Posts: 75
Location: Neeroeteren, Limburg, Belgium

View user's profile Send private message

unable to compile ex_fat
PostPosted: Thu Nov 19, 2009 9:16 am     Reply with quote

Hi guys,

I am trying to run a SD card and FAT on my pic 18f2620.

I made a new project within MPLAB v8.36.

I use the CCS compiler 4.093

And get this error message:

*** Error 90 "FAT_SD.c" Line 155(28,29): Attempt to create a pointer to a constant

it refers to this section of the code

Code:
FILE stream;
   printf("\r\nAppending '%s' to '%s': ", appendString, fileName);
   if(fatopen(fileName, "a", &stream) != GOODEC)
   {
      printf("Error opening file");
      return;
   }


Has anyone a clue what this can be?

FILE is not a constant, in the fat.c it is:


Code:
typedef struct iobuf FILE;


Thanks in advance,

Blob
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Thu Nov 19, 2009 1:50 pm     Reply with quote

I installed vs. 4.093, edited Ex_Fat.c so it uses the 18F2620, and
compiled it. I don't get that error. I just get two warnings:
Quote:

Executing: "C:\Program Files\PICC\Ccsc.exe" +FH "ex_fat.c" +DF +LN +T +A +M +Z +Y=9 +EA
>>> Warning 215 "C:\PROGRAM FILES\PICC\drivers\mmcsd.c" Line 128(1,1): Undefined identifier USE_SW_ONLY
>>> Warning 202 "ex_fat.c" Line 26(5,8): Variable never used: rs232_errors
Memory usage: ROM=43% RAM=35% - 46%
0 Errors, 2 Warnings.
Loaded C:\Program Files\PICC\Examples\ex_fat.cof.
BUILD SUCCEEDED: Thu Nov 19 11:33:32 2009


Quote:

And get this error message:
*** Error 90 "FAT_SD.c" Line 155(28,29): Attempt to create a pointer to a constant

However, I just noticed you referred to a file called "FAT_SD.c".
There is no such file in the CCS directories. Therefore, you are not
really compiling the CCS Ex_Fat.c example. You're doing something else.
Blob



Joined: 02 Jan 2006
Posts: 75
Location: Neeroeteren, Limburg, Belgium

View user's profile Send private message

PostPosted: Fri Nov 20, 2009 1:44 am     Reply with quote

The name is different because I copied the ex_fat file to my working directory, to provide messing up my original file...

I recopied the original code from ex_fat.

And I see my error now, I deleted
#device PASS_STRINGS = IN_RAM
when I was changing the settings for the 2620


Thanks,
Blob


Last edited by Blob on Fri Nov 20, 2009 1:53 am; edited 1 time in total
FvM



Joined: 27 Aug 2008
Posts: 2337
Location: Germany

View user's profile Send private message

PostPosted: Fri Nov 20, 2009 1:50 am     Reply with quote

The problem can be caused by adding or removing global settings related to string processing. The original ex_fat.c has e.g. this setting in effect:
Code:
#device PASS_STRINGS = IN_RAM
Blob



Joined: 02 Jan 2006
Posts: 75
Location: Neeroeteren, Limburg, Belgium

View user's profile Send private message

PostPosted: Fri Nov 20, 2009 1:54 am     Reply with quote

Thanks FvM,

Found it at the same moment....


Best regards,
Blob
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