Tool News
 
 
 

Tool News

Products Info
Downloads
Tools FAQs
RENESAS TOOL NEWS [RSO-M3T-NC308WA-030616D]

A Note on Using C Compilers
M3T-NC308WA and M3T-NC30WA

Please take note of the following problem in using the M3T-NC308WA and M3T-NC30WA C compilers (with an assembler and integrated development environment):
  • On displaying the values of arguments passed to a function


  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. Description
    The values of arguments passed to a function through a register may not correctly be displayed in the emulator debugger or simulator debugger. However, codes are created correctly.

  3. Conditions
    The conditions under which this problem occurs are as follows:

    In the M3T-NC308WA
    The type of the first argument of a function is _Bool, char, int, or near pointer. (The arguments of these types are all passed to functions through registers.)

    In the M3T-NC30WA
    The type of the first argument of a function is _Bool, char, int, or near pointer; or that of the second argument is int or near pointer. (The arguments of these types are all passed to functions through registers.)

  4. Example
    In the program shown below, the value of argument i cannot correctly be displayed in the debugger.
    --------------------------------------------------------
       void func(int i, char c)  // 1st argument is of type int
       {
         :
       }
    --------------------------------------------------------
  5. Workaround
    This problem can be circumvented by performing the following steps:
    (1) Add storage class "register" to the argument displayed incorrectly.
    (2) Select the -fER/-fenable_register option at compilation.
    --------------------------------------------------------
       void func(register int i, char c)
       {
           :
       }
    --------------------------------------------------------
  6. Schedule of fixing the Problem
    We plan to fix this problem in our next release of the products.




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