Keil Logo

What's New in C51 Version 9.56

C51 Version 9.56 Release

Release Date: 8th August 2016

  • [Cx51 Compiler]
    • Improved C90 conformity for ASSERT.H, FLOAT.H, MATH.H, STDARG.H, STDDEF.H, STDLIB.H, and STRING.H header files.
    • Corrected: reduntant code genration. Under some circumstances the C51 compiler generates code which loads the accumulator register A twice. Example:
      ........
      10:
      11:      union X {
      12:        struct {
      13:          unsigned char l8 :8;
      14:        } v;
      15:      };
      16:
      17:      union X xdata x  _at_ 0x5800;
      18:      unsigned char  t;
      19:
      20:      void MyFunc(void) {
      21:        x.v.l8 = t;
      22:      }
      23:
      ........
      
      
                 21:        x.v.l8 = t;
             C:0x088C    90581D   MOV      DPTR,#0x581D     -------+------o Suboptimal code generation
             C:0x088F    E0       MOVX     A,@DPTR                 | <----  Superfluous register A load
             C:0x0890    ED       MOV      A,R5                    |
             C:0x0891    F0       MOVX     @DPTR,A          -------+
      
      
                 21:        x.v.l8 = t;
             C:0x13BA    90581D   MOV      DPTR,#0x581D     -------+------o Corrected code generation
             C:0x13BD    ED       MOV      A,R5                    |
             C:0x13BE    F0       MOVX     @DPTR,A          -------+
      
      
    • Corrected: wrong code generation in case of bit-field computation inside a switch-case statement. Example:
      
      #include <REG51F.H>
      
      typedef struct sTest {
        unsigned char b1 : 1;
        unsigned char b2 : 1;
      } t_test;
      
      xdata t_test tSt;
      
      void main (void) {
      
        switch (tSt.b2) {
          case 1:
            P1 = 1;
            break;
          default:
            P1 = 0;
            break;
        }
      
      
      +-----------------------------
      Wrong code generation
      +-----------------------------
             ; FUNCTION main (BEGIN)
                                    ; SOURCE LINE # 10
                                    ; SOURCE LINE # 12
             0000 900000      R     MOV     DPTR,#tSt
             0003 E0                MOVX    A,@DPTR
      
             0004 5402              ANL     A,#02H    -----------\ 
             0006 14                DEC     A                     +---- The compiler erroneously generates code which evaluates
             0007 7004              JNZ     ?C0003    -----------/      the bit position 0 instead the bit position 1.
                                                                 |
                                                                 |
      +-----------------------------                             |
      Corrected code generation                                  |
      +-----------------------------                             |
             ; FUNCTION main (BEGIN)                             |
                                    ; SOURCE LINE # 10           |
                                    ; SOURCE LINE # 12           |
             0000 900000      R     MOV     DPTR,#tSt            |
             0003 E0                MOVX    A,@DPTR              |
                                                                 |
             0004 C3                CLR     C         -----------\ 
             0005 13                RRC     A                     \ 
             0006 5401              ANL     A,#01H                 +---- The generated code evaluates now the bit position 1.
             0008 14                DEC     A                     /
             0009 7004              JNZ     ?C0003    -----------/
      
      
  • [LX51 Linker/Locater]
    • Corrected: Under some circumstances the LX51 locates the stack segment to a wrong adress inside the idata address space. This problem was introduced with C51 version 9.55. Example:
      +------------------------------------------------------------------------
      Wrong stack location inside the data/idata memory space
      +------------------------------------------------------------------------
      
      MEMORY MAP OF MODULE:  Repro (?C_STARTUP)
      
      START     STOP      LENGTH    ALIGN  RELOC    MEMORY CLASS   SEGMENT NAME
      =========================================================================
      
      * * * * * * * * * * *   D A T A   M E M O R Y   * * * * * * * * * * * * *
      000000H   000007H   000008H   ---    AT..     DATA           "REG BANK 0"
      000008H   000015H   00000EH   BYTE   UNIT     DATA           ?DT?MAIN
      000016H   000017H   000002H   BYTE   UNIT     DATA           ?DT?USB
      000018H   000018H   000001H   BYTE   UNIT     DATA           ?DT?WATCHDOG
      000019H   000019H   000001H   BYTE   UNIT     DATA           ?C?LIB_DATA
      00001AH   00001AH   000001H   BYTE   UNIT     IDATA          ?STACK        <--------+--- Wrong stack location
      00001BH.0 00001FH.7 000005H.0 ---    ---      **GAP**                               |
      000020H.0 000020H.3 000000H.4 BIT    UNIT     BIT            _BIT_GROUP_            |
      000020H.4 000020H.6 000000H.3 BIT    UNIT     BIT            ?BI?MAIN               |
      000020H.7 000020H   000000H.1 ---    ---      **GAP**                               |
      000021H   00004FH   00002FH   BYTE   UNIT     DATA           _DATA_GROUP_           |
      000050H   000077H   000028H   BYTE   UNIT     DATA           ?DT?GLOBALS            |
                                                                                          |
                                                                                          |
                                                                                          |
      +------------------------------------------------------------------------           |
      Corrected stack location inside the data/idata memory space                         |
      +------------------------------------------------------------------------           |
                                                                                          |
      MEMORY MAP OF MODULE:  Repro (?C_STARTUP)                                           |
                                                                                          |
      START     STOP      LENGTH    ALIGN  RELOC    MEMORY CLASS   SEGMENT NAME           |
      =========================================================================           |
                                                                                          |
      * * * * * * * * * * *   D A T A   M E M O R Y   * * * * * * * * * * * * *           |
      000000H   000007H   000008H   ---    AT..     DATA           "REG BANK 0"           |
      000008H   000015H   00000EH   BYTE   UNIT     DATA           ?DT?MAIN               |
      000016H   000017H   000002H   BYTE   UNIT     DATA           ?DT?USB                |
      000018H   000018H   000001H   BYTE   UNIT     DATA           ?DT?WATCHDOG           |
      000019H   000019H   000001H   BYTE   UNIT     DATA           ?C?LIB_DATA            |
      00001AH.0 00001FH.7 000006H.0 ---    ---      **GAP**                               |
      000020H.0 000020H.3 000000H.4 BIT    UNIT     BIT            _BIT_GROUP_            |
      000020H.4 000020H.6 000000H.3 BIT    UNIT     BIT            ?BI?MAIN               |
      000020H.7 000020H   000000H.1 ---    ---      **GAP**                               |
      000021H   000050H   000030H   BYTE   UNIT     DATA           _DATA_GROUP_           |
      000051H   000078H   000028H   BYTE   UNIT     DATA           ?DT?GLOBALS            |
      000079H   000079H   000001H   BYTE   UNIT     IDATA          ?STACK        <--------+--- Correct stack location
      
      
    • New: the warning L48: Ignored Recursive Call Callee: function-name Caller: function-name will be issued when a reentrant function calls a non-reentrant function.
  • [A51 Assembler] and [AX51 Assembler]
    • Removed: a path length limitation of 127 characters.
  • [New Supported Devices]
  • [µVision]
    • This C51 release comes with µVision V5.20.0.39.
  • [Supported Operating Systems]
    • µVision and it's dynamically loaded libraries (DLL) have been ported to MSVC 2015. MSVC 2015 does not officially support Windows XP anylonger.
    • Refer to System Requirements Overview for hardware and operating system requirements.
  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.