View previous topic :: View next topic |
Author |
Message |
LFern
Joined: 16 Mar 2011 Posts: 19 Location: Melbourne, Australia
|
Defined ROM location for built in macros |
Posted: Mon Sep 05, 2011 12:54 am |
|
|
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: 19535
|
|
Posted: Mon Sep 05, 2011 1:52 am |
|
|
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
|
|
Posted: Tue Sep 06, 2011 7:10 pm |
|
|
Thanks Ttelmah, I got it worked! |
|
|
|