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

memory problems 18F6720

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



Joined: 12 Oct 2003
Posts: 13

View user's profile Send private message

memory problems 18F6720
PostPosted: Mon May 10, 2004 7:38 am     Reply with quote

Shocked After upgrading from version 3.142 to 3.190 I have problems
running my code. The problems seems to arise from these lines:

char telegramstosend[8] [3] [40];
#locate telegramstosend =0x0600


When I use the #locate line my program runs haywire. Without it
the programs seems to run well.

Since my array is 960 bytes is my problem then due to overwriting the bank limit of 255 bytes? And will I still have the problem if I use the array above the 255 limit?

Thanks in advance for any advice
Neutone



Joined: 08 Sep 2003
Posts: 839
Location: Houston

View user's profile Send private message

PostPosted: Mon May 10, 2004 8:38 am     Reply with quote

What does the variable map look like? When you remove the #locate where does the variable go? You should be able to use arrays larger than 256 bytes. The code generated to access the array is larger and slower for arrays that span more than one bank but it still works.
prwatCCS



Joined: 10 Dec 2003
Posts: 67
Location: West Sussex, UK

View user's profile Send private message

PostPosted: Mon May 10, 2004 9:51 am     Reply with quote

Have a look at my recent posts under topic v3.190 and 18F6621.

No promises - but your problem might be related.
_________________
Peter Willis
Development Director
Howard Eaton Lighting Ltd UK
kometen



Joined: 12 Oct 2003
Posts: 13

View user's profile Send private message

PostPosted: Tue May 11, 2004 1:21 am     Reply with quote

Thanks for your help.

When the #locate is used, then the array start adress is 0x052C

Best regards

Poul
kometen



Joined: 12 Oct 2003
Posts: 13

View user's profile Send private message

PostPosted: Tue May 11, 2004 2:20 am     Reply with quote

Further to my last message:

I have tried also to run the program with a small allocation:

int16 msgreadtlgno[8];
#locate msgreadtlgno =0x390

Again my program go haywire.

Maybe there is a general problem with the use for the
#allocate directive.

Best regards

Poul Thomsen
Haplo



Joined: 06 Sep 2003
Posts: 659
Location: Sydney, Australia

View user's profile Send private message

PostPosted: Tue May 11, 2004 2:52 am     Reply with quote

1.What chip are you using?
2.Look at the symbol map file (.SYM), is your array placed in the correct location? Check the location of ther variables as well.
3.Post your code if possible.
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