There may be a problem with the settings for the startup routine.
The default startup routine clears the following areas to 0.
- Stack area
- SADDR area
- Sections for variables that do not have initial values (@@DATA, @@DATAL*, and @@DATS sections)
*: An option setting determines whether this area is initialized or not.
The problem is arising for one of the following two reasons.
- A new section has been created.
- The startup routine registered with CubeSuite+ has been customized
Actions in response to the above two reasons are described below.
- If you are using #pragma section to specify a new section, the startup routine is required to include code for copying variables with initial values or clearing variables with no initial values to 0.
For details, refer to the section on the startup routine in the user's manual of the compiler you are using.
- If you are using the CA78K0R C compiler for the RL78 family under CubeSuite+, a startup routine must be registered under the category for the startup routine.
Check that the startup routine file has been registered under [File] in the [Project Tree] panel of CubeSuite+, in the same way as other source files. If it is not under the [Startup] category, move it to that category or register it there.
|CS+ (formerly CubeSuite+)|
|C Compiler Package for RL78 and 78K Families|
|Compiler for RL78 Family and 78K0R [CA78K0R]|