- Important information
- New features
- Known problems
- Program corrections
- User guide corrections
- Miscellaneous
- Release history
Important information
-
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.
New features
- No changes.
Known Problems
-
EW20977
Manual correction - The example for the __bit syntax on page 244 of the C Compiler Reference Guide is wrong. The correct example should be as follows:
#include <stdbool.h> __no_init bool __bit x; -
EW20872
The fstream class in the DLIB library is missing constructors for certain data types. -
EW20971
A constant array index value larger than 0x7FFF will cause the linker to produce an [e18] range error. -
EW21115
Manual correction - References to the size of IDATA on page 23-24 of the C/C++ Compiler Reference Guide are incorrect. The correct size is 256 bytes. 8051 IAR C/C++ Compiler Reference Guide -
EW21180
Manual correction - The note in the description of the __idata_reentrant keyword on page 251 of the C/C++ Compiler Reference Manual does in fact not apply to this keyword. EW21366
In case the banked code model and the option --place_constants=code is used constants must be placed in the root bank and NOT in a code bank. This is unfortunately still true regardless of whether the device you are working with supports the command line option --has_cobank or not.-
EW21367
Manual correction - The code example for placing the variable gamma on page 167 of the C/C++ Compiler Reference Manual is incorrect, The corrected example should be:
const __xdata_rom int gamma @ 0xa0 = 3; /* OK */ const __code int gamma @ 0xa0 = 3; /* OK */ EW21354: In some circumstances, the compiler generates an internal error when the __idata_overlay keyword is used on a function.
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 parameter 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.
Miscellaneous
- Nothing.
Release history
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. More information can be found in the document Migrating banked projects from 7.2x.html. -
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.