Hi
As an starting point, here are the steps for the mcf5213- very similar
1. Download dBUG source ode
http://www.freescale.com/files/netcomm/software/app_software/dbug_rom_monitors/M5213EVB_DBUG_SRC.zip...
2. Look for mwerks.h, flash.lcf
3. Inside LCF:
*(.relocate_code)
*(.relocate_const)
*(.relocate_data)
4. Inside mwerks.h:
#pragma define_section relocate_code ".relocate_code" far_absolute RX
#pragma define_section relocate_data ".relocate_data" far_absolute RW
#pragma define_section relocate_const ".relocate_const" far_absolute R
#define __relocate_code__ __declspec(relocate_code)
#define __relocate_data__ __declspec(relocate_data)
#define __relocate_const__ __declspec(relocate_const)
5. For a variable is used as follows:
__relocate_data__
char ovbuffer[60];
__relocate_const__ char
erase_flash[] = "Erasing Flash...";
6. For a function:
__relocate_code__
static uint8
dldbug_getchar(void)
{ ... }
Hope this gives you a hint, also the AN3521SW has a source code.