Readme file for ICC430 2.20A-P030708
Updated: 2003-07-08 [ILOF]
Archived: $Revision: 1.5 $
Contents
- Two different floating point libraries are provided in this version,
a compact version that is small but lacks a number of features, and a fully
IEEE754-compliant version. The compact version is the same as the floating
point library in EW430 version 1.x. For more information about the two
libraries, see MSP430 IAR C/EC++ Compiler
Reference Guide.
- Two different include files for intrinsic functions are included in the installation.
The old one, in430.h, with all the old intrinsic functions to be used for backward
compatibility, and a new file, intrinsics.h, with the old intrinsic functions using
a new naming style and some new ones.
- Low-level input/output routines (_low_level_get and _low_level_put) are
not included for MSP430.
- The syntax has changed in the I/O include files called io430xxx.h. These files
are now using bitfields to define registers and information about individual bits.
The definitions in the files called msp430xxx.h can be used in the same way as in
version 1.x.
- The size of the stack is specified in the linker command file for each device
by the declaration of _STACK_SIZE. Please note that the stack size is included
in the calculation of the total RAM usage reported by the linker.
- Upgrading from version 1.x to version 2.x
Some changes will most probably be required in your source code
due to the change of compiler front end in version 2.x. It is very important that
you read the chapter Migrating to the MSP430 IAR C/EC++ Compiler in the
MSP430 IAR C/EC++ Compiler Reference Guide.
A step by step description if the migration process is also available,
Migration Guide for EW430 2.10A.
- ICC430 now generates UBROF9 as debugger output object format. If
an emulator which supports an earlier version of UBROF is used, XLINK
must be forced to generate the appropriate UBROF format.
To do this, select the correct UBROF format in the Output format
drop-down list on the Output options page in the XLINK
category.
- Support for 64-bit floating point numbers (doubles).
- Support for the long long integer data type, for more information see
User guide corrections.
- Support for position-independent code.
- Intrinsic functions that can be used for adding two BCD coded numbers have been added.
For more information see User guide corrections.
- Embedded C++ support
The new MSP430 IAR Compiler supports C and optionally Embedded C++ for
the Texas Instuments MSP430 microprocessor family. The
compiler is based on the latest IAR compiler technology
and replaces previous versions of the MSP430 IAR C Compiler.
A simple click in the options dialog box will give you access
to a true object-oriented language that is well suited
for embedded applications. Embedded C++ is a subset of C++,
in which some of the more costly parts of the C++
language have been removed. Embedded C++ support is only included
if you have purchased an Embedded Workbench EC++ product.
- A number of new optimizations now makes the compiler generate even
more compact code for either speed or size.
- A fully IEEE754-compliant floating point library is now included in the
product.
- New compiler options and intrinsic funtions has been added to this
version. See the MSP430 IAR C/EC++ Compiler Reference Guide
for more information.
2.20A-P030708 2003-07-08
- EW14137: Writing to an SFR could in some situations be done too many
times to the SFR.
- EW14155: Arithmetic expessions could be transformed incorrectly if the result
was masked with 0x01, e.g. (x + 1) & 0x01.
- EW14164: A test inside a loop with contant start and stop values could be
transformed to an unconditional jump if it tested the least significant bit of the
loop counter.
2.20A 2003-05-23
- A NOP instruction has been added after the DINT instruction in the
intrinsic funtion __disable_interrupt.
- EW13767: In some cases a pointer incrementation or decrementation could
be performed as a postincrement or postdecrement in the previous statement, even
if the statement had multiple accesses through that pointer and execution of the
postincrement or postdecrement affected the other accesses. This has been corrected.
- EW13863: An alignment problem has been corrected for the type jmp_buf
used by the functions setjmp and longjmp.
- EW13943: A problem has been corrected where an internal error could be
generated for complex expressions containing casts from the address of a variable
to an int.
The corrections below refer to the PDF versions of the user guide MSP430
C Compiler Programming Guide, C430-2. The information
in the PDF files is, in the event of any differences, more accurate than the
printed user guides and the online help files.
- Data representation, Data types, page 73.
Add long long to the list of integer data types.
| Data type |
Size |
Range |
Alignment |
| long long |
64 bits |
-2E63 to (2E63)-1 |
2 |
| unsigned long long |
64 bits |
0 to (2E64)-1 |
2 |
The long long support has the following restrictions:
- The runtime library does not support long long
- A long long variable cannot be used in a switch
statement.
The registers R12 - R15 will be used for passing a long long
parameter to a function if they are available. Otherwise the parameter
will be passed on the stack.
- #pragma directives, type_attribute, page 119.
Add the extended keyword __task to the list of keywords that can be used
with the #pragma type_attribute directive for a function.
- Intrinsic functions, page 126.
Add description of the following new intrinsic functions:
unsigned short __bcd_add_short(unsigned short, unsigned short);
unsigned long __bcd_add_long (unsigned long , unsigned long);
unsigned long long __bcd_add_long_long(unsigned long long,
unsigned long long);
Adds two BCD (binary-coded decimal) coded numbers.
- Intrinsic functions, page 127.
Change the description of the __disable_interrupt intrinsic
function to the following:
Disables interrupts by inserting a DINT instruction followed by a
NOP instruction.
The NOP instruction will ensure that interrupts have been disabled on the
device before the execution continues.
2.10A-3 2003-03-20
- EW13735: The supplied source for cstartup was not the right one.
2.10A 2003-02-28
- EW13554: Shift with a known number of steps on a variable in memory
did not work, in some cases. The problem occured for 32 bit objects that where
placed in memory and shifted exactly 8 steps (for all shift variants). In addition,
for unsigned right shift, if the step count was 24 to 30.
2.09B 2003-01-31 (beta version)
- CFE0013: The following code:
case 1: if (0) default: p += 3;
erroneously deleted the default label. Complex logical expressions
where one or more conditions where known constants or redundant nested
switch statements could cause different types of problems.
- EW12430:
When the following expression was compiled:
while (FCTL3 & 0x01);
an 8-bit access was generated on a 16-bit register.
- EW12893: The new intrinsic function _SWAP_BYTES was missing in the in430.h file.
- EW13388: The compiler did in some cases not distinguish between
a volatile pointer and a pointer pointing to a volatile variable/value.
- EW13399: The stack pointer was not restored correctly in the
cstartup.s43 file, causing two bytes to be wasted on the stack.
- EW13400: When subtracting a constant value from a long variable,
the compiler could give wrong results on optimization level High.
- EW13401: The Embedded Workbench closed down unexpectedly during
compilation of a file with a comment with many '*' characters that had lost
it's first '/' character.
1.26B 2002-10-11
1.26A 2002-03-11
1.25A 2001-11-09
1)
while(1)
{
}
Old assembler code: New code:
?1: MOV #1h,Ry ?1: JMP ?1:
CMP #0,Ry
JNE ?1:
2)
while(1)
{
statement;
}
Old assembler code: New code:
?1: MOV #1h,Ry ?1: statement ...
CMP #0,Ry JMP ?1:
JEQ ?2:
statement ...
JMP ?1:
?2:
3)
More effective code, when writing as follows:
i /= 2, i /= 4, i /= 8, i /= 16, i /= 32, i /= 64 and i /= 128.
i /= 128 only if the speed optimization flag is set.
- Three new intrinsic functions:
_BIS_SR_IRQ and _BIC_SR_IRQ, to change the SR register on the stack,
within interrupt service routines (ISR).
_BIS_NMI_IE1, to change the interrupt enable control bits 1
(IE1, address 0x0000), within a NMI service routine, the BIS.B
instruction is placed before the RETI instruction.
- A new option -ua, to enable odd address check. It is not possible to
read a word from an odd address.
- C00016
The code:
void func_pointer(void);
#define FUNC func_pointer
&FUNC-1,
caused an internal error. This has now been corrected.
- C00017
Copying a structure to another, using pointers, corrupts
one of the structure pointers. This has now been corrected.
- C00018
Internal error when using the keyword asm:
asm ("BIC 010h,0(SP)").
No asm instruction available, the compiler now generates the
error: "No asm-keyword available".
- C00020
The optimizer corrupted local pointers at higher optimizations than -s6,
when decrementing more than twice.
This has now been corrected.
1.24A 2001-04-06
1.23A 2000-10-16
- Optimizations:
Old assembler code: New assembler code:
MOV &1,Rx
AND #XX,Rx
MOV Rx,&1 BIC #~XX,&1
- Multiply with 3 and 5 is generated respectively as, 2*val+val and 2*val+2*val+val,
no library call. Also when writing X *= 3, X *= 5 and X *= 9, more effective
code without library calls will be generated.
1.22E 2000-06-26
- Updated with the latest compiler front end.
- C00014
A NOP instruction has been added after the DINT in the hardware multiply library functions. This has been done to ensure a non-interrupted load of the multiplier registers.
1.22A 1999-11-25
- C0013
Optimization level 3 now generates fully debuggable code.
- C0012
Earlier versions incorrectly accepted absolute bit syntax. Such syntax is not supported by the ICC430 compiler and now generates an appropriate error message.
1.20A 1999-02-19
- C0008
Calling a function via a function pointer on the stack used an incorrect stack offset. This type of call was done inside printf. This has been corrected.
- C0009
Static register variables were always saved on function exit even if they had not been modified. This has been corrected.
- C0011
Problem that could cause Internal Error "scan-if - X06 : null pointer" is now corrected.
- Support for MSP430 11X series microcontrollers is included with the sfr include file io11x.h.
- The bit definitions for the TCCTL register in the other io.h files are removed since same bit names are located in different positions in other registers.
1.11A 1997-09-11
- Support for MSP430 330 series hardware multiplier has been added in the new library 'cl430m.r43'. All devices can use the standard library 'cl430.r43', multiplications are then emulated.
The 'cl430m.r43' library protects the hardware multiplier from maskable interrupts. This implies a longer interrupt latency during multiplications.
Avoid multiplications and indexing arrays of non-scalar elements when writing non-maskable interrupts in C if the 'cl430m.r43' library is linked.
- C0005
The condition test 'if (uint - 42 == 0)' was performed with 'CMP.B'. This has been corrected to 'CMP'.
- C0006
Writeback of static char variables at a function epilogue was performed with 'MOV'. This has been corrected to 'MOV.B'.
- C0007
Illegal optimization for assignments of type 'uint = uchar;' has now been removed.
1.10C 1997-02-28
- Incorrect offsets were used when passing auto variables as arguments to functions:
PUSH @SP was used to transfer stack top, should be PUSH 2(SP)
This problem did not show when (1) passing the two leftmost arguments, since they go in registers and (2) when the passed value is a register variable. [Report D970218A]
1.10B 1997-01-15
- Register parameters were not saved to stack when compiling with option -rr (no register variables). This has been corrected.[Report D961210A]
- Incorrect data definition directives were used in the assembler list file. This has been corrected.
- Post-increment addressing mode is now better utilized.
- XLINK now supports the MSP430_TXT format, which is used in Texas Instruments' Starter Kit/Evaluation Kit. To generate this format use XLINK option:
-Fmsp430_txt
or in the sample linker command file, stk430.xcl:
-f stk430.xcl
To generate the new format when using IAR Embedded Workbench:
1. Choose Project>Options
2. Select the XLINK category.
3. On the output page, select the format Other and choose msp430-txt
from the drop-down list.
Copyright 1996-2003 IAR Systems. All rights reserved.