This file "readmeAVR.txt" is the ICCV7 for AVR readme file. Make sure you subscribe to the icc-avr mailing list for program update announcements. Refer to http://www.dragonsgate.net/mailman/listinfo for details. Outstanding Bug List (we are working on resolving it): - if you use the ++ pre increment operator on a volatile var in an expression context, the wrong value is used, e.g. volatile int i; ... if (++i == ... CHANGE LOGS: V7.13A - May 29th, 2007 C Preprocessor - Reverted to the V6 behavior of expanding __FILE__ to just the file name without the path components Compiler - [PRO only] 8 bit optimization was causing some array declarations to emit erraneous "zero sized array" error. - [PRO only] Fixed couple assertion errors with 8 bit optimization. Library - Eliminated use of RAM literal strings in the library. V7.13 - April 23th 2007 - Vista compatible licensing engine - Make the toolchain compatible with large projects (e.g. over 700+ source files etc.) IDE/Compiler - [PRO version only] Added "8 bit optimization." Most if not all expressions that can be done legally per Standard C rules should be done with 8 bit operations instead of the promoted int type. Should improve most programs by one to two percent and more if 8 bit variables are used extensively. This is enabled if you turn on Project->Options->Compiler->"Global Optimizations" - Added device entries for AT90USB82 and AT90USB162 Compiler - Fixed a bug where the compiler was generating code that save/restore R20..R23 inside an ISR even if the "Do not use R20..R23" switch is on. - Fixed a bug where if the argument to a function is unused, sometimes the compiler saved the argument register into another preserved register without saving the preserved registers. This usually only happened if the function does not have other local variables and it calls other C functions with arguments. Library - Added cscanf and csscanf Header Files - USB AVR header files update V7.12A - March 11th, 2007 IDE - The starting address for the 644P was incorrect (the only current "P" device with more interrupt vectors than the corresponding non-P devices. - For ISP with STK500, add a box for "No Erase." Use only if you pre-erase the chip. Linker - bootloader build for < 64K devices were broken WRT -e: switch added in 7.10B Library - added the missing cstrpbrk and the new cstrtok - the crt* startup files now always initialize RAMPZ to the appropriate value based on the project type. This is so that if you are building an application that is invoked by a bootloader, the startup file for the main app will initialize RAMPZ to zero, ensuring correct program behaviors. V7.12 - Feb 14th, 2007 IDE - the device settings for the M64x devices had the "Use ELPM/RAMPZ" setting accidentally enabled. Fixed. - The AppBuilder now uses symbolic vector numbers defined in the io???v.h for the interrupt handlers (thanks to JA) - the IDE did not use the correct startup files for M8515 with external 64K SRAM. Compiler - If an ISR calls a function, the compiler used to save/restore all registers. However, if the called function(s) obey the normal calling convention as documented in the Help file on "Calling Convention and Assembler Interface," then this is wasteful. The compiler now saves and restores only the registers an ISR uses. Since all C functions obey the calling convention and an assembler routine can be written easily to follow the convention, this change should improve ISR performance. Probably in all cases, no user code change is needed. Linker - 7.10B support for -e: introduced two problems with the Code Compressor: == the linker incorrectly generated extra HEX data if the Code Compressor is selected and if the "Fill Unused ROM with Bytes" option is on. == an off by one error occasionally caused a spurious error message "...Trying to write to absolute location 0x??? but it already contains a value." Both problems are now fixed. V7.11 - Jan 23rd, 2007 Website move caused inconsistent compiler pieces. Fixed. IDE - Added Picopower AVRs to device list. V7.10B - IDE/Linker - Added -e: flag to the linker, specifying the max address of of the rom size Compiler - Allow "const" local variables and function arguments. Minor licensing engine changes V7.10 - Dec 4th, 2006 Help File and PDF manual updated IDE - Added tools to allow sending email for licensing, support etc. - New CRT startup file when selecting external SRAM for newer megas as the memory control registers are on different locations than those of the older devices. - License registration no longer closes down the IDE. Compiler - Support for switch jump table for the M256x. i.e. with known limitations such as that the compiler does not handle auto-setting of the RAMPZ for literals access above the lower 64K page, all M128x and M256x features are supported. - MIO Global Optimizer: fixed some MIO crash problems. Code Compressor - Added informational message that the Code Compressor is not yet compatible with the 3 byte function pointers for the M256x. Code Compressor automatically disabled for the M256x devices. Library - exicall should use elpm instead of lpm to fetch from the efunc_lit table so that it can be used by a M256x bootloader V7.09 - Nov 6th, 2006 IDE/AppBuilder - The Watchdog Init code was not initializing the WDTCR correctly for the following targets: M8, M48, M128, M168, M640, M88, M1280, M1281, M2560, M2561 Compiler - Compiler was miscounting the size of "OUT" instructions to a word sized location and may emit the incorrect length branch instruction and might cause "branch target too far for short branch instructions" error in the assembler. Linker - .MP map file now shows static function and variables Library - itoa/ltoa/print %d/%ld now print -32768 and -2147483648 (e.g. high bit on) instead of -0. Header files - Some C and assembler header files accidentally have not been updated since 2005. - Some entries for the USB1287 were incorrect in the header file, causing incorrect behaviors when porting the Atmel USB1287 examples. V7.08 - September 10th 2006 IDE AppBuilder - fixed prescaler for timer units for M64x/128x/256x - fixed M162's UART section - fixed Tiny2313's USI section - fixed M8535 UART baud rate registers were not set correctly IDE/Linker - Allow JMP/CALL 3 byte relocation (for M256x) in the Demo/STD versions. This is required for bootloader apps. IDE/Compiler - "Use ELPM/RAMPZ" is now enabled for all enhanced core devices with greater than 64K byte flash. This fixes the problem of indirect function calls were not working properly under bootloader option. Compiler/MIO - More enhancements and bug fixes Library - Added M256 specific libraries libcatm256.a, libfpatm256.a and liblpatm256.a so that all functions including sprintf and printf can be put in the upper 2 pages of flash without any constraint - a rarely executed path in the floating point normalization routine was not restoring Y correctly and caused stack imbalance V7.07 - July 18 2006 [ Sync up PRO MIO releases with first MIO releases for the 430 and ARM compilers ] IDE/Compiler/Assembler/Linker/Library (ADV/PRO only) - Added support for function pointers for M256x. A function pointer can now point to function beyond the 128K byte of the address space = At the C level, no source code change is needed. = all pointers, including function pointers are still only 2 bytes = (Current) a function pointer is an entry in the func_lit area. Each entry in func_lit is a WORD function address. = (New) a M256x function pointer is an entry in the efunc_lit area. Each entry in efunc_lit is a 3 byte WORD function address. = The assembler supports a new directive .eaddr `symbol ; note backquote "word address" operator it reserves 3 bytes in the following format: = Note that since there is no M256x specific library, to use printf, you must ensure that your "putchar" function resides in the lower 128K. = (Internal details:) To perform an indirect function call, the internal library function "exicall," takes a pointer to an entry in the efunc_lit area and fetches 3 bytes and does an eijmp. Compiler (MIO - PRO Only) - Fixed a NULL pointer reference that caused MIO to crash - MIO's Constant Propagation sometimes incorrectly deleted a statement after a loop. 7.06B - June 27th, 2006 (Unicals) C Preprocessor - macros defined in the "Macro Define(s)" compiler option box, or with the -D command line switch will get a default value of "1" if a value is not explicitly given. This was the old Preprocessor behavior. IDE - ISP dialog box was not remembering the interface port setting - the TEXT starting addresses for M1280/1281/2560/2561 were too large. - Added %D (for project directory) macro for command expansion Compiler - Some sbi/sbrc/sbrs generations were accidentally disabled. MIO (PRO) - Added Alias Analysis and Dead Code Elimination. Optimization routines will be updated to utilize the information later. Assembler - (M256x only) JMP to literal addresses of more than 16 bits was not handled correctly. Linker/Code Compressor - For 8K or smaller megas with bootloader, the Code Compressor was not generating the correct RJMP offsets for the reset and interrupt vectors Headers - Fixes for tiny261/461/861 to correspond with the fixed Atmel datasheets 7.06A - June 1st, 2006 IDE - the STK500 ISP function accidentally added an extra - to the comport or USB argument (introduced in 7.06) - After performing a "Project->SaveAs...", doing other project operations such as adding a file to the project may cause the IDE to generate an Access Violation error. - Project file list changes were not automatically saved when the IDE exited. C Preprocessor - fixed a bug with not able to #include files with certain UNC path format. Compiler - fixed: Under some conditions, the compiler threw an assertion error "TNType 11, register table too small." 7.06 - May 19th, 2006 C Preprocessor - Completely NEW C99 conformant C preprocessor (VARARGS macros etc.) based on the Unicals C/C++ preprocessor (http://www.unicals.com). Used with permissions. IDE/EEPROM library - The incorrect version of the EEPROM functions were used for M2560 and M2561 due to the incorrect attributes set by the IDE - Starting address for Tiny13 should be 0xA and not 0x10. - Rename "Strict ANSI C Checkings" to just "Strict Checking." - Add "USB" to the STK500 ISP communication port option Compiler - Added "noinit" area for uninitilaized variables in the Startup Files. e.g. you can declare such variables by writing #pragma data:noinit int i, j, k; #pragma data:data and these variables will not be initialized to zero at startup time. (feature added a while ago but forgot to document) - With debug enabled, the compiler was leaving unreachable code in the generated code. - under some conditions, wrong code is generated from implicit conversion of a (stack local) byte variable to a long variable. - MUCH faster code for converting between floating point and unsigned number. - Rewrote local register allocation algorithm. Should eliminate most instances of "out of registers" errors. - (temporarily) disabled Strict ANSI conformance checking (not useful) - the optimization introduced in 7.05 of merging return sequence "call gpop???\nret" to "jmp..." was emitting incorrect debug information such that some versions of AVR Studio (4.12) would display the cursor/currentPC at the incorrect spots for some functions. - Consecutive loading of R30/R31 with an intervening "ld/st Z+off" was not optimized away. MIO (PRO) - Fixed assertion errors and other misc. bugs. Library - some of the documented cstr??? const * string functions were not in the library files - Added different crtboot* startup files for bootloaders for M128x, M256x and M512x (optimistic looking ahead) Linker - user ADV/PRO, allow a single .o file to have more than 64K bytes of object code 7.05 - Feb 28th, 2006 [ Enabled Code Compressor and Global Optimizer trials ] [ Enabled "Special Edition" 6 months licensing ] IDE/Compiler Tool Chain - Enable >128K support for M256x (ADV/PRO) only == [Working] - CALL reachable in full 256K byte range - each object module is limited to up to 64K bytes == [not yet supported] - Indirect function call beyond 128K bytes IDE - Added AppBuilder support for m640,m1280,m2560,m1281, and m2561, plus misc. bug fixes - Added device map support for AT90USB chips. Compiler - Merged "call gpop???\nret" return sequence to "jmp..." - (PRO) Fixed a bug in MIO where a variable incorrectly shares the same register as another variable - Fixed a bug with register allocator where it might emit "Out of Registers..." message with complex long or floating point expressions. Assembler/Linker - Fixed the long standing (e.g. 6.0!) bug of not generating correct code for RJMP 0x Library - Faster function prolog/epilog register save/restore routines Header Files - AT90USB header files support - misc. header file fixes 7.04A - Jan 15th, 2006 [Known bug: functions with complicated long or floating point expressions may trigger an internal error with "Out of Registers..." message. Please report such instance to support@imagecraft.com. We are working on a solution.] IDE - Fixes for Map File Summary tool. Compiler - A rare latent register history error may cause shift counts to become incorrect (usually to a count of 30 from the correct count). Linker/Code Compressor - If the "text" area runs into an absolute area, but then it would have fit after code compression, the linker incorrectly gave an error. - Code Compressor no longer compresses OUT SPx,.. and IN ...,SPx and the corresponding LDS/STS memory accesses Library - the EEPROM functions for newer Megas were not built correctly 7.04 - Jan 9th, 2006 [PRO Optimizer First Release] IDE - File->"Close All Files" now have the option is save all or prompt for changes - Fixed a problem where if a project .src file is readonly, the IDE was not able to close the project. - EEPROM range is set to begin at 1 for older AVRs with the buggy EEPROM and set to begin at 0 for newer AVRs - Added CAN32/CAN64 entries - AppBuilder for Tiny26 was incorrectly using ADMUX instead of ADCMUX Compiler - Compiler sometimes incorrectly eliminated reading of a volatile IO register or memory reference. Library - Changed FP Divide routine so that it uses the SW stack instead of the HW stack. 7.03D - Dec. 5th, 2005 IDE - Entering more than 260 chars in the Project->Options->Path edit boxes was causing illegal memory references Compiler - 7.03C might generate the assertion swtabs_index >= 0 at ..\avr.c(13213) for some switch constructs. Fixed. - Under some circumstances, the compiler was asserting with out of registers: opsize 2 ... V7.03C - Oct 29, 2005 Compiler - Live Analysis introduced in 7.03 did not take (jump table) switch cases and the sbrc/sbrs instructions into consideration. These caused the compiler to sometimes to emit bogues "variable X is used but has no initial value" warnings. - "#pragma global_register" was broken in 7.03 and caused the compiler to crash. Linker - STD users with literal area that overflows to the high 64K bytes (under M128/M256/etc.) might cause the linker to incorrectly assign an odd byte address to the text area in the high 64K bytes which would cause execution to fail. V7.03B - Oct 18, 2005 Compiler - divide an "unsigned char" variable by 2, 4, and 8 might generate incorrect code (typo in code cleanup in 7.03) Libraries - rename math.h functions to with f suffix, e.g. pow to powf, sin to sinf etc. This should be transparent since math.h header file maps the names to the old forms. V7.03A - Oct 10, 2005 IDE - File->"Compfile File"->("to Object or "to Output") did not use short file name if the file has embedded spaces in the file name. Compiler - Lifetime analysis did not take inline asm into consideration and may remove variables only referenced by inline asm. - Fixes introduced in 7.03 for volatile pointer fetches caused incorrect code for volatile const fetches. Header Files - Fixed C and asm headers for M640/M1280/M1281/M2560/M2561 and asm headers for M48/M88/M168 Examples - For M32, completed and tested examples (LED, interrupt, UART polled ...) under \examples.avr\M32\ V7.03 - Oct 3rd, 2005 IDE - Added tiny24, 44, 84, 26B, 46, 86, 166 to the compiler options. - Added M1280/M1281 to the device list. Compiler - Added copy propagation to the register allocator for smaller/faster code - Enhanced live variable analysis for better register allocation - Enabled PRO optimizations. See Help file under Introdction Chapter and Optimizations section. - Register History may incorrectly optimized volatile pointer fetches away. - Added #pragma device_specific_function the symbol is decorated with the $device_specific$ suffix, e.g. #pragma device_specific_function putchar means that the generated name is _putchar$device_specific$. See Linker entry for usage. Linker - If the linker sees an undefined symbol of the form $device_specific$. It emits an error of the form Function 'putchar' not defined. This is a function that references the device's IO register locations and must be compiled specifically for the target device. You may find examples of this function for different devices under the \examples.AVR directory. Library - Faster FP div and mul - Much faster sin/cos using fixed point arithmetic Header Files - Fixes for 164, 324, and 644 C and asm header files - Added "#pragma device_specific putchar getchar" to stdio.h Examples - Added putchar_???.c and getchar_???.c V7.02 - June 25th, 2005 IDE - if "auto-save before compile" option is on, the yellow marks on the opened book icons were incorrectly not being cleared after a build. - AppBuilder fixes for m8515 timer0, m32 timer1, and t13 xtal rates - Added entries for M164, M324, and M644 Debug Support - the source lines might get out of sync for some projects Help File - online Help should now work for any browser/OS combination Compiler - generated code for accessing from IO registers not in the lower IO space were suboptimal, using Z indirection instead of just LDS/STS (introduced in V7) Linker - Should eliminate all "COFF Warning" errors Header files - Added m164, m324, m644, PWM2 and PWM3 C and asm header files V7.01 - June 5th, 2005 Library - Improved floating point multiply speed Listing File Generator - Listing file for addresses close to 64K bytes and above were broken. This does not affect generated code or the debug information, only the .lst listing file. V7.00C - May 3rd, 2005 Under some conditions, the command line compiler was not licensed. IDE - network dongle DLL was incorrect - starting address for CAN128 was incorrect Compiler - obscure register allocation bug may cause some programs to fail - When generating ISR save/restore sequence, the compiler was incorrectly not save/restore R0/R1 some times for reading flash 16 bit variables for enhanced mode targets (e.g. M128 and other newer Megas). V7.00B - March 22nd, 2005 Compiler - if there is a non-initialized EEPROM decl. between two "const" declarations, the 2nd one is incorrectly put in the data space: const int i = 4; #pragma data:eeprom int e; #pragma data:data const int j = 5; // incorrectly put in data area - Checking a constant with a registered variable with relationship operator may cause an assertion from the compiler: unsigned foo; if (foo < -123) ... - Under ATMega enhanced mode code generation, if you have int array[]; unsigned char index; ...array[index * 4] the compiler incorrectly used a byte multiply for the index calculation - Assignment a complex long expression to a char variable might incorrectly writing beyond the char variable register allocation. e.g. char b; long l; b = (l >> x) & 0xFF; Driver - now adds -I\\include as the last include path after any user specified include paths Header Files - Added aiom*.s assembly language heaer files for all supported AVRs Library - cstrncat and cstrncatx were missing V7.00A - Jan 23rd, 2005 Minor licensing issues fixed - Eliminated licensing warning about the DEMO expiring and becoming a 4K demo for dongle users - Fixed the bug where if V6 dongle was attached, then the "Help->Register" menu was made invisible IDE - No longer use -z when calling stk500.exe since the Studio 4.11 version of STK500.exe is broken in that it does not accept the -z flag V7.00 - Jan 19, 2005 Help - New HTML Help c:\iccv7avr\Help\ICCAVR\ - New PDF Manual (same as help) under same directory. ICCAVR.PDF IDE - Added support for generalized external editor interface - Added argument processing: a) if a directory is specified, it is used for accessing the option files (editor, tools, etc.) b) if a file with .prj extension is specified, it is opened as the initial project - Will not try to opened a "last opened" project file if it no longer exists - The IDE predefines __ICC_VERSION__ as a literal string, e.g. "V7.00" - Added ^W to close the current editor window - Added ^Tab and ^Shift-Tab for paging through editor windows - Added support for new mega AVRs - Application Builder support for new devices - New View->"Map File Summary" command - Much less CPU intensive for project file status update, especially when there is a large number of files on the project file list - No need to enter \include and \lib in the Include Path(s) and Library Path, as the driver now does that automatically. Driver - Automatically add \include to the inlcude path and \lib to the library path Compiler & Library - NEW Faster and smaller Floating Point Header Files - Support for new mega devices Linker - Fixed all outstanding problems with "Warning: COFF no struct tag..." - Fixed COFF problem with "const" arrays not specified in the flash section bug - Allow multiple library paths Library - Added more cstr???x functions. See string.h and Help file - printf %d and %ld was incorrect for 0x8000 and 0x80000000 respectively