Technical Support
Support Resources
Product Information
|
Release Notes for C166 C16x/ST10/XC16x Development Tool Kits
Download this Update
This file contains release notes and last minute changes.
Information in this file, the accompanying manuals, and software is
Copyright © 2016 ARM Ltd and ARM Germany GmbH. All rights reserved.
Contents- What's New in C166
- Release Summary
- Example Programs
- Device Database
- Peripheral Simulation
- Technical Support
- Contact Details
What's New in C166The following sections list the changes instituted in each release of the C166 toolset.
C166 Version 7.56 Release
Release Date: 5 October 2016
- [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
Release Date: 24 April 2015
- [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
Release Date: 5 August 2014
- [C166 Compiler]
- 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; // <- Incorect warning generation C192: 'constant': value truncated.
while(1);
}
- Corrected: incorect 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.
- [OH66 Object\Hex converter]
- Enhanced: OH166 supports now an invocation line up to 255 characters.
- [µVision Debugger\Simulator]
- Corrected: the watch window displayed erroneously SFRs as 32 bit values. SFR values displayed correctly as 16 bit values.
- Corrected: under some circumstances SIGNAL functions could change the content of the disassembly window. This problem was introduced with C166 version 753.
- Corrected: under some circumstances after run a LOAD command, previously defined and used debug functions become undefined identifiers.
- 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
Release Date: 4 July 2013
- [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.
- [µVision4]
- This C166 release comes with µVision V4.72.9.0.
- Refer to Revision History for a complete list.
C166 Version 7.52 Release
Release Date: 15 April 2013
- [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.
- [µVision4]
- This C166 release comes with µVision V4.70.80.0.
- Refer to Revision History for a complete list.
C166 Version 7.50a Release
Release Date: 15 June 2012
-
[µVision4]
- This C166 release comes with µVision V4.53.0.6.
C166 Version 7.50 Release
Release Date: 12 June 2012
-
[µVision4]
- 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
Release Date: 15 February 2012
- [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.
- [µVision4 Debugger]
- Corrected: an error which occurs when HEX files use UNIX newline encoding (LF only instead of CR/LF).
- [µVision4]
- This C166 release comes with µVision V4.24.00.
C166 Version 7.05 Release
Release Date: 8 August 2011
-
[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.
-
[µVision4]
This C166 release comes with µVision V4.22.00.
C166 Version 7.04 Release
Release Date: 14 February 2011
- [New Device Support]
- 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]
- [µVision]
This C166 release comes with µVision V4.14.16.
C166 Version 7.00 Release
Release Date: 26 October 2009
C166 Version 6.18 Release
Release Date: 26 Mar 2009
C166 Version 6.17 Release
Release Date: 4 Dec 2008
- [C166 Compiler]
Corrected problem with common-sub expression elimination on bit-field variables when OPTIMIZE(8) is used.
- [C166 Compiler]
Enhancement in pre-processor limits.
- Maximum macro nesting increased from 100 to 150
- Maximum number of macro-arguments increased from 50 to 100
- Maximum #if - #endif nesting increased from 20 to 128
- [Device Support]
Added header files, start-up code, enhanced debug and Flash download support for new Infineon devices
- [ULINK Driver + Infineon DAS Driver]
Corrected problem with non responding
Infineon XC2000 and XE166 series devices with new ULINK reset sequence.
C166 Version 6.14 Release
Release Date: 26 Aug 2008
- [C166 Compiler]
Corrected instruction reordering with the REORDER directive was incorrect when used in combination with ATOMIC/ENDATOMIC sequences.
C166 Version 6.11 Release
Release Date: 31 Jan 2008
- [C166 Run-Time Library]
Corrected a free_box failure when the pool size is just for one block.
- [C166 Compiler]
Corrected an issue where 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 allowing variable value display during program execution.
C166 Version 6.10 Release
Release Date: 15 Jan 2008
- [Device Support]
Corrected a problem where BMOVN incorrectly set PSW status flags N and Z.
- [Device Support]
Corrected register Header files for Infineon XC22xx devices.
- [Device Support]
Added support for XC23xx, XC27xx, and XE16x devices including debug and flash support.
- [C166 Compiler]
Corrected: _lror_ (value, 1) incorrectly shifts bit 0 to bit 63.
- [Device Support]
Corrected: strtod did potentially fail with memory model COMPACT, HCOMPACT, LARGE, HLARGE, and XLARGE.
- [Device Support]
Corrected: a problem with EXT sequence merging and REORDER directive on XC16x/XC2xxx/XE16x devices.
- [Device Support]
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
Release Date: 19 Nov 2007
- [OCDS Debugging Support]
Added ULINK firmware for C165U and C165UTAH.
- [µVision3 IDE/Debugger/Simulator]
Corrected register header files for Infineon XC22xx devices.
- [µVision3 IDE/Debugger/Simulator]
Added support for Infineon XC23xx devices. - [XC16x ULINK Driver]
Corrected several problems with the ULINK Driver including:
- 'Stop on Reset' was broken in V6.08.
- The Flash download option of 'Reset and Run' was broken in V6.08.
- Flash programming angorithm problems with Infineon XC22xx devices.
- ULINK2 did not correctly connect to Infineon XC164 devices due to a startup effect on the TRST line.
- [C166 Compiler]
Corrected a problem with the log library routine for double-precision floating-point numbers.
In some cases this function might return incorrect values. This problem was introduced in C166 V6.08.
- [C166 Compiler]
Corrected a problem with OPTIMIZE(8) that may cause incorrect register variable assignments.
This problem can be identified by empty strings in *.LST files.
- [C166 Compiler]
Corrected a problem with returning a type struct from a function.
When the structure is returned via multiple call levels, the compiler may create an incorrect stack balance.
- [C166 Compiler]
Enhanced the NOFRAME directive so that it now supports MAC register saves in interrupts.
- [Monitor-166]
Corrected potential communication problems with low-cost USB-COM adapters.
C166 Version 6.08 Release
Release Date: 27 Mar 2007
- [µVision3 IDE/Debugger/Simulator]
Corrected a problem that could cause the IDE to crash when the
mouse was right-clicked in the project window when no item was selected. - [µVision3 IDE/Debugger/Simulator]
Added ULINK2 and new Flash algorithm support for XC2000 devices.
- [µVision3 IDE/Debugger/Simulator]
Added the \KEIL\C166\BOARDS\INFINEON XC2278\ folder which contains example projects for the Infineon EASY KIT XC2xxx.
- [C166 Compiler]
Corrected a problem where division was performed using the DIVLU instruction instead of the intended library routin. This caused incorrect values in the case of value overflows. For example:
unsigned int ui1, ui2, ui3, ui4;
ui4 = (unsigned int) (((ui1+15)
* ((499000ul - usTemp1) / (unsigned long)ui2)
- 499000ul) - ui3;
- [C166 Compiler]
Corrected a problem with the strtod library routine where strtod returned incorrect values for the pointer to subsequent characters.
- [C166 Compiler]
Corrected a problem with the log routine when used with FLOAT64 (double-precision arithmetic).
In some cases with negative values this routine created an unbalanced user stack.
- [Infineon DAS Driver]
Added support for DAS Server Version 2.5.
- [Infineon DAS Driver]
Corrected a problem that occasionally reported DAS error messages when starting the µVision debugger.
- [Infineon DAS Driver]
Corrected a problem that caused the Run LED to fail with JTAG over USB Chip.
C166 Version 6.06 Release
Release Date: 15 Jan 2007
- [C166 Compiler]
Corrected the fstrpos, fstrrchr, and fstrrpos library routines so that they include the '\0' character in the search.
- [C166 Compiler]
Enhanced the code generator so that struct copies (on XC16x devices) use CoMOV/JMPA- instructions when the MAC directive is specified.
- [C166 Compiler]
Enhanced the code generator so that a single DIVLU instruction is g
enerated (instead of a library function) for (unsigned int)(ulong / uint) operations.
- [C166 Compiler]
Corrected a problem with register overwrites on BYTEALIGN variable access.
- [C166 Compiler]
Corrected a problem with OPTIMIZE(8) and inline assembly code.
- [A166 Assembler]
Corrected a code generation problem for the Infineon XC16x when the MODV2 is used.
The assembler did not output the REGUSE information which is required for global register optimization.
- [µVision3 IDE/Debugger/Simulator]
Added simulation support for fast external interrupts on Infineon XC164CM.
- [µVision3 IDE/Debugger/Simulator]
Corrected a problem with I²C transmit simulation when the transmit buffer size is larger than 1.
- [µVision3 IDE/Debugger/Simulator]
Added support for ULINK2.
- [L166 Linker/Locator]
Corrected an ELF file generation problem for applications that have code with different storage and execution address (RAM functions).
C166 Version 6.04 Release
Release Date: 31 Jan 2006
- [µVision3 IDE/Debugger/Simulator]
Added peripheral simulation support and target debugging dialogs for the following devices:
- [C166 Compiler]
Corrected several problems with the new Optimization Level 8.
- [C166 Compiler]
Corrected a register assignment problem with BYTEALIGN variable access.
- [C166 Compiler]
Modified several warning messages that were too aggressive.
- [C166 Compiler]
Corrected a problem in XLARGE model with printf string output. Problems occurred when the precision was stated and the string crossed a 64KB boundary.
- [XC16x ULINK Driver]
Corrected occasional 'Flash erase error' problems with XC16x devices.
- [Infineon DAS Driver]
Corrected occasional 'Flash erase error' problems with XC16x devices.
- [Infineon DAS Driver]
Corrected a problem that caused the RUN LED on the USB Wiggler to never turn on.
- [µVision3 IDE/Debugger/Simulator]
Corrected a problem with the AGSI Debug Interface that caused memory range watch calls to fail on large memory ranges.
- [µVision3 IDE/Debugger/Simulator]
Enhanced the EasyWEB example for Keil MCBXC167 boards.
The example did not work with on-chip flash due to invalid external bus configuration. Added a Target for Monitor-166 debugging.
C166 Version 6.03 Release
- [C166 Compiler]
Corrected several warnings that were too aggressive and that were not restricted to situations where they apply.
- [C166 Compiler]
Corrected a problem when using OPTIMIZE(8) with rotated loops and shift operations.
- [C166 Compiler]
Corrected a problem with signed long division that generated a wrong sign when the divisor was a 16-bit number.
- [C166 Compiler]
Modified Warning C192 to be less aggressive in some situations to reduce the impact on legacy code.
- [µVision3 IDE/Debugger/Simulator]
Added a new driver for the Infineon DAS (Debug Access Server).
This is described in the OCDS Debugging User's Guide.
C166 Version 6.02 Release
- [C166 Compiler]
Enhanced the following warnings to include more problematic situations:
- Warning C98: Pointer to Different Objects
- Warning C192: Value Truncated
- Warning C141: Incorrect Initialization
- [C166 Compiler]
Corrected a potential register overlap problem with struct copy when pointers are used as the source or target address.
- [C166 Compiler]
Corrected a problem that sometimes caused registers to get overwritten when using OPTIMIZE(8) in combination with STATIC memory for
register automatics. - [µVision3 IDE/Debugger/Simulator]
Added a new symbol window with drag and drop capabilities.
C166 Version 6.00a Release- [OCDS Debugging Support]
Added detection of the C164CM device ID in the UL2OCDS driver.
- [OCDS Debugging Support]
Added a flash programming algorithm for C16x-8F devices.
C166 Version 6.00 Release- [µVision3 IDE/Debugger/Simulator]
Added simulation for PEC Channel link with XC16x devices.
- [C166 Compiler]
Improved the efficiency of Common Sub-Expression Elimination.
- [C166 Compiler]
Improved access for long variable types and 32-bit pointers.
- [C166 Compiler]
Improved Register Variable Lifetime Analysis so that more optimal registers are used for automatic variables.
This optimization improves execution speed and code density. On some functions, this optimization improves the code density and execution speed up to 20%.
- [C166 Compiler]
Added SAVEMAC and NOSAVEMAC directives to enable/disable saving and restoring MAC registers in interrupt service routines.
- [C166 Compiler]
Corrected a problem with the free function. When all memory blocks were allocated the free function, in some instances, generated invalid reference lists. - [C166 Compiler]
Corrected a problem with the printf, sprintf, scanf, and sscanf functions when the format string crossed a 64KB memory boundary in HLARGE model. - [C166 Compiler]
Corrected a problem in MAC multiplication on XC16x devices that caused invalid results when CoSHL was used. - [L166 Linker/Locator]
Added ELF output support. A new linker directive ELF (elf_output_file) allows you to generate an ELF/DWARF compatible output file. This file may be used by third-party tools to analyze memory contents or symbol information. The ELF/DWARF file may be loaded by the µVision Debugger. - [XC16x ULINK Driver]
Added a configuration register (OPSEN) to START_V2.A66 file to allow stopping speci
f
ic peripherals during debugging. Refer to C166: DO PERIPHERALS STOP WITH ULINK DEBUGGING for more information.
- [XC16x ULINK Driver]
Changed the default setting of the Branch Prediction Unit (CPUCON1.1) in START_V2.A66.
The branch prediction unit may incorrectly jump to address 0x0020 when the Step Into command reached a breakpoint and the previous instruction was a JMP.
- [XC16x ULINK Driver]
Corrected a problem with Flash Programming that did not program on the boundary between on-chip and off-chip Flash ROM.
- [XC16x ULINK Driver]
Corrected a problem with char or unsigned char automatic variables that might have shown incorrect values in the highest nibble.
- [Monitor-166]
Added a new monitor configuration for the Keil MCBXC167 Board.
C166 Version 5.05 Release
- [XC16x ULINK Driver]
Added a new, dedicated ULINK driver that has several enhancements over the previous driver:
- Potential hang-ups are avoided when the user application contains active interrupt functions.
- Breakpoints are no 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 may be set while user code is running.
- Breakpoints may be set at the beginning of Class B traps and in the highest interrupt level.
In µVision, you may select this driver under Project - Options - Debug - ULINK Driver for XC16x. Detailed information is available in the OCDS Debugger User's Guide. - [XC164CM Starter Kit Examples]
Added a sample project for the new Infineon XC164CM Starter Kit in the \KEIL\C166\BOARDS\INFINEON XC164CM\BLINKY\ folder. - [C166
C
ompiler]
Corrected a problem in macro expansions that may have truncated identifiers to 53 characters.
- [C166 Compiler]
Corrected a problem in macros that contain the stringize or number-sign operator ('#') in __asm blocks. On occasion, macros meeting these conditions may cause a Misused '#' Error.
C166 Version 5.04a Release- [µVision3 IDE/Debugger/Simulator]
µVision3 was accidentally excluded from the 5.04 release. It has been re-included in Version 5.04a. - [START_V2.A66 Startup Code]
Added a new configuration setting under CPU Configuration - Definitions for Internal Memory Block Control Register IBMCTR - WSFLASH: Wait States for the Flash Memory. This option allows you to bypass the FCPUR X.162832 Flash Read Performance problem described in C166: ACCESS PROBLEM WITH XC16X ON-CHIP FLASH.
C166 Version 5.04 Release- [µVision3 IDE/Debugger/Simulator]
Added module display to the Project - Functions Window. - [µVision3 IDE/Debugger/Simulator]
Added complete simulation for the XC16x CAPCOM6 Unit and ASC1 Interface. - [µVision3 IDE/Debugger/Simulator]
Added simulation support for the Infineon XC164CM. - [L166 Linker/Locator]
Added program size summary. - [START_V2.A66 Startup Code]
Synchronized with current Infineon Data Sheets and the current Infineon DAvE Version. - [C166 Compiler]
Enhanced bit-field comparisons to use bit instructions. - [C166 Compiler]
Corrected a problem with xhuge variable initialization when initialized data exceeded 64KB. - <
s
pan class=ptl>[C166 Compiler]
Corrected a problem address xhuge const objects.
- [C166 Compiler]
Corrected a problem with local automatic bits and function inlining.
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.
- [µVision3 - Help System]
The on-line help system in µVision has been improved as follows:
- Configuration dialogs have Help buttons that link to the user's guide.
- The F1 context help is improved.
- [µVision3 - 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 incorrect code when EXT sequences were involved.
In some circumstances, incorrect code may have been generated for inline functions. These problems are corrected.
- [L166 - Source Browser Output File]
Beginning in C166 Version 5.00, the L166 Linker generated an output file (extension *.SBR)
which is not deleted if linker errors are encountered. µVision3 was not able to read this file. This problem is corrected.
<
li>[µVision3 - Corrections and Enhancements] Several minor corrections were made to µVision3. Setup problems
for Kernel-Aware Debugging with RTX166 and Advanced RTX166 have been corrected. Two new toolbar buttons were added: Back moves the cursor back to
the location before a find or go to line command, Forward 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. - [EC++ Compiler]
Corrected a problem with
type mismatch warnings at the L166 Linker level when linking C and EC++ files with indentical data types.
- [Traffic Example Project]
Corrected a potential hang-up problem in the interrupt driven serial interface routine.
C166 Version 5.00 Release
- [µVision3 - Integrated New IDE]
µVision3 is now a part of all C166 kits.
Projects created with µVision3 and µVision are fully interchangable. You may use whichever IDE you like. µVision3 adds
many new features such as Source Outlining, Function Navigation, Template Editor, Incremental Search, Configuration Wizard, and Logic Analyzer.
µVision3 adds support for CVS Software Version Control System
which is an Open Source version control system.
Refer to the µVision3 Quick Start Brochure
for more information.
- [µVision3 - Added XC16x Device Simulation and Target Dialogs]
Device simulation and target peripheral
dialogs (with the exception of CAPCOM6) have been added for the XC161, XC164, and XC167 devices. CAPCOM6 is plan
n
ed for release in March 2004. - [EC++ Compiler]
The EC++ Compiler is now available in the release version.
- [C166 - Added XLARGE Memory Model]
Added the XLARGE memory model which stores variables in xhuge memory
and functions in far memory. This new memory model allows virtually unlimited memory access. Note that size_t for most library
functions is unsigned int which limits the size of a single object to 64KB. However the object itself may reside anywhere in the xhuge memory space.
- [C166 Library - Added Block-Based Memory Allocation Routines]
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 may be accessed with huge or far pointers. They provide efficient addressing for xhuge memory buffers without the memory limitations imposed by huge and far memory objects. - [C166 Library - Added Thread-safe, Fixed-Block Memory Allocation Routines]
Added library routines to support memory pools with fixed-size memory blocks. In contrast to the standard memory allocation routines, these routines are reentrant and thread-safe. They may be used without restriction in real-time operating systems like the new Advanced RTX166. You may call them from interrupt routines and from the main function. The following routines are available:- 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.
Execution times for these routines are deterministic and are independent of memory pool sizes. - [MAC Programming: Example
C
ode for Signal Processing]
Application Note 178 shows how to
implement and debug DSP algorithms designed using the MAC instructions of the Infineon XC16x devices. The example code uses in-line assembler and function
inlining to obtain maximum performance. Program debugging is performed with the µVision Debugger/Simulator and the new Logic Analyzer function.
The DSP Library from Infineon (using in-line assembly for MAC programming) is now available.
- [MCBXC167 Examples]
Examples for the MCBXC167 Board
are available in the \KEIL\C166\BOARDS\KEIL MCB-XC167 folder. They may be used to demonstrate OCDS
debugging with ULINK, PLL configuration, and TwinCAN communication.
An Easy Web Server that uses the 10/100bps Ethernet controller on this board is also available.
These examples may be used with user hardware that is based on XC16x devices.
- [C166 Compiler - Improved Function In-Lining]
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:
- Function in-lining is performed on an expression statement boundary where the right side operator is a function call. For example:
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
- Expressions with for statements are never in-lined. For example:
for (z = iFunc (z1, z2) ; z != 0 ; ) { // call to iFunc never in-lined
...
}
- 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.
- [µVision2 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 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. - [µVision2 IDE]
Added Flash menu to µVision2. 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- [µVision2]
Added DaVE support for the new XC161/XC164 devices. - [µVision2]
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. - [µVision2 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
p
roblem description. To use this directive in µVision2, 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 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 µVision2, 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 STMicroelectronics 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. B
y 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 µVision2 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.
Release Summary
- C166 Version 7.55 Release
- C166 Version 7.54 Release
- C166 Version 7.53 Release
- C166 Version 7.52 Release
- C166 Version 7.50a Release
- C166 Version 7.50 Release
- C166 Version 7.07 Release
- C166 Version 7.05 Release
- C166 Version 7.04 Release
- C166 Version 7.00 Release
- C166 Version 6.17 Release
- C166 Version 6.14 Release
- C166 Version 6.11 Release
- C166 Version 6.10 Release
- C166 Version 6.09 Release
- C166 Version 6.08 Release
- C166 Version 6.06 Release
- C166 Version 6.04 Release
Example ProgramsExample programs included in the \C166\EXAMPLES
folder demonstrate how to use the µVision4 Project Manager and Debugger (see the µVision4 Quick Start Guide for details).
Please refer to these if you are new to the tools and want to get started quickly.
Device Database
A unique feature of the Keil µVision4 IDE is the Device Database
which contains information about more than 3500 supported microcontrollers. When you create a new µVision4 project
and select the target chip from the database, µVision4 sets all assembler, compiler, linker, and debugger options for you.
The only option you must configure is the memory map.
As new devices become available, they are added to the database along with data sheets and header files.
For information about adding your own chips to the database or about creating
your own personal databases refer to the following knowledgebase articles.
Peripheral Simulation
The µVision4 Debugger provides complete simulation for the
CPU and on-chip peripherals of most embedded devices. To discover which peripherals of a device are supported,
in µVision4 select the Simulated Peripherals item from the Help menu. You may also use
the web-based Device Database. We are constantly adding new devices and simulation support
for on-chip peripherals so be sure to check the Device Database often.
Technical Support
At Keil Software, we are dedicated to providing you with the best development tools and technical support.
That's why we offer numerous ways you can get the technical support you need to complete your embedded projects.
- Technical Support Knowledgebase
More than 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.
4965 Preston Blvd, Suite 650
Plano, TX 75093 USA
800-348-8051 - Sales
972-312-1107 - Support
972-312-1159 - Fax
sales.us@keil.com - Sales E-Mail
|
|
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 © 2016 ARM Ltd and ARM Germany GmbH.
All rights reserved.
Visit our web site at www.keil.com.
|