<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=gb2312" http-equiv=Content-Type>
<META content="MSHTML 5.00.2314.1000" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2>
<DIV><FONT size=2>Hi,</FONT></DIV>
<DIV><FONT size=2>I have problem building flash image for Motorola FADS860 
</FONT></DIV>
<DIV><FONT size=2>evaluation board.</FONT></DIV>
<DIV><FONT size=2>The BSP is derived from eth_comm, I modified start.S 
to</FONT></DIV>
<DIV><FONT size=2>add some initialization code for FADS860 board and relocated 
it</FONT></DIV>
<DIV><FONT size=2>at section .entry which load address start at flash reset 
vector.</FONT></DIV>
<DIV><FONT size=2>I also modified linkcmds which listed below to locate 
all</FONT></DIV>
<DIV><FONT size=2>sections in dram except the section .entry. In the end of 
start.S,</FONT></DIV>
<DIV><FONT size=2>it will copy the .text, .data and .vectors from flash to 
dram.</FONT></DIV>
<DIV><FONT size=2>But when I finished building samples based on this BSP and 
program</FONT></DIV>
<DIV><FONT size=2>the image to flash memory using mpc8bug software, I find only 
the</FONT></DIV>
<DIV><FONT size=2>section .entry is programmed to flash, all other sections are 
</FONT></DIV>
<DIV><FONT size=2>loaded to dram instead of flash !</FONT></DIV>
<DIV><FONT 
size=2>/*--------------------------------------------------------------*/</FONT></DIV>
<DIV><FONT size=2>OUTPUT_FORMAT("elf32-powerpc", 
"elf32-powerpc",<BR>              
"elf32-powerpc")<BR>OUTPUT_ARCH(powerpc)<BR>SEARCH_DIR(/usr/local/powerpc-rtems/lib);</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>ENTRY(start)</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>MEMORY<BR> {<BR> ram   : org = 0x00000000, 
l = 4M<BR> flash : org = 0x02800000, l = 2M<BR> dpram : org = 
0xFF000000, l = 16K<BR> }</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>SECTIONS<BR>{<BR> .entry :<BR> {<BR>   
*(.entry)<BR>   . = ALIGN(0x10);<BR>   copy.src = 
.;<BR> } > flash</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2> /* IMPORTANT: section ".vectors" must be the first in 
RAM ! */<BR> .vectors 
:          AT 
(copy.src)<BR> {<BR>   copy.dest = .;<BR>   
*(.vectors)<BR>   . = ALIGN(0x10);<BR>   copy.tmptop.vec = 
.;<BR> } > ram</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2> .text 
:             AT 
(copy.tmptop.vec - copy.dest + copy.src)<BR>   {<BR>   
text.start = .;<BR>   *(.entry2)<BR>   
*(.text)<BR>   *(.rodata)<BR>   
*(.gnu.linkonce.r*)<BR>   *(.rodata1)<BR>   
*(.gnu.linkonce.t.*)<BR>   *(.descriptors)<BR>   /* 
.gnu.warning sections are handled specially by elf32.em.  
*/<BR>   *(.gnu.warning)<BR>   *(rom_ver)<BR>   
etext = ALIGN(0x10);<BR>   _etext = .;</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>   __CTOR_LIST__ = .;<BR>   
LONG((__CTOR_END__ - __CTOR_LIST__) / 4 - 2)<BR>   
*(.ctors)<BR>   LONG(0)<BR>   __CTOR_END__ = .;</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>   __DTOR_LIST__ = .;<BR>   
LONG((__DTOR_END__ - __DTOR_LIST__) / 4 - 2)<BR>   
*(.dtors)<BR>   LONG(0)<BR>   __DTOR_END__ = .;</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>   *(.lit)<BR>   
*(.shdata)<BR>   *(.init)<BR>   *(.fini)<BR>   . = 
ALIGN(0x10);<BR>   _endtext = .;<BR>   text.end = 
.;<BR>   copy.tmptop.txt = .;<BR> } > ram</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2> text.size = text.end - text.start;</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2> /* R/W Data */<BR> .data 
:             AT 
(copy.tmptop.txt - copy.dest + copy.src)<BR> {<BR>   
*(.data)<BR>   *(.data1)<BR>   
*(.gnu.linkonce.d.*)<BR>   PROVIDE (__SDATA_START__ = 
.);<BR>   *(.sdata)<BR>   . = ALIGN(0x10);<BR>   
copy.tmptop.dat = .;<BR> } > ram</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2> PROVIDE (__EXCEPT_START__ = 
.);<BR> .gcc_except_table : AT (copy.tmptop.dat - copy.dest + 
copy.src)<BR> {<BR>   *(.gcc_except_table)<BR>   . = 
ALIGN(0x10);<BR>   copy.tmptop.exc = .;<BR> } > 
ram<BR> PROVIDE (__EXCEPT_END__ = .);</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2> __GOT_START__ = .;<BR> .got 
:              
AT (copy.tmptop.exc - copy.dest + copy.src)<BR> {<BR>   s.got = 
.;<BR>   *(.got.plt) *(.got)<BR>   . = 
ALIGN(0x10);<BR>   copy.tmptop.got = .;<BR> } > 
ram<BR> __GOT_END__ = .;</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2> .got1 
:             AT 
(copy.tmptop.got - copy.dest + copy.src)<BR> {<BR>   
*(.got1)<BR>   . = ALIGN(0x10);<BR>   copy.tmptop.gt1 = 
.;<BR> } > ram</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2> PROVIDE (__GOT2_START__ = .);<BR> PROVIDE 
(_GOT2_START_ = .);<BR> .got2 
:             AT 
(copy.tmptop.gt1 - copy.dest + copy.src)<BR> {<BR>   
*(.got2)<BR>   . = ALIGN(0x10);<BR>   copy.tmptop.gt2 = 
.;<BR> } > ram<BR> PROVIDE (__GOT2_END__ = .);<BR> PROVIDE 
(_GOT2_END_ = .);</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2> PROVIDE (__FIXUP_START__ = .);<BR> PROVIDE 
(_FIXUP_START_ = .);<BR> .fixup 
:            AT 
(copy.tmptop.gt2 - copy.dest + copy.src)<BR> {<BR>   
*(.fixup)<BR>   . = ALIGN(0x10);<BR>   copy.tmptop.fix = 
.;<BR> } > ram<BR> PROVIDE (_FIXUP_END_ = .);<BR> PROVIDE 
(__FIXUP_END__ = .);</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2> PROVIDE (__SDATA2_START__ = .);<BR> .sdata2 
:           AT 
(copy.tmptop.fix - copy.dest + copy.src)<BR> {<BR>   
*(.sdata2)<BR>   . = ALIGN(0x10);<BR>   copy.tmptop.sda = 
.;<BR> } > ram</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2> copy.size = copy.tmptop.sda - copy.dest;</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2> .sbss2 :<BR> {<BR>   *(.sbss2)<BR> } 
> ram<BR> PROVIDE (__SBSS2_END__ = .);</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2> __SBSS_START__ = .;<BR> .bss 
:<BR> {<BR>   bss.start = .;<BR>   *(.bss) *(.sbss) 
*(COMMON)<BR>   . = ALIGN(4);<BR>   bss.end = .;<BR> } 
> ram<BR> __SBSS_END__ = .;</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2> bss.size = bss.end - bss.start;</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2> /* reserve 16KByte for stack... */<BR> stack.end = 
bss.end + 16K;<BR> PROVIDE(_end = stack.end);</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2> dpram : 
<BR> {<BR>          m860 = 
.;<BR>          _m860 = 
.;<BR>          . += (8 * 
1024);<BR>        } > dpram</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2> .line 0 : { *(.line) }<BR> .debug 0 : { *(.debug) 
}<BR> .debug_sfnames 0 : { *(.debug_sfnames) }<BR> .debug_srcinfo 0 : 
{ *(.debug_srcinfo) }<BR> .debug_pubnames 0 : { *(.debug_pubnames) 
}<BR> .debug_aranges 0 : { *(.debug_aranges) }<BR> .debug_aregion 0 : 
{ *(.debug_aregion) }<BR> .debug_macinfo 0 : { *(.debug_macinfo) 
}<BR> .stab 0 : { *(.stab) }<BR> .stabstr 0 : { *(.stabstr) 
}</FONT></DIV>
<DIV><FONT 
size=2>/*-----------------------------------------------------------*/</FONT></DIV>
<DIV><FONT size=2>
<DIV><FONT size=2>It seems the "AT" command didn't work at all.</FONT></DIV>
<DIV><FONT size=2>Can anybody tell me what's wrong with the precedure 
?</FONT></DIV>
<DIV><FONT size=2>How to build boot image for my board ?</FONT></DIV>
<DIV>(I'm using rtems-4.5.0-beta1c)</DIV>
<DIV> </DIV>
<DIV><FONT size=2>Thanks in advance !</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>Li HongSong</FONT></DIV></FONT></DIV>
<DIV> </DIV></FONT></DIV></BODY></HTML>