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

Use of FILL_ROM

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



Joined: 16 Apr 2007
Posts: 26
Location: Arizona

View user's profile Send private message Visit poster's website

Use of FILL_ROM
PostPosted: Mon Apr 16, 2007 2:16 pm     Reply with quote

Hello All,

This is our first post to the forum. Our company has started doing all of it's development using the CCS Compiler. Previously we used only assembler for our applications. I must say that the change was one of the best decisions we ever made...!

Our question centers around the use of FILL_ROM and what to fill it with. In all of our assembler based programs that used the watch-dog timer all un-filled locations in Flash Memory were filled with GOTO$. This statement was used because of it's ability to basically "lock" the processor cold until the WDT timed out if the code ran-away for any reason. We cannot determine how this would be done using FILL_ROM or if there is some directive in the CCS Compiler that would function the same way causing the processor to produce the same kind of "stop here forever" command. We looked at SLEEP, but the effect is not the same as the GOTO$.
_________________
Thank you,
Chris
ckielstra



Joined: 18 Mar 2004
Posts: 3680
Location: The Netherlands

View user's profile Send private message

PostPosted: Mon Apr 16, 2007 3:03 pm     Reply with quote

Am I right in assuming that GOTO$ has the effect of jumping to the same address again, so you are caught in a never ending loop?

What processor family are you using? On the PIC18 you could achieve a similar result with an RCALL -1, this either times out your watchdog or you will get a reset on stack overflow (when this feature is activated).
ChrisL



Joined: 16 Apr 2007
Posts: 26
Location: Arizona

View user's profile Send private message Visit poster's website

PostPosted: Mon Apr 16, 2007 3:05 pm     Reply with quote

We are using the PIC16F690 in the application.. Yes, the command was basically "Goto Me"...
_________________
Thank you,
Chris
kevcon



Joined: 21 Feb 2007
Posts: 142
Location: Michigan, USA

View user's profile Send private message

PostPosted: Tue Apr 17, 2007 7:04 am     Reply with quote

Something like this might do the trick, or point you in the right direction.

Code:

#fill_rom 0 // 0 = NOP


void main( void )
{
   while ( 1 );
}




#org 0xffe,0xfff //End of rom
void spin( void )
{
   while( 1 );
}
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