Tool News
 
 
 

Tool News

Products Info
Downloads
Tools FAQs
MAEC TOOL NEWS: MAECT-M3T-NC308WA_2-020616D

A Note on C Compilers
M3T-NC308WA, M3T-NC30WA, and M3T-NC79WA;
and Assemblers AS308, AS30, and AS79

Please take note of the following problem in using C compilers (with an assembler and integrated development environment) M3T-NC308WA, M3T-NC30WA, and M3T-NC79WA:
  • On using macro directive command ".LOCAL"


  1. Products and Versions Concerned
    C compiler for the M32C/80 and M16C/80 series MCUs:
    M3T-NC308WA V.1.00 Release 1 -- V.3.10 Release 3
    C compiler for the M16C/60, M16C/30, M16C/20, and M16C/10 series MCUs:
    M3T-NC30WA V.3.20 Release 1 -- V.5.00 Release 1
    C compiler for the 79xx series MCUs:
    M3T-NC79WA V.3.20 Release 1 -- V.4.10 Release 1

    Relocatable assembler for the M32C/80 and M16C/80 series MCUs:
    AS308 V.1.00 Release 1 -- V.2.00 Release 1
    Relocatable assembler for the M16C/60, M16C/30, M16C/20, and M16C/10 series MCUs:
    AS30 V.1.00 Release 1 -- V.3.20 Release 1
    Relocatable assembler for the 79xx series MCUs:
    AS79 V.2.00 Release 1 -- V.3.20 Release 1

  2. Problem
    When a ".LOCAL" macro directive command and a character string are described in a macro definition, the character string may not correctly be expanded.

  3. Conditions
    This problem occurs if the following three conditions are satisfied:
    (1) A macro local label is declared using macro directive command ".LOCAL" in a macro definition.
    (2) A character string is described in the macro definition in (1).
    (3) The character string in (2) ends with a period (".").

  4. Example
    [Assembly-language source file]
    --------------------------------------------------------------------
       mac  .macro
            .local btop, bend           <-- Condition (1)
       btop:
            .byte  bend - btop
            .byte  "string."            <-- Conditions (2) and (3)
       bend:
            .endm
    
            .section prg,code
             mac
            .end
    --------------------------------------------------------------------
    
    [Results of macro expansion]
    --------------------------------------------------------------------
            .local btop, bend
       ..ml0001:
            .byte  ..ml0002 - ..ml0001
            .byte  "stringstring"      <-- Expanded incorrectly
       ..ml0002:
            .endm
    --------------------------------------------------------------------
  5. Workaround
    Separate special character "." from the preceding character string and define the special character as an immediate value.
    [Example]
    --------------------------------------------------------------------
       mac  .macro
            .local btop, bend
       btop:
            .byte  bend - btop
            .byte  "string", 2EH    <-- Special character "." is 
                                           defined as an immediate value.
       bend:
            .endm
    --------------------------------------------------------------------

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




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