From: Bernd Sprenger <sprenger@Robotics.Stanford.EDU>
To: ecos-discuss@sourceware.cygnus.com
Subject: [ECOS] Problems with the PowerPC simulator
Date: Thu, 04 Nov 1999 12:39:00 -0000 [thread overview]
Message-ID: <3821EEFF.57B6A468@robotics.stanford.edu> (raw)
I have a problem using eCos together with the PowerPC simulator (and
GDB). I have installed the sourceware distribution of ecos-1.2.1 and
ecosSWtools-990319. Everything went smoothly.
I configured eCos for: --target=powerpc --platform=sim --startup=ram
When I try to run the tutorial I encounter a problem with the powerpc
simulator and gdb
(ecos-1.2.1/doc/tutorials/ecos-tutorial/run-an-ecos-test-case.html):
>powerpc-eabi-run install/tests/kernel/bin_sem0
core_find_mapping() - access to unmaped address, attach a default
map to handle this - addr=0xf000101a nr_bytes=0x1 processor=
0x40118008 cia=0x55b4
The same happens when running with gdb.
I debugged this test program and found out, that the error happens in
the macro HAL_DIAG_WRITE_CHAR defined in the file
ecos-1.2.1/packages/hal/powerpc/sim/v1_2_1/include/hal_diag.h:
#define OEA_DEV 0xf0001000
#define HAL_DIAG_WRITE_CHAR(_c_) \
CYG_MACRO_START \
volatile unsigned char *tty_buffer = \
(unsigned char*)(OEA_DEV + PAL_WRITE_FIFO); \
volatile unsigned char *tty_status = \
(unsigned char*)(OEA_DEV + PAL_WRITE_STATUS); \
unsigned long __state; \
\
HAL_DISABLE_INTERRUPTS(__state) \
if( _c_ != '\r' ) \
{ \
while( *tty_status == 0 ) continue; \
*tty_buffer = _c_; \
} \
HAL_RESTORE_INTERRUPTS(__state); \
CYG_MACRO_END
This lead me to the realization, that the simulated hardware in psim
might not be the one required by eCos. Searching the hal source code
I found the file ecos-1.2.1/packages/hal/powerpc/sim/v1_2_1/runtime/tree
with the following content:
/#address-cells 1
/openprom/init/register/pc 0x100
/iobus@0xf0000000/reg 0xf0000000 0x01000000
/iobus/pal@0xf0001000/reg 0xf0001000 32
Using this definition I was able to run the test program via the
following command line:
>powerpc-eabi-run -o '/#address-cells 1' \
-o '/openprom/init/register/pc 0x100' \
-o '/iobus@0xf0000000/reg 0xf0000000 0x01000000' \
-o '/iobus/pal@0xf0001000/reg 0xf0001000 32' \
install/tests/kernel/bin_sem0
The same is true for the gdb using these paramaters when selecting the
target.
Now my question:
Is there a possibility to configure psim that it uses this device-tree
by default?
Is there a better documentation of psim available than the files its
source directory
(Bugs, Install, Readme, Run and Psim.texinfo)?
Thanks a lot for your help,
Bernd
sprenger@robotics.stanford.edu
next reply other threads:[~1999-11-04 12:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-11-04 12:39 Bernd Sprenger [this message]
1999-11-05 1:28 ` Jesper Skov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3821EEFF.57B6A468@robotics.stanford.edu \
--to=sprenger@robotics.stanford.edu \
--cc=ecos-discuss@sourceware.cygnus.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).