Solved! Go to Solution.
Hello
CrasyCat
Hello
There is nothing special to do in respect of function definition when you are building in BANKED memory model.
Just rebuild everything with -Mb and the compiler will care about invoking the function with CALL instead of JSR.
Only think you have to really take care of is you HAVE TO place your interrupt function in NON BANKED flash. Entry within the vector table are 16-bit wide. So you need to make sure interrupt functions are placed in NON-BANKED memory.
I am usually recommending to define the interrupt function in the section NON_BANKED as follows:
#ifndef __SMALL__
#pragma CODE_SEG __NEAR_SEG NON_BANKED
#endif
interrupt void INCcount(void) {
/* Insert Code here */
}
#ifndef __SMALL__
#pragma CODE_SEG DEFAULT
#endif
I hope this helps.
CrasyCat
Is the above declaration right or do I also have to use #pragma?
Hello
CrasyCat