Tool News
 
 
 

Tool News

Products Info
Downloads
Tools FAQs
MESC TOOL NEWS: MESCT-NC308-990516D

NC308WA, NC30WA, NC79WA, and NC77WA
Precautions

Please take note of the following problems in using C compilers (with assembler and integrated development environment) NC308WA, NC30WA, NC79WA, and NC77WA for the Mitsubishi 16-bit microcomputers.


Products Concerned
MCUs Supported Product NameVersions
M16C/80 SeriesNC308WAV.1.00 Release 1
M16C/60 Series
M16C/20 Series
NC30WA
(NC30)
V.1.00 Release 1 -- V.3.10 Release 1
7900 SeriesNC79WA
(NC79)
V.2.00 Release 1 -- V.3.10 Release 1
77xx SeriesNC77WA
(NC77)
V.3.00 Release 1 -- V.5.10 Release 1


Problem on Arrays of Type far with Initial Values
  1. Description
    "System Errors" occur if the number of elements of an array of type far with initial values is greater than 32767.

  2. Conditions
    This problem arises if the following two conditions are satisfied:
    (1) An array of type far has been initialized.
    (2) The number of elements (subscripts) of the array is greater than 32767.

  3. Example
         [C Source File]
          -------------------------------------------------------------------- 
         |   const unsigned short far ch[35000] = {0,1,2,3,4,5,6,7,8,9};
         |
          -------------------------------------------------------------------- 
    
  4. Workaround
    Divide the array in such a way that the number of elements of each array is equal to or less than 32767.
         [C Source File]
          -------------------------------------------------------------------- 
         |   const unsigned short far ch1[30000]={0,1,2,3,4,5,6,7,8,9};
         |   const unsigned short far ch2[5000];
         |
          -------------------------------------------------------------------- 
    

NC308WA, NC30WA, NC79WA, and NC77WA Precautions
MESCT-NC308-990516D

Problem on "sizeof" Operator
  1. Description
    Compiling programs described with sizeof operators may cause "Page Faults" or "Core Dumps" to be generated.

  2. Conditions
    This problem arises if the following two conditions are satisfied:
    (1) At the beginning of descriptions, an extern declaration is made with no initial value.
    (2) After the sentence of the declaration, the declared variable is assigned an initial value described as "sizeof(a character string)".

  3. Example
         [C Source File]
          -------------------------------------------------------------------- 
         |   extern int i;
         |   int i = sizeof( "abcde" );
         |
          -------------------------------------------------------------------- 
    
  4. Workaround
    Circumvent this problem by using either of the following methods.
    (1) Make an extern declaration after the sizeof operator.
            [C Source File]
             ----------------------------------------------------------------- 
            |     int i = sizeof( "abcde" );
            |     extern int i;
            |
             ----------------------------------------------------------------- 
    
    (2)Make an extern declaration in a different file from the one where the initial value is described (the one where the substance is defined).
            [C Source File]
             ----------------------------------------------------------------- 
            |  [file:samp.h]
            |     extern int i;
            |
            |
            |  [file:source.c]
            |      #include "samp.h"
            |      int I = sizeof( "abcde" );
            |
             ----------------------------------------------------------------- 
    



© 2008. Renesas Technology Corp., All rights reserved. Privacy | Legal