AN2616 Freescale Semiconductor / Motorola, AN2616 Datasheet - Page 37

no-image

AN2616

Manufacturer Part Number
AN2616
Description
Getting Started with HCS08 and CodeWarrior Using C
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
CodeWarrior C and HCS08
MOTOROLA
CodeWarrior normally places the files within the directory of the project file or
subdirectories; for example:
This section explains how the HCS08 devices are defined within CodeWarrior
C, and how they are used.
In order to be able to write C code, for HCS08 devices, that utilizes the
hardware, it is necessary to define the registers of the modules and their
absolute addresses. Metrowerks provides the register definitions and address
space mapping for each device within two files: the device header file and the
device definition file.
The device header file (MC9S08GB60.h) contains data declarations and
definitions used to reference the device registers. Registers are allocated and
mapped into the device’s address space in the device definition file
(MC9S08GB60.c), using the definitions from the header file.
A program normally consists of the device definition/mapping file
(MC9S08GB60.c), the user code (for example, main.c), and a startup file
(startup.c), which initializes the runtime environment. The startup code, device
and header files are normally included automatically within the project by the
“CodeWarrior project wizard”, along with a default main program (main.c).
Getting Started with HCS08 and CodeWarrior Using C
Freescale Semiconductor, Inc.
For More Information On This Product,
Directory location for sources, binaries, and other files
Compiler settings for each source file
Debugging details
Go to: www.freescale.com
CodeWarrior C and HCS08
AN2616
37

Related parts for AN2616