Skip to main content
Knowledgebase
Home
Renesas Electronics America - Knowledgebase

Specifying the same interrupt function with the difference interrupt source (RL78 CC-RL)

Last Updated:01/31/2018

Question:

Using the RL78 CC-RL compiler, how to specify different interrupt sources that will use the same interrupt function?

Answer:

Multiple interrupt requests to one function cannot be specified on the C source file. Instead, have all interrupt function sources point to an interrupt vector using the -vectn option of the CC-RL linker or the VECTOR directive of the assembly source file.

<Example> -vectn option
Interrupt vector address : 0x04,0x06,0x0a
Interrupt function (C language) : dummy_int 
For this case, write the code as follows.
-vectn=4=_dummy_int,6=_dummy_int,a=_dummy_int

<Example> VECTOR directive
Interrupt vector address : 0x04,0x06,0x0a
Interrupt function (C language) : dummy_int 
For this case, write the code as follows.
.EXTERN _dummy_int
_dummy_int    .VECTOR    0x04
_dummy_int    .VECTOR    0x06
_dummy_int    .VECTOR    0x0a
 

Suitable Products
e² studio
CS+ (formerly CubeSuite+)
C Compiler Package for RL78 Family