 |
|
 |
RENESAS TOOL NEWS on December 1, 2006: 061201/tn3
| A Note on Using
the C Compiler Package for the M16C Series
|
Please take note of the following problem in using the C compiler package--
M3T-NC30WA--for the M16C series: *
- With using assembler start-up files
- With using C-language start-up files
* The M16C series is the generic name of the M16C/60, /30, /20, /10, /Tiny
and R8C/Tiny series.
1. With using assembler start-up files
1.1 Product and Version Concerned
The C compiler package (M3T-NC30WA) for the M16C series
V.5.42 Release 00
1.2 Description
If you use any assembler start-up file generated by the High-performance
Embedded Workshop, the user stack pointer is not set properly.
1.3 Conditions
This problem occurs when the assembler start-up file is generated
by the High-perfomance Embedded Workshop, if status is set to use the
user-stack on making a new workspace. The default status is to use the
user-stack.
In this case, the value of __STACKSIZE__ defined in the nc_define.inc
file is equal to or greater than 1.
1.4 Workarounds
When a new workspace is generated:
We provide you with the problem-fixed start-up file ncrt0.a30.
So, go through the following steps:
(1) Download the ZIP file.(3KB)
(2) Decompress the ZIP file to obtain the st_up folder.
(3) Overwrite the previous st_up folder that resides in the
following directory* with the one obtained in (2):
Hew¥System¥Pg¥Renesas¥M16C¥V5_42_0¥Generate
* In this directory, the High-performance Embedded Workshop
has been installed; it is under C:¥ProgramFiles¥Renesas¥
by default.
When a workspace has existed already:
Modify source-lines in the ncrt0.a30 according to the following cases
- The start-up file for R8C/Tiny series: Change 35 and 36 lines
- The start-up file for M16C family: Change 41 and 42 lines
Before changing:
--------------------------------------------
.if __STACKSIZE__ != 0
ldc #stack_top,sp ;set stack pointer
ldc #0080h,flg
.else
ldc #0000h,flg
.endif
--------------------------------------------
After changing:
--------------------------------------------
.if __STACKSIZE__ != 0
ldc #0080h,flg
ldc #stack_top,sp ;set stack pointer
.else
ldc #0000h,flg
.endif
--------------------------------------------
1.5 Schedule of Fixing the Problem
We plan to fix this problem in the next release of the product.
2. With using C-language start-up files
2.1 Product and Versions Concerned
The C compiler package (M3T-NC30WA) for the M16C series
V.5.40 Release 00 and V.5.42 Release 00
2.2 Description
If you use any C-language start-up file generated by the High-
performance Embedded Workshop, the section for external variables
with initial values may not be initialized properly.
2.3 Conditions
This problem occurs if the following conditions are all satisfied:
(1) The initsct.c file is not linked at the top of the user program.
(2) The last of a section in the file linked to the user program
immediately before the initsct.c file has an odd address.
2.4 Workarounds
Go through the following steps to link the initsct.c file at first
to the user program:
(1) Open the Build menu and Select the Linkage Order command.
You see the Linkage Order dialog box.
(2) Check the Use custom linkage order check box.
(3) Click "initsct.r30" in the list displayed; then press the Move
to top button.
(4) Press the OK button to close the dialog box.
2.5 Schedule of Fixing the Problem
We plan to fix this problem in the next release of the product.
|
 |