Tool News
 
 
 

Tool News

Products Info
Downloads
Tools FAQs
MESC TOOL NEWS: MESCT-NC308WA-000116D

NC308WA, NC30WA, NC79WA, and NC77WA
Precautions

Please take note of the following problem in using C compilers (with assembler and integrated development environment) NC308WA, NC30WA, NC79WA, and NC77WA:

  1. Products Concerned
    NC308WA V.2.00 Release 1C compiler for the M16C/80 series MCUs
    NC30WA V.3.20 Release 1C compiler for the M16C/60 and M16C/20 series MCUs
    NC79WA V.3.20 Release 1C compiler for the 7900 series MCUs
    NC77WA V.5.20 Release 1C compiler for the 77xx series MCUs


  2. Problem
    Initialization of external variables of type float or double may result in incorrect values being assigned.
    2.1 Conditions
    This problem occurs if the following four conditions are satisfied:
    (1)External variables are initialized.
    (2)The external variables are of type float or double.
    (3)The external variables are types of aggregate (struct, union, or array).
    (4)Variables of type float or double are continuously described in an aggregate.

    2.2 Examples
    -----------------------------------------------------------------
    Structure
       struct S {
          double d;
          float  f;
          long   l;
       } s = {0.5, 0.6, 0};
    Array
       double d[5] = {0.5, 0.6, 0.7, 0.8, 0.9};
          union {
          float f;
          long l;
       } u[5] = {0.5, 0.6, 0.7, 0.8, 0.9};
    -----------------------------------------------------------------
    

  3. Workaround
    3.1 Structure
    Describe variables of type float or double discontinuously. If they will be continuously placed, see Section 3.2.
    [Example of Description]
    -----------------------------------------------------------------
    struct S {
       double d;
       long   l;     /* Place a member of type other than float or double */
       float  f;
    } s = {0.5, 0, 0.6};
    -----------------------------------------------------------------
    

    3.2 Array
    Assign an initial value within each function.
    [Example of Description]
    -----------------------------------------------------------------
    double d[5];
    void init(void)
    {
       d[0] = 0.5;
       d[1] = 0.6;
       d[2] = 0.7;
       d[3] = 0.8;
       d[4] = 0.9;
    }
    -----------------------------------------------------------------
    

  4. Schedule of Fixing Problem
    We plan to fix this problem in our next release.




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