Technical information

© Motorola, Inc., 2003
AN2216/D
Rev. 2, 4/2003
MC9S12DP256 Software
Development Using
Metrowerk's Codewarrior
Application Note
by Stuart Robb
Applications Engineer
Motorola, East Kilbride
Introduction
Metrowerk's Codewarrior tool suite provides a set of tools and utilities for
MC9S12DP256 software development. While Metrowerk's documentation
adequately covers the installation and general use of their tools for the
MC68HC12 family of microcontrollers, it doesn’t adequately cover the specifics
of compilation and linking of code modules for execution in the paged memory
environment of the MC9S12DP256. While this application note is not a
substitute for the documentation provided with the Metrowerks tool set, it
attempts to provide the additional details necessary to compile, link and
generate an S-Record object code file that can be executed on the
MC9S12DP256 using Metrowerk's tools for the M68HC12 family. Be sure to
read the Codewarrior documentation to gain an understanding of the compiler,
linker and assembler features. This document is not a substitute for the
Codewarrior documentation.
The MC9S12DP256 Memory Map
The MC68HC12 family consist of 16-bit microcontrollers with a 16-bit program
counter, and therefore cannot directly address more than 64K bytes of
memory. To enable the MC68HC12 family to address more than 64K bytes of
program memory, a paging mechanism was designed into the architecture.
Access to program memory beyond the 64K limit is provided through a 16K
byte window located from $8000 through $BFFF. An 8-bit paging register,
called the PPAGE register, provides access to a maximum of 256, 16K byte
pages or 4 megabytes of program memory. The MC9S12 family adopt a similar
paging mechanism, but the PPAGE register is located at a different address in
the memory map.

Summary of content (24 pages)