From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11162 invoked by alias); 27 Jun 2007 19:51:18 -0000 Received: (qmail 11153 invoked by uid 22791); 27 Jun 2007 19:51:17 -0000 X-Spam-Check-By: sourceware.org Received: from wx-out-0506.google.com (HELO wx-out-0506.google.com) (66.249.82.237) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 27 Jun 2007 19:51:13 +0000 Received: by wx-out-0506.google.com with SMTP id h26so284756wxd for ; Wed, 27 Jun 2007 12:51:10 -0700 (PDT) Received: by 10.90.113.18 with SMTP id l18mr1102614agc.1182973870717; Wed, 27 Jun 2007 12:51:10 -0700 (PDT) Received: by 10.90.65.20 with HTTP; Wed, 27 Jun 2007 12:51:10 -0700 (PDT) Message-ID: <2308fb0f0706271251l497b7d46t35cb260563740de2@mail.gmail.com> Date: Wed, 27 Jun 2007 21:21:00 -0000 From: "Tales Toledo" To: "Gary Thomas" Cc: ecos-discuss@ecos.sourceware.org In-Reply-To: <2308fb0f0706211159v174bfae8w7e99244a8a871895@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <2308fb0f0706201318r4526a575q2e21320d692ed3e6@mail.gmail.com> <46798E18.9010204@mlbassoc.com> <2308fb0f0706201347i7a8e01fx7ec2baf0b69f13f6@mail.gmail.com> <2308fb0f0706211159v174bfae8w7e99244a8a871895@mail.gmail.com> X-IsSubscribed: yes Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Subject: Re: [ECOS] PowerPC Redboot porting problems X-SW-Source: 2007-06/txt/msg00258.txt.bz2 Hi Gary you were right. Seems that debug cable gdbinit file and eCos .S were in conflict. The board misconfiguration cause errors that was hard to find due debug tools lack at this case. Thx, TT On 6/21/07, Tales Toledo wrote: > Hi, > > Regarding your questions about the code it seems to be download > correctly since hexdump from bin file is the same as > powerpc-eabi-objdump from elf except for the 0x40000 offset present in > elf file (no problem since this bin should be generated just for ROM). > > Regarding the tools, they are used to download other images/projects > (u-boot) and program FLASH. > > For this project I would like to test and use redboot and that is the > reason why I am boring you an all people with this. > > Right now I'm using gdb 5.0 with mpcbdm 1.2.2 (Unfortunately I don't > have a BDI2000 ;-(.) to load redboot.elf to SDRAM. > $ powerpc-linux-gdb -x board.gdbinit redboot.elf > (gdb) load > Loading section .vectors, size 0x2000 lma 0x40000 > Loading section .text, size 0x1c568 lma 0x42000 > Loading section .rodata, size 0x59b4 lma 0x5e568 > Loading section .data, size 0x11a0 lma 0x63f20 > Start address 0x40100 , load size 151740 > Transfer rate: 134880 bits/sec, 510 bytes/write. > > To run it I a make > (gdb) j *0x40100 > > but as I said before I always got a SIGINT interrupt > > Program received signal SIGINT, Interrupt. > CR :=3D (CR0|4CR1|8CR2|12CR3|16CR4|20CR5|24CR6|28CR7) > SPR 2:Condition Register, UM140 > CR =3D 0x2002608d =3D > (CR0=3D0x2|CR1=3D0x0|CR2=3D0x0|CR3=3D0x2|CR4=3D0x6|CR5=3D0x0|CR6=3D0x8|CR= 7=3D0xd) > ICR :=3D (|RST|CHSTP|MCI||6EXTI|ALI|PRI|FPUVI|DECI||13SYSI|TR||17SEI|ITLB= MS|DTBLMS|ITLBER|DTLBER||28LBRK|IBRK|EBRK|DPI) > SPR 148:Interrupt Cause Register, UM994 > ICR =3D 0x00004000 =3D (SEI) > 0x4b6c0 in ?? () > (gdb) > > looking at objdump and .S files is in the right moment when I tried to > program BR0/CS0 > > ------------------------------ objdump file > 4b6b4: 90 64 01 70 stw r3,368(r4) > 4b6b8: 90 64 01 74 stw r3,372(r4) > 4b6bc: 3c 60 40 00 lis r3,16384 > 4b6c0: 60 63 08 01 ori r3,r3,2049 > 4b6c4: 3c a0 ff 80 lis r5,-128 > 4b6c8: 60 a5 07 74 ori r5,r5,1908 > 4b6cc: 90 64 01 00 stw r3,256(r4) > 4b6d0: 90 a4 01 04 stw r5,260(r4) > 4b6d4: 3c 60 00 00 lis r3,0 > ------------------------------- > > ------------------------------- .S file > lwi r3,0x00802114|(MAMR_PTA<<24) > stw r3,MAMR(r4) > stw r3,MBMR(r4) > > /* > * Base Register initialization. > */ > > /* BOOT ROM */ > lwi r3,0x40000801 # 16-bit, GPCM > lwi r5,0xFF800774 # 7 wait states, up to 8MB > stw r3,BR0(r4) > stw r5,OR0(r4) > > /* ONBOARD SDRAM */ > lwi r3,0x00000081 # 32-bit, UPMA > lwi r5,0xFF800E00 > stw r3,BR1(r4) > stw r5,OR1(r4) > ------------------------------- > > Why does it happen? Do you have an idea? > > Thx again, > TT. > > On 6/20/07, Tales Toledo wrote: > > Hi, > > > > I see some progress now. > > I was downloading .bin file to 0x0 (the same procedure I was using > > before when I tried to download code to RAM an programming to flash). > > I decide to move from .bin to .elf and voil=E1... > > > > Now I have a new message > > > > -------------------------------------------------------------- > > Program received signal SIGINT, Interrupt. > > CR :=3D (CR0|4CR1|8CR2|12CR3|16CR4|20CR5|24CR6|28CR7) > > SPR 2:Condition Register, UM140 > > CR =3D 0x2042488d =3D > > (CR0=3D0x2|CR1=3D0x0|CR2=3D0x4|CR3=3D0x2|CR4=3D0x4|CR5=3D0x8|CR6=3D0x8|= CR7=3D0xd) > > ICR :=3D (|RST|CHSTP|MCI||6EXTI|ALI|PRI|FPUVI|DECI||13SYSI|TR||17SEI|IT= LBMS|DTBLMS|ITLBER|DTLBER||28LBRK|IBRK|EBRK|DPI) > > SPR 148:Interrupt Cause Register, UM994 > > ICR =3D 0x00004000 =3D (SEI) > > 0x4b6c0 in hal_hardware_init () > > --------------------------------------------------------------- > > > > looking at disassembled file > > > > --------------------------------------------------------------- > > 4b6b8: 90 64 01 74 stw r3,372(r4) > > 4b6bc: 3c 60 40 00 lis r3,16384 > > 4b6c0: 60 63 08 01 ori r3,r3,2049 > > 4b6c4: 3c a0 ff 80 lis r5,-128 > > 4b6c8: 60 a5 07 74 ori r5,r5,1908 > > 4b6cc: 90 64 01 00 stw r3,256(r4) > > 4b6d0: 90 a4 01 04 stw r5,260(r4) > > 4b6d4: 3c 60 00 00 lis r3,0 > > 4b6d8: 60 63 00 81 ori r3,r3,129 > > 4b6dc: 3c a0 ff 80 lis r5,-128 > > 4b6e0: 60 a5 0e 00 ori r5,r5,3584 > > 4b6e4: 90 64 01 08 stw r3,264(r4) > > 4b6e8: 90 a4 01 0c stw r5,268(r4) > > --------------------------------------------------------------- > > > > seems that the exception occurs when I'm programming BR0/OR0 > > > > ------------------------------------------- > > /* > > * Base Register initialization. > > */ > > > > /* BOOT ROM */ > > lwi r3,0x40000801 # 16-bit, GPCM > > lwi r5,0xFF800774 # 7 wait states, up to 8MB > > stw r3,BR0(r4) > > stw r5,OR0(r4) > > > > /* ONBOARD SDRAM */ > > lwi r3,0x00000081 # 32-bit, UPMA > > lwi r5,0xFF800E00 > > stw r3,BR1(r4) > > stw r5,OR1(r4) > > ----------------------------------------------- > > > > I didn't see the problem yet. Any idea. > > > > Thanks, > > TT. > > > > > > On 6/20/07, Gary Thomas wrote: > > > -----BEGIN PGP SIGNED MESSAGE----- > > > Hash: SHA1 > > > > > > Tales Toledo wrote: > > > > Hi, > > > > > > > > I'm facing some problems trying to port redboot to MPC885... > > > > I have tried to follow the steps suggested at porting guide. I'm us= ing only > > > > RAM as a first step but unfortunately I can get success. I'm using > > > > Viper files as reference. > > > > > > > > I'm using gdb with mpcbdm and get always the same exception when > > > > running it from RAM. > > > > > > Look carefully - this is failing on the first instruction you downloa= ded, > > > so it most certainly has nothing to do with porting eCos. > > > * Have you verified the code that was downloaded correctly? > > > * Have you successfully executed any code on this platform using th= ese tools? > > > > > > - -- > > > - ------------------------------------------------------------ > > > Gary Thomas | Consulting for the > > > MLB Associates | Embedded world > > > - ------------------------------------------------------------ > > > -----BEGIN PGP SIGNATURE----- > > > Version: GnuPG v1.4.7 (GNU/Linux) > > > Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org > > > > > > iD8DBQFGeY4YmaKbSsQGV8ARAirMAJ9xEKtFrDXYOh5jB59disiPExgbUgCgjT0j > > > xmJBNpW1xfQruVljpMs/JrY=3D > > > =3D/UuG > > > -----END PGP SIGNATURE----- > > > > > > -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss