Keil Logo

Release Notes for C251
MCS® 251 Development Tool Kits

Download this Update

This file contains release notes and last minute changes.

Information in this file, the accompanying manuals, and software is
Copyright © 2014 ARM Ltd and ARM Germany GmbH.
All rights reserved.


Contents

  1. What's New in C251
  2. Release Summary
  3. Example Programs
  4. Device Database
  5. Peripheral Simulation
  6. Technical Support
  7. Contact Details

What's New in C251

The following sections list the changes instituted in each release of the C251 toolset.

C251 Version 5.57 Release

Release Date: 5 August, 2014

  • Comes with compiler version C251 V5.57
  • Removed: unnecessary WARNING C53 when bits are defined and declared in the same module.
  • Corrected: problem with wrong type conversion when bitwise NOT operator (~) is used. Example:
    volatile unsigned long va, vb;
    
    void main(void) {
       vb = va & ~0x2;     <-- wrong   : results in  vb = va & 0xFFFD instead of  vb = va & 0xFFFFFFFD
       vb &= ~0x2;         <-- wrong   : results in  vb &= 0xFFFD instead of  vb &= 0xFFFFFFFD
       vb = va & -3;       <-- correct : results in  vb = va & 0xFFFFFFFD
    }
    
  • [L251 Linker/Locater]
    • Corrected: L251 code optimization does not remove common blocks for unused functions. These code blocks remains inside the image. Example:
      unsigned char a, b, c;
      unsigned char darr [0x10];
      
      void FuncA (void) {
        darr[c] = darr[b];
      }
      
      void FuncB (void) {
        darr[c] = darr[b];
      }
      
      void FuncC (void) {
        darr[c] = darr[a] + darr[b];
      }
      
      void FuncD (void) {
        darr[c] = darr[a] + darr[b];
      }
      
      void main(void) {
        FuncA ();
        FuncB ();
        while(1);
      }
      
      
      ; FUNCTION FuncA (BEGIN)           ; FUNCTION FuncB (BEGIN)            ; FUNCTION FuncC (BEGIN)                ; FUNCTION FuncD (BEGIN)          
          R     MOV     A,#LOW darr          R     MOV     A,#LOW darr           R     MOV     A,#LOW darr ----- + ----- R     MOV     A,#LOW darr     
          R     ADD     A,b                  R     ADD     A,b                   R     ADD     A,b               |       R     ADD     A,b             
                MOV     R0,A     ----- + -----     MOV     R0,A                        MOV     R0,A              |             MOV     R0,A            
                MOV     A,@R0          |           MOV     A,@R0                       MOV     A,@R0             |             MOV     A,@R0           
                MOV     R7,A           |           MOV     R7,A                        MOV     R7,A              |             MOV     R7,A            
          R     MOV     A,#LOW darr    |     R     MOV     A,#LOW darr           R     MOV     A,#LOW darr ----- + ----- R     MOV     A,#LOW darr     
          R     ADD     A,c            |     R     ADD     A,c                   R     ADD     A,a               |       R     ADD     A,a             
                MOV     R0,A           |           MOV     R0,A                        MOV     R0,A              |             MOV     R0,A            
                MOV     @R0,AR7  ----- + -----     MOV     @R0,AR7                     MOV     A,@R0             |             MOV     A,@R0           
                RET                    |           RET                                 ADD     A,R7              |             ADD     A,R7            
                                       o-> Common code for FuncA and FuncB             MOV     R7,A              |             MOV     R7,A            
                                                                                 R     MOV     A,#LOW darr       |       R     MOV     A,#LOW darr     
                                                                                 R     ADD     A,c               |       R     ADD     A,c             
                                                                                       MOV     R0,A              |             MOV     R0,A            
                                                                                       MOV     @R0,AR7           |             MOV     @R0,AR7         
                                                                                       RET                       |             RET                     
                                                                                                                 o-> Common code for FuncC and FuncD   
      
      

      In the example above the functions FuncC() and FuncD() are removed when the REMOVEUNUSED linker directive is specified. Now, the first part of the common code block (FUNCTION ?L?COM0001) is no longer necessary. In previous verions this was still part of the image. With the new linker enhancement even this code block is removed.

      ----- FUNCTION ?L?COM0001 (BEGIN) -----                                                                  
      000021 7408              MOV      A,#LOW darr  ---+                                                      
      000023 2519              ADD      A,b             |\                                                     
      000025 F8                MOV      R0,A            | \                                                    
      000026 E6                MOV      A,@R0           |  o-> Common code for FuncC and FuncD                 
      000027 FF                MOV      R7,A            |                                                      
      000028 7408              MOV      A,#LOW darr  ---+                                                      
      00002A         ?L?COM0002:                                                                               
      00002A F8                MOV      R0,A         ---+                                                      
      00002B E6                MOV      A,@R0           |\                                                     
      00002C FF                MOV      R7,A            | \                                                    
      00002D 7408              MOV      A,#LOW darr     |  o-> Common code for FuncA and FuncB                 
      00002F 251A              ADD      A,c             |                                                      
      000031 F8                MOV      R0,A            |                                                      
      000032 A607              MOV      @R0,AR7      ---+                                                      
      000034 22                RET                                                                             
      ----- FUNCTION ?L?COM0001 (END) -------                                                                  
      
      
  • [µVision]
    • This C251 release comes with µVision V5.11.2.0.
  • C251 Version 5.55 Release

    Release Date: 4 July, 2013

    • [C251 Compiler]
      • Implemented local SBIT with external EBDATA/BDATA.
      • Implemented: unlimited length and count of command line DEFINEs.
    • [A251 Assembler]
      • Allow class BIT and EBIT in expressions.
      • Corrected: an erroneously issued error A57 'REGISTER USAGE' REQUIRES A PUBLIC CODE SYMBOL which occurs when REGUSE directive is used by mixed-case (composed by upper and lower case characters) symbols.
      • Implemented ALIGN directive.
      • Generate workfile name dependent on process number.
    • [L251 Linker/Locater]
      • Added: Error 144: OVERLAY GROUP SEGMENT CANNOT HAVE 'LAST' ADDRESS ASSIGNMENT message. The LAST attribute cannot be used to locate segments that collect overlayable segments.
    • [µVision4]
      • This C251 release comes with µVision V4.72.9.0.

    C251 Version 5.54 Release

    Release Date: 8 February, 2013

    • [C251 Compiler]
      • Added: optimization for handling of 32 bit numbers.
      • Added: optimization for for functions that do never return. This functions need to use __attribute__ ((noreturn)).
      • Corrected: assembler instructions used as label name erroneously thrown an Syntax-Error in SRC mode.
      • Corrected: a potential inline-assembler macro problem with '#' when meant for the #imm operand. Example:
        #pragma SRC
        
        #define AOP         \
           __asm { NOP }    \
           __asm { MOV A,#1 }    // incorrect generated error C302: misused # operator
        
        void main (void) {
          AOP
        }
        
      • Corrected: incorrect error C143 "initializer is not a constant" generation at cast of a constant pointer which is part of a struct. Example:
        struct GlStruct {
          char a;
          char cArr[1];
        };
         
        long offset = (long) (*(struct GlStruct*)0x0D000000).cArr;   // incorrect generated error: C143 "initializer is not a constant"
        
      • Corrected: incorrect error C83 "incompatible types" generation when used floating point types togehter with & operator. Example:
         volatile unsigned long  ul2;
         volatile signed char    sc1;
         volatile signed char    sc2;
         
         void main(void) {
           ul2 = 2147483647L;
           sc1 = -1;
           sc2 = 1;
           (ul2 ^= (((( ! ( (double) (char)127))) > ((( -- sc2)))) & sc1));  // incorrect generated error C83: '&': incompatible types
         }
        
      • Corrected: huge at function definition is not allowed. Erroneously has been taken as near. Example:
        void huge hg_fnc() {  }   // The warning C65: 'hg_fnc': illegal use of near/far/huge will be generated.
        
    • [L251 Linker]
      • Corrected: a potential incorrect overlap of data segments when this features are used in combination:
        • Overlapping segments by command line directives.
        • Linker Code Packing optimization with ROM (HUGE) model.
        • Code segments placed in the same 64KB region as the DATA segments.
    • [A251 Assembler]
      • Added: support for forward slash (/) as path seperator.
    • [C Run-Time Library]
      • Corrected: the function free failed when the complete memory pool was allocated.
      • Corrected: the HPTR variant of the function float LOG does not work.
    • [µVision]
      • This C251 release is delivered with µVision V4.60.6.9 IDE.

    C251 Version 5.50l Release

    Release Date: 12 September, 2012

    • [C251 Compiler]
      • Improved: handling of rotation expressions. There will be optimized as a _*rol_/_*ror_. Example:
        unsigned short s1,s2;
        s1 = s2 << 10 | s2 >> 6;
        
        // There will be optimized as:
        
        s1 = _iror_(s2,6);
        
      • Improved: optimization for shifts and rotations. Optimization of mod and div by 1. Example:
        int x = y%1;    // y%1 always results in 0. This have been optimized to an assignment of 0.
        
        int x = y/1;    // y/1 always results in y. This have been optimized to an assignment of y.
        
      • Improved: branch optimization. In case of a short branch distance a smaller opcode will be used.
    • [µVision] This C251 release is delivered with µVision V4.57.0 IDE.
      • Improved: build process for applications which using cross module optimization.

    C251 Version 5.50 Release

    Release Date: 12 June, 2012

    • [C251 Compiler]
      • Removed multiple register loads with constant zero by using SUB/XRL. Example:
        unsigned short us,us1;
        signed short ss;
        
        void foo(void){
          us  = 0;     // The selected register will be loaded only once with constant zero for all three statements.
          us1 = 0;
          ss  = 0;
        }
        
      • Added a new warning message which occurs when a case label value exceeds the value range of the switch expression. Example:
        void foo(void){
          signed char g;
          
          switch (g) {
           case 255:   // "Warning case label value exceeds maximum" will be generated.
             break;
           case -1:
             break;}
         
        }
        
      • Removed multiple warning C209 for same line. Example:
        unsigned char uc;
        
        uc = -257;     // The warning C209 appeared twice in previous versions.
        
        
      • Corrected issue in C251 which ignored REENTRANT pragma. Example:
        #pragma CODE SYMBOLS XSMALL MODECC7 INTR2 FUNCTIONS (REENTRANT) NOCASE ROM(HUGE)
        
        typedef int (foo)(void *p1, void *p2, void *p3, void *p4, int i); 
        foo foo_function; /* prototype the function */ 
        
        /* Is non-reentrant due to typedef'd prototype: */
        int foo_function(void *p1, void *p2, void *p3, void *p4, int i)  {
          return i; 
        }
        
        #define NULL  (void *) 0
        void main(void){ 
          volatile int ret=0; 
           
          ret=foo_function(NULL, NULL, NULL, NULL, 2);
          if (ret != 2)
            while(1);
          while(1);
        } 
    • [µVision4]
      • This C251 release comes with µVision V4.53.0.4 which includes the new Scintilla based editor.

      • The new editor includes the following enhancements:
        Encoding for UTF-8 Unicode, DBCS Korean, DBCS Japanese, and DBCS Chinese languages. Unicode and Asian ANSI encoding is recognized automatically when a file is opened.
        Monospaced fonts and proportional fonts are supported.
        Syntax coloring has been extended.
        Unprintable characters, such as End-Of-Line, can be visualized in the editor.
        The Outlining menu has been simplified. Outlining information is saved and restored for each file.
        Search and replace utilities (Incremental Find, Find-in-Files, and Replace) have been reworked.
        Text can be zoomed with Ctrl+mouse wheel. The information is saved and restored for each file.
        In case device-specific books are not found in the local installation, then www.keil.com is scanned for a matching document.

      • and corrections: Scrolling quickly through large files with Page Up or Page Down works smoothly.
        The editor's context menu can be closed by pressing ESC.
        Breakpoints can be set now with a simple click into the editor margin.
        Under some circumstances the Debugger showed wrong values of arrays or structures in the Watch window.

      • Refer to Revision History for a complete list.

    C251 Version 5.08 Release

    Release Date: 15 February, 2012

    • [New Supported Devices]
    • [C Run-Time Library]
      • free: corrected a problem when all memory blocks were allocated, using the function free may generate a corrupted memory pool.
    • [C251 Compiler]
      • Corrected: when assigning an char value to bit SFR registers the generated code may be incorrect. Example:
        sbit ET0  = 0xA9;
        
        ES  = u8ES;    // previous compiler versions may generate incorrect code
        
        

    C251 Version 5.07b Release

    Release Date: 8 August, 2011

    • [C Run-Time Library]
      Corrected: the functions memcmp, hmemcmp, strcmp, strncmp, and hstrcmp now compare the memory content using unsigned char (instead of signed char) data types.
    • [C251 Compiler]
      Corrected: problem with constant folding in address calculation. Example:
        unsigned char array[0x2000];
        unsigned long l1, l2;
      
        void foo(void)  {
        l1 = ((((unsigned long)array) + (0x100)) + (0x80));       // incorrectly calculated in previous versions
        l2 = ((((unsigned long)&(array[0])) + (0x100)) + (0x80)); // work-arround
      }
      
    • [µVision4]
      This C251 release comes with µVision V4.22.00.

    C251 Version 5.04b Release

    Release Date: 14 February, 2011

    • [C Run-Time Library]
      • Corrected: the function toint did not detect the value range 0x59 - 0x40 as invalid. Now the function returns -1 for these values.
      • Corrected: double numbers are incorrectly converted to float numbers when round-up is required. Example:
                double d = 3.9999999999123;  // needs round-up to 4.0 when converting to float
                float f;
                f = d;                       // incorrect result due to incorrect round-up
    • [µVision4]
      This C251 release comes with µVision V4.14.16.

    C251 Version 5.00 Release

    Release Date: 26 October 2009

    • [µVision4]
      C251 now includes the new µVision4 IDE.
    • [C251 Compiler]
      Enhanced: register values are tracked and reload of identical values are removed to improve code density.
    • [C251 Compiler]
      NOCCODE directive has been added to ensure proper optimization with linker code packing for setjmp/longjmp constructs.Enhanced code efficiency for pointer accesses and long shift operations.
    • [C251 Compiler]
      Corrected: _irol_ and _iror_ intrinsic functions did not deliver correct results.

    C251 Version 4.61a Release

    Release Date: 26 March 2009

    • [C251 Compiler - Header File]
      Added header file srom.h to obtain segment and class information in C source files.
    • [C251 Compiler]
      Enhanced code efficiency for pointer accesses and long shift operations.
    • [C251 Compiler]
      Corrected double multiplication by 2 being folded into shift operation, with potential loss of precision.
    • [C251 Compiler]
      Added NVM_CONST directive to disable access optimizations to const for in-system programming.

    C251 Version 4.55 Release

    Release Date: 18 Aug 2008

    • [C251 Compiler]
      Corrected long shift in complex combinations (in this case an decryption / encryption algorithm), which previously could create register clashes and therefore incorrect results.

    C251 Version 4.53 Release

    Release Date: 31 Jan 2008

    • [C251 Compiler]
      Added a new directive HPTR that uses 32-bit arithmetic even for far address calculation.
    • [L251 Run-Time Library]
      Added library functions hmemccpy, hmemchr, hmemcmp, hmemcpy, hmemmove, hmemset, hstrcmp, hstrcpy, hstrlen, and hstrncpy.
    • [L251 Run-Time Library]
      Changed made so that the run-time library is no longer built with the directive FIXDRK; when using Intel 80C251Sx C-step devices copy the libraries in the folder ..\C251\LIB\FIXDRK to ..\C251\LIB.
    • [Device Support]
      Corrected an problem where the setup of interrupt functions (over RETI instructions) did not work.

    C251 Version 4.52 Release

    Release Date: 19 Nov 2007

    • [Device Support]
      Corrected the device simulator instruction execution times for Dolphin Flip80251 Hurricane.
    • [L251 Linker/Locater]
      Enhanced the Linker Size Summary Line.
    • [L251 Linker/Locater]
      Corrected a problem where REMOVEDUNUSED did not correctly work with SROM symbols and linker code packing.
    • [L251 Linker/Locater]
      Corrected a problem where debug symbols of absolute bits generated in AX51 had the wrong offset.
    • [LX51 Linker/Locater]
      Segment locating with the LAST keyword generated unnecessary memory gaps when used with code banking. This is now corrected.
    • [A251 Compiler]
      Added support for the operators '>>', '<<', '|', '&', '~'. These can now be used in expressions.

    C251 Version 4.50 Release

    Release Date: 30 Jul 2007

    • [C251 Compiler]
      Added optimization levels 8 and 9 and the OBJECTADVANCED linker directive. These may be used together to enable Linker Code Packing to shrink program size.
    • [MON251 Monitor]
      Corrected a potential communications problem with low-cost USB to COM-Port adapters.
    • [µVision3 IDE/Debugger]
      Added a Load Incremental feature that allows the debugger to load multiple applications in the same debugging session.
    • [µVision3 IDE/Debugger]
      User manuals are now updated and available as on-line documentation.

    C251 Version 4.01 Release

    Release Date: 19 Apr 2006

    • [C251 Compiler]
      Corrected a problem with shifting long types by 24 bits.
    • [C251 Compiler]
      Corrected a problem with integer promotion in division expressions. For example, in the expression (x+y)/2;, the sum (x+y) was previously calculated as an unsigned char value, when both x and y were unsigned char types.
    • [L251 Linker]
      Corrected a problems that caused incorrect WARNING L15: MULTIPLE CALL TO FUNCTION messages to be generated when using the overlay directive to group more than two functions. For example: OVERLAY (* ! (func1, func2,func3,...)).

    C251 Version 4.00a Release

    • [µVision3 IDE/Debugger]
      Updated toolset to include the µVision3 IDE/Debugger.
    • [C251 Compiler]
      Rearranged post-increment and post-decrement to better optimize code.
    • [C251 Compiler]
      Optimized bit-field access and bit-field compares with constants.
    • [C251 Compiler]
      Replaced CALL/RET combinations with JMP.
    • [C251 Compiler]
      Enhanced allocation for register variables.
    • [C251 Compiler]
      Optimized multiplication, division, and modulo operation with long or int types.
    • [C251 Compiler]
      Improved performance of long shift with constant shift factors or 8, 16, and 24.

    C251 Version 3.60 Release

    • [µVision2 Debugger]
      Added device support for the Dolphin Flip80251 Typhoon IP Core.
    • [µVision2 IDE]
      Added a new dialog for project component management under Project - Components, Environment, and Books. This dialog allows you to change the order of project targets and file groups.
    • [C251 Compiler]
      Corrected a code generation problem with stack corrections in reentrant function calls. The following code demonstrates this problem:
      extern void pr (long l1, long l2, int i) reentrant;
      long l;
      char c;  
      
      void test (void) {
        pr (0, 1, (l == 0));  // wrong stack correction
                              // SP-4 instead of SP-2 due to long compare.
      
        pr (0, 1, (c == 0));  // wrong stack correction
                              // SP-1 instead of SP-2 due to char compare.
      }

    C251 Version 3.53 Release

    • [C251 Compiler]
      Corrected code generation problems with int multiplication and internal errors.

    C251 Version 3.52 Release

    • [C251 Compiler]
      Corrected code generation problem with internal errors and int multiplication.

    C251 Version 3.51 Release

    • [C251 Compiler]
      Added bank switching capability. Refer to the \C251\LIB\L251BANK.A51 configuration file. Bank switching works similarly to the code banking scheme used for 8051 targets. A new banking mode (mode 3) allows bank switching using a memory-mapped EDATA port. Sample programs may be found in the \C251\EXAMPLES\CODEBANKING folder.
    • [C251 Compiler]
      Improved compiler optimization on common tail merging.
    • [C251 Compiler]
      Corrected a round-up problem in the double-precision floating-point library.
    • [C251 Compiler]
      Corrected a problem in V3.20 that sometimes caused for and while loops to ignore constant assignments in the loop initialization.

    C251 Version 3.20 Release

    • [C251 Compiler]
      Added several minor enhancements.
    • [µVision2 Debugger]
      Stabilized support for MON251.
    • [µVision2 IDE]
      Added several new options to the Help Menu.
    • [µVision2 IDE]
      Improved the SVCS connection.
    • [µVision2 IDE]
      Corrected problems with environment variables.

    C251 Version 3.12 Release

    • [C251 Compiler]
      Corrected several minor problems.

    C251 Version 3.00 Release

    • [µVision2 IDE]
      Added simulation support for all MCS® 251 devices. This includes the Intel 80C251Sx and 80C251Tx and the Atmel WM C251G1D, C251G2D, and C251A1.

    Release Summary

    1. C251 Version 5.57 Release
    2. C251 Version 5.55 Release
    3. C251 Version 5.54 Release
    4. C251 Version 5.50l Release
    5. C251 Version 5.50 Release
    6. C251 Version 5.08 Release
    7. C251 Version 5.07b Release
    8. C251 Version 5.04b Release
    9. C251 Version 5.00 Release
    10. C251 Version 4.61a Release
    11. C251 Version 4.55 Release
    12. C251 Version 4.53 Release
    13. C251 Version 4.52 Release
    14. C251 Version 4.50 Release
    15. C251 Version 4.01 Release

    Example Programs

    Example programs included in the \C251\EXAMPLES folder demonstrate how to use the µVision4 Project Manager and Debugger (see the µVision4 Quick Start Guide for details). Please refer to these if you are new to the tools and want to get started quickly.

    Device Database

    A unique feature of the Keil µVision4 IDE is the Device Database which contains information about more than 3500 supported microcontrollers. When you create a new µVision4 project and select the target chip from the database, µVision4 sets all assembler, compiler, linker, and debugger options for you. The only option you must configure is the memory map.

    As new devices become available, they are added to the database along with data sheets and header files. For information about adding your own chips to the database or about creating your own personal databases refer to the following knowledgebase articles.

    Peripheral Simulation

    The µVision4 Debugger provides complete simulation for the CPU and on-chip peripherals of most embedded devices. To discover which peripherals of a device are supported, in µVision4 select the Simulated Peripherals item from the Help menu. You may also use the web-based Device Database. We are constantly adding new devices and simulation support for on-chip peripherals so be sure to check the Device Database often.

    Technical Support

    At Keil Software, we are dedicated to providing you with the best development tools and technical support. That's why we offer numerous ways you can get the technical support you need to complete your embedded projects.

    • Technical Support Knowledgebase
      More than 1500 technical support questions and answers are available in the Support Solutions Knowledgebase. When a new question arises, it is added to the knowledgebase which is continuously published to the Web. This enables you to get technical support at times when our support staff is unavailable.
    • Application Notes
      Numerous Application Notes help you decipher complex features and implement robust applications.
    • Example Programs and Files
      Utility programs, example code, and sample projects are regularly added to the Download File section of the web site.
    • Discussion Forum
      Post questions, comments, and suggestions to the Keil Software Discussion Forum and interact with other Keil users around the world.

    Many of the features of our Technical Support Knowledgebase and Web Site are the results of your suggestions. If you have any ideas that will improve them, please give us your feedback!

    Contact Details

    If you experience any problems or have any questions about this product, contact one of our distributors or offices for assistance.

    In the USA...

    ARM, Inc.
    4965 Preston Blvd, Suite 650
    Plano, TX  75093
    USA

    800-348-8051 - Sales
    972-312-1107 - Support
    972-312-1159 - Fax

    sales.us@keil.com
    - Sales E-Mail
    support.us@keil.com
    - Support E-mail 
      
    In Europe...

    ARM Germany GmbH
    Bretonischer Ring 16
    D-85630 Grasbrunn
    Germany

    +49 89 456040-0 - Sales
    +49 89 456040-24 - Support
    +49 89 468162 - Fax

    sales.intl@keil.com
    - Sales E-Mail
    support.intl@keil.com
    - Support E-Mail
      

    Copyright © 2014 ARM Ltd and ARM Germany GmbH.
    All rights reserved.
    Visit our web site at www.keil.com.

      Arm logo
    Important information

    This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

    Change Settings

    Privacy Policy Update

    Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
    of your data.