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

Problems whit 18F452

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



Joined: 10 Oct 2003
Posts: 1

View user's profile Send private message

Problems whit 18F452
PostPosted: Fri Oct 10, 2003 4:21 pm     Reply with quote

Hello,

I have a problem with a tested routine, when the code grows the problem change place?

I´ve change the microcontroller and the problem still happens

What can I do?
Mark



Joined: 07 Sep 2003
Posts: 2838
Location: Atlanta, GA

View user's profile Send private message Send e-mail

PostPosted: Fri Oct 10, 2003 7:26 pm     Reply with quote

Post the code that is giving you problems and describe what the problems are. No magic 8 balls here Smile
sheldona



Joined: 15 Oct 2003
Posts: 1

View user's profile Send private message MSN Messenger

Re: Problems whit 18F452
PostPosted: Wed Oct 15, 2003 6:10 am     Reply with quote

I have similar problems with the 18F452. When I resize global arrays, particularly, this problems arises. for example, I'll change a byte array size from 32 to 16 and the code just doesn't run. Not even start up code gets run properly, before the array is accessed.

Its quite frustrating, and there seems to be no rhyme or reason to it. A bit of "black magic" is required to get my code running correctly on the 18F452, resizing arrays, removing calls to certain functions, etc... all in an attempt to get the compiler to arrange the generated code properly. (I've looked at the generated asm code for good vs. bad programs and at a very general level, this seems to be the problem. Its hard to follow, but it looks during/after branches and jumps, the program goes to the incorrect location in memory).

Anyone else having this problem, and have a solution? I posted about this over a month ago and received a response along the lines of: "this is a bug in the compiler".

Cheers.
Confused
Sheldon
TSchultz



Joined: 08 Sep 2003
Posts: 66
Location: Toronto, Canada

View user's profile Send private message

PostPosted: Wed Oct 15, 2003 8:27 am     Reply with quote

I am still using PCWH version 3.142 since my 30 days upgrades expired before 3.148 was released. However I ran into quite a few problems with PCH and the use of arrays and arrays or structures.

I found that the compiler was re-using some of the memory locations reserved for the arrays with other variables. My solution was to reserve a large section of memory and then manually assign thier locations (and lose one of the nice features of the compiler). I also found problems at times if an array crossed the first page boudary (0xFF).

These problems were not predictable and tend to change with each compile and especially if you make any changes to the array sizes. This may or may not be your problem but I would suggest you carefully review the assigned locations for all variables after compile.
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