AN2302 Freescale Semiconductor / Motorola, AN2302 Datasheet - Page 31

no-image

AN2302

Manufacturer Part Number
AN2302
Description
EEPROM Emulation for the MC9S12C32
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
Example with
Interrupts Enabled
during Programming
EE RAM functions
with IRQs
MOTOROLA
remapped after reset then this address will have to be changed. This section
must have the attribute NO_INIT.
The section RAM_FUNCS is reserved as a space in RAM for the RAM
functions to be copied to for execution. The RAM functions are copied here
from the FLASH_COPY section by the InitRAMFuncs function. The addresses
allocated for the RAM functions may need to be expanded if EECALLBACK is
defined.
Finally, the EE_RAMFuncs ROM library file must be included using the linker
HEXFILE command. An OFFSET must be added to the addresses in this file
so that it is loaded into Flash. The offset is chosen so that when added to the
original addresses the desired Flash address is obtained. This address is
equivalent to FLASH_COPY_START in EE_Emulation.h. No other code must
be located in this address space.
Two targets are provided to build an example with interrupts enabled during
programming and erasure.
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_RAMfuncsIRQ.abs and the s-record file EE_RAMfuncsIRQ.sx.
The compiler directive "-DIRQ_DURING_PROG" is specified on the compiler
command line to activate the code required to enable interrupts to be serviced.
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.
Freescale Semiconductor, Inc.
For More Information On This Product,
EEPROM Emulation for the MC9S12C32
Go to: www.freescale.com
Example Project
AN2302/D
31

Related parts for AN2302