* [ECOS] Issue with PSIM
@ 2011-04-22 18:28 Smith, Keith
2011-04-23 9:33 ` Sergei Gavrikov
0 siblings, 1 reply; 3+ messages in thread
From: Smith, Keith @ 2011-04-22 18:28 UTC (permalink / raw)
To: ecos-discuss
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.
I then created a PSIM.ecc file and built the library and 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
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [ECOS] Issue with PSIM
2011-04-22 18:28 [ECOS] Issue with PSIM Smith, Keith
@ 2011-04-23 9:33 ` Sergei Gavrikov
2011-04-25 12:48 ` Smith, Keith
0 siblings, 1 reply; 3+ messages in thread
From: Sergei Gavrikov @ 2011-04-23 9:33 UTC (permalink / raw)
To: Smith, Keith; +Cc: ecos-discuss
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:<Thread 0 OK>
EXIT:<done>
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [ECOS] Issue with PSIM
2011-04-23 9:33 ` Sergei Gavrikov
@ 2011-04-25 12:48 ` Smith, Keith
0 siblings, 0 replies; 3+ messages in thread
From: Smith, Keith @ 2011-04-25 12:48 UTC (permalink / raw)
To: Sergei Gavrikov; +Cc: ecos-discuss
Sergei -
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]
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.
>
> 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:<Thread 0 OK>
EXIT:<done>
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-04-25 12:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-22 18:28 [ECOS] Issue with PSIM Smith, Keith
2011-04-23 9:33 ` Sergei Gavrikov
2011-04-25 12:48 ` Smith, Keith
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).