# Release Notes for C166
XC16x/C16x/ST10 Development Tool Kits

This file contains release notes and last minute changes.

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

## Contents

1. What's New in C166
2. Example Programs
3. Device Database™
4. Peripheral Simulation
5. Technical Support
6. Contact Details

## What's New in C166

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

### C166 Version 7.57 Release

- [A166 Macro Assembler]
  - Corrected: sometimes object files will be broken if more than one instance of A166 is running at the same time.
  - Corrected: two line feeds in Macro Processor Language (MPL) error message.
- [C166 C Compiler]
  - Corrected: a compiler crash which occurs by using the library function _lror_() in combination with a modulo operation. Example:

        #include <intrins.h>

        unsigned long ROR32(unsigned long v, int n)
        {
          n = n%32;
          return _lror_(v,n);
        }

  - Corrected: under some circumstances the C166 generates erroneously long and indirect addressing modes togehter with the EXTS instruction which overrides accesses to data in other pages.
  - Corrected: a user stackpointer corruption which occurs when the struct-parameter of a function gets initialized by the return struct-value of another funcion call. Example:

        -------------------------------------------------------------
                             Source code
        -------------------------------------------------------------

        08     :::::::
        09     typedef struct
        10     {
        11       DWORD dwTest1;
        12       DWORD dwTest2;
        13     }tStruct;
        14
        15     static void test (void);
        16     static tStruct test_1 (DWORD dw1, DWORD dw2);
        17     static tStruct test_2 (tStruct tVal1, WORD wVal2);
        18
        19     static void test (void)
        20     {
        21       tStruct tVar1;
        22       /* The first parameter of function test_2 gets initialized by the return value of the function test_1 */
        23       tVar1 = test_2(test_1(0x1000, 0x2000), 0xfff);
        24     }
        25     :::::::

        -----------------------------------------------------------------           -------------------------------------------------------------
                             Wrong code generation                                                    Corrected code generation
        -----------------------------------------------------------------           -------------------------------------------------------------

                      The user stackpointer R0 gets corrupted  ---------+
                                                                        |
                                                   ; SOURCE LINE # 23   |                                                      ; SOURCE LINE # 23
        0004 E6F4FF0F      MOV       R4,#0FFFH                          |           0004 E6F4FF0F      MOV       R4,#0FFFH
        0008 8840          MOV       [-R0],R4                           |           0008 8840          MOV       [-R0],R4
        000A E6FA0020      MOV       R10,#02000H                        |           000A E6FA0020      MOV       R10,#02000H
        000E E00B          MOV       R11,#00H                           |           000E E00B          MOV       R11,#00H
        0010 E6F80010      MOV       R8,#01000H                         |           0010 E6F80010      MOV       R8,#01000H
        0014 E009          MOV       R9,#00H                            |           0014 E009          MOV       R9,#00H
        0016 DA000000 R    CALLS     SEG (test_1),test_1                |           0016 DA000000 R    CALLS     SEG (test_1),test_1
        001A E087          MOV       R7,#08H                            |           001A E087          MOV       R7,#08H
        001C 2007          SUB       R0,R7                              |           001C 2007          SUB       R0,R7
        001E F060          MOV       R6,R0                              |           001E F060          MOV       R6,R0
        0020 0061          ADD       R6,R1                              |           0020 0061          ADD       R6,R1
        0022 DA000000 E    CALLS     SEG (?C_WCPYSH),?C_WCPYSH          |           0022 DA000000 E    CALLS     SEG (?C_WCPYSH),?C_WCPYSH
        0026 0001          ADD       R0,R1                    <---------+           0026 DA000000 R    CALLS     SEG (test_2),test_2
        0028 DA000000 R    CALLS     SEG (test_2),test_2                            002A E0A6          MOV       R6,#0AH       ; tVar1
        002C E0A6          MOV       R6,#0AH       ; tVar1                          002C 0060          ADD       R6,R0         ; tVar1
        002E 0060          ADD       R6,R0         ; tVar1                          002E 0061          ADD       R6,R1
        0030 0061          ADD       R6,R1                                          0030 E087          MOV       R7,#08H
        0032 E087          MOV       R7,#08H                                        0032 DA000000 E    CALLS     SEG (?C_WCPYNH),?C_WCPYNH
        0034 DA000000 E    CALLS     SEG (?C_WCPYNH),?C_WCPYNH                      0036 0001          ADD       R0,R1
        0038 0001          ADD       R0,R1                                          0038 06F00A00      ADD       R0,#0AH
        003A 06F00A00      ADD       R0,#0AH                                                                                   ; SOURCE LINE # 24
                                                   ; SOURCE LINE # 24

- [Debug Commands]
  - Added: New debugger command COVTOFILE filespec [\\app][\module][\function] [DETAILS] [ASM] which works like the COVERAGE command but sends the output into a file. This is much faster than into the output window.
- [µVision]
  - This C166 release comes with µVision V5.25.3.
  - Enhanced: New PC-Lint configuration option to add project target and compiler specific preprocessor symbols.
- [Supported Operating Systems]
  - Refer to System Requirements Overview for hardware and operating system requirements.

### C166 Version 7.56 Release

- [C166 C Compiler]
  - Corrected: error C67 'a': 'undefined identifier' was issued on an enumeration passed as parameter to a function. For example:

        void foo( enum enA { a, b, i_a = a } );

        *** ERROR C67 'a': undefined identifier

  - Corrected: an erroneously issued warning C118 in case of an enum definition with negative values. Exmaple:

        test.c
        ......
        enum { m4 = -4, m3 = -3, m2 = -2, m1 = -1, z };

        test.c(2): warning C118: enum constant: signed value out of range

  - Corrected: under some circumstances a wrong relocation of register variables will be generated in case of the following expression and optimize level 8 Register Variable Lifetime Analysis. Example:

        int gl_a;
        int gl_b;

        int foo(void) {
           int a;
           int b;
           int error;

           a = gl_a;                               /* Source line #12 */
           b = gl_b;                               /* Source line #13 */

           error = abs(a/10-b/10);                 /* Source line #15 */

           if (error > 100)
              return 1;
           else
              return 0;
        }

        +-----------------------------
        Wrong code generation
        +-----------------------------
        .........
                                                   ; SOURCE LINE # 13
        0004 F2F40000 R    MOV       R4,gl_b                           -------------\
        ;---- Variable 'b' assigned to Register 'R4' ----                            \  The compiler optimization erroneously relocates the register variable b
                                                   ; SOURCE LINE # 15                /  to the register R4 which is used by the next instruction.
        0008 E0A4          MOV       R4,#0AH                           -------------/
        000A F6F40EFE      MOV       MDL,R4                                         |
        000E 4B44          DIV       R4                                             |
        .........                                                                   |
                                                                                    |
                                                                                    |
        +-----------------------------                                              |
        Corrected code generation                                                   |
        +-----------------------------                                              |
        .........                                                                   |
                                                   ; SOURCE LINE # 13               |
        0004 F2F60000 R    MOV       R6,gl_b                           -------------\
        ;---- Variable 'b' assigned to Register 'R6' ----                            \  The corrected code optimization is using now the register R6
                                                   ; SOURCE LINE # 15                /  for the relocation of register variable b.
        0008 E0A4          MOV       R4,#0AH                           -------------/
        000A F6F60EFE      MOV       MDL,R6
        000E 4B44          DIV       R4

- [L166 Linker]
  - Increase: the max number of externals/publics to 32766.
- [µVision]
  - This C166 release comes with µVision V5.21.1.
  - µVision now offers Japanese localization on Windows PCs with the 'primary language' Japanese.
    To select the language use the uVision menu item Edit - Configuration - Other - Startup - Language.
  - A Japanese Getting Started user's guide is available in the uVision Books Window.
  - Added: new option to limit the Find in Files utility to the "Current Document".
  - Enhanced: editor now supports Arabic, Baltic, Eastern European, Greek, Hebrew, Russian, Thai, Turkish, and Vietnamese character sets.
  - Corrected: Bookmark navigation is now working only on the "Current Document".
  - Corrected: opening struct elements in the Watch Window did not always show up-to-date values.
