From: Grant Edwards <grante@visi.com>
To: Joel Brenner <"\x03joel".brenner@tchip.com>
Cc: gdb@sourceware.cygnus.com
Subject: Re: Semihosting output on ARM7TDMI
Date: Tue, 14 Aug 2001 07:56:00 -0000 [thread overview]
Message-ID: <20010814095805.A8415@visi.com> (raw)
In-Reply-To: <3B791E3D.A993411F@tchip.com>
On Tue, Aug 14, 2001 at 02:49:01PM +0200, Joel Brenner wrote:
> Hi I'm using JEENI debug module wich supports semihosting (libc) on a
> ARM7TDMI target. I'make use of function printf() from newlib wich seems
> to work.
> I've tried to execute "printf("abc\n\n");" and I've logged the ADP
> communication:
> ....
> R=0001000d H->T CI_HADP: ADP_Execute 00000000
> rx: [T=0 L=24] 01 d1 d1 01 0d 00 01 80 00 00 00 00 ff ff ff ff ff ff ff
> ff 00 00 00 00
> R=8001000d H<-T CI_HADP: ADP_Execute 00000000
> rx: [T=0 L=36] 05 d2 d1 01 69 00 00 80 00 00 00 00 ff ff ff ff ff ff ff
> ff 00 00 00 00 04 00 00 00 04 00 00 00 61 62 63 0a
> R=80000069 H<-T CI_CLIB: CL_Write 00000000 00000004 00000004 0a636261
> tx: [T=0 L=28] 05 d2 d2 01 69 00 00 00 00 00 00 00 ff ff ff ff ff ff ff
> ff 01 00 00 00 04 00 00 00
> R=00000069 H->T CI_CLIB: CL_Write 00000001 00000004
> rx: [T=0 L=33] 05 d3 d2 01 69 00 00 80 00 00 00 00 ff ff ff ff ff ff ff
> ff 00 00 00 00 01 00 00 00 01 00 00 00 0a
> R=80000069 H<-T CI_CLIB: CL_Write 00000000 00000001 00000001 0000000a
> tx: [T=0 L=28] 05 d3 d3 01 69 00 00 00 00 00 00 00 ff ff ff ff ff ff ff
> ff 01 00 00 00 01 00 00 00
> R=00000069 H->T CI_CLIB: CL_Write 00000001 00000001
> rx: [T=0 L=28] 02 d4 d3 01 01 00 02 80 00 00 00 00 ff ff ff ff ff ff ff
> ff 20 00 02 00 00 00 00 00
> R=80020001 H<-T CI_TADP: ADP_Stopped 00020020 00000000
How handy!
> but no message are printed to gdb console. Are the above
> messages correct? Whath is the command to enable semihosting?
> Where GDB puts the receved strings ?
IIRC, The RDI interface code writes semihosting output data to
whatever filedescriptor is requested. I think your request are
for fd 0. The CL_Write data is fd,len,len,data. I've no clue
why the length is there twice.
There is an internal file table that translates from "RDI" fd
number to Unix FILE pointers. The table is initialized to be
empty, and then filled in when the semi-hosting client opens
files.
It looks like it needs to be changed so that it is
pre-initialized so that stdin, stdout, and stderr are
"pre-opened". I think you'll need to change the code in
rdi-share/hsys.c HostSysInit() so that fds 0,1,2, are
initialized to map to FILE pointers stdin, stdout, stderr.
If you enable debugging info in hsys.c (by adding "#define
DEBUG" at the top of the file) you might be able to get a
better idea about what's going on.
--
Grant Edwards
grante@visi.com
next prev parent reply other threads:[~2001-08-14 7:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-08-14 4:51 Joel Brenner
2001-08-14 7:56 ` Grant Edwards [this message]
2001-08-14 8:33 ` Andrew Cagney
2001-08-14 8:46 ` Grant Edwards
2001-08-14 9:11 ` Andrew Cagney
2001-08-14 9:24 ` Grant Edwards
2001-08-14 9:31 ` Keith Seitz
2001-08-14 11:43 ` Grant Edwards
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=20010814095805.A8415@visi.com \
--to=grante@visi.com \
--cc="\x03joelbrenner"@tchip.com \
--cc=gdb@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