⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 install.txt

📁 FreeRTOS 是一个源码公开的免费的嵌入式实时操作系统
💻 TXT
📖 第 1 页 / 共 2 页
字号:

INSTALLATION OF CC8E


SYSTEM REQUIREMENTS
-------------------

The CC8E compiler uses 32 bit processing (console application) and
runs on IBM-PC compatible machines using Windows (95/98/me/NT/2000/
XP).

The installation program runs under Windows. Around 3-5 MB of free
disk space is needed to complete installation.



INSTALLATION
------------

A Windows installation program is available. The installation is
completed by a few simple steps.

A license file is needed to install a licensed compiler edition.
This file should preferably be stored at the same folder as the
installation program. Otherwise the license file has to be located
during the installation process.

CC8E is ready to compile C files after installation. Header and C
source files have to be created and edited by separate tools (not
included), for instance in the MPLAB suite.

The CC8E files can be deleted without any uninstallation procedure.



ZIP FILE
--------

The compiler is alternatively supplied as a ZIP file if the Windows
installation program can not be used for some reason. A tool like
PKUNZIP or WINZIP is required to extract the files into the desired
compiler folder.

First create a directory/folder on the hard disk where the compiler
files should be located. Most application programs are found in the
"Program Files" folder on the C: drive.



SUPPORT FOR LONG FILE NAMES
---------------------------

CC8E supports long file names. It is also possible to use spaces in
file names and include directory names.

Equivalent include directory option formats:

   -I"C:\Program Files\cc8e"
   -IC:\progra~1\cc8e

Equivalent include file formats:

   #include "C:\Program Files\cc8e\C file"
   #include "C:\progra~1\cc8e\Cfile~1"

The alternative to long names is the truncated short format. The
truncated form is decided by the file system. The best guess
consists of the 6 first characters of the long name plus ~1. The
last number may be different (~2) if the first 6 characters are
equal to another name in the same directory.

MPLAB version 5 uses and displays the short format only.




USER INTERFACE
--------------

The CC8E compiler is a command-line program. It requires a list of
command line options to compile a C source file and produce the
required files.

Starting CC8E from Windows can be done from the Start->Run menu.
Then type the full path name including cc8e.exe (or use Browse). The
list of compiler command line options are then written to the
screen. The normal way of using CC8E is to use it as a tool from an
integrate environment like MPLAB.

In a MSDOS window, the compiler is invoked by writing (note that
the full path may have to be written):

  cc8e

This produces an list of the valid arguments to the compiler.

Compiling a program is done by:

  cc8e sample1.c

Generating an assembly file:

  cc8e -a sample1.c



MPLAB SUPPORT
-------------

CC8E can be used inside the MPLAB environment. Project setup is
easy, especially the single module mode. The output from the
compiler is shown in the MPLAB 'Output' window. POINT-AND-CLICK on
error messages is supported.

  MPLAB version 7.xx           : supported
  MPLAB version 6.30 and later : supported
  MPLAB version 6.00 - 6.20    : limited support - not recommended
  MPLAB version 5.xx           : described in the next section.

SINGLE MODULE MODE: The compiler will generate all required files
for programming and debugging. Both assembly and C level debugging
is available.

MULTIPLE MODULE MODE: The compiler will generate relocatable
assembly, then start MPASM or MPASMWIN and finally use MPLINK to
generate the HEX and debugging files used by MPLAB. This means that
the debugging have to be done in assembly mode. The main advantage
of using multiple modules is integration with assembly modules.


Preparing for a new project:

First install and start MPLAB.

Create a new project by clicking on the "New Project" icon, or
selecting the menu item "Project->New". Write the name of the
project. Then decide the Directory where to store the project files,
or use the "Browse..." button to select a directory. Click on "OK".
MPLAB will create two files <project>.mcp and <project>.mcw in this
directory, and display a window containing the project name on top.

Define the device by selecting the menu item "Configure->Select
Device". Select for example PIC18F452.

Define the configuration bits by selecting the menu item "Configure->
Configuration Bits". This is interesting only if you are programming
a real device. Select the right oscillator, watchdog mode and so on.

For high level debugging you select menu item "Debugger->Select
Tool" and then for example MPLAB ICD 2 or MPLAB SIM. If you are not
debugging, but want to program devices then select "Programmer->
Select Programmer" and then MPLAB ICD 2 or another tool.

Select menu item "Project->Select Language Toolsuite" (or right-
click on the project name and then click on "Select Language
Toolsuite"). Then click on the button at the right of the Active
Toolsuite. Select "B Knudsen Data CC8E". Then select in "Toolsuite
Contents" the "CC8E C Compiler" item. Select the Browse button down
to the right. You now have to find and select the compiler
executable. After selecting this file and clicking Open, the full
path and name will appear in the "Location" field. This field can
also be edited manually. Click OK.

Select menu item "Project->Build Options->Project" or right-click on
the project name and then "Build Options...". Enter a path for
"Include Path, $(INCDIR)", for example by using the Browse button
to the right. This path should normally point to the compiler
directory which contains header and math include files. Note that
directory names containing spaces have to be written according to
the rules described earlier (in section SUPPORT FOR LONG FILE
NAMES). It may be required to enter doublequotes " " manually if the
path contains spaces. Note that the string should NOT end with
backslash+doublequote \" because then the options will not be
forwarded correctly to the compiler. The other options forwarded to
the compiler can be changed on the "CC8E C Compiler" card item.
Click OK.

NOTE: ICD 2 debugging need resource reservation to avoid problems.
Upper addresses of RAM and CODE space is used by the ICD 2 module,
and 2 stack level. The definition of these reservations are normally
found in the header files (i.e. 18F452.h), but may not be present in
all header files. Note that ICD 2 reservations are different from
ICD reservations. Please check and update the header file, or get an
updated header file. When the header is correct, add option
-DICD2_DEBUG to the compiler build options (Field "Additional
Command-Line Options").

Adding and changing command line options:
Select menu item "Project->Build Options->Project" or right-click on
the project name and then "Build Options...".  Then click on the
"CC8E C Compiler" TAB. Options can be entered as a string in
"Additional Command-Line Options" field. Multiple include paths
need a separate -I<path> for each directory to be searched.


Working with a single module:

After creating the project (as described earlier), MPLAB displayed a
window at the left side where project files can be inserted. It is
required to create the files before they are added to the project.
By clicking on the right mouse button on the "Source Files" item, it
is possible to add source files. You can also do this by selecting
the menu item "Project->Add files to Project". Select a single main
C file.

The Build all (ctrl-F10) will build the project. The Output window
will state BUILD SUCCEEDED or BUILD FAILED. If build failed it will
be required to correct the wrong input. It is possible to use POINT-
AND-CLICK on the error messages.

On successful build it will be possible to run and debug the code in
ICD 2 or the MPLAB simulator, and to program the device for normal
target execution.

NOTE: When displaying variables in the Watch window (View->Watch),
variables are by default displayed as 8 bit HEX values. When the
variables to be displayed have been added to the Watch window,
select "Properties ..." by right-clicking in the Watch window (chose
the last menu item). Then change "Watch Properties" according to
your preferences for each variable selected. For bit variables you
first change the "Format" to "Single Bit", then select the right bit
number (0..7).

NOTE: When displaying the simulator trace (View->Simulator Trace),
there will be no source code information. A disassembly listing is
displayed, containing labels as only high level information. If the
trace is important, try the compiler option -CA to enable assembly
mode debugging.


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -