Skip to main content
Knowledgebase
Home
Renesas Electronics America - Knowledgebase

How to remove this error, E0842: Unrecognized pragma SECTION 'xxx'?

Latest Updated:12/01/2014

Question:

I am using the CA78K0R compiler for RL78 and 78K0R products. It produces the following error message when I try to build a project. Why am I getting this message, and how can I remove the error?
E0842: Unrecognized pragma SECTION 'xxx'

Answer:

The above error is output when section name xxx specified by #pragma section does not exist.
Section names output by the compiler can be changed by options or modifiers. Check that the section has been output with the specified name.

(Example)
When the default medium model is in use and no other options are specified, the name of the section for functions without a modifier is @@CODEL.
The name of the section for functions specified with the __near modifier is @@CODE.
With the -zx option, which specifies the output of objects for allocation to RAM, the name of the section for functions is @@CODER.

Suitable Products
C Compiler Package for RL78 and 78K Families
Compiler for RL78 Family and 78K0R [CA78K0R]
Compiler for 78K0R [CC78K0R]