AN2302 Freescale Semiconductor / Motorola, AN2302 Datasheet - Page 29

no-image

AN2302

Manufacturer Part Number
AN2302
Description
EEPROM Emulation for the MC9S12C32
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
EE RAM functions,
no IRQ
NAMES
END
SECTIONS
END
PLACEMENT
END
ENTRIES
ProgFlash
END
MOTOROLA
LASH_REGS
DUMMY_RAM
RAM_FUNCS
DEFAULT_RAM
DEFAULT_ROM,RAM_FUNCTIONS
FLASH_REG
This target is provided to build the RAM functions as a ROM library. The file
EE_RAMfuncs.c is compiled and linked by itself, generating the absolute file
EE_RAMfuncs.abs and the s-record file EE_RAMfuncs.sx.
The linker directive "-AsROMlib" is specified on the linker command line to
enable this to be built as a ROM library, so no main function is expected. The
usual start-up initialisation structure is not generated either.
The linker directive "-M" is specified on the linker command line so that a map
file is generated.
The linker directive "-B" is specified on the linker command line so that an s-
record file is generated.
The ROM library is placed at the addresses specified in the associated prm file,
EERAMfuncs.prm, listed below:
The RAM functions defined within code segment RAM_FUNCTIONS are
placed in section RAM_FUNCS. This is located at the RAM address at which
the functions will be copied to and executed from, this section must have the
attribute READ_ONLY. The addresses allocated for the RAM functions may
need to be expanded if EECALLBACK is defined.
The structure containing the Flash control registers is placed in the section
FLASH_REGS which is located at the default address. If the registers are
remapped after reset then this address will have to be changed. This section
must have the attribute NO_INIT.
The pre-defined segments DEFAULT_RAM and DEFAULT_ROM are listed to
comply with the linker, although they contain no data or code.
Finally, all the RAM function names that are not explicitly called must be listed
under the ENTRIES command.
= NO_INIT
= READ_WRITE
= READ_ONLY
Freescale Semiconductor, Inc.
For More Information On This Product,
EEPROM Emulation for the MC9S12C32
Go to: www.freescale.com
0x100
0x800
0x0FD0 TO 0xFFF;
INTO
INTO
INTO
/* list all RAM function names here */
/* eg EECallBackFunc */
DUMMY_RAM;
RAM_FUNCS;
FLASH_REGS;
TO 0x110;
TO 0x800;
Example Project
AN2302/D
29

Related parts for AN2302