3 relocatable versus absolute section, 1 modularity, 2 multiple developers – Motorola HC12 User Manual

Page 114: Relocatable versus absolute section, Modularity, Multiple developers

Advertising
background image

User’s Manual

MCUez HC12 Assembler

114

Sections

MOTOROLA

Sections

According to the PRM file in

Figure 6-2

:

The section

dataSec

will be allocated starting at

0x0900

.

The section

constsec

will be allocated starting at

0x0C00

.

The section

codeSec

will be allocated starting at

0x0B00

.

6.4.3 Relocatable versus Absolute Section

Generally, developing an application using relocatable sections is
recommended. Relocatable sections offer several advantages.

6.4.3.1 Modularity

An application is more modular when programming can be divided into smaller
units called sections. The sections themselves can be distributed among
different source files.

6.4.3.2 Multiple Developers

When an application is split over different files, multiple developers can be
involved in the development of the application. To avoid major problems when
merging the different files, attention must be paid to the following items:

An include file must be available for each assembly source file
containing XREF directives for each exported variable, constant, and
function. Additionally, the interface to the function should be described
(parameter passing rules and function return value).

When accessing variables, constants, or functions from another module,
the corresponding include file must be included.

Variables or constants defined by another developer must always be
referenced by their names.

Before invoking a function implemented in another file, the developer
should respect the function interface. For instance, parameters are passed
as expected and return value is retrieved correctly.

Advertising