This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Code generate without "vect" and "near" option for ISR

Dear 

Could you let me know the way to generate the interrupt code without "vect" & "near" option?

#pragma interrupt r_tau0_channel0_interrupt(vect=INTTM00) ==>  #pragma interrupt r_tau0_channel0_interrupt

static void __near r_tau0_channel0_interrupt(void) ==> static void  r_tau0_channel0_interrupt(void)

OR

Is there any way to branch into near area? 

Because when I add the BR command, I can see the error as follows.

It is only disappeared when I remove "near" option.

BR     !!_r_tau0_channel0_interrupt

Thanks,

  • I finally got some time to look into this.  There are several things going on with tools under the hood that are not obvious.  If you enable assembler source or assembler listing and have a look at the assembly file you will notice a few things:

    Using the code generator for CS+ has the effect of not exporting the symbol (function name) as public because they are declared "static", and the symbol name is "mangled" by the compiler by appending the suffix "@1" to the symbol name. 

    The app-note makes a mention about not defining the interrupt vector number for the function:

    But I don't believe there is any way to control this in the code-generator.

    If you wish to continue to use the CS+ code generator with this application I believe you will have to manually edit the files to remove the "static" and the interrupt vector numbers from auto-generated code, there does not appear any mechanism or option to avoid this.

    Leaving the __near qualifier is simply a question of implementation.  If these functions are can be located lower 64KB these can remain, however I see no advantage since the jump-table must reference them as far jump in order to maintain the 4-byte table entry size.

  • Clear for me. 

    Thank you so much.