From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25698 invoked by alias); 23 Apr 2011 09:33:21 -0000 Received: (qmail 25690 invoked by uid 22791); 23 Apr 2011 09:33:20 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST X-Spam-Check-By: sourceware.org Received: from mail-fx0-f49.google.com (HELO mail-fx0-f49.google.com) (209.85.161.49) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 23 Apr 2011 09:33:05 +0000 Received: by fxm14 with SMTP id 14so905821fxm.36 for ; Sat, 23 Apr 2011 02:33:03 -0700 (PDT) Received: by 10.223.161.133 with SMTP id r5mr2063767fax.78.1303551130880; Sat, 23 Apr 2011 02:32:10 -0700 (PDT) Received: from sg-laptop ([178.123.242.132]) by mx.google.com with ESMTPS id l4sm1120211fan.14.2011.04.23.02.32.08 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 23 Apr 2011 02:32:09 -0700 (PDT) Date: Sat, 23 Apr 2011 09:33:00 -0000 From: Sergei Gavrikov To: "Smith, Keith" cc: ecos-discuss@ecos.sourceware.org In-Reply-To: <501B5326BE25CC4A9161C264148D5E3901D9591F@AMERMAIL02.PERKINELMER.NET> Message-ID: References: <501B5326BE25CC4A9161C264148D5E3901D9591F@AMERMAIL02.PERKINELMER.NET> User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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] Issue with PSIM X-SW-Source: 2011-04/txt/msg00085.txt.bz2 On Fri, 22 Apr 2011, Smith, Keith wrote: > I am attempting to use the PowerPC simulator with an eCos configuration. > > 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' > > $ powerpc-unknown-eabisim-gdb > ~/PPCSim/PPCSim_install/tests/services/memalloc/common/v3_0/tests/heapte > st > > . . . > (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 target sim -o '/iobus/pal@0xf0001000/reg 0xf0001000 32' rbreak cyg_test_exit rbreak cyg_assert_fail end psim load run EOF Example of the GDB session $ powerpc-eabi-gdb -q install/tests/kernel/current/tests/thread0 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: 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=/home/SmithKM/PPCSim/PPCSim_install/tests/service > s/memalloc/common/v3_0/tests/heaptest, from_tty=1) 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=0x241c900, ...) > gdb-sim.c:1280: sim_fetch_register(regno=176(pc), buf=0x241c5bc) > sim_calls.c:141: sim_read(mem=0x100, buf=0x241c638, length=4) = 4 > gdb-sim.c:1280: sim_fetch_register(regno=1(r1), buf=0x241c53c) > gdb-sim.c:1280: sim_fetch_register(regno=190(lr), buf=0x241c53c) > sim_calls.c:141: sim_read(mem=0x96e0, buf=0x26aafcc, length=4) = 4 > sim_calls.c:153: sim_write(mem=0x96e0, buf=0x269b5c8, length=4) = 4 > sim_calls.c:141: sim_read(mem=0x100, buf=0x241c6a8, length=4) = 4 > sim_calls.c:238: sim_resume(step=0, siggnal=0) > core_find_mapping() - access to unmaped address, attach a default map to > handle > this - addr=0xf000101a nr_bytes=0x1 processor=0x25c7338 cia=0x5084 > > > I hope I have described my problem in enough detail. > > 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