CodeVisionAVR Revision History 20051208
CodeVisionAVR Revision History 20051208
● added in Settings|Programmer the possibility to specify a baud rate of 115200 for communication with a modified
AVR910 programmer
● fixed: “pointless integer comparison with an out of range constant” warning was generated in certain cases when
the result of the sizeof operator was compared with a constant
● added the possibility to disable the above mentioned warning in Project|Configure|CCompiler|Messages
● fixed: if there were no local variables declared in a function, then it’s parameters were “out of scope” when trying to
Watch them in AVR Studio
● fixed: an error message that the size of the constants exceeds 65536 bytes was issued when compiling boot
loaders for chips with 128kbytes or more FLASH memory
● fixed: no debugging information was generated in the COFF object files for code located in the .asm file at line
numbers exceeding 65535
● the assembly file created by the compiler is now assembled with Atmel’s AVRASM2 assembler V2.1.0 distributed
with AVR Studio 4.12
● added the definitions for the EXT_INT0, EXT_INT1, EXT_INT2 interrupt vectors in the mega164.h, mega324.h
and mega644.h header files, in order to make them consistent with code generated by CodeWizardAVR
● added the definition for the TCCR0B Timer 0 control register in the mega164.h, mega324.h and mega644.h
header files
● fixed: the CodeWizardAVR generated an incorrect TWI interrupt vector name for the ATmega 48/88/168 and
ATmega406 chips
frequencies
● added ATmega88 and ATmega168 programming support for AVRISP and STK500 (requires AVRISP/STK500
firmware update to V1.18 using AVR Studio 4.10)
● the Programmer and Terminal may now share the same COM port
● the Navigator now displays the RAM placement address or register allocation for global variables
● improved the syntax highlighting in the editor
● added the possibility to do syntax highlighting for user defined keywords (Settings|Editor)
● added the possibility to comment/uncomment a block of text using Ctrl+[ and Ctrl+]
● added the possibility to hide the Find in Files tab by right clicking with the mouse on it
● added a Code Templates window from which the user can drag and drop code sequences to the editor window
● added a Clipboard History viewer window
● significantly reduced the time needed to close large projects
● fixed: the IDE sometimes crashed when a file opened in the CodeVisionAVR’s editor was simultaneously edited
with an external editor
● increased the maximum value of the Delay Multiplier (for parallel port programmers in the Settings|Programmer
menu) to 99
● fixed: in bootloaders the unused interrupt vectors now point to the start of the bootloader, instead of address 0
● added 16 bit access to I/O register ICR1 in the mega8.h header file
● improved the functionality of the Delay Multiplier for parallel port programmers (Settings|Programmer menu)
● improved the peephole optimizer for the ++ and -- operators applied to global pointers to char and int, allocated to
registers in the tiny memory model
● fixed: error message when applying the ++ and -- operators to a global pointer allocated to a register
● fixed: a small bug in the C preprocessor which led to errors in handling certain literal strings which contained the \\
and \” escape sequences one after the other (example: "\\\"")
● increased the height of the Information window, so the text will fit in it on some systems
● added the possibility to change the project’s file compilation order in Project|Configure|Files
● added the possibility to specify buffer sizes larger than 256 for the buffered interrupt driven serial communication
code generated by the CodeWizardAVR
● fixed: the PORT I/O register addresses are now correct for inline assembly code generated by the
CodeWizardAVR for the ATmega169 chip
● fixed: the Terminal window remaining opened in certain situations
● improved the watchdog disabling in the startup code generated by the compiler for the ATmega48/88/168 chips
● improved the watchdog initialization in the code generated by the CodeWizardAVR for the ATmega48/88/168
chips
● improved the Find, Find in Files and Replace dialogs used in the IDE
● improved ANSI compatibility: the const keyword, used when declaring pointer function arguments, now specifies
that these arguments may not be modified by the function. For pointers to FLASH arguments, the flash keyword
must be now used instead of const
● improved the common block packing optimizer for interrupt service routines
● fixed a bug in “smart” register saving/restoring in interrupt service routines, which led to data stack unbalance
when several return statements were present
● improved error reporting when declaring global bit variables
● added the possibility to suppress assembly macro expansion in the .lst file (Settings|Assembler|Expand Macros in .
lst file)
● corrected in the CodeWizardAVR generated code the names of the ICR3L and ICR3H registers
● fixed a bug in the peephole optimizer which could lead to assembly errors if optimization for Size was specified in
Project|Configure|C Compiler|Code Generation
● added support for “smart” saving/restoring of affected registers in interrupt service routines. The #pragma savereg
directive is not needed anymore
● improved the peephole optimizer
● added the constant literal strings merging optimizer
● improved the register allocator, registers are now allocated for local pointers too
● improved the dead code optimizer
● improved error and warning reporting
● modified the startup initialization code for watchdog disabling and global variable initialization. Projects that use an
external startup.asm file must have this file updated with the new one supplied with the compiler
● improved ANSI C compatibility
● fixed a rare bug which occured when testing a bit in SREG ( if (SREG.0) ... didn’t work, but if (SREG.0==1)... did )
● in the header file mega32.h, the TWSI interrupt vector was renamed to TWI
● modified the CodeWizardAVR so that it will not generate code with #pragma savereg for interrupt service routines
● added initialization for ICR1 and ICR3 in the CodeWizardAVR
● fixed in the CodeWizardAVR: removed ADC auto-trigger source for ATmega8(L)
● fixed in the CodeWizardAVR: the ADATE bit in ADCSRA will be 0 for ADC free running mode
● fixed AT86RF401 parallel port (STK200) FLASH programming
● fixed ATmega64(L) STK500/AVRISP programming
● improved the Programmer menus
● added one-button programming
● various small fixes and improvements in the IDE
● added the malloc, calloc, realloc and free memory allocation standard library functions (stdlib.h)
● added the _HEAP_START_ and _HEAP_SIZE_ predefined macros
● improved the constant folding for calculations employing the ? : operator
● updated the LCD libraries for better compatibility
● the lcd_init function in the LCD libraries now detects the presence of a LCD module, returning 1 on success and 0
on failure
● updated the tiny2313.h header files with the definitions for the PORTA, DDRA and PINA I/O registers
● fixed the ## preprocessor operator not working in nested macros
● added support for the ATmega88 and ATmega168 chips in the Compiler, CodeWizardAVR and Programmer
● added the PORTA pins in the CodeWizardAVR for the ATtiny2313 chip
● added support for the ATmega48 chip in the CodeWizardAVR
● added support for the ATtiny2313 chip in the Programmer for STK500 and AVRISP (the firmware update from
AVR Studio V4.08 is needed for these programmers)
● added support for the ATmega48 chip in the Compiler and Programmer
● updated the CodeWizardAVR to comply with the latest ATmega8 data sheet
● modified the code generator so that the global bit variables will be first allocated to GPIOR registers, if present in
the chip, and then to R2..R14
● added support for the ATtiny2313 chip in the Compiler, Programmer and CodeWizardAVR
● modified the startup code for the ATtiny13 chip so that the watchdog timer could be disabled even if the WDTON
fuse is programmed
● added support for the ATtiny13 chip in the Compiler and CodeWizardAVR
● added support for reading long integers in scanf and sscanf functions from stdio.h
● added the vprintf and vsprintf functions in stdio.h
● typedef now allows defining the pointers to functions data type
● enhanced the peephole code optimizer
● improved error and warning reporting
● fixed assembly errors when calling the power management functions for the ATmega162 and ATmega8515 chips
● the ++ and -- operators now work correctly when applied to bit fields in structures or unions
● any expression can now be used when initializing bit fields in structures or unions
● fixed a bug that occurred when subtracting two pointers that pointed to structures or unions
● fixed: the sizeof operator returned incorrect size for arrays of structures or unions located in FLASH or EEPROM
● when using external RAM and external interrupts, the CodeWizardAVR will now correctly set the MCUCR and
EMCUCR registers for the ATmega162 chip
● the Timer 1 operating modes selection list box for the ATmega32 chip is now correct in the CodeWizardAVR
● in the CodeWizardAVR the external interrupts 0 and 1 now allow also the “any level” setting for the AT90S2333
and AT90S4433 chips
● fixed in CodeWizardAVR: the SPI DO pin for ATtiny26 is now PORTB bit 1
● fixed: incorrect FLASH programming for the ATmega8535 chip using parallel port programmers
● added the possibility to stop the compilation process by pressing the Stop Compilation button or using the Project|
Stop Compilation menu command
● the dimension of an array of structures can be now omitted during its initialization
● fixed the incorrect amount of copied data, when assigning an element of an array of structures to another structure
● changed the name of the ADCSR register to ADCSRA in the mega32.h header file, in order to comply with the
latest datasheet
● header .h files, that are present in the Project|Configure|Files list, are not compiled/linked anymore if they have
been previously #included in one of the project’s program modules
● in the Project|Configure|C Compiler|Code Generation, and in the CodeWizardAVR, the AVR clock frequency can
be now specified up to 40MHz, as required by the new FPSLIC chips
● fixed in the CodeWizardAVR: for the ATmega169 the name of the MCUSR register is now correctly used when
generating code for reset source identification
● fixed in the CodeWizardAVR: for the ATmega64/128 the TCCR2 register is now correctly initialized when
specifying Timer/Counter 2 clock source as pulses on pin T2
● added support for the ATmega162 chip in the Compiler, CodeWizardAVR and the Programmer
● the lcd_putsf function from lcd.h, lcd4x40.h and lcdstk.h can now be used in boot loaders for the ATmega128 chip
● fixed a bug resulting in incorrect assigning of a structure located in EEPROM to a structure in RAM
● corrected the Fuse Bits settings for ATmega161 according to the latest data sheet
http://www.hpinfotech.ro/html/cvavr_history.htm(第 9/20 页)2005-12-8 0:18:42
CodeVisionAVR revision history
● removed the warning message issued by the Programmer about the necessity to upgrade the firmware of the
STK500/AVRISP
● the Programmer now supports reading the STK500/AVRISP firmware version in the Read|Programmer’s Firmware
Version menu
● the printf and sprinft Standard I/O functions now support printing floats (%f, %e, %E) with width and precision. To
enable printing floats, select Project|Configure|C Compiler|(s)printf features: float, width, precision.
● the printf, sprintf, scanf and sscanf Standard I/O functions are now reentrant
● libraries can be nested now
● additional paths for #include and library files can now be specified in Project|Configure|C Compiler|Paths
● storing pointers in FLASH and EEPROM now use the following syntax: [<type storage modifier>] type * [<pointer
storage modifier>] pointer_name; or type [<type storage modifier>] * [<pointer storage modifier>] pointer_name;
● a function that is pointed by a pointer to function, pointer that is used as an argument of another function, can now
also have arguments
● added the possibility to merge an additional .ROM file when programming the chip in Project|Configure|After
Make. This is very useful for merging an application, that was previously compiled, with a boot loader
● added support for the new ATmega169 and ATmega8515 chips in the Compiler, CodeWizardAVR and
Programmer
● pressing Ctrl+Del in the Editor window now deletes all the characters in a word, that are located to the right of the
cursor
● added the Program Preview option in CodeWizardAVR
● improved the code generated by the CodeWizardAVR for interrupt driven serial communication
http://www.hpinfotech.ro/html/cvavr_history.htm(第 10/20 页)2005-12-8 0:18:42
CodeVisionAVR revision history
● fixed a bug which generated assembly errors when using large local arrays
● fixed several bugs in programming the ATtiny26 chip
● fixed a bug which resulted in incorrect error messages when programming chips which have the RSTDISBL fuse
● improved the code optimizer for the ATmega chips that use the enhanced core instructions
● fixed the definition of the ds2430_read_appreg_block function in ds2430.lib
● fixed a bug in the CodeWizardAVR generated code for the ADC scanning multiple inputs (replaced ... |adc_index
with ... +adc_index)
● fixed a bug in the CodeWizardAVR that resulted in incorrect initialization of the TIMSK register for Timer/Counter0
overflow interrupt for the ATtiny26 chip
● fixed a bug in the CodeWizardAVR that resulted in setting the bit 7 of the UCSR1C register, when using interrupt
driven serial communication through USART1, for the ATmega64/128 chips
● added the possibility to display char strings located in FLASH in the printf and sprintf standard I/O functions. This
is accomplished by using the new ‘p’ conversion type character. Example: printf(“Hello %p”,”world!”);
● added the possibility to debug boot loaders in AVR Studio, by enabling the Project|Configure|C Compiler|Boot
Loader Debugging option. This option is available only if the Project|Configure|C Compiler|Program Type option is
set to Boot Loader
● fixed a bug in the ftoa function from stdlib.h
● completely rewritten the printf and sprintf functions. These functions now support the precision specifier and
displaying longs. Which version of these functions will be linked, can now be specified in the Project|Configure|C
Compiler|(s)printf features option
http://www.hpinfotech.ro/html/cvavr_history.htm(第 11/20 页)2005-12-8 0:18:42
CodeVisionAVR revision history
● removed the Global #defines option from Project|Configure|C Compiler dialog. For compatibility with old projects
use the new #pragma glbdef+ at the beginning of the first source file of the project
● improved the generated code speed and size
● improved overall ANSI C compatibility of the compiler
● added support for the ATmega8/16/64/128 and AT43USB355 devices in both the compiler and the CodeWizard
● the interrupt driven buffered serial communication code generated by the CodeWizard is now written in C, not
assembly like in previous versions, allowing for easier modification and understanding
● the Atmel STK500 and AVRISP are now directly controlled by the programmer, there’s no need for STK500.EXE
from AVR Studio anymore
● added programmer support for the Futurlec JRAVR AT90S2313 and AT90S8535 development boards
● fixed the Fuse Bits programming error for the ATmega161
● the IDE window is not maximized at startup anymore, but remembers it’s previous size. This is useful for systems
with large or dual monitors
● improved the licensing system. The license can be now exported on a floppy disk and reimported back on the
same computer too. This is useful when doing HDD upgrades.
● added support for the ATmega8/16 and ATmega128 devices in the compiler
● updated the Power Management Functions for the ATmega128, ATmega8/16, ATmega161 and ATmega32/323
● updated the code generator in order to comply with the latest ATmega161 errata data sheet
● improved the error reporting
● improved the File|Reopen menu
● small bug fixes
● revised the Help and User Manual topics about #include, Using Interrupts and Power Management Functions
● improved the size and speed of the generated code, especially when accessing structure or union elements using
pointers
● in order to improve code portability, type, structure, union and enum definitions are now visible only in the program
module where they reside
● added strtok to the String Functions
● removed _strlen from the String Functions, the existing strlen function now returns unsigned int in the SMALL
memory model
● fixed scanf and sscanf in the Standard C Input/Output Functions
● fixed: local pointers and pointer arrays were always initialized with NULL during declaration, even if another value
was used
● fixed: the Check Erasure option was always set in the AVR Chip Programmer
● improved the code speed for devices with more than 128 bytes of SRAM
● added the _GLOBAL_DEFINES_ predefined macro
● improved the function atof in the Standard Library Functions
● added the function _strlen in the String Functions
● added to the programmer the option to preserve the EEPROM contents during chip erasure
● improved error handling for the STK500 programmer
● various small improvements in the IDE
● added the Global #define compiler option to allow macros to be globally visible in all the project files
● removed the #pragma enhcore directive and added the Enhanced Instructions compiler option to enable/disable
the generation of Enhanced Core instructions for ATmega161/163 and FPSLIC devices
● added ISP support for the Atmel STK500 development board
● improved the File|Reopen menu command
● clicking in the left margin of the editor window now selects a whole line of text
● added the Ctrl+Y keyboard shortcut for deleting text lines in the editor
● changed the Redo keyboard shortcut to Shift+Ctrl+Z
● changed the Goto Line keyboard shortcut to Alt+G
● added enum
● added multiple instruction support in #asm
● the ? operator can now have any type of operands
● if a project is opened the AVR Chip Programmer will automatically load the corresponding .rom, .eep, .hex or .bin
files, if they exist
● redesigned the Terminal
● added the possibility to edit the contents of the FLASH and EEPROM buffers in the AVR Chip Programmer
● modified the keypad.c example program so it compiles with the Evaluation version
● the project files are now automatically linked to the main file on Make, without the need to use #include
● added the new Common Block Subroutine Optimizer, that allows achieving 25% smaller code size for large
programs with optimization for size turned on
● added loop, branch and subroutine call optimizations
● added macros with parameters
● added the # and ## preprocessor operators
● added the __LINE__ , __FILE__ , __DATE__ , __TIME__ predefined macros
● added the #undef , #line , #error preprocessor directives
● added the #pragma optsize compiler directive
● added the #pragma enhcore compiler directive
● local variables can be now initialized during declaration
● added functions for LCDs connected in 8 bit memory mapped mode, as used in the Kanda Systems STK200 and
STK300 development boards
● added support for libraries
● added the following mathematical functions: exp, log, log10, pow, sin, cos, tan, sinh, cosh, tanh
● when invoked, the AVR Studio debugger will automatically load the .obj or .cof file
● added in CodeWizardAVR: the MISO pin is configured as an output in SPI slave mode
● added Page Setup for printing
● added the Match Braces editor command
● fixed Fuse Bit(s) programming for AT90S/LS2323, AT90S/LS2343, ATtiny12
● fixed programming of the AT90S1200
● fixed "out of scope" messages when watching local variables in AVR Studio
● added a reset button in the chip programmer
● the chip programmer buffers are now initialized with FFh
● added support for the Vogel Elektronik VTEC-ISP
● added the possibility to disable programming verification in the chip programmer
● added a chip programmer counter
● reduced the amount of Windows resources required by CodeVisionAVR
● various enhancements to the IDE
● added the new 4x4 KEYPAD example program
● added the possibility to specify the size of bit variables used by the program
● enhanced the code optimizer, code size decrease is more than 30% compared with the previous version
● added COFF file generation in order to allow variable watching in AVR Studio 3 Debugger
● added an advanced automatic register allocator
● added allocation of global char and int variables to registers up to R15
● added allocation of local char and int variables to registers from R16 to R21
● added the #pragma regalloc compiler directive
● added the register keyword
● added the typedef keyword
● added pointers to functions
● modified the >> operator to generate the ASR, respectively LSR, instructions for signed, respectively unsigned,
operands
● added the short int and double data types
● added the possibility to enter constants in binary form
● added the strlenf function
● the compiler uses now only the AVRASM32 32 bit assembler, that is supplied with the AVR Studio 3 Debugger
● added support for the Dallas Semiconductor DS1302 and DS1307 real time clocks
● added support for 4x40 characters alphanumeric LCDs in the lcd4x40.h file
● programs that use buffered interrupt driven serial communication and ADC, produced by the V1.0.0.7
CodeWizardAVR, need to be generated again with the V1.0.0.8
● modified the i2c_read function in order to allow sending acknowledgments
● the i2c_init function must be called now prior to lm75_init, respectively rtc_init, functions for LM75, respectively for
PCF8583 and DS1307
● increased the speed of the I2C bus functions
● renamed the ADC interrupt vector number to ADC_INT and added the ADCW declaration in the header files:
90s2333.h, 90s4433.h, 90s4434.h, 90c8534.h, 90s8535.h, mega103.h and mega603.h
● added the Navigator
● added a pop-up menu, activated with the mouse right button, in the Editor windows
● added the possibility to insert bookmarks in the edited source file
● added the possibility to visit HP InfoTech's web site directly from the IDE
● added the possibility to contact HP InfoTeche-mail by e-mail directly from the IDE
● added the possibility to run an user program after Make
● enhanced the Serial Communication Terminal
● added the possibility to save and restore the position of the Terminal window
● added support for using the ISP with Windows NT 4.0 and 2000 with User privileges
● added initialization with 0 of the ISP buffers prior to file loading
● fixed: error message when programming the BODEN fuse for the AT90S2333/4433 chip
● fixed: GPF on some errors in C source files
files
● enhanced the code optimizer
● added support for the Atmel 32 bit Win32 assembler AVRASM32, supplied with the AVR Studio 3 Debugger
● added the possibility to use an external startup file
● added the possibility to transfer the license to another computer
● enhanced the source file editor, added: undo, redo, mouse drag and drop, line numbers, color setup
● modified the mode how external RAM size is specified in the Project|Configuation|C Compiler menu
● enhanced the code optimizer
● revised the 90s2333.h, 90s4433.h, 90s4434.h, 90s8534.h, 90s8535.h files
● added Dallas Semiconductor 1 Wire protocol functions
● added Dallas Semiconductor DS1820 Temperature Sensor functions
● added Philips PCF8583 Real Time Clock functions
● added new functions: bcd2bin, bin2bcd
● added the @ operator for specifying the RAM storage address for global variables
● added the generation of a global variables memory map file by the compiler
● modified the ATmega103/603 programming
● added support for programming 3V devices
● updated the help file topic Working with the AVR Studio Debugger
● the names of project files are now stored in the .prj file as relative to the project directory
● increased the Terminal receive buffer size to 32K
● added inline assembly, ex: #asm("sei")
● added delay functions: delay_us, delay_ms
● improved the speed and size of the lsqrt function
http://www.hpinfotech.ro/html/cvavr_history.htm(第 18/20 页)2005-12-8 0:18:42
CodeVisionAVR revision history
V0.0.1.2 BETA
V0.0.1.1 BETA
V0.0.1.0 BETA
● corrected: incorrect code generated for the != operator for 8 bit values
● corrected: relative jump out of range for large programs
V0.0.0.9 BETA