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 CCS Technical Support

Help with strange debugger behavior (ccs ide and icd-u40)

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



Joined: 21 May 2008
Posts: 2

View user's profile Send private message

Help with strange debugger behavior (ccs ide and icd-u40)
PostPosted: Tue May 27, 2008 11:57 pm     Reply with quote

A certain bug is causing my program to become unresponsive.

The following is the weird part:
- If i (Halt program) and (Run) then everything acts normal again, completely responsive until the bug is encountered again.

- When I halt the program manually, the IDE shows the program counter as PC=FFFFFF. Which should never happen as far as I can tell: The datasheet says "To prevent the PC from becoming misaligned with word
instructions, the Least Significant bit of PCL is fixed to
a value of ‘0’." So when the debugger is reading the program registers as: PCLATU=0, PCLATH=0, and PCL=00FF something is not right.

- If i single step the program from this undefined address, it jumps to vector 0x08 which is (low or high priority interrupt, not exactly sure which i am not using high interrupts) which then goes to INT_RB (an interrupt which should not currently be activated), and then i can single-step or run the program and everything seems fine. (as mentioned previously, i can also just run from the undefined address and it begins responsiveness again)

I am not using any strange goto or branching, no function pointers. just a main loop and interrupts.

Using compiler PCH 4.073

So the question is: What sort of condition (of my chip / program / or the CCS IDE) would cause the debugger to read a program counter of FFFFFF when the chip can never have such a value?
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