by the way I'm using CodeWarrior 5.9.0 build 2502
I put my software into a EXTERNAL FLASH project.
Then I selected for the memory locations in Processor Expert INTERNAL RAM if I just start the program it runs fine.
However if I try to upload it with the FLASHTOOL it says that the data I want to FLASH is out of FLASH area.
Now I modified the .lcf-File so that everything is placed into FLASH and placed the copy table at the end of the .lcf-file like I found in Targeting Coldfire document.
(Does anybody know another/additional documentation that shows how to copy from FLASH to RAM)
With my modifications the FLASHTOOL doesn't complain anymore, but the program doesn't run.
If I press debug after flashing it stops at location 0x0 with 0xbababababa inside.
This is my .lcf-file:
## ###################################################################
##
## THIS BEAN MODULE IS GENERATED BY THE TOOL. DO NOT MODIFY IT.
##
## Filename : EXTERNAL_FLASH.lcf
##
## Project : Project
##
## Processor : MCF54455VR266
##
## Compiler : CodeWarrior MCF C Compiler
##
## Date/Time : 24/07/2008, 11:50
##
## Abstract :
##
## This file is used by the linker. It describes files to be linked,
## memory ranges, stack size, etc. For detailed description about linker
## command files see CodeWarrior documentation. This file is generated by default.
## You can switch off generation by setting the property "Generate linker file = no"
## in the "Build options" tab of the CPU bean and then modify this file as needed.
##
## (c) Copyright UNIS, spol. s r.o. 1997-2007
##
## UNIS, spol. s r.o.
## Jundrovska 33
## 624 00 Brno
## Czech Republic
##
## http :
www.processorexpert.com## mail :
info@processorexpert.com##
## ###################################################################
KEEP_SECTION { .vectortable }
MEMORY {
interrupts (RX) : ORIGIN = 0x80000000, LENGTH = 0x00000300
code (RX) : ORIGIN = 0x80000300, LENGTH = 0x00005354
data (RW) : ORIGIN = 0x80005654, LENGTH = 0x000029AC
}
SECTIONS {
.interrupts :AT (0x04000000)
{
___VECTOR_RAM = .;
* (.vectortable)
. = ALIGN (0x4);
} > interrupts
.text :AT (0x04000000 + SIZEOF(.interrupts))
{
* (.text)
. = ALIGN(0x4);
* (.rodata)
. = ALIGN(0x4);
___ROM_AT = .;
___DATA_ROM = .;
} > code
.data : AT (0x04000000 + SIZEOF(.interrupts) + SIZEOF(.text)) #AT(___ROM_AT)
{
___PLL_CODE_START =.;
* (.changePllCode)
. = ALIGN(0x4);
___PLL_CODE_END =.;
___PLL_CODE_SIZE = ___PLL_CODE_END - ___PLL_CODE_START;
___DATA_RAM = .;
* (.exception)
. = ALIGN(0x4);
__exception_table_start__ = .;
EXCEPTION
__exception_table_end__ = .;
___sinit__ = .;
STATICINIT
___DATA_START =.;
* (.data)
. = ALIGN (0x4);
___DATA_END =.;
__SDATA_START =.;
* (.sdata)
. = ALIGN (0x4);
__SDATA_END = .;
__SDA_BASE = .;
. = ALIGN(0x4);
} > data
.bss : AT (0x04000000 + SIZEOF(.interrupts) + SIZEOF(.text) + SIZEOF(.data))
{
__START_SBSS = .;
* (.sbss)
*(SCOMMON)
__END_SBSS = .;
__START_BSS = .;
* (.bss)
* (COMMON)
__END_BSS = .;
. = ALIGN(0x4);
} >> data
# Heap and Stack sizes definition
___heap_size = 0x400;
___stack_size = 0x400;
# 32 Kbytes Internal SRAM
___RAMBAR = 0x80000000;
___RAMBAR_SIZE = 0x00008000;
___SP_AFTER_RESET = ___RAMBAR + ___RAMBAR_SIZE - 4;
___SP_SIZE = 0x0400;
___HEAP_START = .;
___HEAP_END = ___HEAP_START + ___heap_size;
___SP_END = ___HEAP_END;
___SP_INIT = ___SP_END + ___stack_size;
___heap_addr = ___HEAP_START;
___heap_size = ___HEAP_END - ___HEAP_START;
__SP_INIT = ___SP_INIT;
# _romp_at = ___ROM_AT + SIZEOF(.data);
_romp_at = 0x04000000 + 0x8000 ;
.romp : AT(_romp_at)
{
__S_romp = _romp_at;
WRITEW(0x04000000);
WRITEW(0x80000000);
WRITEW(0x7fff);
WRITEW(0);
WRITEW(0);
WRITEW(0);
}
}