Tool News
 
 
 

Tool News

Products Info
Downloads
Tools FAQs
MESC TOOL NEWS: MESCT-NC77WA-980916D

NC77WA V.5.00 Release 1
Precaution

Please take note of the following problem in using C compiler NC77WA V.5.00 Release 1 (with assembler and integrated tool manager) for the 77XX series of microcomputers. You are kindly requested to circumvent this problem by the workaround described below.


Problem at Accessing Arrays of Type far
  1. Description
    Arrays of type far with data size of greater than 32 Kbytes and less than or equal to 64 Kbytes may not be accessed correctly.

  2. Conditions
    This problem occurs if the following four conditions are satisfied:
    1. An array is of type far.
    2. The size of the array is greater than 32 Kbytes and less than or equal to 64 Kbytes.
    3. The type of subscripts of the array is any of type signed char, unsigned char, or signed int.
    4. An element of the array whose area is greater than the 32 Kbytes and less than or equal to the 64 Kbytes from the beginning of the array is accessed.

  3. Phenomenon
    When the element is accessed as described in the condition 4 above, it is not done but another address is referenced instead.

  4. Example
    [C source file]
    ----------------------------------------------------------------------- 
      
        extern far int arr[20000]; 
      
        void func(int i)
        {
                return arr[i];
        }
      
        main()
        {
                int i;
      
                i = func(100);   /* OK because arr[100] < 32K */
                i = func(19999); /* NG because 32K < arr[100] <= 64K */
        }
      
    ----------------------------------------------------------------------- 
    
  5. Workaround
    Cast the type of subscripts of the array to "unsigned int".

    Example: return arr[(unsigned int) i];




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