 |
|
 |
RENESAS TOOL NEWS [July 16, 2003: RSO-M3T-NC308WA-030716D]
Notes on Using C Compilers M3T-NC308WA and M3T-NC30WA
|
Please take note of the following problems in using the M3T-NC308WA and M3T-NC30WA C compilers (with an assembler and integrated development environment):
- On using the -Ocompare_byte_to_word (-OCBTW) compile option
- On the character string length of a variable which have functions as array elements
- Problem on Using the -Ocompare_byte_to_word (-OCBTW) Compile Option
- 1.1 Products and Versions Concerned
- M3T-NC308WA V.5.00 Release 1 and V.5.10 Release 1
- for the M32C/80, and M16C/80 series MCUs
- M3T-NC30WA V.5.00 Release 1 and V.5.10 Release 1
- for the M16C/60, M16C/30, M16C/20, and M16C/10 series MCUs
- 1.2 Description
- When in the program statement exists more than one conditional expression that tests the equality between an element of an array and a constant, incorrect code may be generated.
- 1.3 Conditions
- This problem occurs if the following four conditions are satisfied:
| (1) | In an if statement exist more than one conditional expression that tests the equality between an element of an array and a constant. |
| (2) | The conditional expressions in (1) are all logically ORed. |
| (3) | The array is of type unsigned char or signed char. |
| (4) | The -Ocompare_byte_to_word (-OCBTW) compile option is selected as well as any one or more of these, -O1, -O2, -O3, -O4 ,-O5, -OR, and -OS. |
- 1.4 Example
-------------------------------------------------------------
int i;
char c[10]; /* Condition (3) */
void func(void)
{
if( c[0] == 0x1 || c[1] == 0x0 )
/* Conditions (1) and (2) */
i = 1;
else
i = 0;
}
-------------------------------------------------------------
- 1.5 Workaround
- Don't use the -Ocompare_byte_to_word (-OCBTW) compile option if any of these options, -O1, -O2, -O3, -O4 ,-O5, -OR, and -OS, is selected.
- 1.6 Schedule of Fixing the Problem
- We plan to fix this problem in our next release of the products.
Notes on Using C Compilers M3T-NC308WA and M3T-NC30WA RRENESAS TOOL NEWS [July 16, 2003: RSO-M3T-NC308WA-030716D]
- Problem on the Character String Length of a variable which have functions as array elements
- 2.1 Products and Versions Concerned
- M3T-NC308WA V.5.10 Release 1
- for the M32C/80, and M16C/80 series MCUs
- M3T-NC30WA V.5.10 Release 1
- for the M16C/60, M16C/30, M16C/20, and M16C/10 series MCUs
- 2.2 Description
- If the sum of the number of characters of a variable which has functions as array elements and that of any one of these functions exceeds the specified value, inspector information can incorrectly be generated in the absolute module file.
Consequently, when inspector information is referred to by the MapViewer displaying the map information or the integrated development environment TM, the following issues are brought up:
- In the MapViewer, the message shown below appears.
"File read error. Inspect Part: Function Information error."
- In the TM, no inspector information appears.
- If the -U option is used in the ln308 or ln30 linker, either of the following warning messages may be displayed according to the type of the function as an array element:
"Local function 'xxx' is never used", or "Global function 'xxx' is never used"
- 2.3 Conditions
- This problem occurs if the number of characters of a variable which have functions as array elements, A, and that of any one of these functions, B, that is an element of the array satisfy the following condition:
A + 2B > 120
- 2.4 Example
---------------------------------------------------
void func_.....1();
void func2();
void (*func.....Tble[])(void)={func_.....1,func2};
---------------------------------------------------
Here, the "....." denotes a lot of characters, and the problem occurs if the sum of the number of characters of variable "func.....Tble" and twice the number of characters of "func_.....1" is greater than 120.
- 2.5 Workaround
- Reduce the number of characters of a variable which have functions as array elements or that of any one of these functions. If either of them cannot be reduced, do not use the MapViewer, the inspector functions of TM, and the -U option of the ln308 or ln30. The map information can be referred to by using the .map file outputted by the ln308 or ln30.
- 2.6 Schedule of Fixing the Problem
- We plan to fix this problem in our next release of the products.
|
 |