Hi All,
I'm using CW-6.4 Build 6.
My controller is MCF5485.
Recently I was successful with making a small LED blink program work standalone on my target board.
(Bootloading was OK!!) ...
Now I have a problem when I have to burn my custom code.
I'm able to burn the S-rec file into Flash using the Flash programmer.
I also verified with the "Hardware DIag" , that the address 0xFE000000(The location of my code!)
has the S-record file....
But when I try to download the code, After downloading I get the error->
"COULD NOT SET PC TO ENTRY POINT"
I suspect my linker file, as other things seem to be OK.....
Please help me out with my linker file....
LCF FILE::
#/********************************************************************/
#/**************************FPRO3000-Linker***************************/
#/********************************************************************/
#/********************************************************************/
#/**************************MEMORY sections***************************/
#/********************************************************************/
MEMORY
{
sdram (RWX) : ORIGIN = 0x00000500, LENGTH = 0x02000000
mbar (RWX) : ORIGIN = 0x10000000, LENGTH = 0x00040000
boot_flash (RWX) : ORIGIN = 0xFE000000, LENGTH = 0x02000000
}
SECTIONS
{
#/********************************************************************/
#/****************************Definitions*****************************/
#/********************************************************************/
.bootCode :
{
vectors.s (.text)
*(.text)
*(.rodata)
.= ALIGN(0x8);
} > boot_flash
__end_of_text = .;
___DATA_ROM = __end_of_text;
___CODE_ROM = __end_of_text;
___CODE_RAM = ADDR(sdram);
___DATA_RAM = ADDR(sdram);
.sdram : AT(ADDR(.bootCode) + SIZEOF(.bootCode))
{
*(.exception)
.= ALIGN(0x8);
__exception_table_start__ = .;
EXCEPTION
__exception_table_end__ = .;
___sinit__ = .;
STATICINIT
__START_DATA = .;
*(.data)
__START_SDATA = .;
*(.sdata)
__END_DATA = .;
___DATA_END = .;
__END_SDATA = .;
. = ALIGN(0x8);
__SDA_BASE = .;
} > sdram
.bss:
{
___BSS_START = .;
__START_SBSS = .;
*(.sbss)
*(SCOMMON)
__END_SBSS = .;
__START_BSS = .;
*(.bss)
*(COMMON)
__END_BSS = .;
___BSS_END = .;
___HEAP_START = .;
___heap_addr = ___HEAP_START;
___heap_size = 0x02000000;
___HEAP_END = ___HEAP_START + ___heap_size;
___SP_END = ___HEAP_END;
___SP_INIT = ___SP_END + (10*1024);
__SP_INIT = ___SP_INIT;
. = ALIGN(0x8);
} >>sdram
___MBAR = ADDR(.mbar);
__MBAR = ___MBAR;
___SDRAM = ADDR(.sdram);
___SDRAM_SIZE = 0x08000000;
___BOOT_FLASH = ADDR(.bootCode);
___BOOT_FLASH_SIZE = 0x00200000;
___FLASH = ___BOOT_FLASH;
_romp_at = ___DATA_ROM + SIZEOF(.sdram);
.romp : AT(_romp_at)
{
__S_romp = _romp_at;
WRITEW(___CODE_ROM); # FLASH CODE Address
WRITEW(___CODE_RAM); # SDRAM CODE Address
WRITEW(SIZEOF(.bootCode));# CODE Size
WRITEW(___DATA_ROM); # FLASH Initialized DATA Address
WRITEW(___DATA_RAM); # SDRAM Initialized DATA Address
WRITEW(SIZEOF(.sdram)); # DATA Size
WRITEW(0); # NULL Last Entry
WRITEW(0); # NULL Last Entry
WRITEW(0); # NULL Last Entry
}
___free_mem = ___heap_addr + ___heap_size; # for threadx
}
Please post your comments on the file....