Sections
Section Types
MCUez HC12 Assembler User’s Manual
MOTOROLA Sections 115
6.4.3.3 Early Development
The application can be developed before the application memory map is known.
Often the definitive application memory map can be determined only once the
size required for code and data can be evaluated. The size required for code or
data can be quantified only once the major part of the application is
implemented. When absolute sections are used, defining the definitive memory
map is an iterative process of mapping and remapping the code. The assembly
files must be edited, assembled, and linked several times. When relocatable
sections are used, this can be achieved by editing the PRM file and linking the
application.
6.4.3.4 Enhanced Portability
Since the memory map is not the same for all MCU derivatives, using
relocatable sections allows the user to easily port the code to another MCU.
When porting relocatable code to another target, link the application again with
the appropriate memory map.
6.4.3.5 Tracking Overlaps
When using absolute sections, the programmer must ensure there is no overlap
between sections. When using relocatable sections, the programmer does not
need to be concerned about sections overlapping. The label offsets are evaluated
relative to the beginning of the section. Absolute addresses are determined and
assigned by the linker.
6.4.3.6 Reusability
When using relocatable sections, code implemented to handle a specific I/O
(input/output) device (serial communication device) can be reused in another
application without modification.