Vous êtes sur la page 1sur 3

Using the HITECH C compiler with Flowcode

Flowcode versions V4.2 or later now come capable of generating code that is compatible with the HITECH C 10F-12F-16F & 18F compilers. To allow Flowcode to work with the HITECH compiler you must first install the compiler onto your hard drive. The latest version of the HITECH compiler can be downloaded from here http://www.htsoft.com/. The compiler allows you to use it with no restrictions for 45 days. After the 45-day period is over the compiler will change to the lite version which does not optimise the code as much as the pro version does. Once you have installed the compiler you need to point Flowcode to the HITECH installation directory to allow the compiler to be referenced by Flowcode. To do this open Flowcode and then click on the "chip" menu and select "compiler options".

In here you will need to replace the information in the top four text boxes with the following information ensuring that the paths are correct for your installation of HITECH. If your using a 10F, 12F or 16F target Compiler Location 32-bit OS = C:\Program Files\HI-TECH Software\PICC\9.83\bin\picc.exe Compiler Location 64-bit OS = C:\Program Files (x86)\HI-TECH Software\PICC\9.83\bin\picc.exe Params = --CHIP=%p -N48 "%f.c"

If your using a 18F target Compiler Location 32-bit OS = C:\Program Files\HI-TECH Software\PICC-18\9.80\bin\picc.exe Compiler Location 64-bit OS = C:\Program Files (x86)\HI-TECH Software\PICC18\9.80\bin\picc.exe Params = --CHIP=%p -N48 "%f.c"

If your using a Matrix target with Matrix USB bootloader eg MIAC, ECIO Compiler Location 32-bit OS = C:\Program Files\HI-TECH Software\PICC-18\9.80\bin\picc.exe Compiler Location 64-bit OS = C:\Program Files (x86)\HI-TECH Software\PICC18\9.80\bin\picc.exe

Params = --CHIP=%p -N48 %f.c --CODEOFFSET=800h --ROM=default,-0-7FF --OUTPUT=inhx032 The next two text boxes control the linker settings and require the following information. You should ensure that the path to the Flowcode directory is correct. Flowcode v4 Linker Location 32-bit OS = C:\Program Files\Matrix Multimedia\Flowcode V4\Tools\DoNothing\DoNothing.exe Linker Location 64-bit OS = C:\Program Files (x86)\Matrix Multimedia\Flowcode V4\Tools\DoNothing\DoNothing.exe Linker Parameters = Flowcode v5 Linker Location 32-bit OS = C:\Program Files\Flowcode\v5\Tools\DoNothing\DoNothing.exe Linker Location 64-bit OS = C:\Program Files (x86)\Flowcode\v5\Tools\DoNothing\DoNothing.exe Linker Parameters =

Following are a few things to look out for when using the HITECH compiler. Otherwise you will receive the message "Unrecognised File Type" when trying to compile.

1) 2) 3)

There must be no spaces in the Flowcode filename. There must be no punctuation in the Flowcode filename. The Flowcode filename must not start with a number.

The following PICmicro targets have been created to work with this new HITECH compatibility, and will currently only work when used with the HITECH compiler: PIC10F devices : 10F200, 10F202, 10F204, 10F206, 10F220, 10F222 New PIC16/18 devices which are currently unsupported by the BoostC compiler. If you are using the ICD functionality with the HITECH compiler then you must ensure that the communications speed in the project options is set to approx 3x what it would be for the default BoostC speed. For example at a clock speed of 19660800Hz the default ICD rate is 9. Multiplying 9 by 3 gives a rate of 27, which should allow the ICD to work when compiled with HITECH.

If you wish to restore the Flowcode settings to the default BoostC compiler, you can simply click the "restore defaults" button on the "compiler options" screen, or consult the Flowcode help file which contains the appropriate settings. In v5 there is an option to save the edited configuration settings. After you have changed all the settings and tested they work go back into the compiler options, type in a name for your configuration eg "HiTech 16 9.83 + PPP" and click the disk icon to save the configuration. You can then use the drop down selection to choose between the default and your edited settings.

Fonte: http://wwww.matrixmultimedia.com/mmforums/viewtopic.php?f=26&t=6812

Vous aimerez peut-être aussi