 |
|
 |
MESC TOOL NEWS:
MESCT-CC32R-010301D
Please take note of the problem described below in using cross-tool kit CC32R for the M32R family of microcomputers.
- On S-format files generated by load module converter lmc32R
- Versions Concerned
CC32R V.1.00 Release 1 -- V.3.00 Release 1
- Problem
Incorrect data may be output to S-format files generated by load module converter lmc32R, causing checksum errors to appear in PROM programmers and others.
- Conditions
- This problem occurs if the following three conditions are satisfied:
- (1) Statically initialized data of type char continuing for 50 bytes or more is described.
- (2) In a source file exist 248 bytes or more of such data as in (1) in total.
- (3) Both of the following options are used at execution of lmc32R:
- (a) option -d for dividing an output file into two or more
- (b) option -W for setting the unit of length in division to 2 bytes
- [Note:]
- CC32R unifies two or more pieces of statically initialized data of type char into a block of 250 bytes or less in length and outputs this to the object and load modules.
However, a large piece of such continuous data as described in condition (1) may be placed across the 250-byte block's boundary. In this case, if the address of the boundary of the block is odd, and the piece of data is broken into 2 bytes width to be described in more than one S-format file, the above problem occurs.
Therefore, if checksum errors arise when an S-format file is input to a PROM programmer, it is probable that the above conditions are met.
- 3.1 Example
Source File: test.c
-----------------------------------------------------------------------
/* In str1 and str2 exists a relatively long initialized
character string: condition (1) */
/* The sum of str1 and str2 is 248 bytes: condition (2) */
/* (A '0' at the end of character strings is included in the number
of bytes.) */
char str1[] =
"Copyright 2001 MITSUBISHI ELECTRIC CORPORATION " /* 50 bytes */
"AND MITSUBISHI ELECTRIC SEMICONDUCTOR SYSTEMS CORP" /* 100 bytes */
"All Rights Reserved. "; /* 150 bytes */
char str2[] =
"CC32R Compiler for M32R Family V.3.00 Release 1 " /* 50 bytes */
"AS32R Assembler for M32R family V.3.00 Release 1"; /* 99 bytes */
-----------------------------------------------------------------------
Examples of Executing Commands in CC32R
(Here % denotes a prompt.)
-----------------------------------------------------------------------
% cc32R -c test.c
% lnk32R -o test.abs -SEC D=20000 test.mo
% lmc32R -d 2 -W 2 test.abs * Condition (2)
-----------------------------------------------------------------------
The execution of the sequence of these commands generates S-format files "test.m20" and "test.m21".
However, checksum errors will arise when these files are input to a PROM programmer since data in file "test.m21" is incorrect.
- Workaround
Please download the modified program of lmc32R if necessary from HERE.
- [Notice:]
- Incorrect data can be output where checksum errors appear.
This problem would not be solved even when checksums are rewritten by a text editor or so in S-format files.
- Schedule of Fixing Problem
We plan to fix this problem in our next release.
|
 |