- Important information
- New features
- Known problems
- Program corrections
- User guide corrections
- Miscellaneous
- Release history
Important information
-
Please note that libraries built with previous versions of IAR Embedded Workbench for 8051 need to be rebuilt to link correctly with an application built with version 8.30 of the compiler.
-
If you are using multi-file compilation together with the banked memory model, you must make sure that the size of each multi-file compiled module does not exceed the size of the code bank on the device you are using.
-
Some of the names defined for interrupt vectors in the I/O include files (8051\inc\io<device name>.h) have been changed. This might require a rebuild of the source code.
New features
- None
Known Problems
EW21366
If the banked code model and the option --place_constants=code are used, constants must be placed in the root bank and NOT in a code bank. This is regardless of whether the device you are working with supports the command line option --has_cobank or not.
Program Corrections
EW25851
In rare cases, the compiler can optimize away a clear carry instruction after a switch on short or long integers while using optimization level medium or higher.
User guide corrections
- Page 277, in the description of --place_constants=data_rom the second sentence should state "In the Large data model, the objects are placed in xdata memory...."
- Page 298 and 299 in the section "Extended keywords->General syntax rules for extended keywords" the description of the placement of type attributes is not complete. Sentences stating "The syntax for declaring [data objects|pointers] using type attributes follows the same syntax as the type qualifiers const and volatile." lacks the following comment to be correct: "An exception to this is when the type attribute comes before the type specifier, in which case the attribute applies to the variable, function or typedef being declared."
Miscellaneous
- Nothing
Release history
9.10.3, Feb 2015
Program corrections
EW25202
The code bank number is not saved by setjmp when using plain core 8051.
9.10.2, Feb 2015
Program corrections
EW25137
Optimizing conditional branches can in some circumstances cause an internal error.EW25146
Taking the address of a variable on the XDATA stack can sometimes generate an internal error when using shadowed data pointer registers.
9.10.1, Dec 2014
Program corrections
EW24452
The volatile operands of certain expressions are referenced in an incorrect order.
8.30.4, Jul 2014
Program corrections
EW24838
In C++ a function that returns a bool and is declared __monitor will return an incorrect value.EW24438
Some labels in the assembler support routines causes a misra error to occur at link stage.
8.30.1, Dec 2013
Program corrections
EW23770
The compiler warns about low_level_init when using the banked code model.EW23812
The bool type used in the intrinsic function __tbac(bool) is not available when using the C89 dialect.EW24083
Far function calls can incorrectly generate banked function calls instead.
8.20.2, Feb 2012
New features
- None
Program corrections
EW23759
A bug fix caused the compiler to generate more code when moving 8-bit data from __data to __data memory and from __idata to __data memory.
8.20.1, Oct 2012
New features
-
The behaviour of the __monitor function keyword has been corrected to only restore the global interrupt enable bit at exit.
Program corrections
EW23540
Using a static anonymous union placed at an absolute address caused an internal error in the compiler.EW23537
A long 16 bits shift with bit mask and following pointer update could on high optimization cause an Internal Error. This has been corrected.EW23480
Inline assembler statements were always considered equal when optimizing.EW23406
__set_interrupt_state now only restores the enable global interrupts bit.EW23296
A loop that initialized an array larger than 255 members with a constant value could fail to initialize the members above 255.
8.11.4, May 2012
New features
- None
Program corrections
EW23188
Fixed a rare problem with sparse byte switches and 24-bit dptr.
8.11.3, April 2012
New features
- None
Program corrections
EW22878
A problem where an anonymous union could generate an error if it was also declared extern in the same module has been corrected.EW23071
The compiler no longer generates object files with corrupt symbol name information for certain constructions involving nested templates.
8.11.1, Feb 2012
New features
- None
Program corrections
EW22648, EW22648, EW22742
Typos and omissions in the following device header files has been corrected:
ioC8051F540.h, iop89LV51Rx2.h, ioHVC2xyzA.h and iop89LV51Rx2.h
8.10.4, Dec 2011
New features
- None
Program corrections
EW22876
16-bit equal operations could fail if the low byte had value zero.
8.10.3, Sep 2011
New features
- None
Program corrections
EW22647
The inclusion of PDATA_Z in ?RESET_PDATA_BANK was erroneously root'ed. It has now been given the attribute NOROOT. (The problem you might have seen as a consequence of this was the linker error: "Error[e16]: Segment PDATA_Z (size: 0 align: 0) is too long for segment definition. At least 0 more bytes needed.")EW22656
Debug info could fail for interrupt functions in xdata or pdata reentrant mode causing wrong addresses shown for local variables in the interrupt function.EW22697
Subtraction of two short variables could generate faulty code. This has been corrected.EW22699
Comparing a short variable in idata memory against zero could fail to check the high byte.
8.10.1, May 2011
New features
-
C99 compliance
The IAR C/C++ Compiler for 8051 now supports the ISO/IEC 9899:1999 standard.Refer to the Embedded Workbench Migration Guide (v8) for more information on how this affects your application. -
Improved runtime library support for constants placed in code memory
The CLIB runtime library has been extended with functions that accept constants placed in code memory as parameters. Please refer to the Compiler Reference Guide for more information on how to use this in your application.
Program corrections
EW20971
A range error could occur at link time if a large array was accessed with an immediate index that was larger than 0x7FFF. This has been corrected.EW21354
In some circumstances, the compiler could generate an internal error when the __idata_overlay keyword was used on a function. This has been corrected.EW21913
A signed division of an expression with a negative divider no longer gets optimized into using an unsigned division.EW21981, EW21990
The compiler did not correctly preserve the accumulator for certain 8-bit comparison operations. This has been corrected.EW21996
An internal error was issued in the compiler by expressions such as 'const volatile __code int a;'. This has been corrected.EW22111
On the highest optimization level, the compiler could sometimes neglect to save and restore the content of the accumulator when the function inlining and the common subexpression elimination optimizations were used to optimize switch cases for bitfields. This has been corrected.EW22158
Bitwise OR of a value to an output port register would lead to the compiler generating a superfluous MOV instruction. This has been corrected.EW22280
Casting a __pdata address to a short generated faulty code. This has been corrected.EW22284
Code could be displayed as data in the Disassembly window if it was immediately preceded in memory by a data object. This has been corrected.EW21115, EW21180, EW21367, EW22039, EW22132, EW22253
The documentation has been updated in this release, correcting several errors from the previous edition.The library functions that update the XDATA stack pointer (XSP) and the augmented extended stack pointer (ESP) have been modified to ensure that stack pointer update operations always are carried out atomically.
V7.60.1, June 2010
Program corrections
EW20949
The symbols _heap_of_memory and _top_of_heap are no longer implemented as variables but rather as macros that automatically find the beginning and end of the XDATA_HEAP segment.EW20958
Realloc in Clib could fail if the pointer plus its size caused the pointer to wrap around. This has been corrected.EW20976
The compiler now uses the command line option --dlib_config instead of -D_DLIB_CONFIG_FILE=FILE.EW21103
Using a boolean type as prameter to a function would fail if the banked code model together with a ?CBANK_MASK other than 0xFF was used.EW21104
In case banked functions were explicitly placed in a user defined segment (e.g using the #pragma location-directive) the compiler could at times generate code which triggered a range check error from the linker.EW21138
Combining the options --code_model=far with --data_model=large and --place_constants=code made it impossible to build the CLIB library, this has been corrected.EW21476
Initialization of global C++ objects in the banked code model has been corrected.EW21574
The saving and restoration of DPTR1 in the function prologue and epilogue was incorrect if more than one DPTR, combined with a function declared with the __idata_overlay calling convention, was used. This has been corrected.EW21629
The upper byte of the PDATA stack pointer was hardwired to the same address as the P2 register. This has been corrected.
V7.51A, March 2009
-
EW20344
The _EXTENDED_STACK_END symbol was incorrectly defined. This has been corrected. -
EW20509
The address of the FLSTAT register was wrong in the device io file for the Silabs C8051F127 device. This has been corrected. -
EW20869
The address of the PLL0CN register was wrong in the device io file for the Silabs C8051F120 device. This has been corrected. -
EW20965
Testing whether an unsigned character value was greater than or equal to 0xFF would lead to an erroneus error message. This has been fixed. -
EW20870
Passing a variable placed with the keyword __data as a parameter when using calling convention pdata_reentrant and more than one dptr could make the compiler stop as in a uncontrolled termination. -
EW20747, EW20748
When using multiple file compilation (--mfc), defining a variable with an absolute location in more than one translation unit was erroneously signalled as an error.
V7.50C, September 2008
Program corrections
-
EW20134
Support has been added to handle the Silicon Laboratories C8051F12x-F13x devices COBANK-selection bits (part of the PSBANK register on address 0xB1) correctly within the compiler if one uses the banked code model. Please specify the command line option "--has_cobank" if you are using one of these devices. -
EW20187
In C++ mode, the compiler could sometimes erroneously generate a copy assignment operator for memories that were too small for a particular class/struct/union, resulting in spurious 'type too large' errors. -
EW20286
A shift combined with a bitwise OR of a SFR one bit bitfield could generate wrong code in specific cases. -
EW20457
Empty while loops will no longer cause an internal error.
V7.50B, July 2008
Program corrections
-
EW20274, EW20277, EW20293, EW20299
The compiler would fail when attempting to generate code for bitfields wider than 1 bit.
V7.50A, June 2008
New features
- New options added to the compiler:
-
--mfc
Use this option to compile several source files in one compilation. The advantage of multi-file compilation is that it gives the interprocedural optimizations a larger set of functions to work on.
Syntax:
icc8051 -mfc file1 {file2 file3 ...}
The order in which the source files are given on the command line may affect the code size.
--discard_unused_publics
Use this option together with the --mfc option if the compilation unit is the whole application apart from the library. This can improve the optimization further because the compiler will assume that there are no references to any symbol not included in the current batch of files being compiled (ie. that the compilation unit is the whole application apart from the library).
-
Program corrections
-
EW20035
The default memory attribute of an interrupt function when the banked memory model is used is now __near_func. -
EW19424
It is now possible to declare volatile constants with the __code attribute set. -
EW18278, EW19909
Placing a C++ variable that needed dynamic initialization in a non-writable memory caused an internal error. This is now treated as a regular error. -
EW18243, EW19911
Instantiating a template function or a template class on a member of an anonymous union caused an internal error in the compiler. -
EW19924, EW19979
In C, a bool cast at the top level of a Boolean controlling expression could result in an internal error in the compiler.
V7.40A, February 2008
New features-
The storing and restoration of the original state of the Interrupt Enable register (IE) during an update of the XDATA or Extended Stack Pointer is now interrupt safe.
-
EW15883
Added peephole optimization to improve code generation for bit manipulations in the SFR area. -
EW16816, EW18918
Converting a legal constant value to a pointer could earlier incorrectly generate the warning: Warning[Pe1053]: conversion from integer to smaller pointer. -
EW18065
Attempts to create pointers to the SFR area now generates a correct error message.
-
EW18258
The compiler now generates a proper error message when the parameter passed to __tbac is not declared __bit. In previous versions of the compiler an internal error was generated. -
EW18277
A struct declared in SFR memory cannot be used for copying because it is not possible to have a pointer to the SFR area. A more descriptive error message has been added for this situation. -
EW18821
Located variables can now be defined in other modules than the ones where they are used. -
EW18911
When the result of a multiplication was used as adress for @ and the result overflowed to a non-negative (signed) integer constant an Internal Error was generated. This has been replaced with a more descriptive error message. -
EW18914, EW18915, EW19041, EW19045, EW19618
Calling an __idata_reentrant function from an __xdata_reentrant function could sometimes generate an Internal Error. The same Internal Error would also be triggered when a struct of size 256 to 511 was passed as a parameter to an __xdata function.
V7.30B, September 2007
-
New design of banked code model
The banked code model was redesigned in this release. -
EW19423
Declaring a pdata reentrant interrupt function would generate an internal error.
V7.30A, August 2007
-
EW16031, EW16043
The use of a __bit bool variable in a switch statement generated an internal error. -
EW17380
Including an I/O definition header and referencing more than one SFR from C++ code resulted in an incorrect warning when linking. -
EW17385
Multiple-line, inline assembler used to generate an internal error from the compiler. -
EW17388
Under certain specific circumstances the loop unrolling optimization would cause an internal error -
EW17389
If a label ending with ':' was used inside an inline assembler function an internal error was given. -
EW17531
An empty conditional loop is no longer incorrectly removed as dead code. -
EW17573
An internal error occured when multiplying signed values between 0x4000 and 0x7FFF by two. -
EW18359
Conditional expressions using the ? operator would generate illegal code if the contitions involved manipulation of SFR registers. -
EW19257
A problem that occured when attempting to allocate more memory than 0x1F bytes on the XDATA heap when using banked code has been resolved.
V7.20H, November 2006
-
EW18238
The compiler failed to properly preserve the carry flag for functions that return a bool value and have more than three bytes of auto area allocated. This resulted in the return value being corrupted. -
EW18018
The code that generated text for a constant only worked for 8-bit constants. This only affects CALL instructions which uses a special output mode. -
EW18406
The code generator would misstakenly try to generate MOV instructions for all accesses to located variables where the address was less than 256 and the memory attribute was not __pdata or __generic. This was especially bad for __xdata variables which should have used MOVX. This affected all located __xdata, __ixdata, and __xdata_rom variables. -
EW18443
The code generator did not clear the accumulator before accessing the second byte of a 16-bit pointer located in __code, __far_code or __huge_code memory when doing pointer arithmetics. Only expressions of the kind "p + i" where p is a 16-bit pointer stored in the code memory and i is any integer expression are affected (independent if the pointer expression is used as an lvalue or an rvalue). -
EW17854
The assemble source created by icc8051 compiler no longer generates "*" comments. -
EW17770
The optimizer could sometimes mistakenly combine two if-else statments into one common set. -
EW14809
An error in the instruction level analysis phase could cause the optimizer to erronously remove a load instruction. A support routine used the wrong target address (off by one) when tracking memory accesses in conjunction to pushing values onto the stack. -
EW18050
A MISRA error in sysmac.h has been fixed.
V7.20D-v7.20G
These versions were never publically released.
V7.20C, January 2006
-
EW17693, EW17694
Accesses to volatile declared variables could under certain circumstances be removed at optimization level medium or high (6 or 9). Now the volatile information is correctly handled and operations on volatile declared variables will not be removed at higher optimization levels.
V7.20A, Oct 2005
-
EW15870
Now an error message is generated when the INTVEC segment is not located at the address zero. This is because the INTVEC segment contains the reset vector which should normally be located at the address zero. Previously no warning or error message was given. -
EW16044, EW17131, EW17343
Mixing switch-case and if-else constructions can generate internal error: [CoreUtil/General]: 1: bad byte count for graph ... when the file is compiled. This error can often be avoided if the nested code statements are rewritten. -
EW17157
The compiler could in certain cases generate a JBC instruction instead of a JNB instruction. This has now been corrected. -
EW17241
If the same interrupt vector was used for different interrupt functions, located in different files, no error or warning message was generated and only one of the interrupt functions was placed in code memory, while the others were removed. Now a warning message is generated and all interrupt functions using the same interrupt vector are located in code memory. -
EW17344
Accessing a structure member from a >struct located in the __sfr memory could generate the internal error: Internal error: [CoreUtil/General]: Illegal state. This problem has now been corrected. -
EW17345
Data placed at an absolute location, with the @ operator or the #pragma=location could previously be placed in the wrong memory type. This could result in the same memory address being used for more than one variable, which generated the XLINK error message: Error[e24]: Segment ... overlaps segment ....
V7.10A, July 2005
-
EW15834
Absolute located variables are now allowed in bdata memory, e.g., __no_init __bdata unsigned char foo @ 0x22. -
EW15994
The error message generated by the compiler, when too much code is generated in the Baseline and Kickstart editions, has been corrected. The correct limits are 8192 and 4096 bytes. -
EW16020
Cast from a signed char to a __far or __huge pointer generated an internal error. Now these cast operations are correctly generated. -
EW16094
The inline register restore sequence performed at function return could be erroneously removed. This most likely occurred for interrupt functions using a separate register bank. This has now been corrected. -
EW16675
Older versions of ubrof (ubrof5 or ubrof6) can now properly be generated from the compiler. Registers will be correctly displayed in third-party tools reading older ubrof versions.
V6.11A-P04314, November 2004
-
EW16045
Incorrect __sfr variable declarations could previously generate an internal error. Now an error message is instead generated. -
EW16096
Access to an __sfr declared variable could previously erroneously be performed with indirect addressing and thus accessing IDATA memory instead of SFR memory. This has now been corrected.
V6.11A, October 2004
-
EW15795
The compiler now always clean the stack before an infinite loop. Earlier you could get the internal error: [CoreUtil/General]: Different paths give different backtrace info. The compiler removed the stack cleaning code because it was dead depending on the infinite loop. However, this assumtion was incorrect as an interrupt can occur. -
EW15775
Interrupt functions that performs in-line saving and restoring of callee-saved registers now restores the saved registers correctly, independent of the optimization level. -
EW15770
The internal error: [CoreUtil/General]: Illegal unspillreg, has been fixed. The error occured when a bool variable that had been spilled from the VB register to the B register was restored (unspilled) to the VB register. -
EW15333
The __low_level_init function, used to initialize I/O registers or to omit the default initialization made by CStartup, is now declared as __root and will always be included in the linked application. -
EW15311
#pragma dataseg and #pragma location now work as intended. The produced code is now located in the specified segment. -
EW15047, EW15080
The __task keyword is now acknowledged. -
EW15004
Variables located in a specific, user-created, segment with #pragma location="NAME" or @ "NAME" now ends up in this segment. -
EW11851
Version 6 of 8051 IAR C/EC++ Compiler is totally new compared to version 5. All problems exsisting in v5 have been corrected in v6. There is for instance no longer a problem to combine banked code with high optimization.
V6.10C, June 2004
(V6.10B was a pre-release of V6.10C)
-
EW15564
Operations on __bit declared variables and 1 bit bitfields have been improved. The direct bit addressing mode is used more often for instructions supporting this addressing mode. -
EW15514
The volatile keyword was ignored and the generated code could be corrupt for a volatile variable. -
EW15332
The not operation applied on bit fields now works correctly, e.g. P1_bit.b6 = !P1_bit.b6. This operation and lot of other operations on bitfields now also produce more efficient code. -
EW15264, EW15573
Bit operations combined with xdata access could generate an internal error: [CgDriver]: Coloring failed. -
The following bit optimizations were implemented
- Assignments (bytes in bit-addressable space)
- byte.bit = constant
- byte.bit = byte.bit
- byte.bit &= constant
- byte.bit |= constant
- byte.bit ^= expr
- Assignments (bytes in non-bit-addressable space)
- byte.bit = expr
- Compare (bytes in bit-addressable space)
- if(byte & aMask)
- if(byte.bit) and if(!byte.bit)
- Assignments (bytes in bit-addressable space)
V6.10A, February 2004
Initial release.