30.11.2014 Views

HI-TECH PICC Release Notes for Version 8.05PL2

HI-TECH PICC Release Notes for Version 8.05PL2

HI-TECH PICC Release Notes for Version 8.05PL2

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>HI</strong>-<strong>TECH</strong> <strong>PICC</strong> <strong>Release</strong> <strong>Notes</strong> <strong>for</strong><br />

<strong>Version</strong> <strong>8.05PL2</strong><br />

27th September 2004<br />

T<strong>HI</strong>S FILE CONTAINS IMPORTANT INFORMATION RELATING TO T<strong>HI</strong>S<br />

COMPILER. PLEASE READ IT BEFORE RUNNING T<strong>HI</strong>S SOFTWARE.<br />

Description<br />

This is a minor patch-level update from the 8.05PL1 release. All reported bugs have<br />

been fixed and comprehensive tests have been carried out to further improve code reliability.<br />

Previous <strong>Version</strong><br />

The previous version was 8.05PL1, released August 2004.<br />

New Features<br />

General<br />

New chips added (8.05) <strong>PICC</strong> now has support <strong>for</strong> the following devices: 10F200,<br />

10F202, 10F204, 10F206, 12F508, 12F509, 12F635, 12F683, 16C557, 16F505,<br />

16F54, 16F57, 16F636, 16F688, 16F716, 16F737, 16F747, 16F767 and 16F777.<br />

New chipinfo entry (8.05) Three new entries have been added <strong>for</strong> chips in the <strong>PICC</strong><br />

chipinfo INI file. The entries are FLASHTYPE, EEPROMSIZE and DATABANK and<br />

relates to the type of flash and EEPROM memory the device has. This in<strong>for</strong>mation<br />

allows the compiler to more accurately select appropriate library routines.<br />

Updated bootloader (8.05) The 16F87x bootloader has been updated to accommodate<br />

higher baud rates. It is also now easier to build and use.<br />

Bootloader Project Files (8.05PL1) Project files are now included <strong>for</strong> building the<br />

bootloader under MPLAB. Also included are pre-compiled versions of the bootloader<br />

and sample application.<br />

1


New Sample Code (8.05PL1) A new sample program designed to run on the PIC-<br />

DEM2 plus demo board is now included in the compiler’s samples directory.<br />

Driver<br />

New option (8.05) An option has been added to allow more control over the RAM<br />

usage in a project.<br />

• The -BANKCOUNT=number option allows the user to specify the number of<br />

RAM banks used in a project. Normally the compiler will assume that all<br />

RAM banks of the processor may have been used. If the user can assure that<br />

the compiled program doesn’t require all of the banks, then the compiler<br />

can per<strong>for</strong>m additional code size optimizations. This is particularly useful<br />

to processors that have four RAM banks but two of the banks only contain<br />

SFR’s (16F72/73/74, 16F870/871/872/873/874, etc...). The allowable bank<br />

counts are: 1,2,3 or 4.<br />

Code Generator<br />

New optimizations (8.05) An additional optimization has been added to the code generation<br />

stage of the compiler.<br />

Assembler<br />

• Additional code size optimizations may be done <strong>for</strong> processors that have<br />

four RAM banks but only two are available <strong>for</strong> general purpose RAM.<br />

New optimizations (8.05) New optimizations have been added to the assembler stage<br />

of the compiler. These optimizations will only become apparent when the assembler<br />

optimizer is enabled.<br />

Changes<br />

<strong>Release</strong> notes<br />

• There has been improvements to an optimization which will attempt to convert<br />

two bit clear on status instructions (bcf) to a single clear file register<br />

(clrf) instruction.<br />

• A new function inlining optimization has been implemented. This optimization,<br />

if efficient to do so, will attempt to inline small functions rather<br />

than call them. When applied, this optimization has the potential to reduce<br />

stack usage and/or code size.<br />

Readme and bugfixes files (8.05) The readme and bugfixes files have been merged<br />

into a single (README) file and contains more detailed in<strong>for</strong>mation about the release.<br />

2


Header files<br />

Changes <strong>for</strong> flash and EEPROM macros (8.05) Previously the flash and EEPROM<br />

access macros and function definitions <strong>for</strong> each chip were defined in that chip’s<br />

specific headerfile, this is no longer the case. As well as the existing EEP-<br />

ROM_SIZE definition, the preprocessor will now define a symbol to indicate<br />

what type of flash access it uses. In pic.h the combination of the FLASH and<br />

