Skip to main content
Knowledgebase
Home
Renesas Electronics Europe - Knowledgebase

Storing a constant code to the C source program (RL78 CC-RL)

Latest Updated:12/05/2016

Question:

Using the RL78 CC-RL compiler, how do I store the 0xff code in the C source program to reset the CPU?

Answer:

The CC-RL has the function, #pragma inline_asm, which specifies inline expansion of a function written in the assembly language. Using this function, define the 0xff with the assembler directive .DB.
 
  
<Example>
#pragma inline_asm sampleasm
void sampleasm(void)
{
 .DB 0xff
}
void func(void)
{
 ...
 sampleasm();
 ...
}
Suitable Products
e² studio
CS+ (formerly CubeSuite+)
C Compiler Package for RL78 Family