ecos platform porting to MPX860

diego diego_iverson@yahoo.com
Mon Jan 7 02:00:00 GMT 2002


hi, i am working on Porting ECOS to PLX PCI 9054RDK-860.
i used a MPCBDM GDB. when i use mpcbdm to download 
the gdb_module.img. the following appeared:
If it is the problem i should change the original MPC.init script.
it seems that the program is not started from the right place. is 
it the relocation problem? 

(i use it on cygwin, win2000)
% ./ppc-eabi-gdb -x mpc.init -nw gdb_module.img
GNU gdb 5.0
Copyright 2000 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "--host=i686-pc-cygwin --target=ppc-eabi"...
MPCBDM version 1.2.1 (FP) patch 2 (JPI) / 2001/06/14
disabled power at port
adapter version 2 initialized
assert HRESET
assert SRESET sequence for immediate debug mode
*** init
Target cpu PVR=0x00500000 PARTNUM=0x00 MASKNUM=0x31 REV_NUM=0x0004
Target cpu is a 'XPC860 Rev. C.1'
BDM initialized
0xfff00100 in ?? ()
SYPCR := (SWTC|16BMT|24BME||28SWF|SWE|SWRI|SWP)
IMMR + 4:System Protection Control Register, UM283
SYPCR = 0xffffff88 = (SWTC=0xffff|BMT=0xff|BME|SWF)
ICTRL := (CTA|3CTB|6CTC|9CTD|12IW0|14IW1|16IW2|18IW3|20SIW0EN|SIW1EN|SIW2EN|SIW3EN|DIW0EN|DIW1EN|DIW2EN|DIW3EN|IFM|ISCT_SER)
SPR 158:Instruction Support Control Register, UM989
ICTRL = 0x00000007 = (CTA=0x0|CTB=0x0|CTC=0x0|CTD=0x0|IW0=0x0|IW1=0x0|IW2=0x0|IW3=0x0|ISCT_SER=0x7)
DER := (|RSTE|CHSTPE|MCIE||6EXTIE|ALIE|PRIE|FPUVIE|DECIE||13SYSIE|TRE||17SEIE|ITLBMSE|DTLBMSE|ITLBERE|DTBLERE||28LBRKE|IBRKE|EBRKE|DPIE)
SPR 149:Debug Enable Register, UM996
DER = 0x7002400f = (RSTE|CHSTPE|MCIE|TRE|SEIE|LBRKE|IBRKE|EBRKE|DPIE)
(gdb) load
Loading section .vectors, size 0x2000 lma 0xfe000000
Loading section .text, size 0x82d4 lma 0xfe002000
Loading section .rodata, size 0xca8 lma 0xfe00a2d8
Loading section .data, size 0x4c8 lma 0xfe00af80
Start address 0xfe000100 , load size 46148
Transfer rate: 123061 bits/sec, 501 bytes/write.
(gdb) c
Continuing.
*** run
*** Resume
*** wait freeze

Program received signal SIGTRAP, Trace/breakpoint trap.
r00=00000000  r01=0002fdf0  r02=000473c0  r03=ff000000  r04=fff00000
r05=0002fe68  r06=000009cf  r07=00008000  r08=8000212b  r09=00000200
r10=00000200  r11=30000000  r12=00010000  r13=00000000  r14=4e800020
r15=00000100  r16=00004000  r17=00000000  r18=00000000  r19=00000000
r20=00000000  r21=00000000  r22=00000000  r23=00000000  r24=000000b2
r25=30000114  r26=00001001  r27=180f767e  r28=00804c06  r29=00000000
r30=0002fe68  r31=00010000
CR := (CR0|4CR1|8CR2|12CR3|16CR4|20CR5|24CR6|28CR7)
SPR 2:Condition Register, UM140
CR = 0x20000200 = (CR0=0x2|CR1=0x0|CR2=0x0|CR3=0x0|CR4=0x0|CR5=0x2|CR6=0x0|CR7=0x0)
ICR := (|RST|CHSTP|MCI||6EXTI|ALI|PRI|FPUVI|DECI||13SYSI|TR||17SEI|ITLBMS|DTBLMS|ITLBER|DTLBER||28LBRK|IBRK|EBRK|DPI)
SPR 148:Interrupt Cause Register, UM994
ICR = 0x10000000 = (MCI)
0xfe000178 <__exception_reset+120>:	I!fnmadd.	f31,f31,f31,f31
0xfe000178 in __exception_reset ()
    at /ecos-c/PROGRA~1/REDHAT~1/eCos/packages/hal/powerpc/mpc8xx/v1_3_1/src/var_misc.c:56
56	}
(gdb) q


>Hi,
>
>On Sun, Dec 16, 2001 at 07:56:08PM +0800, Liu Wensheng wrote:
>> Hi,
>> i want to port ecos to a MPC860 board, but it is not in the list of 
>> boards supported by eCos, i want to know what work i have to do,
>> how much workload will be? and will i have to change a lot of
>> source code? 
>> if anyone have such experience, and tell me something, i will be
>> grateful.
>
>first start reading the docs at
>http://sources.redhat.com/ecos/docs-latest especially 
>http://sources.redhat.com/ecos/docs-latest/porting/index.html
>
>Memorize the "MPC860 PowerQUICC User's Manual" as well as
>"The Programming Environments for 32-Bit Microprocessors"
>(Green Book). :-)
>
>You need some functionality to upload code to your board
>and start it.  (load-go bootstrapper in Flash, JTAG loader, ...)
>
>Use the CVS version (snapshot at
>ftp://ftp.skynet.ie/cvs/ecos-latest.tar.gz )
>
>copy an existing port (MBX would the right for you) with
>renaming the files accordingly. 
>
>adjust the memory layout for matching your board in
>myboard/current/include/pkgconf/mlt_powerpc_*[h,ldi]
>
>After having done the linking stuff right, the core should
>starting execution at the entry point _start in
>arch/current/src/vectors.S. An On-Chip-Debugger would be
>useful, at least some leds would also help.
>
>rewrite the hal_hardware_init macro in myboard/current/src/myboard.S
>(memory initialization, Base/Option Registers, ...)
>
>disable cache/MMU at the beginning
>write a diagnostic serial device driver (quicc/current/src/quicc_smc1.c)
>write a flash driver (if needed)
>write a ethernet driver (if needed)
>
>It is recommended that you do not changing the existing code.
>Copy the parts you have to change (create new packages). Its
>easier when updating to a newer version of eCos.
>
>I did first porting RedBoot to my platform. After having this 
>done you have an working HAL for your platform, and the step
>for running eCos applications should be a small one.
>
>These are not the complete steps to get it working - only that
>i remember on monday morning, but it will give an overview what
>to do.
>
>good luck
>christoph
>-- 

Regards
            diego
            diego_iverson@yahoo.com



_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com



More information about the crossgcc mailing list