EEPROM symbols will determine what sort of access macros to provide.<br />

PICINFO.INI file<br />

12F635 ICD ranges (8.05PL1) The reserved memory locations required <strong>for</strong> using the<br />

ICD2 with the 12F635 has been updated in accordance with the latest Microchip<br />

documentation.<br />

HPDPIC<br />

No longer supported (8.05) The text-based IDE HPDPIC will no longer be supported.<br />

It will still be included with the compiler and it still works, however some some<br />

processors cannot be selected, the compiler’s string packing feature is disabled<br />

and the EEPROM read/write library routines will not automatically be included<br />

if called.<br />

Limitations<br />

Demo Mode<br />

Disabled options After installtion this version of the compiler will run in demo mode.<br />

When operating in demo mode, compilation of programs will be slower then<br />

normal and some command-line options are disabled. The following is a list of<br />

the disabled options:<br />

• -D to predefine macro symbols<br />

• -L to specify libraries to be scanned by the linker<br />

• -L-opt to allow specification of additional linker options<br />

• -M map file generation<br />

• -NORT to disable runtime code inclusion<br />

• -PRE to only preprocess source files<br />

• -RESRAM to reserve RAM ranges<br />

• -RESROM to reserve ROM ranges<br />

• -U to undefine macro symbols<br />

• -V <strong>for</strong> verbose compilation messages<br />

The compiler will continue to operate in demo mode <strong>for</strong> 21 days, after which it will<br />

cease to function. If you have purchased this compiler, these limitations may be removed<br />

by running the activation program. Visit <strong>HI</strong>-<strong>TECH</strong> Software’s web site <strong>for</strong><br />

further details about activation/registration.<br />

3


Preprocessor<br />

Incorrect result <strong>for</strong> sizeof The result of the sizeof preprocessor operator when applied<br />

to a pointer will always return 1. Use of the C sizeof operator will return<br />

the correct value.<br />

Parser<br />

Missing parenthesis not detected A missing end parenthesis is not detected in variable<br />

declarations when the variable is type cast. For example,<br />

