메인 콘텐츠로 건너뛰기
Knowledgebase
Home
Renesas Korea

How to add a FIT module to an RI600V4 or RI600PX sample project using FIT (CS+ version)

Last Updated:05/17/2017

Question:

How do I add a FIT module to an RI600V4 or RI600PX sample project using FIT (CS+ version)?

Answer:

1.    Add the folder of FIT module source files to the project.

Copy the folder of required FIT module source files from software modules, such as RX Driver Package, to the project root.
In Windows Explorer, drag and drop the copied folder to the “File” folder of the CS+ Project tree.
In the “Add folder and file” dialog, select "C source" and "Header file" as file types, then set a value over the maximum number of layers and press the "OK" button.
This adds all the paths in the FIT module to the compiler option "Additional Include Path."

2.    Exclude the registration line of all interrupt handlers in FIT module.
Exclude "#pragma interrupt" lines in the FIT module source.
Remove "static" declaration of an interrupt handler function.

[Example] 
//#pragma interrupt (rspi_spri0_isr(vect = VECT(RSPI0, SPRI0)))
 void rspi_spri0_isr(void)
 {
   :
 }

Note: “platform.h” or “kernel.h” and “kernel_id.h” must be included in the interrupt handler’s source file. If neither of them has been included, add them.

3.    Register the interrupt handler to the configuration file.
Register the interrupt handler in FIT module to the configuration file sample.cfg.
The interrupt vector number should be the same as the VECT macro number following "#pragma interrupt."

       //Macro VECT(RSPI0, SPRI0) -> VECT_RSPI0_SPRI0 -> 38
       interrupt_vector[38]{
           os_int = NO;
           entry_address = rspi_spri0_isr();
           pragma_switch = E,ACC;

[Notes]
The FIT modules included in the sample projects using FIT “r_bsp” and “r_cmt_rx” have been customized for the RTOS. Do not overwrite them with FIT modules that have the same module name.
 

 

Suitable Products
RI600V4
RI600PX