Tool News
 
 
 

Tool News

Products Info
Downloads
Tools FAQs
RENESAS TOOL NEWS on July 16, 2008: 080716/tn1

A Note on Using the C Compiler Packages for the M16C MCU Family
--With Building a Static Function Having a Static Variable within It--


Please take note of the following problem in using the C compiler packages for the M16C MCU family:
  • With building a static function having a static variable within it


1. Products and Versions Concerned
   (1) The C compiler package for the R32C series
         V.1.01 Release 00
   (2) The C compiler package for the M32C series, M3T-NC308WA (NOTE 1)
         V.5.00 Release 1 through V.5.41 Release 01
   (3) The C compiler package for the M16C series, M3T-NC30WA (NOTE 2)
         V.5.00 Release 1 through V.5.44 Release 00

   NOTES:
    1. The M32C series is the generic name of the M32C/80 and M16C/80 
       series.
    2. The M16C series is the generic name of the M16C/60, /30, /20, /10, 
       /Tiny, and R8C/Tiny series.

2. Description
   If a build is performed of the file that contains a static function 
   having a static variable within it with the optimizing option 
   -Ostatic_to_inline being selected, the utility SNI Generator, executed
   after creating an absolute module file .x30, may be terminated 
   abnormally.
   As a result, you are unable to utilize the stack analyzing tool, Call 
   Walker, that uses stack information generated by SNI Generator and the 
   Ecx Map tool that refers to mapping information.

2.1 Conditions
    This problem occurs if the following conditions are all satisfied:
    (1) A static function having a static variable within it is defined.
    (2) The -finfo option is selected to invoke the compile driver.
    (3) The -Ostatic_to_inline optimizing option is selected.
    (4) When the C compiler package for the M32C series or the M16C series 
        is running, any one or more of the optimizing options -O1, -O2, 
        -O3, -O4, and -O5 are selected.

2.2 Example
    ------------------------------------------------------------------------
    int xxx;

    static void func( int a )
    {
        static int xxx;
        xxx += a;
    }

    void main( void )
    {
        func(1);
    }
    ------------------------------------------------------------------------

3. Workarounds
   Avoid this problem in either of the following ways:
   (1) Do not select -Ostatic_to_inline.
   (2) Do not select -finfo.
       NOTICE: When -finfo not selected, Call Walker and Ecx Map do not 
               operate.
   (3) Do not define any static function having a static variable within it.

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



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