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

Inline assembly function and the error code E0551213 (CC-RL)

Last Updated:05/10/2017

Question:

I am using the CC-RL compiler for RL78 devices. When I define a label in an inline assembly function, the error code E0551213 appears. How can I resolve this?

E0550213: Label xxxx redefined.

[ Example ]

#pragma inline_asm sample
void sample(void) {
  LABEL_01:
    NOT1 CY
    BZ LABEL_01
}

Answer:

When you write a label in a #pragma inline_asm function, as many labels which have the same name are created as the number of definitions and inline expansion.

Use the .LOCAL directive to in assembly to make the label local in such cases. The assembler will automatically change the name, even though the local label has the same name as in the assembly source.

[ Example ]

#pragma inline_asm sample
void sample(void) {
  .LOCAL LABEL_01 ; Addition
  LABEL_01:
    NOT1 CY
    BZ LABEL_01
}

Suitable Products
e² studio
CS+ (formerly CubeSuite+)
C Compiler Package for RL78 Family
  • 이 기사가 도움이 되셨나요?