Tool News
 
 
 

Tool News

Products Info
Downloads
Tools FAQs
MESC TOOL NEWS: MESCT-NC30WA_2-000901D

NC30WA V.4.00 Release 1
Precaution

Please take note of the following problems in using C compiler NC30WA for the M16C/60 and 20 series of MCUs (with an assembler and integrated development environment):
  • If a result of operation using an & operator is evaluated, incorrect code may be generated.
  • If a multiply operation includes a floating-point number, System Error may arise or incorrect code may be generated.
  • If both a void function and an inline function are contained in a file, incorrect code may be generated.


  1. If a result of operation using an & operator is evaluated, incorrect code may be generated.
    1.1 Conditions
    This problem occurs if the following six conditions are satisfied:
    (1) A variable of type char or int that is bitwise-ANDed with immediate value A is tested for its equality or inequality to another immediate value B.
    (2) Immediate value A has more than one 1's bit.
    (3) Immediate value B is not 0.
    (4) The test is done with "equal to" operator "==" or "not equal to" operator "!=".
    (5) The program statement executed if the result of the test is TRUE is a single assignment of immediate value C to a variable of type char.
    (6) No else statement exists.

    1.2 Example
     --------------------------------------------------------------------
             if( (i&0x0005)==0x0003){
                 c=1;
             }
     --------------------------------------------------------------------
           
    * In the above example, immediate value A is 0x0005, immediate value B is 0x0003, and immediate value C is 1.

    1.3 Workaround
    Place a dummy "asm" function immediately before the program statement executed if the test is TRUE as follows:
     --------------------------------------------------------------------
             if((i&0x0005)==0x0003){
                 asm();    /* A dummy "asm" function */
                 c=1;
             }
     --------------------------------------------------------------------
    

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



    NC30WA V.4.00 Release 1 Precaution
    MESCT-NC30WA_2-000901D

  2. If a multiply operation includes a floating-point number, System Error may arise or incorrect code may be generated.
    2.1 Conditions
    This problem occurs if the following two conditions are satisfied:
    (1) In a multiply operation, either a multiplier or a multiplicand is a floating-point number.
    (2) Optimize option -OS is used.

    2.2 Workaround
    If floating-point numbers are included, use any of the other optimize options than -OS.

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


    NC30WA V.4.00 Release 1 Precaution
    MESCT-NC30WA_2-000901D

  3. If both a void function and an inline function are contained in a file, incorrect code may be generated.
    3.1 Conditions
    This problem occurs if the following three conditions are satisfied:
    (1) A void function or an inline function are contained in a file.
    (2) A function that calls the void function or the inline functions only is contained in the above file.
    (3) Any of optimize options -OR, -O[3-5], and -OS is used at compilation.


    3.2 Example
           --------------------------------------------------------------------
           void func(void){                    /* Void function */
           }
      
           inline void inline_func(void){      /* inline function */
               :
           }
      
           void inline_call(void){    /* Function calling inline function only */
               inline_func();
           }
          --------------------------------------------------------------------
    



    3.3 Workaround
    Use compile option-Ono_asmopt or -ONA together with the already-selected option.

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





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