 |
|
 |
RENESAS TOOL NEWS on August 16, 2005: RSO-M3T-NC308WA-050816D
A Note on Using the C Compiler Packages
M3T-NC308WA and M3T-NC30WA |
Please take note of the following problem in using the C compiler packages M3T-NC308WA and M3T-NC30WA, which are used for the M16C family of MCUs:
- On machine-language files created by the load module converter (lmc308 or lmc30) with the "-F" option selected
- Products and Versions Concerned
M3T-NC308WA V.3.00 Release 1 through V.5.20 Release 02
(for the M32C/90, M32C/80, and M16C/80 series)
M3T-NC30WA V.4.00 Release 1 through V.5.30 Release 02
(for the M16C/60, M16C/30, M16C/20, M16C/10, M16C/Tiny, and R8C/Tiny series)
- Description
The ID code* may be duplicated when outputted to a machine-language file.
| * |
The ID code can take any value, and this value is checked by the ID code check function, which is used for restricting reprogramming of on-chip flash memory.
For details of the ID code check function, see the hardware manual of each MCU. |
| 2.1 |
|
Conditions
This problem occurs if the following conditions are all satisfied:
| (1) |
|
No code exists in the ID code setting address, and the address next to it is defined as the beginning address of a section using the assembler directive command ".ORG." |
| (2) |
|
Either of the following ways is used to output the ID code:
| (a) |
|
The -ID option of the load module converter (lmc308 or lmc30) is selected. |
| (b) |
|
The .ID assembler directive command is used in either of the following compilers:
- The M3T-NC308WA V.5.20 Release 1
- Any of the M3T-NC30WA V.5.20 Release 1 through V.5.30 Release 1
|
|
| (3) |
|
The beginning address of the data-writing area; or its beginning and ending addresses are not designated as parameters of the -F option of the load module converter (lmc308 or lmc30) but only the value of data written to the free space is designated. |
|
| 2.2 |
|
Examples
Example of an assembly-language source file:
Here the address 0FFFFCH, which is next to the ID code setting address, is defined as the beginning address of the fvector section by the assembler directive command ".ORG."
------------------------------------------------------------------
.section vector,ROMDATA ; variable vector table
.org 0FFEDCH
.lword dummy_int ; vector 0
;
.lword dummy_int ; vector 63
.section fvector,ROMDATA ; fixed vector table
.org 0FFFFCH
.lword start
.end
------------------------------------------------------------------
Example of invoking the lmc30:
In this example, value "11223344556677" is designated as the ID code by option -ID.
------------------------------------------------------------------
> lmc30 -ID#11223344556677 -F 0FF sample.x30
------------------------------------------------------------------
Example of a machine-language file outputted:
Here, the whole of the third line is output to a machine-language file in error. As a result, the ID code (77H) output to address FFFFBH is duplicated in the third and fourth lines.
Line No. Machine-language code
------------------------------------------------------------------
1 S2140FFFD4FFFFFFFFFFFFFFFFFFFFFF11FFFFFF22E4
2 S2140FFFE4FFFFFFFFFFFFFF33FFFFFF44FFFFFF553A
3 S2050FFFFB777A
4 S20C0FFFF4FFFFFF66FFFFFF771A
5 S2080FFFFC00800FFF5F
6 S804000000FB
------------------------------------------------------------------ |
| 2.3 |
|
Workaround
When outputting the ID code to a machine-language file, designate the beginning address of the data-writing area; or its beginning and ending addresses as parameters of the -F option of the load module converter (lmc308 or lmc30), as well as designating the value of data written into the free space.
Example of invoking the lmc30 with command option -ID selected:
------------------------------------------------------------------
>lmc30 -ID#11223344556677 -F 0FF:0F8000:0FFFFF sample.x30
------------------------------------------------------------------
Example of invoking the lmc30 with assembler directive command
.ID used:
------------------------------------------------------------------
>lmc30 -F 0FF:0F8000:0FFFFF sample.x30
------------------------------------------------------------------ |
- Schedule of Fixing the Problem
We plan to fix this problem in the next release of the products.
|
 |