Skip to main content
Knowledgebase
Home
Renesas Singapore - Knowledgebase

Specifying the address of the CALLT instruction table in the C language (CC-RL)

Last Updated:04/17/2017

Question:

I am using the CC-RL compiler for RL78 devices. Can I use #pragma callt directives to specify particular addresses within the CALLT instruction table (0x80 to 0xBF) per function? What determines the order of placement in the CALLT instruction table?

Answer:

No, you cannot use #pragma callt to specify addresses for individual functions.

The following two points determine the order of placement in the CALLT table area.
-    The order of linkage of files
-    The order of the definitions of functions in each file
The orders of declaration of functions called through callt and of the calls of functions do not make any difference to their locations in the table.
The linkers of CC-RL V1.02.00 and later versions incorporate an optimization feature for the deletion of symbols that have no references. 

A function is deleted if it is not called, even if it is defined as a callt function.
Accordingly, the order will not be switched when a function address is registered in the CALLT table, but the other functions will be moved up in the order if the function is deleted.
 
Suitable Products
e² studio
CS+ (formerly CubeSuite+)
C Compiler Package for RL78 Family