- [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 any longer.
  - Refer to System Requirements Overview for hardware and operating system requirements.

### C166 Version 7.55 Release

- [C166 C Compiler]
  - Corrected: under some circumstances the C166 generates wrong code with optimization levels >= 6. Example:

          5         unsigned long ulA;
          6         float *pfA;
          7         float fA;
          8
          9         void main (void)  {
         10
         11         ulA = 0x43874F74ul;
         12         pfA = (float *)&ulA;
         13         fA = *pfA;                     /*  This may create wrong code which is not initializing the fA variable. */

                     ; FUNCTION main (BEGIN  RMASK = @0x7FFF)
                                                   ; SOURCE LINE # 9
                                                   ; SOURCE LINE # 11
        0000 E6F4744F      MOV       R4,#04F74H
        0004 E6F58743      MOV       R5,#04387H
        0008 F6F40400 R    MOV       ulA,R4
        000C F6F50600 R    MOV       ulA+02H,R5
                                                   ; SOURCE LINE # 12
        0010 E6F40400 R    MOV       R4,#ulA
        0014 F6F40800 R    MOV       pfA,R4

                                                   ; SOURCE LINE # 13  --+
        0018 E6F49F0E      MOV       R4,#0E9FH     ;                     |\
        001C E6F5874E      MOV       R5,#04E87H    ;                   --+ o-> Wrong code generation.

                                                   ; SOURCE LINE # 13  --+
        0018 F2F40400 R    MOV       R4,ulA        ;                     |\
        001C F2F50600 R    MOV       R5,ulA+02H    ;                     | \
        0020 F6F40000 R    MOV       fA,R4         ;                     |  \
        0024 F6F50200 R    MOV       fA+02H,R5     ;                   --+   o-> Right code generation.

- [µVision]
  - This C166 release comes with µVision V5.14.1.

### C166 Version 7.54 Release

- [C166 Compiler]
  - There is a compatibility issue between C166 V7.54 and AR166 versions equal or less than 3.20. If you want to use this combination, you must add one #pragma NOFRAME directive just above the ISR 'function os_tmr_interrupt' in file C:\Keil\C166\inc\AR166_lib.c.
    However, we recommend to update AR166 to version 3.30. Example:

        #pragma NOFRAME        /* This directive is absolutely necessary since C166 version 7.54 */
        void os_tmr_interrupt (void) interrupt TxINTNR {
          __asm { JMP OS_CLOCK_INTERRUPT };
        }

  - Corrected: warning C912 'constant': value truncated removed on expressions that used local variables definition. Example:

        void main (void)
        {
          unsigned char a = 8;
          unsigned char b = a + 5;   // <- Incorrect warning generation C192: 'constant': value truncated.

          while(1);
        }

  - Corrected: incorrect return type conversion from int to huge pointer. Example:

        #include "string.h"

        int foo (char *a, char *b, unsigned char c, unsigned char d, unsigned char e)
        {
          return (c == d) && ((e == d) ? (a == b) : strcmp(a,b));         //  warning C40: 'int' converted to 'huge' pointer
        }

  - Added: error E201 to show errors with 'const sdata' attributes.
- [L166 Linker]
  - Increased: maximum amount of symbols for linking from 32000 to 48000.
  - Corrected: When using the RESERVE directive the VECTAB offset is now considered. Previously this caused issues when the vector table is filled using INTNO(func(FILL)).
- [OH66 Object\Hex converter]
  - Enhanced: OH166 supports now an invocation line up to 255 characters.
- [µVision Debugger\Simulator]
  - Corrected: the watch window sometimes displayed wrong values for pointers and arrays.
  - Corrected: the watch window displayed SFRs as 32 bit values by mistake. Now SFRs are displayed correctly as 16 bit values.
  - Corrected: under some circumstances the content of the disassembly window was destroyed by a SIGNAL function.
  - Corrected: under some circumstances a LOAD hexfile INCREMENTAL NORESET command destroyed previously defined debug- and signal-functions.
  - Improved: loader can read HEX files with corrupted line endings.
- [µVision]
  - This C166 release comes with µVision V5.11.2.0.

### C166 Version 7.53 Release

- [C166 Compiler]
  - Corrected: an address conversion error. Address conversion from xhuge address to 'unsigned long' does not consider 64K segment boundaries. Example:

        #pragma LARGE BROWSE MOD167 DEBUG

        unsigned char xhuge ucArr[0x20000];      // Assuming that this array is located at address 0x10204.

        unsigned int xhuge * Addr1 = &ucArr[0x10000];                     // The Addr1 is 0x20204 which is the expected address.
        unsigned long const  Addr2 = (unsigned long)(&ucArr[0x10000]);    // The Addr2 is 0x10204 which is an incorrect result.
                                                                          // This cast does not consider the 64K segment overvlow.

  - Corrected: a stack corruption when __inline function is used with OT(4) or greater. This problem was introduced with C166 version 750. Example:

        unsigned char g_ucArr[4]={0x10,0x11,0x12,0x13};

        static __inline void InlFnc(unsigned char par)
        {
          signed long *slDat;
          unsigned char ucArr[4];

          ucArr[0]=g_ucArr[3];
          ucArr[1]=g_ucArr[2];
          ucArr[2]=g_ucArr[1];
          ucArr[3]=g_ucArr[par];

          slDat=(signed long *)ucArr;
        }

        void foo(void)     // In function foo(), the compiler alocates only 2 bytes on the stack,
        {                  // while the object inside the inlined function InlFnc() needs 4 bytes.
         InlFnc(0);        // That causes corruption of other data on the stack.
        }

- [ULink2]
  - Since C166 version 7.52 the firmware of the ULINK2 target debuger will be updated to version 2 which will not work with older C166 installations.
    The .\C166\ULINK\Utilities\UL2_Configure.exe tool allows to switch back to an older firmware version when backward compatibility is needed.
- [µVision]
  - This C166 release comes with µVision V4.72.9.0.
  - Refer to Revision History for a complete list.

### C166 Version 7.52 Release

- [C166 Compiler]
  - Corrected: C166 creates wrong code with OT(8). Example:

        #pragma MODV2 HLARGE OPTIMIZE (8,SPEED)

        char ASCII_Data [12];

         void foo(char typ) {
          signed short i;

          i = 0;
          ASCII_Data [i++]  = '#';
          ASCII_Data [i++]  = DataType;
          ASCII_Data [i++]  = '*';                  // This may create wrong code that overwrites 'i'
          ::::::::::::

  - Corrected: C166 creates word access where byte access would be required. Example:

        #pragma HLARGE MODV2 FIX167 FIXPEC PACK (1)

         struct a  {
           unsigned char b0;
           unsigned int  i;
           unsigned char b1;
           unsigned char b2;
           unsigned char b3;
         } m1, m2, m3[5];

         void foo(void) {

          m3[getindex()].i = m1.b1 = m2.b3;         // This line causes a hardware trap because of a word access to an odd address

         }

  - Removed unjustified compiler warnings. Example:

        warning C192: '=': value truncated          // Happens when assigning "0" or "1" to a bitfield member.

- [µVision]
  - This C166 release comes with µVision V4.70.80.0.
  - Refer to Revision History for a complete list.

### C166 Version 7.50a Release

- [µVision]
  - This C166 release comes with µVision V4.53.0.6.

### C166 Version 7.50 Release

- [µVision]
  - This C166 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.

### C166 Version 7.07 Release

- [C166 Compiler]
  - Corrected: BYTEALIGN did create byte accesses to XSFR registers. Depending on the peripheral this may create unexpected side-effects. Now the compiler generates always WORD writes to the XSFR address range. Example:

        #pragma bytealign
        #define ADC0_KSCFG             (*((unsigned int volatile sdata *) 0xE00C))    // XSFR definition

        ADC0_KSCFG = ( ( 1<<1 ) | ( 1<<0 ) ) ;  /* previous compiler versions generate two byte writes which may cause side-effects */

  - Corrected: In previous compiler versions using BYTEALIGN in combination with (unsigned) long multiplication may result in Illegal Word Operand Access Trap when the target variable resides on odd memory address. Example:

        #pragma bytealign
        struct { unsigned char uc; unsigned long ul; } val;
        extern unsigned int ifunc (void);

        val.ul = ifunc() * 10L;    // previous compiler versions generate 16-bit write to memory which causes hardware trap

- [C166 Run-Time Library]
  - Corrected: sprintf function which fails in XLARGE model to write in a buffer that crosses a 64k border.
- [µVision Debugger]
  - Corrected: an error which occurs when HEX files use UNIX newline encoding (LF only instead of CR/LF).

### C166 Version 7.05 Release

- [C166 Compiler]
  - Corrected: the error 'illegal use of near/far/huge' was issued on some valid statements. For example:

        typedef unsigned long ul_v;
        typedef unsigned long ul_a[];

        char foo ( ul_v *pul, const ul_a far par, unsigned char uc );   // erroneous generated error message

        char foo ( ul_v *pul, const ul_a far par, unsigned char uc ) {
         pul;
         par;
         uc = 1;
         return (2);
        }

  - Corrected: by using optimization level 6 or greater the following statement results in an endless loop:

        void foo (void) {
         unsigned short us;
         volatile unsigned char uc = 0;

         for ( us = 0; us <= 0; us++ ){
           uc++;
          }
        }

- [A166 Macro Assembler]
  - Corrected: a problem when using mutated vowels within macro statements.
- [System Viewer]
  - Added: System Viewer description files for Infineon XC2000 devices in folder ..\C166\SFD\.
  - Added: System Viewer description files for Infineon XE16x ULE\LE devices in folder ..\C166\SFD\.
- [Debugger]
  - Added: unique tick marks for breakpoints.
  - Added: dialogues which refers to System Viewer window.
- [AGSI Debug Interface]
  - Added: CriticalSection to time-watch functions to avoid deadlocks when time-watches are set via AGSI asynchronously.
  - Added: return error address of function SetOpc.
  - Updated: notification messages for AGSI/AGDI functions.
- [Infineon DAS Driver]
  - Added: help buttons for flash algorithms.
- [Device support]
  - Added: new flash programming algorithms for Infineon XC2000 devices in folders ..\C166\Flash\XC2xxx\, ..\C166\Flash\XC2xxx_L_D_X\, ..\C166\Flash\XC2xxx_H_C_X\, and ..\C166\Flash\XC2xxx_M_A_X\. These algorithms use a pattern check function to speed up flash download.
- [µVision]
  - This C166 release comes with µVision V4.22.00.

### C166 Version 7.04 Release

- [New Supported Devices]
  - Infineon XE167xH-200F, XE167xH-136F, XE169xH-200F, XE169xH-136F, XC2288H-200F, XC2288H-136F, XC2289H-200F, XC2289H-136F, XC2298H-200F, XC2298H-136F, XC2299H-200F, XC2299H-136F, XC2388C-200F, XC2388C-136F, XC2387C-136F, XC2787X-200F, XC2787X-136F, XC2797X-200F, and XC2797X-136F.
- [Device support]
  - Added: flash programming algorithms for Infineon XC2xxx-\H\C\X devices in folder ..\C166\Flash\XC2xxx_H_C_X\.
  - Added: flash programming algorithms for Infineon XC2xxx-\L\D\X devices in folder ..\C166\Flash\XC2xxx_L_D_X\.
  - Added: flash programming algorithms for Infineon XC2xxx-\N\B\X devices in folder ..\C166\Flash\XC2xxx_N_B_X\.
  - Added: flash programming algorithms for Infineon XC2xxx-\U\S\X devices in folder ..\C166\Flash\XC2xxx_U_S_X\.
  - Added: flash programming algorithms for Infineon XE16xFH devices in folder ..\C166\Flash\XE16xFH\.
  - Added: flash programming algorithms for Infineon XE16xFU devices in folder ..\C166\Flash\XE16xFU\.
  - Added: flash programming algorithms for Infineon XE16xyL devices in folder ..\C166\Flash\XE16xyL\.
  - Added: flash programming algorithms for Infineon XE16xyN devices in folder ..\C166\Flash\XE16xyN\.
  - Added: Blinky example for Infineon XC2288H device in folder ..\C166\Boards\Infineon XC2288H\.
  - Corrected: flash programming algorithms for Infineon XC2xxx-\M\A\X devices in folder ..\C166\Flash\XC2xxx_M_A_X\.
  - Added: Header files and startup code for the following Infineon devices:
    - XC2200H series devices: XC2299H-200F, XC2299H-136F, XC2298H-200F, XC2298H-136F, XC2289H-200F, XC2289H-136F,
      XC2288H-200F, and XC2288H-136F.
    - XC2300C series devices: XC2388C-200F, XC2388C-136F, and XC2387C-136F.
    - XC2700X series devices: XC2797X-200F, XC2797X-136F, XC2787X-200F, and XC2787X-136F.
    - XE16xxH series devices: XE169xH-200F, XE169xH-136F, XE167xH-200F, and XE167xH-136F.

[C166 Compiler]

- Corrected: BYTEALIGN may cause register overwrites on long, float, or double variables when addressing via a pointer that is assigned to register variables.
- Corrected: BYTEALIGN caused byte access even to memory mapped peripheral registers that are referenced with pointer constant definitions. Pointer definitions with constant addresses are no longer affected by the BYTEALIGN directive.
- Corrected: in XLARGE memory model the library functions memcpy, memcmp, strcpy, and strcmp had a potential problem when buffers cross a 64KB boundary.
- Enhanced: memory types are not valid for chained variable definitions. For example:

      unsigned char huge v1, v2;  // both v1 and v2 are located to 'huge' memory

- [µVision]
  - This C166 release comes with µVision V4.14.16.

### C166 Version 7.00 Release

- [µVision4]
  - This C166 release comes with the new µVision4 IDE.
- [C166 Compiler]
  - Corrected: true expression with bits evaluated incorrectly

        #define _TRUE ((bit)1)

        void test(void) {
          if( _TRUE != 0 ) {  // incorrectly evaluated to FALSE
            ...
          }
        }

- [C166 Run-Time Library]
  - Corrected: scanf and sscanf did incorrectly process '+' and '-' characters in the middle of a floating point argument as sign. For example "1.2-" was interpreted as -1.2.
  [A166 Macro Assembler]
  - Corrected: with explicit jump prediction (i.e. JMPA+ instruction used) the jump target where wrong.
- [Device Support]
  - Added: Header files and startup code for the Infineon XE162 devices. Several new Infineon XE167 and XC2000 variants added.

### C166 Version 6.18 Release

- [C166 Compiler]
  - Corrected: true expression with bits evaluated incorrectly

        #define _TRUE ((bit)1)

        void test(void) {
          if( _TRUE != 0 ) {  // incorrectly evaluated to FALSE
            ...
          }
        }

- [A166 Assembler]
  - Corrected: with explicit jump prediction (i.e. JMPA+ instruction used) the jump target where wrong.
- [Device Support]
  - Added: Header files and startup code for the Infineon XE162 devices. Several new Infineon XE167 and XC2000 variants added.

### C166 Version 6.17a Release

- [C166 Compiler]
  - Corrected: a problem with common-sub expression elimination on bit-field variables when OPTIMIZE(8) is used.
  - Enhanced: Preprocessor limits. The maximum number for:
    - macro nestings is increased from 100 to 150.
    - macro-arguments is increased from 50 to 100.
    - if/#endif nestings is increased from 20 to 128.
  [Device Support]
  - Added: Header files and startup code for the following Infineon devices:
    - XC2200M series devices: XC2267M-104F and XC2287M-104F.
    - XC2300A series devices: XC2365A-104F and XC2387A-104F.
    - XC2700X series devices: XC2765X-104F and XC2785X-104F.
- [ULINK Driver + Infineon DAS Driver]
- Enhanced: Debug and Flash download support for the above Infineon devices.
- Corrected: New ULINK reset sequence implemented for non responding XC2000 and XE166 series devices.

### C166 Version 6.14 Release

- [C166 Compiler]
  - Corrected: instruction reordering with the REORDER directive was incorrect when used in combination with ATOMIC/ENDATOMIC sequences.

### C166 Version 6.11 Release

- [C166 Run-Time Library]
  - Corrected: free_box failed when the pool size is just for one block..

- [C166 Compiler]
  - Corrected: user stack (R0) might be overwritten when bit negate is used in a parameter list of a function call.

- [ULINK Driver + Infineon DAS Driver]
- Enhanced: on-the-fly memory access allows variable value display during program execution.

### C166 Version 6.10 Release

- [Device Simulation]
  - Corrected: BMOVN did incorrectly set PSW status flags N and Z.
  - Corrected: the MAC value in register window was only updated after operations, not after load/store instructions. It affects only the display, not the operation itself.
- [Device Support]
  - Corrected: Register Header files for XC22xx devices.
  - Added: XC23xx, XC27xx, and XE16x devices including startup code, debug and flash support.
- [C166 Compiler]
  - Corrected: _lror_ (value, 1) incorrectly shifts bit 0 to bit 63.
  - Corrected: strtod did potentially fail with memory model COMPACT, HCOMPACT, LARGE, HLARGE, and XLARGE.
  - Corrected: a problem with EXT sequence merging and REORDER directive on XC16x/XC2xxx/XE16x devices.
  - Corrected: when a extended sfr bit was assigned to a standard sfr bit using a negation, the ext sequence was incorrectly generated.

### C166 Version 6.09 Release

- [OCDS support for C165U and C165UTAH]
  - Added: ULINK firmware for C165U and C165UTAH.
- [Device Support ]
  - Corrected: Register Header files for XC22xx devices.
  - Added: XC23xx devices.
- [ULINK Driver]
- Corrected: 'Stop on Reset' did not work since release 6.08.
- Corrected: 'Reset and Run' Flash download option did not work since release 6.08.
- Corrected: Flash programming algorithm for XC22xx devices.
- Corrected: ULINK2 did not correctly connect to XC164 devices due to a startup effect on the TRST line.
- [C Library]
  - Corrected: log function for double precision float might return wrong results since release 6.08.
- [Monitor-166]
  - Corrected: potential communication problems with low-cost USB-COM adapters.
- [C166 Compiler]
  - Corrected: OPTIMIZE(8) may cause incorrect register variable assignments (can be identified on empty strings in *.LST files).
  - Corrected: struct return via multiple call levels may cause incorrect stack balance.
  - Enhanced: the NOFRAME directive now supports also MAC register saves in interrupts.

### C166 Version 6.08 Release

- [C166 Compiler]
  - Corrected: division was done with DIVLU instruction instead of library call which cause incorrect values in case of value overflows on following statement:

        unsigned int ui1, ui2, ui3, ui4;

        ui4 = (unsigned int) (((ui1+15) * ((499000ul - usTemp1) / (unsigned long)ui2) - 499000ul) - ui3;

- [C Library]
  - Corrected: strtod did return incorrect values for the pointer to subsequent characters.
  - Corrected: log function when used with FLOAT64 (double precision arithmetic) cause an unbalanced user stack for negative values.
  - [Infineon DAS Driver]
    - DAS Server update to Version 2.5.
    - Corrected: Occasional DAS error messages when starting µVision debugger.
    - Corrected: 'Run' LED did not work with 'JTAG over USB Chip'.
  - [uVision IDE]
    - Corrected: potential crash in the project window on right mouse click when no item was selected.
  - [Device Support]
    - Added: ULINK2 support for XC2000 Device series including new Flash algorithm.
    - Added: example project for the Infineon EASY KIT XC2xxx in the folder ..\C166\Boards\Infineon XC2287.

### C166 Version 6.06 Release

- [C166 Compiler]
  - Corrected: functions fstrpos, fstrrchr, fstrrpos did not include the '\0' character into the search.
  - Enhanced: when enabled with the MAC directive struct copy on XC16x uses CoMOV/JMPA-.
  - Enhanced: a single DIVLU instruction instead of a library function is used for (unsigned int)(ulong / uint).
  - Corrected: a problem with register overwrites on BYTEALIGN variable access.
  - Corrected: a problem with OPTIMIZE(8) and in-line assembly code.
  - [A166 Macro Assembler]
    - Corrected: with MODV2 (code generation for Infineon XC16x) the assembler did not output the REGUSE information for global register optimization.
- [Device Simulation]
  - Added: Fast external interrupts on XC164CM.
  - Corrected: a problem for simulation of I2C transmissions with transmit buffer size > 1.
- [L166 Linker/Locater]
- Corrected: ELF file generation problem for applications that code with different storage and execution address (RAM functions).
- [ULINK Driver]
- Added: support for ULINK2.

### C166 Version 6.04 Release

- [New Device Support]
  - Added: Device support for Infineon XC164D, XC164N, XC164S, XC164GM, XC164KM, XC164LM, XC164SM, and XC164TM.
- [C166 Compiler]
  - Corrected: several problems with the new Optimization Level 8.
  - Corrected: register assignment problem with BYTEALIGN variable access.
  - Modified: some warning messages were too aggressive.
  - Corrected: a problem in XLARGE model with printf string output, when precision is stated and the string crosses a 64KB boundary.
- [ULINK Driver]
  - Corrected: Occasional 'Flash erase error' problems with XC16x devices.
  - [Infineon DAS Driver]
    - Corrected: Occasional 'Flash erase error' problems with XC16x devices.
    - Corrected: RUN LED on USB Wiggler was never turned on.
  - [AGSI Debug Interface]
    - Corrected: The memory range watch calls in the simulator AGDI interface was failing on larger memory ranges.
  - [Example Project]
    - Enhanced: EasyWEB for Keil MCB-XC167 did not work with on-chip flash because of wrong external bus configuration. Target for Monitor-166 debugging added.

### C166 Version 6.03 Release

- [C166 Compiler]
  - Corrected: Some warnings have been to aggressive and are not limited to cases where they apply
  - Corrected: problem when using OPTIMIZE(8) in with rotated loops and shift operations.
  - Corrected: signed long division may generate a wrong sign when the divisor is a 16-bit number.
  - Modified: Warning C192: value truncated was two aggressive. Reduce on some situations to reduce impact on legacy code.
- [µVision IDE/Debugger]
  - Added: Driver for Infineon DAS (Debug Access Server) which is described in the OCDS Debugging User's Guide.

### C166 Version 6.02 Release

- [C166 Compiler]
  - Enhanced: the following warnings are now more aggressive and cover more situations:
  - Warning C98: pointer to different objects
  - Warning C192: value truncated
  - Warning C141: incorrect initialization
  - Corrected: potential register overlapping problem with struct copy when pointers are used as source or target.
  - Corrected: when using OPTIMIZE(8) in combination STATIC memory for register automatics, register might get overwritten.
- [µVision IDE/Debugger]
  - Added: symbol window with drag and drop features.

### C166 Version 6.00a Release

- [XC16x OCDS Support]
  - Added: detection for the C164CM device ID in the UL2OCDS driver.
  - Added: Flash programming algorithm for the C16x-8F devices.

### C166 Version 6.00 Release

- [ULINK Driver for XC16x]
  - Added a configuration register (OPSEN) to the START_V2.A66 fie that allows to stop specific peripherals during debugging. Refer to C166: DO PERIPHERALS STOP WITH ULINK DEBUGGING for more information.
  - Changed the default setting of the Branch Prediction Unit (CPUCON1.1) in START_V2.A66. The branch prediction unit may cause a wrong jump to address 0x0020 when the Step Into command reached a breakpoint and the previous instruction was JMP.
  - Corrected: Flash Programming did not program on the boundary between on-chip and off-chip Flash ROM.
  - Corrected: Automatic variables of the type char or unsigned char might have shown incorrect values in the highest nibble.
  - [Example Project for Infineon XC164CM Starter Kit]
    The folder ..\C166\Boards\Infineon XC164CM\Blinky contains a sample project for the new Infineon XC164CM Starter Kit. The µVision Debugger/Simulator contains full Device Simulation for all the Infineon XC16x devices including the new XC164CM. For debugging in the target hardware the Keil ULINK USB->OCDS Adapter offers Flash download and full program debugging capabilities.
- [C166 Compiler - Improvements]
  The code generation portion of the C166 Compiler has been reworked. The following features are added or enhanced:
  - Common Sub-Expression Optimization: common sub-expressions elimination has been re-worked and is now more efficient.
  - Long Variable Optimization: the access to long variables and 32-bit pointers has been improved.
  - Optimize Level 8 - Register Variable Lifetime Analysis: re-allocates automatic variables to different CPU register to improve the execution speed and the code density. On some functions, this optimization can improve the code density/speed by up to 20%.
  - SAVEMAC, NOSAVEMAC directive to save/restore all MAC registers in interrupt service routines.
- [C166 Library - Corrections]
  - free function: corrected a problem when all memory blocks were allocated, the free function may generate wrong reference lists.
  - printf, sprintf, scanf, sscanf function: problem with format string crossing the 64KB memory boundary in HLARGE model.
  - MAC multiplication: XC16x uses a different encoding for CoSHL which causes wrong results with MAC multiply.
- [uVision Simulator / Target Debugger]
  Added simulation for PEC Channel link with XC16x devices.
- [L166 Linker/Locater - ELF Output File]
  A new Linker directive ELF (elf_output_file) that allows you to generate a ELF/DWARF compatible output file. This file may be used by third-party tools to analyze the memory content or the symbol information. The ELF/DWARF file can be loaded by the µVision Debugger.
- [Monitor-166]
  New Monitor configuration added for the Keil MCBXC167 Board.

### C166 Version 5.05 Release

- [ULINK Driver for XC16x]
  Added a new dedicated ULINK driver (selected Project - Options - Debug - ULINK Driver for XC16x) which improves:
  - Avoids potential hang-ups when user application contains active interrupt functions.
  - Breakpoints are not longer ignored when all four flash breakpoints are used.
  - Generates only one RESET at debugger startup. The CPU is stopped at the reset vector and no user code is executed.
  - Breakpoints can be set while user code is running.
  - Breakpoints can be set at beginning of Class B traps or in the highest interrupt level.
  - Detailed information available under OCDS Debugger User's Guide.
- [Example Project for Infineon XC164CM Starter Kit]
  The folder ..\C166\Boards\Infineon XC164CM\Blinky contains a sample project for the new Infineon XC164CM Starter Kit. The µVision Debugger/Simulator contains full Device Simulation for all the Infineon XC16x devices including the new XC164CM. For debugging in the target hardware the Keil ULINK USB->OCDS Adapter offers Flash download and full program debugging capabilities.
- [START_V2.A66 Startup Code uVision Missing in Setup]
  Added: Configuration setting under CPU Configuration - Definitions for Internal Memory Block Control Register IBMCTR - WSFLASH: Wait States for the Flash Memory. This is required to bypass the FCPUR X.162832 Flash Read Performance problem as described in C166: ACCESS PROBLEM WITH XC16X ON-CHIP FLASH.
- [C166 Compiler]
  - Corrected: macro expansion may truncate identifiers to 53 characters.
  - Corrected: macro containing # in __asm have caused a misused '#' error.

### C166 Version 5.04 Release

- [uVision Simulator / Target Debugger]
  Added complete simulation for:
  - XC16x CAPCOM6 unit and ASC1 interface.
  - Infineon XC164CM.
- [L166 Linker/Locater]
  Added program size summary.
- [START_V2.A66 Startup Code and µVision DAvE Support]
  Synchronized with current Infineon Data Sheets and the current Infineon DAvE Version.
- [C166 Compiler]
  - Enhanced: bit-field compare is now generated with bit instructions.
  - Corrected: problem with xhuge variable initialization that exceeds 64KB image size.
  - Corrected: problem with xhuge const addressing.
  - Corrected: problem with local automatic bits and function inlining.

  [µVision3 IDE]
  Added: module display in the Project - Functions Window.

### C166 Version 5.03 Release

- [L166 - Data Mismatch Warning]
  Warning 20 and Warning 21 have been enhanced to output the module in which the symbol is defined. This should simplify locating data type mismatches in an application.
- [uVision3 - Help System]
  The on-line help system in uVision has been improved as follows:
  - Configuration dialogs have Help buttons that link to the user's guide.
  - The F1 context help is improved.
- [uVision3 - Logic Analyzer]
  Added data export capability to the Logic Analyzer.
- [Infineon DAvE Support]
  Corrected several problems in the DAvE project import that were caused by new configuration options in the DAvE project file.
- [C166 - Problems Solved]
  Problems with function in-lining that result in compile-time errors are solved.
- [C166 Library - membox initialization]
  Corrected a problem in the thread-safe fixed-block memory allocation function _init_boxm with the pool initialization for far and huge memory pools.

### C166 Version 5.01 Release

- [C166 - Problems Solved]
  The ORDER directive in V5.00 generated wrong code when EXT sequences were involved. Inline functions may have generated under some circumstances wrong code. These problems are solved in Version 5.01.
- [L166 - Source Browser Output File]
  Since Version 5.00 the L166 linker generates a separate output file (extension *.SBR) which is not deleted in case of linker errors. However, µVision3 was not able to read this file. This problem is corrected.
- [uVision3 - Corrections and Enhancements]
  Several minor corrections are made to µVision3. The setup problems for Kernel Aware Debugging with RTX166 and Advanced RTX166 are solved. Two new toolbar buttons are added: the Back button moves the cursor back to the location before a 'find' or 'go to line' command. The Forward button moves the cursor towards the current position.
- [C166 Library - membox initialization]
  The thread-safe fixed-block memory allocation function _init_boxm failed when the end of a memory buffer was at a 64KB boundary. This problem is corrected in the C library.
- [EC++ Compiler]
  Corrected a problem with type mismatch warnings at the L166 Linker/Locater level when linking C and EC++ files with identical data type.
- [Traffic Example Project]
  Corrected a potential hang-up problem in the interrupt driven serial interface routine.

### C166 Version 5.00 Release

- [C166 - XLARGE Memory Model added]
  The memory model XLARGE is identical to HLARGE, but the default memory type is xhuge. This allows virtually unlimited memory access. Note that size_t of most library functions is unsigned int which limits the size of a single object to 64KB. However the objects itself may reside anywhere in the xhuge memory space.
- [uVision3 IDE Added]
  µVision3 is now part of the package. µVision3 projects are fully compatible with µVision2 and therefore you may change the IDE for your projects any time. µVision3 adds many new features such as Source Outlining, Function Navigation, Editor Templates, Incremental Search, Configuration Wizard, and Logic Analyzer. Refer to the µVision3 Quick Start Brochure for more information. µVision3 adds even integration for CVS Software Version Control System that is available as Open Source project.
- [C166 Library - Block Based Memory Allocation Functions added]
  New library functions (malloc_b, free_b, calloc_b, realloc_b, init_mempool_b) support block based memory management of xhuge buffers. These functions return memory blocks that reside within the restrictions of huge or far pointers. They provide therefore efficient addressing for xhuge memory buffers that are not limited to 64KB or 16KB.
- [C166 Library - Thread-safe Fixed-Block Memory Allocation Functions added]
  The header file membox.h defines new library functions for memory pools that maintain fixed memory blocks:
  - Near Memory Box: _init_boxn, _alloc_boxn, _calloc_boxn, and _free_boxn.
  - Far Memory Box: _init_boxf, _alloc_boxf, _calloc_boxf, and _free_boxf.
  - Huge Memory Box: _init_boxh, _alloc_boxh, _calloc_boxh, and _free_boxh.

  In contrast to the standard memory allocation routines, the memory box functions are reentrant and thread-safe. They can be used with no restrictions in real-time operating systems like the new Advanced RTX166. You may call them from interrupt routines and the main function. Execution times are deterministic and are independent of memory pool sizes always identical.

- [EC++ Compiler]
  The EC++ Compiler is now available in the release version.
- [MAC Programming: Example Code for Signal Processing]
  The Application Note 178 shows the implementation and debugging of DSP algorithms that are designed with the MAC instruction set of the Infineon XC16x devices. The example code uses in-line assembler code and function inlining to get the maximum performance. Program debugging is performed with the µVision Debugger/Simulator and the new Logic Analyzer function. Also available is the DSP Library from Infineon that is using in-line assembly for MAC programming.
- [Examples for MCBXC167 Board]
  Examples for the MCBXC167 Board are available in the folder ..\C166\Boards\Keil MCB-XC167. These examples are also useful for user hardware that is based on XC16x devices. They show OCDS debugging with ULINK, PLL configuration, and TwinCAN communication. Also included is an Easy Web Server that uses the 10/100bps Ethernet controller available on this board.
- [µVision XC16x Device Simulation and Target Peripheral Dialogs]
  Device simulation for the XC161, XC164, and XC167 devices is complete (except CAPCOM6). CAPCOM6 is planned for release in March 2004. Also included are target peripheral dialogs for the debugger.
- [C166 Compiler - Function In-Lining Improved]
  Function in-lining has been improved in cases where the __inline function calls other __inline functions. The rules for function in-lining are as follows:

1. function in-lining is performed on expression statement boundary where the right side operator is a function call:

       z = iFunc (z1, z2)          // in-lined:     first operation is function call
       z = iFunc (z1, z2) * 11     // not in-lined: first operation is multiplication
       z = iFunc (z1, z2) + 2;     // not in-lined: first operation is addition

2. expressions of a 'for' statement are never in-lined, for example:

       for (z = iFunc (z1, z2) ; z != 0 ; )  {  // call to iFunc never in-lined
                  ...
       }

3. an __inline function with no calls (Leaf function) or calls to other Leaf functions is in-lined as long as the above rules are fulfilled.

       static __inline int yFunc (int n)  {
         return (n + 10);
       }

       static int zFunc (int n)  {
         return (n + 10);
       }

       static __inline int iFunc (int i, int y)  {
         i += y;
         i += yFunc (y);      // Note: i += yFunc * zFunc (i): not in-lined
         i *= zFunc (i);
         return (i);
       }

       static int z, z1, z2;

       void main (void)  {
         z = iFunc (z1, z2);           // in-lined
         z = z2 + iFunc (z1, z2);      // not in-lined
         z = iFunc (z1, z2) * 11;      // not in-lined
       }

### C166 Version 4.27 Release

- [OCDS Debugging Support]
  Corrected problems with single-step in combination with breakpoints and connection problems to debug hardware on LPT ports.
- [uVision2 Debugger/Simulator]
  Added context menu commands in the Source Window and Disassembly Window for Set Program Counter, Show Disassembly, and Show Source Code.
- [Monitor-166]
  Added support for the Forth EVA269 board.
- [C166 Compiler]
  Corrected specific problems with in-line assembly and function in-lining.
- [C166 Compiler]
  Corrected problems with DaVE support for the new XC161/XC164 devices.

### C166 Version 4.26a Release

- [C166 Compiler - Source Mode (RTX166 Config File)]
  Corrected a problem in C166 Version 4.26 that failed to translate the RTX166 configuration file into Source Mode.
- [Monitor-166]
  Corrected a problem in C166 Version 4.26 that caused Monitor-166 to fail.
- [C166 Compiler]
  Updated several header files. Added RSTCON for the C167CS. Added the XC167 header file.

### C166 Version 4.26 Release

- [C166 Compiler]
  The extended inline assembler now supports C preprocessor macros. Details are documented in Application Note 172: Using the Extended C166 Inline Assembler.
- [C166 Compiler]
  Added named constant optimization. The values of const variables are no longer loaded. Instead the constant value is used in a way which provides the opportunity for additional optimization. For example:

      const int d = 0x200;   // named constant
      unsigned int i;

      void main() {
        i /= d;           // now uses shift instead of div (power of 2 optimization)
      }

- [OCDS Support]
  Enhanced OCDS support. Breakpoints and single stepping now work correctly on EXTS sequences. A new configuration setting OCDS Break Level allows you to execute interrupt functions while your system is stopped. Flash programming support is now configured for the XC16x AC steps and allows programming off-chip Flash devices.
- [XC16x Device Support]
  Fast Register Banks may now be correctly defined in the tools. These are fully simulated in the µVision2 debugger.
- [uVision2 Debugger]
  Corrected a problem with local variables not displaying in the watch window - locals tab.

### C166 Version 4.25 Release

- [XC16x Device Support]
  Corrected a problem with OCDS debugging that caused breakpoints in interrupt functions with level > 3 not to work.
- [C166 Compiler - Compiler Warnings]
  Corrected a problem with C166 Version 4.24 that caused warning 192 messages when there was no value truncation.
- [C166 Compiler - Function In-Lining]
  Added function in-lining that is fully optimized into the program context. When used with the extended in-line assembler the Keil C16x/ST10 C Compiler allows you to create in-line functions that generate the same efficient code as intrinsic functions.

          1         typedef unsigned char  BYTE;
          2         typedef unsigned int   WORD;
          3
          4         typedef struct cla  {
          5           unsigned char  type;
          6           unsigned char  mode;
          7           struct cla    *p[2];
          8         } CLA;
          9
         10         CLA  cl1;
         11         BYTE  type, mode;
         12         CLA    *pL,  *pR;
         13         int     it;
         14
         15         __inline int Getit (CLA *pthis)  {
         16  1        int   n1;
         17  1        if (pthis->mode == 2)  {
         18  2          n1 = pthis->p[0]->mode | pthis->p[1]->mode;
         19  2        }
         20  1        else  {
         21  2          n1 = pthis->p[0]->type & pthis->p[1]->type;
         22  2        }
         23  1        return (n1);
         24  1      }
         25
         26         __inline BYTE GetMode (CLA *pthis)  {
         27  1        return (pthis->mode & 0x0F);
         28  1      }
         29         __inline BYTE GetType (CLA *pthis)  {
         30  1        return (pthis->type & 0x08);
         31  1      }
         32         __inline CLA *GetNodeL (CLA *pthis)  {
         33  1        return (pthis->p[0]);
         34  1      }
         35         __inline CLA *GetNodeR (CLA *pthis)  {
         36  1        return (pthis->p[1]);
         37  1      }
         38
         39         int near iLocal;
         40
         41         __inline WORD Mul2 (WORD w)  {
         42  1        if (w >= 0x10)  {
         43  2          __asm  {
         44  2            MOV    R4,w
         45  2      al1:  MOV    R5,iLocal
         46  2            ADD    R4,R5
         47  2            mov    w,R4
         48  2          }
         49  2        } else w <<= 10;
         50  1        return (w);
         51  1      }
         52
         53
         54         void main (void)  {
         55  1        CLA   *p1;
         56  1
         57  1        it = Mul2 (cl1.mode);
         58  1        p1 = &cl1;
         59  1        type = GetMode (p1);
         60  1        mode = GetType (p1);
         61  1        pL   = GetNodeL (p1);
         62  1        pR   = GetNodeR (p1);
         63  1        it   = Getit (&cl1);
         64  1      }

                   ; FUNCTION main (BEGIN  RMASK = @0x41F2)
                                                 ; SOURCE LINE # 54
      ;---- Variable 'n1?6?Getit' assigned to Register 'R7' ----
                                                 ; SOURCE LINE # 57
      0000 C2F60900 R    MOVBZ     R6,cl1+01H
      ;---- Variable 'w?1?Mul2' assigned to Register 'R6' ----
                                                 ; SOURCE LINE # 42
      0004 46F61000      CMP       R6,#010H
      0008 8D06          JMPR      cc_ULT,?C0001
                                                 ; SOURCE LINE # 44
      000A F046          MOV    R4,w
                                                 ; SOURCE LINE # 45
      000C         al1?1?Mul2:
      000C F2F50000 R    al1:  MOV    R5,iLocal
                                                 ; SOURCE LINE # 46
      0010 0045          ADD    R4,R5
                                                 ; SOURCE LINE # 47
      0012 F064          mov    w,R4
                                                 ; SOURCE LINE # 49
      0014 0D01          JMPR      cc_UC,?C0003
      0016         ?C0001:
      0016 5CA6          SHL       R6,#0AH
      0018         ?C0003:
                                                 ; SOURCE LINE # 50
      0018 F086          MOV       R8,R6
                                                 ; SOURCE LINE # 57
      001A F6F60000 R    MOV       it,R6
                                                 ; SOURCE LINE # 58
      001E E6F40800 R    MOV       R4,#cl1
      0022 F054          MOV       R5,R4
      ;---- Variable 'p1' assigned to Register 'R5' ----
                                                 ; SOURCE LINE # 59
      ;---- Variable 'pthis?2?GetMode' assigned to Register 'R4' ----
                                                 ; SOURCE LINE # 27
      0024 F4840100      MOVB      RL4,[R4+#01H]
      0028 67F80F00      ANDB      RL4,#0FH
      ;---- Variable 'Rvb?2?GetMode' assigned to Register 'RL4' ----
                                                 ; SOURCE LINE # 59
      002C F7F80E00 R    MOVB      type,RL4
                                                 ; SOURCE LINE # 60
      0030 F065          MOV       R6,R5
      ;---- Variable 'pthis?3?GetType' assigned to Register 'R6' ----
                                                 ; SOURCE LINE # 30
      0032 A985          MOVB      RL4,[R5]
      0034 67F80800      ANDB      RL4,#08H
      ;---- Variable 'Rvb?3?GetType' assigned to Register 'RL4' ----
                                                 ; SOURCE LINE # 60
      0038 F7F80F00 R    MOVB      mode,RL4
                                                 ; SOURCE LINE # 61
      003C F045          MOV       R4,R5
      ;---- Variable 'pthis?4?GetNodeL' assigned to Register 'R4' ----
                                                 ; SOURCE LINE # 33
      003E D4650200      MOV       R6,[R5+#02H]
                                                 ; SOURCE LINE # 61
      0042 F6F60600 R    MOV       pL,R6
                                                 ; SOURCE LINE # 62
      ;---- Variable 'pthis?5?GetNodeR' assigned to Register 'R5' ----
                                                 ; SOURCE LINE # 36
      0046 D4650400      MOV       R6,[R5+#04H]
                                                 ; SOURCE LINE # 62
      004A F6F60400 R    MOV       pR,R6
                                                 ; SOURCE LINE # 63
      004E F065          MOV       R6,R5
      ;---- Variable 'pthis?6?Getit' assigned to Register 'R6' ----
                                                 ; SOURCE LINE # 17
      0050 F4840100      MOVB      RL4,[R4+#01H]
      0054 4982          CMPB      RL4,#02H
      0056 3D0B          JMPR      cc_NZ,?C0004
                                                 ; SOURCE LINE # 18
      0058 D4160400      MOV       R1,[R6+#04H]
      005C F4A10100      MOVB      RL5,[R1+#01H]
      0060 D4160200      MOV       R1,[R6+#02H]
      0064 F4810100      MOVB      RL4,[R1+#01H]
      0068 718A          ORB       RL4,RL5
      006A C087          MOVBZ     R7,RL4
                                                 ; SOURCE LINE # 19
      006C 0D08          JMPR      cc_UC,?C0005
      006E         ?C0004:
                                                 ; SOURCE LINE # 21
      006E D4160400      MOV       R1,[R6+#04H]
      0072 A9A1          MOVB      RL5,[R1]
      0074 D4160200      MOV       R1,[R6+#02H]
      0078 F18A          MOVB      RL4,RL5
      007A 6989          ANDB      RL4,[R1]
      007C C087          MOVBZ     R7,RL4
                                                 ; SOURCE LINE # 22
      007E         ?C0005:
                                                 ; SOURCE LINE # 23
      007E F087          MOV       R8,R7
                                                 ; SOURCE LINE # 63
      0080 F6F70000 R    MOV       it,R7
                                                 ; SOURCE LINE # 64
      0084 CB00          RET
                   ; FUNCTION main (END    RMASK = @0x41F2)

### C166 Version 4.24 Release

- [XC16x Device Support]
  Corrected XC16x example programs to match the released devices. Added OCDS Debugging Information and corrected various problems with the XC164 OCDS interface. Interrupt vector tables are located at the segment start address derived from the ICODE class when the L166 VECTAB directive is not used.
- [Extended C166 Inline Assembler]
  A new extended inline assembler is integrated into the Keil C166 Compiler. With the extended inline assembler you may insert assembler instructions into C function code while retaining full debug and optimization capabilities. The extended inline assembler fully supports all C16x, XC16x, ST10, and Super10 instruction set extensions. Example programs are provided in the \C166\EXAMPLES\XC16X DEVICES\ folder.
- [ULINK Installation]
  Enhanced the Keil ULINK installation. Details on ULINK can be found in \C166\HLP\OCDS.CHM.
- [uVision2 IDE]
  Added Flash menu to uVision2. This menu provides a direct interface to external Flash programming tools and allows you to use the OCDS interface to program the on-chip FLASH memory of XC16x devices. Flash programming commands are configured under Options for Target Utilities.

### C166 Version 4.23 Release

- [uVision2]
  Added DaVE support for the new XC161/XC164 devices.
- [uVision2]
  Added drivers for ULINK (USB-OCDS Adapter for XC16x Devices).
- [C166 Compiler]
  Corrected the behavior of pragma directives to be compatible with C166 Version 4.20. Version 4.22 added detailed checking for primary controls and created problems with existing source code. Now the behavior is compatible with Version 4.20 except that the ORDER directive must be specified on the command line or at the beginning of a C source file.
- [L166 Linker]
  Corrected a problem that occurred (due to EC++ segments) when building Monitor-166. EC++ segments are now generated only for projects that contain EC++ modules.
- [uVision2 Debugger]
  Added debug dialogs (for most C16x and ST10 devices) that display the peripheral status while debugging using Monitor-166 or an Emulator.

### C166 Version 4.22 Release

- [BETA RELEASE]
  Added EC++ Compiler. Several tool enhancements were made to support EC++. Details for using the EC++ Compiler can be found in \C166\HLP\EC166.CHM.
- [BETA RELEASE]
  Added support for the new Infineon XC161/XC164 devices.

### C166 Version 4.20 Release

- [L166 Linker]
  Added the NOSORTSIZE (abbreviation NOSO) directive which disables section sorting within the linker. By default, the linker sorts sections by size before locating them. This ensures fewer gaps in the memory space which reduces memory consumption. The NOSORTSIZE directive disables sorting and is compatible with the version 3 linker.

### C166 Version 4.12 Release

- [C166 Compiler]
  Corrected various minor problems.

### C166 Version 4.10a Release

- [C166 Compiler]
  Added the COMMONRET directive (abbreviation CR) which forces the compiler to generate functions that always exit at the same RET instruction. RET instructions will not be inserted in the middle of a function.
- [C166 Compiler]
  Added the FIXBFLD directive (abbreviation FB) which ensures that the compiler encloses BFLDL and BFLDH instructions within ATOMIC sequences. This is required to avoid problems documented by Infineon in CPU.21 problem description. To use this directive in uVision2, you must enter it in Options-C166-Misc.
  The FIXBFLD directive causes the compiler to insert ATOMIC #1 instructions before each BFLDL and BFLDH instruction. If the BFLD instruction is used to access ESFR registers, the EXTR sequence is not combined with other EXTR sequences. An exception to this occurs when accessing the SYSCON1, SYSCON2, and SYSCON3 SFR's since this is required by the hardware for UNLOCK sequences.
  The compiler does not modify the use of the _bfld_ intrinsic function within _atomic_-_endatomic_ blocks. You must check such code blocks carefully and insert NOP's if required (using the _nop_ intrinsic function) before the _bfld_() intrinsic call.
  If you use RTX166 Tiny you must enable the FIXBFLD option in RTX166T.A66 and rebuild the RTX166 Tiny library. This corrects the CPU.21 problems in the kernel.
- [L166 Linker]
  Enhanced the INTNO directive by adding two new subcommands.
  INTNO (interrupt_name (FILL)) causes the linker to direct unused interrupts to the specified interrupt_name. For example:

      void interrupt_trap (void) interrupt MYINT
        {
        while (1);
        }

  defines the interrupt service routine MYINT and...

      L166 myfile.obj INTNO (MYINT (FILL))

  instructs the linker to direct all unused interrupts to MYINT.

  INTNO (interrupt_name (NONE)) suppresses generation of the interrupt vector. For example:

      L166 myfile.obj INTNO (MYINT (NONE))

  instructs the linker not to generate an interrupt vector for MYINT. This may be useful if you supply the interrupt vector in an assembly file. For example:

      EXTERN interrupt_trap:NEAR             ; FAR for MEDIUM, LARGE, HLARGE Model
           int_vector4 section code at 4     ; interrupt vector address
           vector4 proc
              jmp FAR interrupt_trap
           vector4 endp
           int_vector4 ends

### C166 Version 4.06 Release

- [C166 Compiler]
  Added the EXTINS directive which causes the compiler to terminate EXTS and EXTP instruction sequences after each source line (typically, the compiler generates code with EXTS and EXTP sequences that are longer than one source line). This directive improves single-stepping during debugging.

### C166 Version 4.05 Release

- [C166 Compiler]
  Added the _pop_ intrinsic function which uses the POP instruction to pop a 16-bit word value from the system stack.
- [C166 Compiler]
  Added the _push_ intrinsic function which uses the PUSH instruction to push a 16-bit word value onto the system stack.
- [C166 Compiler]
  Added the _prior_ intrinsic function which uses the PRIOR instruction to calculate the number of left shifts required to normalize a number.
- [C166 Compiler]
  Added the _priord_ intrinsic function which uses the PRIORD instruction to calculate the number of left shifts required to normalize a number.
- [C166 Compiler]
  Changed the behavior of hidden string placement. Hidden strings (those declared without an associated name and memory space) are now located in the memory space requested by their associated pointer declaration. For example:

      const char huge  *phc = "const huge memory";  // String located in huge-const
      const char xhuge *pxc = "const xhuge memory"; // String located in xhuge-const
      const char   far *pfc = "const far memory";   // String located in far const
      const char  near *pnc = "near memory";        // String located in near const

### C166 Version 4.03 Release

- [C166 Compiler]
  Corrected various minor problems.

### C166 Version 4.02 Release

- [C166 Compiler]
  Corrected various minor problems.

### C166 Version 4.01 Release

- [C166 Compiler]
  Added the FIXPEC directive which ensures that functions do not begin with JMP instructions. When you use optimizer level 7 (OPTIMIZE(7)) the compiler may generates JMPs to functions (instead of CALLs). If the function begins with a JMP instruction, you may experience problems with the PEC on some chip steppings. The FIXPEC directive solves this potential problem. To use this directive in uVision2, you must enter it in Options-C166-Misc.
- [A166 Assembler]
  Enhanced the OMF166 object module format to support 32-bit and 64-bit numbers. This OMF format is supported by the L166 Linker Version 4.02 and higher. The absolute OMF format was not changed so existing debugging tools will continue to function without any problems.
- [A166 Assembler]
  Enhanced expression evaluation to use 64-Bit arithmetic. Previous versions of the A166 Assembler used 16-bit math when calculating expressions. In the following equate:

      Value EQU (8000h + 9000h) / 2

  A166 Version 3 calculates a value of 800h since the result of the addition is 1000h (a 16-bit value). A166 Version 4.12 calculates a value of 8800h since the result of the addition is 110000h (a 64-bit value).

- [A166 Assembler]
  Added new directives and operators to support 32-bit and 64-bit values.
  The following directives were added to support defining and reserving space for 32-bit and 64-bit objects:
  - DD: Define double-word value.
  - DF32: Define 32-bit floating-point value.
  - DF64: Define 64-bit floating-point value.
  - DSD: Define storage for a double-word value.

  For example:

      [name[:]] DD   init [, init] [,...] /* DWORD */
      [name[:]] DF32 init [, init] [,...] /* 32-bit IEEE float */
      [name[:]] DF64 init [, init] [,...] /* 64-bit IEEE float */
      [name[:]] DSD  expression           /* DWORD */

  The following operators were added to support 32-bit and 64-bit constant manipulations:

  - DATA32: Creates a 32-bit constant value.
  - DATA64: Creates a 64-bit constant value.
  - WORD0, WORD2, WORD4, WORD6: Extracts a word from an expression.
  - BYTE0, BYTE1, BYTE2, ... BYTE7: Extracts a byte from an expression.
- [A166 Assembler]
  Reserved more symbols and directives to support new features. If your existing assembler modules use names that are the same as those reserved by the assembler, you must change them. For example, the symbol DD is a reserved symbol. It is used to define a double word value. Therefore, your program may not use DD as a label or other name.
- [A166 Assembler]
  Enhanced the macro processor to behave like the A51 Assembler and A2561 Assembler. The following directives are now available.
  - NOMACRO disables all macro processing.
  - NOMPL disables the MPL Macro processor.
  - MPL enables the MPL Macro processor.
- [A166 Assembler]
  Added support for all instructions of the ST Microelectronics ST10 MAC unit. MAC instructions are enabled with the EXTMAC directive. For example:

      A166 MYFILE.A66 EXTMAC

### C166 Version 4.00 Release

- [C166 Compiler]
  Added support for accessing bit-fields with bit instructions when the associated structure is located in the BDATA address space. For example:

      struct test {
        int bit0: 1;
        int bit1: 1;
        int bit2: 1;
        int bit3: 1;
        int bit4: 1;
        int bit5: 1;
      };

      struct test bdata t;

      void main (void)  {
        t.bit0 = 1;
        if (t.bit1) {
          t.bit2 = t.bit0;
        }
      }

  You may use the HOLD directive to locate structures with single-bit bit-fields to the BDATA memory area. The compiler then generates bit instructions to access the bit-fields. For example:

      C166 MYPROG.C HOLD (bdata 2, near 6)

  locates all structures (smaller than 2 bytes) with bit-fields to the BDATA memory.

- [C166 Compiler]
  Added a new memory type (EBDATA) which allows you to access extended bits in the Special Function Register (SFR) area. The memory classes EBDATA and EBDATA0 are used for bits in EBDATA.

  You may use this bit-addressing mode to access SFR registers of the 166 derivatives by 1) defining all the CPU SFR registers in a C source file, 2) translating the file with the ORDER directive, 3) and locating the section containing the SFR definitions with the SECTIONS linker directive. For example:

      L166 ... SECTIONS (?EB?SFRBIT%EBDATA (0F100H), ?BD?SFRBIT%BDATA (0FF00H))

- [C166 Compiler]
  Added the PACK directive which allows you to specify whether objects in structures are aligned on byte (PACK(1)) or word (PACK()) boundaries. By default, the compiler located all structure members so that they begin on 16-bit word boundaries. The following example shows the difference between byte-alignment and word-alignment:

      #pragma pack(1)     // Select byte-alignment

           struct s1  {
             int  i1;     // i1 has offset 0
             char c1;     // c1 has offset 2
             int  i2;     // i2 has offset 3
             char c2;     // c2 has offset 5
             int  i3;     // i3 has offset 6
             char z1;     // z1 has offset 8
           };

      #pragma pack()      // Select word-alignment
           struct s2  {
             int  i1;     // i1 has offset 0
             char c1;     // c1 has offset 2
             int  i2;     // i2 has offset 4
             char c2;     // c2 has offset 6
             int  i3;     // i3 has offset 8
             char z1;     // z1 has offset 10
           };

  The PACK(1) directive may be useful when exchanging data structures with other systems where no alignment is required. This directive is compatible with the Microsoft C directive.

  Note that the C166 compiler generates considerably more code to access byte-aligned words. For this reason, the PACK(1) directive should be used only when necessary.

- [C166 Compiler]
  Added the BYTEALIGN directive. By default, the compiler assumes that pointers point to objects that start on word (16-bit) boundaries. The BYTEALIGN directive informs the compiler that struct pointers may point to byte-aligned structures. This directive is required when you use the PACK(1) directive. The following example illustrates this:

      #pragma PACK(1)       // Select byte-alignment
      #pragma BYTEALIGN     // Use pointers to byte-aligned structures

           struct s1  {
             int  i1;       // i1 has offset 0
             char c1;       // c1 has offset 2
             struct s2  {
               int  i2;     // s2.i2 has offset 3
               char c2;     // s2.c2 has offset 5
               int  i3;     // s2.i3 has offset 6
             } s2;
             char z1;       // z1 has offset 8
           } s1;

           struct s2 *s2p;

           void main (void)  {
             s2p = &s1.s2;  // &s1.s2 is a byte-aligned structure
             s2p->i2 = 0;   // s2p->i2 is a byte-aligned int
           }

- [C166 Compiler]
  Added the PREPRINTONLY directive (abbreviation PPO) which causes the compiler to create a C preprocessor output file and stop after the C preprocessor completes. This directive is similar to the PREPRINT directive except that no object file is created. PREPRINTONLY allows you to optionally specify an output filename (the default filename is basename.I). For example:

      C166 MYFILE.C PPO(MYFILE.TXT)

- [C166 Compiler]
  Added the ASMEXPAND directive (abbreviation AE) and the NOASMEXPAND directive (abbreviation NOAE).

  The ASMEXPAND directive is the default setting. It instructs the compiler to expand all symbols used in ASM-ENDASM blocks.

  The NOASMEXPAND directive prevents the the compiler from expanding symbols used in ASM-ENDASM blocks. For example:

      #pragma noasmexpand

      #define  abc  1
      #define  xx0  2
      #define  xx1  3

      #pragma asm
        abc equ 2     ; abc (which is defined above) is not expanded
        xx0 equ 10    ; xx0 (which is defined above) is not expanded
      #ifdef QQQ
        xx1 equ 20    ; xx1 (which is defined above) is not expanded
      #endif
      #pragma endasm

- [C166 Compiler]
  Added the USERSTACKDPP3 directive (abbreviation U3) which changes assumptions made by the compiler regarding access to the user stack. By default, the user stack is located in the NDATA memory class and is accessed using R0.

  Use the USERSTACKDPP3 directive to change the memory class of the user stack to IDATA or SDATA (which are accessed using DPP3). To accomplish this you must change the definition of the ?C_USERSTACK section in the STARTUP.A66 or START167.A66 file.

  To this:

      ?C_USERSTACK SECTION DATA PUBLIC 'IDATA'

  Or this:

      ?C_USERSTACK SECTION DATA PUBLIC 'SDATA'

  Additionally, you must change the address of the user stack that is loaded into R0.

  From this:

      MOV R0,#DPP2:?C_USERSTKTOP

  To this:

      MOV R0,#DPP3:?C_USERSTKTOP

- [C166 Compiler]
  Added the DYNAMICUSRSTK directive (abbreviation DU) which informs the compiler that your program modifies the user stack area. This is useful to developers who create real-time operating systems that change the user stack area. With this directive, it is possible to have a 16KB user stack for each task. Without this control, the entire user stack area must reside in the NDATA memory class which is limited to a maximum of 64 Kbytes.
- [C166 Compiler]
  Added the NOFRAME directive (abbreviation NOF) which causes the compiler to suppress the prolog and epilog in an interrupt service routine (ISR) that immediately follows the directive specification. This directive is active for only one function. It is useful for interrupt routines that never return (like CPU RESET).

  The following example illustrates the difference in generated code between a standard interrupt and one generated using the NOFRAME directive.

       1          int i1, i2, i3;
       2
       3          void intr_func1 (void)  interrupt 0x21  {
       4   1        i1 = i2 * i3;
       5   1      }
       6
       7          #pragma NOFRAME
       8          void intr_func2 (void)  interrupt 0x22  {
       9   1        i1 = i2 * i3;
      10   1      }

      ASSEMBLY LISTING OF GENERATED OBJECT CODE

           ; FUNCTION intr_func1 (BEGIN  RMASK = @0x2030)
                                                ; SOURCE LINE # 3
      0000 C6871000      SCXT    MDC,#010H
      0004 EC06          PUSH    MDH
      0006 EC07          PUSH    MDL
      0008 ECF4          PUSH    R4
      000A ECF5          PUSH    R5
                                                ; SOURCE LINE # 4
      000C F2F50000 R    MOV     R5,i3
      0010 F2F40200 R    MOV     R4,i2
      0014 0B45          MUL     R4,R5
      0016 F2F40EFE      MOV     R4,MDL
      001A F6070400 R    MOV     i1,MDL
                                                ; SOURCE LINE # 5
      001E FCF5          POP     R5
      0020 FCF4          POP     R4
      0022 FC07          POP     MDL
      0024 FC06          POP     MDH
      0026 FC87          POP     MDC
      0028 FB88          RETI
           ; FUNCTION intr_func1 (END    RMASK = @0x2030)

           ; FUNCTION intr_func2 (BEGIN  RMASK = @0x2030)
                                                ; SOURCE LINE # 8
                                                ; SOURCE LINE # 9
      002A F2F50000 R    MOV     R5,i3
      002E F2F40200 R    MOV     R4,i2
      0032 0B45          MUL     R4,R5
      0034 F2F40EFE      MOV     R4,MDL
      0038 F6070400 R    MOV     i1,MDL
                                                ; SOURCE LINE # 10
      003C FB88          RETI
           ; FUNCTION intr_func2 (END    RMASK = @0x2030)

  The interrupt function built using NOFRAME does not switch context nor save and restore registers.

- [C166 Compiler]
  Added the SAVESYS directive which instructs the compiler to save temporary results to the system stack. This is the default setting for the compiler. This directive is useful for The system stack is always in the on-chip RAM. It is faster than the user stack but the size is limited. See the SAVEUSR directive description for an example of how this directive is used.
- [C166 Compiler]
  Added the SAVEUSR directive which instructs the C Compiler to save temporary results and saved-by-callee variables to the user stack. This directive is useful when your stack will exceed the size of the on-chip system stack. Of course, accesses to the user stack are slower than accesses to the system stack. For example:

       1    extern void func (void);
       2
       3    #pragma SAVESYS   // Temporary Saves to SYSTEM STACK (default)
       4    int func1 (int i1, int i2)  {
       5 1    func ();
       6 1    return (i1 + i2);
       7 1  }
       8
       9
      10    #pragma SAVEUSR   // Temporary Saves to USER STACK
      11    int func2 (int i1, int i2)  {
      12 1    func ();
      13 1    return (i1 + i2);
      14 1  }

      ASSEMBLY LISTING OF GENERATED OBJECT CODE

           ; FUNCTION func1 (BEGIN  RMASK = @0x7FFF)
                                                ; SOURCE LINE # 4
      0000 ECFD          PUSH    R13
      0002 ECFE          PUSH    R14
      0004 F0D9          MOV     R13,R9
      ;---- Variable 'i2' assigned to Register 'R13' ----
      0006 F0E8          MOV     R14,R8
      ;---- Variable 'i1' assigned to Register 'R14' ----
                                                ; SOURCE LINE # 5
      0008 CA000000 E    CALLA   cc_UC,func
                                                ; SOURCE LINE # 6
      000C F04E          MOV     R4,R14
      000E 004D          ADD     R4,R13
                                                ; SOURCE LINE # 7
      0010 FCFE          POP     R14
      0012 FCFD          POP     R13
      0014 CB00          RET
           ; FUNCTION func1 (END    RMASK = @0x7FFF)

           ; FUNCTION func2 (BEGIN  RMASK = @0x7FFF)
                                                ; SOURCE LINE # 11
      0016 88D0          MOV     [-R0],R13
      0018 88E0          MOV     [-R0],R14
      001A F0D9          MOV     R13,R9
      ;---- Variable 'i2' assigned to Register 'R13' ----
      001C F0E8          MOV     R14,R8
      ;---- Variable 'i1' assigned to Register 'R14' ----
                                                ; SOURCE LINE # 12
      001E CA000000 E    CALLA   cc_UC,func
                                                ; SOURCE LINE # 13
      0022 F04E          MOV     R4,R14
      0024 004D          ADD     R4,R13
                                                ; SOURCE LINE # 14
      0026 98E0          MOV     R14,[R0+]
      0028 98D0          MOV     R13,[R0+]
      002A CB00          RET
           ; FUNCTION func2 (END    RMASK = @0x7FFF)

  In func1, arguments are passed on the system stack and a PUSH instruction is used to put values onto the stack. In func2, arguments are passed on the user stack (which is accessed using R0) and a MOV instruction is used to put values onto the stack.

- [C166 Compiler]
  Added optimizer level 7 (OPTIMIZE(7)) common tail merging. When this optimization level is enabled, the compiler analyzes the generated code function-by-function, locates common heads and tails, and merges them if possible. If the compiler detects common code sequences (which commonly occur in switch/case statements) it replaces one code sequence with a jump instruction to the other equivalent code sequence. While analyzing the code, the compiler also replaces instruction sequences with shorter instructions. The default optimizer level is still optimizer level 6. You must enable optimizer level 7 using the OPTIMIZE directive or from the uVision2 Project Options Dialog.
- [L166 Linker]
  Added the CINITTAB directive which allows you to locate the C166 initialization sections ?C_CLRMEMSEC and ?C_INITTAB to a specific address range. For example:

      L166 myfile.obj CINITTAB (0x10000 - 0x18000)

  locates ?C_CLRMEMSEC and ?C_INITTAB to the address range 0x10000-0x18000. L166 issues a warning if this is not possible.

- [L166 Linker]
  Added the DISABLEWARNING (abbreviation DW) directive which allows you to selectively disable linker warnings. For example:

      L166 myfile.obj DISABLEWARNING (20, 22)

  disables warnings 20 and 22.

- [L166 Linker]
  Added Warning 22: CLASS RANGE NOT GIVEN IN INVOCATION LINE. When you use a memory class without defining its address range, the L166 Linker now outputs a warning message. Note that this warning is not generated for the following classes: IDATA, IDATA0, BIT, BIT0, BDATA, and BDATA0.

## Example Programs

Example programs included in the \C166\EXAMPLES folder demonstrate how to use the uVision Project Manager and Debugger (see the uVision 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 uVision IDE is the Device Database™ which contains information about more than 3500 supported microcontrollers. When you create a new uVision project and select the target chip from the database, uVision 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.

- Adding Custom Parts to the Device Database
- Creating Custom Databases

## Peripheral Simulation

The uVision 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 uVision 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 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 2500 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.
- Contact Technical Support
  Describes how to contact the Technical Support.

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. 1501 10th Street, Suite 110 Plano, TX 75074 USA 800-348-8051 - Sales 972-312-1107 - Support 972-312-1159 - Fax sales.us@keil.com - Sales 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

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