static char C @ ((unsigned)&PORTA;<br />

This problem does not appear to affect any output code, but may cause problems<br />

when using third-party software tools.<br />

Qualified arrays generate error The compiler generates an error when compiling<br />

complicated qualified arrays, e.g.:<br />

const char * const * const listnames[] = {menu0, menu1};<br />

The error is not issued if the array is not qualified, or <strong>for</strong> arrays of more basic<br />

types.<br />

Structure initialization Locally defined structures cannot be initialized.<br />

Code Generator<br />

Functions returning ROM structure For Highend devices (17Cxxx), a function cannot<br />

return a copy of a structure which resides in ROM.<br />

Indirect function calls For Highend devices (17Cxxx), certain indirect function calls<br />

with more than one byte of argument may produce incorrect code.<br />

Functions as arguments to printf The argument list to printf or sprintf should not<br />

include function calls. For example,<br />

printf(“x = %f, sin(x) = %f\n”, x, sin(x*3.141592/180.0));<br />

This code demonstrates a workaround:<br />

y = sin(x*3.141592/180.0);<br />

printf(“x = %f, sin(x) = %f\n”, x, y);<br />

Error on initialization of complex bitfields Any structure using bitfields within a structure<br />

or union cannot be initialized. For example, using the following types where<br />

a structure is a member of a union, initialization of the structure’s bitfields will<br />

generate an error.<br />

4


typedef struct {<br />

unsigned b0:1, b1:1, b2:1, b3:1, b4:1, b5:1, b6:1, b7:1<br />

} byte_bits;<br />

typedef union {<br />

byte_bits bits;<br />

char byte;<br />

} byte_or_bits;<br />

This will generate a compiler error:<br />

byte_or_bits example = { {1,0,1,1,0,1,0,0 } };<br />

Instead, use a single value:<br />

byte_or_bits example = { 0b10110100 };<br />

Multiple block variable declaration Functions which have variables declared within<br />

multiple blocks where code within the block requires the use of temporary memory,<br />

may get corrupted when compiled with global optimizations. A workaround<br />

is to move the inner variable declaration outsize of the block.<br />

Libraries<br />

Minimum floating point value The floating point math libraries cannot per<strong>for</strong>m operations<br />

predictably on numbers below the order of 1e-35. The result is either<br />

correct or zero.<br />

Bug Fixes<br />

The following are descriptions of bugs that were present in the previous versions of<br />

this compiler, and which have been fixed in this release.<br />

Driver<br />

Crash linking many files (8.05PL1) For projects with greater than 100 files, the driver<br />

may crash at the link stage. The driver has been updated to account <strong>for</strong> projects<br />

of this size.<br />

Preprocessor<br />

Warning level ignored (8.05PL1) The -W warning level option was ignored by the<br />

preprocessor which resulted in some warning not being shown. This has been<br />

corrected.<br />

5


Preprocessor crashes scanning macros (8.05) A problem with the preprocessor may<br />

cause it to crash when processing macros which have trailing parenthesis missing.<br />

The preprocessor has been altered so as to produce an error message if the trailing<br />

parenthesis is omitted.<br />

Preprocessor crashes on macros functions (8.05) A problem with the preprocessor<br />

may cause it to crash when processing macros which take parameters but were<br />

called with the wrong number of parameters.<br />

The preprocessor has been altered so as to produce an appropriate error message.<br />

Preprocessor treats constants as signed (8.05) The preprocessor incorrectly treats all<br />

constants as signed values. This may lead to unexpected results if using the preprocessor<br />

to compare values. For example #if 1 > 0xFFFFFFFF should be a<br />

false condition if the second operand is treated as unsigned, but true if treated as<br />

signed.<br />

The preprocessor has been fixed to follow the ANSI standard. Values are considered<br />

to be 32-bit values by the preprocessor.<br />

Parser<br />

Crash on missing comma (8.05) A problem in the parser (P1) may cause it to crash<br />

when parsing an enumerated type definition that has a missing comma between<br />

enumerators in the list.<br />

The parser will now generate an error if such a condition is encountered.<br />

Crash on missing union tag (8.05) If a variable declaration is per<strong>for</strong>med using a union<br />

tag that is yet to defined, the parser may crash. For example: union tag var =<br />

{1}; // tag not yet defined<br />

The parser has been changed to handle this correctly.<br />

Hang on missing specifier (8.05) In some instances calls to printf functions where the<br />

parameter was given but no specifier caused the parser to hang. For example:<br />

sprintf(buffer,”The number is”,number);<br />

The parser will now generate an appropriate error message.<br />

Error given <strong>for</strong> LU suffix (8.05) The parser generates an error when encountering<br />

constants with an LU suffix.<br />

This syntax is now accepted.<br />

Code Generator<br />

Variable argument functions not returning (<strong>8.05PL2</strong>) For baseline (12bit) processors,<br />

functions that are not qualified as fastcall and which have a variable number<br />

of arguments (...) may not return. Printf is such a function and runs correctly,<br />

but never returns. Such functions now work as expected.<br />

6


IRP bit selection after call (<strong>8.05PL2</strong>) When an XOR, OR or plus operation occurred<br />

on a char object which required to be accessed indirectly following a function<br />

call in which the IRP bit was modified, the result may incorrectly be assigned to<br />

the wrong bank. This has been fixed.<br />

IRP bank selection bit corruption (8.05) A problem in the code generator lead to the<br />

IRP bank selection bit possibly getting corrupted over a function call. The problem<br />

only manifested itself when assembler optimizations were applied.<br />

The code generator now assumes the IRP bit may get corrupted over a function<br />

call and ensures it is set correctly after the call.<br />

Incorrect bank selection after if (8.05) The wrong bank may get selected <strong>for</strong> midrange<br />

PICs with four banks after an if statement that tests bit object in different<br />

banks. For example:<br />

int i;<br />

if ((RCIF & RCIE)|(TXIF & TXIE))<br />

++i;<br />

--i; //possible wrong bank selection here<br />

The problem has now been fixed.<br />

Assembler<br />

SET/EQU (8.05PL1) Added code to test that SET or EQU doesn’t have the same name<br />

as a macro.<br />

Bank select problem (<strong>8.05PL2</strong>) An assembler optimization problem caused the wrong<br />

bank to be selected in some instances where an assembler level label had multiple<br />

paths of arrival where each path had a different bank selected. This typically<br />

happened where there are many comparisons in a row (eg: switch statements,<br />

multiple if comparisons) followed by access to an object in a bank other than<br />

bank0, followed by a return. This has been fixed.<br />

Wrong bank selected (8.05PL1) A bank selection problem may occur in code which<br />

uses many ’if’ statements in a row, which tested bit objects. This tends to affect<br />

code which is typically written <strong>for</strong> interrupt routines and there<strong>for</strong>e may result in<br />

some ’if’ statements evaluating incorrectly. This problem has been fixed.<br />

Crash with assembler optimizations (8.05) With the assembler (ASPIC) optimizers<br />

enabled, certain very specific sequences of code caused the assembler to crash.<br />

This problem is quite rare and did not affect generated code if the assembler ran<br />

to normal completion.<br />

This problem has now been fixed.<br />

7


Cromwell<br />

Erroneous output on complex return types (8.05) For some functions which use a<br />

complex return type (structure/union pointers) the COF file output may be incorrect.<br />

This problem has been fixed.<br />

Header Files<br />

Missing SSPIE definition (<strong>8.05PL2</strong>) The SFR definition <strong>for</strong> SSPIE was missing <strong>for</strong><br />

the 16C774 processor. This has now been added.<br />

Incorrect SFR addresses (8.05PL1) Some of the SFR definitions in the PIC16F87.H<br />

header file were incorrect. This affected their use on the PIC16F87 and PIC16F88<br />

processors. This has now been corrected.<br />

Typo in 16F7x7 header (8.05) There was a typo in the pic16f7x7.h header file which<br />

resulted in some SFRs not being defined correctly. This has been updated.<br />

PICINFO.INI file<br />

Incorrect ICD2 reservations (<strong>8.05PL2</strong>) The memory ranges required to be reserved<br />

when using the MPLAB-ICD2 on the 16F688 or 12F683 was not correct. This<br />

has been adjusted.<br />

Insufficient RAM definition (8.05PL1) The RAM definition <strong>for</strong> bank 0 of the 16F636<br />

was less than it should have been. This may have resulted in the compiler giving<br />

an out of space error earlier than expected. The correct RAM range has now<br />

been added.<br />

Missing RAM definition (8.05PL1) The RAM definition <strong>for</strong> bank 2 of the 16F688<br />

was missing. This definition has now been added.<br />

Incorrect EPPROM size (8.05PL1) The value of the pre-processor define EEPROM_SIZE<br />

which is obtained from the PICINFO.INI file was incorrect. This has been adjusted<br />

to the correct values.<br />

Incorrect RAM ranges (8.05) The RAM ranges given <strong>for</strong> the rf12F675 (ie, 12F675F/H/K)<br />

was incorrect.<br />

Library Code<br />

Floating point calculations (<strong>8.05PL2</strong>) The library routines ldexp, sqrt, exp, pow,<br />

sinh, cosh & tanh in some instances would erroneously return values of zero.<br />

This has been corrected.<br />

Leap year day incorrect (8.05PL1) The day of the week calculated <strong>for</strong> February 29th<br />

which is generated by the time functions (ctime) was incorrect. This has now<br />

been corrected.<br />

8


Floating point exponent (8.05PL1) The exp() and ldexp() routines did not correctly<br />

do bounds checking where the exponent may overflow. This meant that<br />

caclulations that overflowed returned a result which is significantly incorrect.<br />

These routines now check the limits and will return a maximum value or zero<br />

where appropriate.<br />

Undefined symbol <strong>for</strong> string packing (8.05PL1) The 16F87 and 16F88 processors,<br />

although capable of the string packing optimization, were not getting the correct<br />

library routine linked in to handle it. This would result in an undefined symbol<br />

uses_packed_strings.<br />

The correct library is now linked accordingly.<br />

Incorrect results <strong>for</strong> 32-bit doubles (8.05) Some four-bank processors were not getting<br />

the correct library routine linked which resulted complex assignments (+=,-=,*=,/=)<br />

involving objects in bank 2 and 3 to give incorrect results.<br />

The correct library is now linked accordingly.<br />

Incorrect results <strong>for</strong> atof() and strtod() (8.05) A problem in strtod() (atof() shares<br />

code with this function) may cause an incorrect result if there are leading zeros<br />

specified with the exponent. Only the first two digits of the exponent were read<br />

so that code similar to atof("1.7546e003") will return a value with incorrect<br />

exponent.<br />

The source <strong>for</strong> this function has been corrected and new libraries compiled.<br />

Updates<br />

Monitor the announcements <strong>for</strong>um on <strong>HI</strong>-<strong>TECH</strong> Software’s web site <strong>for</strong> in<strong>for</strong>mation<br />

relating to new versions or patches, and/or subscribe to our announcement mailing list<br />

- send email to <strong>HI</strong>-<strong>TECH</strong> Software’s mailing list <strong>for</strong> more in<strong>for</strong>mation.<br />

9

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!