Hi,
Try with this, I am not sure it will work...
My First impression is You are doing Wrong calculation for params.It should be ( ORIGIN + LEN )
Changes are indicated by ===>>
//////////////////////// Mcf52223.s
/********************************************************************
*
* This is the main entry point upon hard reset. The memory map is
* setup based on linker file definitions, then the higher level
* system initialization routine is called. Finally, we jump to the
* "main" process.
*/
asm_startmeup:
_asm_startmeup:
move.w #0x2700, sr
/* Save off reset values of D0 and D1 */
//// Get the Exception vector name: Address error here !!!!!!!
move.l d0,d6
move.l d1,d7
/* Initialize RAMBAR1: locate SRAM and validate it */
move.l #__SRAM,d0
add.l #0x21,d0
movec d0,RAMBAR1
/* Locate Stack Pointer */
move.l #__SP_INIT,sp
/* Initialize IPSBAR */
move.l #__IPSBAR,d0
add.l #0x1,d0
move.l d0,0x40000000
/* Initialize FLASHBAR */
move.l #__FLASH,d0
===>> //cmp.l #0x00000000,d0
cmp.l #0x00001000,d0
bne change_flashbar
add.l #0x21,d0
movec d0,RAMBAR0
_continue_startup:
/* Locate Stack Pointer */
move.l #__SP_INIT,sp
/* Initialize the system */
///jsr board_sysinit
jsr Start_It_Up
jsr board_sysinit
/* Save off intial D0 and D1 to RAM */
move.l d6,d0_reset
move.l d7,d1_reset
/* Jump to the main process */
jsr main
// Flash starting out on at address 0x00001000. Problems here...
// vector table starts at 0x00001000
MEMORY
{
flash (RX) : ORIGIN = 0x00001000, LENGTH = 0x0003EF80
===>> //params (RX) : ORIGIN = 0x0003FF80, LENGTH = 0x00000080 //128 bytes
params (RX) : ORIGIN = 0x00040F80 /*( 1000 + 3EF80 )*/ LENGTH = 0x00000080
vectorram (RW) : ORIGIN = 0x20000000, LENGTH = 0x00000400
ram (RW) : ORIGIN = 0x20000400, LENGTH = 0x00007C00
}
Regards,
Kumar