From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16257 invoked by alias); 25 Apr 2011 12:48:10 -0000 Received: (qmail 16245 invoked by uid 22791); 25 Apr 2011 12:48:09 -0000 X-SWARE-Spam-Status: No, hits=1.4 required=5.0 tests=AWL,BAYES_05 X-Spam-Check-By: sourceware.org Received: from mail63.messagelabs.com (HELO mail63.messagelabs.com) (216.82.242.83) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 25 Apr 2011 12:47:53 +0000 X-VirusChecked: Checked X-Env-Sender: Keith.Smith@PERKINELMER.COM X-Msg-Ref: server-4.tower-63.messagelabs.com!1303735671!109400600!1 X-StarScan-Version: 6.2.9; banners=-,-,- Received: (qmail 23445 invoked from network); 25 Apr 2011 12:47:51 -0000 Received: from 165-88-73-155.perkinelmer.com (HELO MX1.Perkinelmer.com) (165.88.73.155) by server-4.tower-63.messagelabs.com with RC4-SHA encrypted SMTP; 25 Apr 2011 12:47:51 -0000 Received: from AMERMAIL02.PERKINELMER.NET ([165.88.73.151]) by MX1.Perkinelmer.com with Microsoft SMTPSVC(6.0.3790.4675); Mon, 25 Apr 2011 08:47:51 -0400 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Date: Mon, 25 Apr 2011 12:48:00 -0000 Message-ID: <501B5326BE25CC4A9161C264148D5E3901D95A2D@AMERMAIL02.PERKINELMER.NET> In-Reply-To: References: <501B5326BE25CC4A9161C264148D5E3901D9591F@AMERMAIL02.PERKINELMER.NET> From: "Smith, Keith" To: "Sergei Gavrikov" Cc: 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] Issue with PSIM X-SW-Source: 2011-04/txt/msg00091.txt.bz2 Sergei -=20 Thank you very much. The .gdbinit script, especially adding to the device tree did the trick. Keith Smith -----Original Message----- From: Sergei Gavrikov [mailto:sergei.gavrikov@gmail.com]=20 Sent: Saturday, April 23, 2011 5:32 AM To: Smith, Keith Cc: ecos-discuss@ecos.sourceware.org Subject: Re: [ECOS] Issue with PSIM On Fri, 22 Apr 2011, Smith, Keith wrote: > I am attempting to use the PowerPC simulator with an eCos configuration. >=20 > I have successfully (I think) built a version of gdb to support the psim > target. Hi If you do not sure, first try GNU toolchain from eCosCentric ftp://ecos.ecoscentric.com/pub/ecos/gnutools/i386linux/ > I then created a PSIM.ecc file and built the library and tests. Is there something special in PSIM.ecc? First, just try in a fresh dir ecosconfig new psim && ecosconfig tree && make && make tests > When I try to run a test file in gdb, I get an error ' > core_find_mapping() - access to unmaped address, attach a default map to > handle' >=20 > $ powerpc-unknown-eabisim-gdb > ~/PPCSim/PPCSim_install/tests/services/memalloc/common/v3_0/tests/heapte > st >=20 > . . . > (gdb) target sim -t gdb > Connected to the simulator. > (gdb) load you have to add a device to ppc device tree (gdb) target sim -h There is the same example in the eCos User Guide http://ecos.sourceware.org/docs-latest/user-guide/setup-ppc-sim.html So, your .gdbinit file to run eCos tests would be $ cat >.gdbinit << EOF set confirm no define psim=20=20 target sim -o '/iobus/pal@0xf0001000/reg 0xf0001000 32'=20=20 rbreak cyg_test_exit=20=20 rbreak cyg_assert_fail=20=20 end=20 psim load run EOF Example of the GDB session $ powerpc-eabi-gdb -q install/tests/kernel/current/tests/thread0=20 Connected to the simulator. Breakpoint 1 at 0x5b14: file /home/sg/repo/devo/ecos/packages/infra/current/src/tcdiag.cxx, line 254. void cyg_test_exit(void); PASS: EXIT: =20=20 Breakpoint 1, cyg_test_exit () at /home/sg/repo/devo/ecos/packages/infra/current/src/tcdiag.cxx:254 254 cyg_test_exit(void) (gdb) q HTH Sergei > sim_calls.c:104: > sim_load(prog=3D/home/SmithKM/PPCSim/PPCSim_install/tests/service > s/memalloc/common/v3_0/tests/heaptest, from_tty=3D1) called > sim_calls.c:108: sim_load() - first time, create the simulator > (gdb) break main > Breakpoint 1 at 0x96e0: file > /opt/ecos/ecos-3.0/packages/language/c/libc/startup > /v3_0/src/main.cxx, line 91. > (gdb) run > Starting program: > /home/SmithKM/PPCSim/PPCSim_install/tests/services/memalloc/co > mmon/v3_0/tests/heaptest > sim_calls.c:173: sim_create_inferior(start_address=3D0x241c900, ...) > gdb-sim.c:1280: sim_fetch_register(regno=3D176(pc), buf=3D0x241c5bc) > sim_calls.c:141: sim_read(mem=3D0x100, buf=3D0x241c638, length=3D4) =3D 4 > gdb-sim.c:1280: sim_fetch_register(regno=3D1(r1), buf=3D0x241c53c) > gdb-sim.c:1280: sim_fetch_register(regno=3D190(lr), buf=3D0x241c53c) > sim_calls.c:141: sim_read(mem=3D0x96e0, buf=3D0x26aafcc, length=3D4) =3D 4 > sim_calls.c:153: sim_write(mem=3D0x96e0, buf=3D0x269b5c8, length=3D4) =3D= 4 > sim_calls.c:141: sim_read(mem=3D0x100, buf=3D0x241c6a8, length=3D4) =3D 4 > sim_calls.c:238: sim_resume(step=3D0, siggnal=3D0) > core_find_mapping() - access to unmaped address, attach a default map to > handle > this - addr=3D0xf000101a nr_bytes=3D0x1 processor=3D0x25c7338 cia=3D0x5084 >=20 >=20 > I hope I have described my problem in enough detail. >=20 > Keith Smith -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss