|
|
View previous topic :: View next topic |
Author |
Message |
dlc@frii.com
Joined: 05 Nov 2003 Posts: 23
|
PCH #int_global just not doing what it should, why? |
Posted: Sat Feb 12, 2005 11:13 pm |
|
|
Hi all,
Once again I find myself fighting with the interrupts. I wish
to make a fast ISR for an 18F252, so I'm using #int_global.
I've written the code and when it compiles I get this error:
isr
Seg 000008-0006C,0066 left, need 007E
@goto10052
Error 71... Out of ROM, A segment or the program is too large
The 18F series doesn't segment ROM, it is contiguous, so
why am I getting this error? Why isn't the code just
going where it should and the compiler getting on with it?
Does anyone have any suggestions of how to get around
this problem?
thanks,
DLC _________________ --
------------------------------------
Dennis Clark dlc@frii.com
http://www.techtoystoday.com
------------------------------------ |
|
|
Ttelmah Guest
|
|
Posted: Sun Feb 13, 2005 3:00 am |
|
|
First comment, is that #int_global, handles the _standard_ interrupt, not the 'fast' interrupt. The normal 'fast' interrupt handler, itself behaves exactly like int_global (it does not check the interrupt source, and does not save the registers). Just declare a 'fast' handler, and add your required testing to this.
If you are declaring 'int_global', and then declaring this as 'fast', you are sending two conflicting messages to the compiler.
The error message is just complaining that the routine does not fit in front of the 'main' code. If you are using the double declaration, this is probably just 'confusing' the compiler...
Best Wishes |
|
|
Mark
Joined: 07 Sep 2003 Posts: 2838 Location: Atlanta, GA
|
|
|
Guest
|
|
Posted: Sun Feb 13, 2005 4:47 pm |
|
|
Ttelmah wrote: | First comment, is that #int_global, handles the _standard_ interrupt, not the 'fast' interrupt. The normal 'fast' interrupt handler, itself behaves exactly like int_global (it does not check the interrupt source, and does not save the registers). Just declare a 'fast' handler, and add your required testing to this.
If you are declaring 'int_global', and then declaring this as 'fast', you are sending two conflicting messages to the compiler.
The error message is just complaining that the routine does not fit in front of the 'main' code. If you are using the double declaration, this is probably just 'confusing' the compiler...
Best Wishes |
First off, you can't declare #int_global FAST, the compiler
won't let you. It would not be sending any conflicts to
the compiler if the compiler was correct. First off, FAST
ISR handling is the PIC18F default, where the PC, Status
and BSR are saved to the 1-deep call stack. So CCS is
misusing the term "FAST" to declare a high priority IRQ,
all IRQ's will use the "FAST" option by default. Only if
you are mixing high and low priority IRQ's can you NOT
use the "FAST" call stack. So, to use #int_global, one
really needs to re-direct the ISR, which is not gracefully
handled I think.
DLC |
|
|
Guest
|
|
Posted: Sun Feb 13, 2005 5:32 pm |
|
|
Thanks,
That is pretty much what I expected to be doing. Since I'm only using high priority interrupts, I was going to (and confirmed that it works) just do an :
#int_global
void ISR_High_Wrapper(void)
{
ISR_High();
}
But now that I think about it, it is cleaner define both high and low and punch the IRQ bits manually.
thanks,
DLC |
|
|
|
|
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
|