External_Flash programmer

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

External_Flash programmer

1,244件の閲覧回数
IsmaelSanchez_R
Contributor I
Hello my name is professor Ismael Sanchez-Rios
 
I am using an M5482Lite board from Freescale. I am using codewarrior for coldfire.
Iam using the Interniche Tecnologies NicheLite TCP/IP stack. I can debug the software
and it runs in the debug mode giving the expected results. The problem is when i want
to run the program in the external rom (external flash memory). I change the address in the
lcf file to FFE00000 hex in the MEMORY section, but the program doesnot run. The lcf file is the following:
 
# Sample Linker Command File for Metrowerks Embedded 68K/ColdFire
#  NOTE: The debugger uses the Illegal Instruction Vector to stop.
#  A small subroutine is written at the location VBR+0x408-VBR+0x40B
#  to handle the exception.  The Illegal Instruction Vector in
#  the the vector table at VBR+0x10 is then pointed to it.  When the
#  debugger encounters an illegal instruction, it jumps to this
#  subroutine, which ends with an RTE, then exits.
#  Do not overwrite this area of memory otherwise the debugger may not
#  exit properly.
MEMORY {
 TEXT (RX) : ORIGIN = 0x00005000, LENGTH = 0 # using External DRAM
 DATA   (RW) : ORIGIN = AFTER(TEXT), LENGTH = 0
}
SECTIONS {
 .main_application :
 {
  *(.text)
  .= ALIGN(0x4);
  *(.rodata)  
 } > TEXT
   .main_application_data :
 {
  . = ALIGN(0x4);
  *(.exception)
  . = ALIGN(0x4);
  __exception_table_start__ = .;
  EXCEPTION
  __exception_table_end__ = .;
  
  ___sinit__ = .;
    STATICINIT
  __START_DATA = .;
  *(.data)
  __END_DATA = .;
  __START_SDATA = .;
  *(.sdata)
  __END_SDATA = .;
  
  __SDA_BASE = .;    # A5 set to  middle of data and bss ...
  __START_SBSS = .;
  *(.sbss)
  *(SCOMMON)
  __END_SBSS = .;
  __START_BSS = .;
  *(.bss)
  *(COMMON)
  __END_BSS = .; 
  . = ALIGN(0x4);
 } > DATA
 __SP_INIT = . + 0x00004000;  # set stack to 0x4000 bytes (16KB)
   ___IPSBAR = 0x40000000; 
 ___heap_addr = __SP_INIT;  # heap grows in opposite direction of stack
 ___heap_size = 0x50000;   # heap size set to 0x50000 bytes (500KB)
 __S_romp = 0x0;     # no ROM in this example
}
 
 
What i am doing wrong? What do i have to change, or add , or delete?
 
I appreciate any help on this
 
thanks for your support
 
 
Professor Ismael Sanchez-Rios
University of Puerto Rico at Bayamon
Department of Electronics and Instrumentation
 
 
 
 
 
 
ラベル(1)
0 件の賞賛
1 返信

334件の閲覧回数
SimonMarsden_de
Contributor II
Sorry, I don't have the board you mention or the TCP/IP stack. However, although it doesn't answer the question directly you might want to try the following:

Use the CodeWarrior Stationery to create a new sample project for an M5485EVB. This will have multiple targets, including one called "M5485 UART SDRAM" for debugging with your code located in SDRAM, and one called "M5485 ROM" for code running in external Flash.

There are a number of key differences between these targets:

(1) In the case of the SDRAM target, the debugger performs some initialisation (including initialising the SDRAM controller) before downloading the code/data into SDRAM.

(2) In the case of the ROM target, the program is executing out of Flash. The program's initialised data starts off in ROM, but gets copied into SDRAM before the main() routine is called

(3) The two targets use *different* Linker Control Files (LCFs). One is called "sdram.lcf" and the other is "rom.lcf"

(4) The SDRAM target's LCF puts the exception vector table at the start of SDRAM, whereas the ROM target locates it at the start of Flash (This is necessary since the CPU will read the table to get its start PC address) and then copies it to SDRAM

Hopefully, by comparing these LCFs you can figure out the problem in your own example. It looks as though what you're currently trying would fail for a number of reasons (Read/Write data not copied from Flash to SDRAM, Vector Table possibly not at start of Flash, etc).


Hope this helps
0 件の賞賛