AnsweredAssumed Answered

HC12: __NEAR_SEG or not ?

Question asked by no name on Nov 30, 2006
Latest reply on Nov 30, 2006 by no name
Hello,

I'm using CW for S12X.
My code uses the banked memory model.
In that code I have some (non XGATE) interrupt handlers that look like this:

#pragma CODE_SEG __NEAR_SEG NON_BANKED
__interrupt void Isr (void)
{
...
}
#pragma CODE_SEG DEFAULT

Sometimes the compiler shows a warning message "Segment already used with different attributes".
When I remove the modifier '__NEAR_SEG', the warning disappears...
Anyway, the program works fine, regardless of __NEAR_SEG or not.

Is the __NEAR_SEG modifier really necessary?
I think NON_BANKED is quite enough to force the code into non-paged flash, or am I wrong?

Thanks in advance,
-> pittbull

Message Edited by CrasyCat on 2007-04-13 11:36 AM

Outcomes