ImageCraft ANSI C Compiler for the Motorola HC08 microcontrollers. IMPORTANT: Please subscribe to the icc-mot or icc-announce mailing list for program update announcements. Refer to http://www.dragonsgate.net/mailman/listinfo for details. Starting at V6.10, YOU MUST HAVE THE #pragma interrupt_handler line before the interrupt vector definition. See \icc\examples.08\vectors08.c for an example. Make sure to look at the \icc\examples.08 diretcory for sample programs, free monitor, code for AN-HK32 "In Circuit Programming", vector table examples and USB08 etc. Features To Be Relesed Soon - Some high level math functions are not working: tan/asin/acos [ BUG NOTE: when accessing the IO register as a 16 bit item (e.g. T1CNT), you MUST assign it to a 16 bit variable before performing arithmetic on it since the HC08 requires the high byte to be accessed first. This will be fixed in a later release. Examples: int i = T1CNT; // OK foo(T1CNT); // OK i = T1CNT + 10; // not OK, do i = T1CNT; i += 10; // OK ] 08/22/2005 - V6.11 Compiler - signed/unsigned byte comparison some times used the wrong compare instructions - shifts were incorrectly limited to 7, 15, and 31 bits for byte, word, and long. - a peephole match mov *__rX,*__rY mov ...,... was done incorrectly and incorrect code resulted - int to float conversion may corrupt stack value if an int is used in a complex floating point expression. This was the cause for sin/cos/exp/log/log10 not working Library - sin/cos/exp/log/log10 now are working (code generation fix) 03/08/2004 - V6.10A Library - Fixed a bug in the "unpack" utility in the Floating Point package. The error would be exposed if a negative operand is being processed and SRAM location 0 is zero when doing FP addition and subtraction. 02/01/2004 - V6.10 (big version jump) IDE - Enabled Code Compressor (PRO only, and trial mode for STD/DEMO) - Scroll wheel support now works for any W32 OS except for W95. Linker - Enabled Code Compressor, most programs are compressed from 2-10%. SIDE EFFECTS - If you use your own startup file, you must modify it to declare the areas similar to what is done in the default crt08.s - All indirect function calls must now be done using an indirect function entry, e.g. OLD: ldhx _func jmp 0,x NEW: ldhx PL_func jsr __icall ... .area func_lit PL_func: .word _func __icall fetches the word in HX and jump indirect to it. The compiler does the right thing if you are using C, and create an indirect entry for a reference to a function address UNLESS the function is declared as "#pragma interrupt_handler" since it will (most likely) be used directly in an interrupt vector table. - your program will run slower due to more function calls. The average seems to be around 2-5%. - To disable Code Compression temporarily, use the new assembler directives: .nocc_start ; code that should not be compressed, e.g. timing loop ; or timing sensitive code ... .nocc_end In C, the header file hc08def.h contains #define NOCC_START() asm(".nocc_start") #define NOCC_END() asm(".nocc_end") Do not use these inline asm outside of a function body. Libraries - All frequently used string functions are now written in ASM. 10/31/03 - V6.06 IDE - Added device entries (Project->Options->Target->DeviceList) for all known HC08/HCS08 devices Header Files - Added header files for all know HC08/S08 devices. Compiler - Fixed (unsigned_char_var / signed_char) to use unsigned 8 bits divide instead of signed 8 bits divide - LCC4.2 source merge. Listing File Generator - If you have an absolute code section (e.g. a bootloader) and if you turn on Compiler Options->Output->ASM/Source_Level_Debugging, then the listing file generator may crash trying to disassembly non-existent code between the valid text area and your bootloader 04/29/03 - V6.05C Compiler - bitfield fixes Linker - Eliminated too aggressive assertion check on code memory boundary check 04/07/03 - V6.05B Compiler - Improved constant folding for exprs: (expr OP const) OP const and where OP is a commutative operator - (unsigned_var = unsigned_char << 8) was generating incorrect code - (char_var <<= 7) was generating incorrect code - stack adjustment could be off after FP or some long/int expressions 02/03/03 - V6.05A [ Happy Chinese New Year ] [ V2.53 of dongle drivers ] IDE - Clicking on an error always brought up the builtin editor even if an external one was selected - The AppBuilder flipped the CLI/SEI pair in the generated code Compiler - Added peephole to catch consecutive AND/ORs with immediate operands - the compiler was asserting when compiling indirect function calls that return a long or float - "long x, y; x = ~y;" was generating incorrect code - structure assignment between a local structure and a function returning pointer to structure when the structure is less than 10 bytes was incorrect Library - Added missing library functions such as strtok etc. - printf now supports width and precision on %f, as well as %e, %E, %g and %G Header Files - Added iosr12.h and ioqt.h/ioqr.h 09/19/02 - V6.05 The COMPILER CAN NOW BE INSTALLED IN PATH WITH SPACES. You may also use spaces in your source file names, but probably not in header file names. IDE - Code Browser bug fixes - Added support for spaces in Paths - Moved Code Browser options to Tools->EnvironmentOptions Library - Added %s to scanf 07/29/02 - V6.04A Compiler - Register History was not tracking that sthx affects two virtual registers. For example, this caused problem when passing an expression + to a function. - assignment to a single byte structure was incorrect 06/10/02 - V6.04 IDE - Added FirstErr/NextErr - Improved fast FindInFiles using builtin search functions instead of external grep program Compiler - Assignment to a bitfield in the first byte was incorrect - TSX was incorrectly eliminated because the optimizer wrongly set TSX as not needed after encountering a ldx ?,x instruction - some inline structure assignment and 8 bit unsigned div/mod incorrectly did pulh/ldx with pulh trashing the index used in ldx - Register History incorrectly treating any ?,X as frame pointer references even though they may be a dynamic pointer offset - Register History was not invalidating VRs with local variables correctly. This caused problems with char a, *p; a = *p++; a = *p++; - When seeing a "lda/sta pair," Register History did not correctly update the content of ACC Library - _HC08Setup() now default to not do anything. COP and SCI setup should be done using the Application Builder - Added ftoa (see stdlib.h) for converting FP to ASCII. 04/23/02 - V6.03 Structure Debug Info is being generated for PRO version IDE - Added Code Browser - Added GP32 Application Builder! Compiler - various bug fixes: unsigned int x 256 (or << 8) was incorrect; unsigned << 1 was incorrect; assigning a "literal" to a pointer got the incorrect address; and some peephole errors were fixed. 01/24/02 - V6.02 IDE - general improvements: ^tab between opened editor, Find/FindNext work much better etc. - Project files now use relative pathnames for the source files - Added a checkbox in Project->Options->Compiler for "int size enum" for backward compatibility - ASCII Download with "Wait for '*'" protocol works better Compiler - It is now OK to have non-initialized items in the abs_address pragma region - Added a flag for -intenum for int size enum (default char size if possible) - left shifting by one or two using the extended addressing did not propagate the carry bit from the low byte correctly. Library - tolower and toupper were missing. 11/27/01 - V6.01 ADDed support for hardware dongles (optional) Compiler - complete tracking of unsigned char in expressions. Generating correct code in all cases of >>, div/mod and comparison. - passing the address of a local/parameter variable caused subsequent local/parameter arguments in the same function call (e.g. args to the "left" of this one) not passed correctly. 11/05/01 - V6.00D Driver and Linker - ilst08 the listing file generator is now called by the driver, and not by the linker - the linker is now called ilink08. If you are calling the linker directly, use ilink08 ... instead of ilinkw -08 ... Compiler - better code for --char_var - an overly aggressive peephole was deleting sthx/ldhx (rare) - an overly aggressive peephole was deleting lda 2,x ... lda 2,SP - the compiler was generating mov #,* clr * for assigning address of a global variable to a global variable. However, this is incorrect if "global1" is the address of a literal string. Disabled this code pattern. Library - the library is now compiled with -xmem to be compatible w/ xmem environment 09/14/01 - V6.00C Compiler - some peephole errors. This also caused printf to loop Assembler - the assembler was not accepting "mov x+,..." addressing mode Library - Changed startup file to use SP to store into "data" and not fetch from "idata" since some 08MON code does not like SP to point to non-RAM 09/07/01 - V6.00B Compiler - small enums can now be char type - function returning byte now uses A instead of r0/r1 pair with no extension to int size. Function prototype must be used. - better code for i = (a << 8) | b and i = (a << 8) + b idiom for packing an integer (b must be unsigned char) - inline asm referencing local (char) variable was generating incorrect code - accessing a 16 bit IO register should be done high byte first (e.g. TCNT) Library - added getchar, sscanf, and scanf 07/27/01 - V6.00A Compiler - Better code for utilizing LDHX for 16 bit operations with direct page variables and constants - Better code for shifting local variables in place - ~ operator was causing internal error Library - some long expressions caused undefined symbols error in the library 07/17/01 - V6.00 Initial Release ICC08 is a full featured ANSI C Development Tool with easy to use IDE, support for all ANSI C language features including 32-bit long, 32-bit float.