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

Defined ROM location for built in macros

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



Joined: 16 Mar 2011
Posts: 19
Location: Melbourne, Australia

View user's profile Send private message

Defined ROM location for built in macros
PostPosted: Mon Sep 05, 2011 12:54 am     Reply with quote

Hi Everyone,

I am trying to use delay_ms() built in macro function in defined ROM addresses.

The requirement is to put the complete program in between a defined rom area. All the other functions are custom and I can use #org for main().

Any idea?
Ttelmah



Joined: 11 Mar 2010
Posts: 19518

View user's profile Send private message

PostPosted: Mon Sep 05, 2011 1:52 am     Reply with quote

If you specify an #org for your code, including a default, and a clock statement, then the delay code will be put inside the area specified by the org, with your other code. Then when you have completed your section, have another #org, and another clock statement, and future delays will be located in the new range. This is how a bootloader has a delay if used, that is inside the bootloader range, rather than with the other code.

Best Wishes
LFern



Joined: 16 Mar 2011
Posts: 19
Location: Melbourne, Australia

View user's profile Send private message

PostPosted: Tue Sep 06, 2011 7:10 pm     Reply with quote

Thanks Ttelmah, I got it worked!
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