Tool News
 
 
 

Tool News

Products Info
Downloads
Tools FAQs
RENESAS TOOL NEWS [July 1, 2003: RSO-M3T-NC30WA-030701D]

A Note on Using C compiler
M3T-NC30WA V.5.10 Release 1

Please take note of the following problem in using the M3T-NC30WA C compiler (with an assembler and integrated development environment) for the M16C/60, M16C/30, M16C/20, and M16C/10 series MCUs:
  • On calling functions by using the indirection operator


  1. Description
    Calling a function using the indirection operator results in incorrect code being generated.

  2. Conditions
    This problem occur if the following three conditions are satisfied:
    (1)Either of the optimizing options -OR and-OS is selected.
    (2)Immediately before the ending process of a function A, another function B is called using an indirection operator.
    (3)A pointer variable pointing to function B is declared outside of function A.

  3. Example
    --------------------------------------------------------
       void (*sub)(void);   /* Condition (3) */
            :
       void func(void)
       {
            :
         (*sub)();         /* Condition (2) */
       }
    --------------------------------------------------------
  4. Workaround
    Place a dummy asm function immediately after calling a function using the indirection operator.
    --------------------------------------------------------
       void (*sub)(void);
            :
       void func(void)
       {
          :
         (*sub)();
         asm();          /* A dummy asm function inserted */
       }
    --------------------------------------------------------
  5. Schedule of Fixing the Problem
    We plan to fix this problem in our next release of the product.




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