public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Peter Graf <p.graf@itknet.de>
To: ecos-discuss@sources.redhat.com
Subject: Re: [ECOS] sscanf() vs. fgetc()
Date: Thu, 12 Jul 2001 05:57:00 -0000	[thread overview]
Message-ID: <3.0.5.32.20010712145511.0093c540@128.128.128.220> (raw)
In-Reply-To: <3B4D832C.370985AE@redhat.com>

Hi Jonathan,

thank you very much for trying the example. Indeeed very kind of you!

>Hmm....
>
>cyg_thread_create()...
>cyg_thread_resume...
>fgetc()...
>fgetc() done.

Why doesn't fgetc() block in your case?
Were there characters in the serial buffer?
For me, fgetc() does block due to empty buffer.

>fgetc()...
>loop...
>sprintf...
>sscanf...
>sscanf done.
>loop...
>main() finished
>
>This was on a PC target FWIW.

Which priority value did you have for the sscanf() thread?
I had the default of "10", which means lower priority than
the "9" in the fgetc() thread.
(Otherwise sscanf() works for me as well.)

>Perhaps you should step into sscanf() and see where it stops.

I tried, of course. Singlestepping has the tendency of being a bit
problematic on my target.
(probably due to optimized code, and the way singlestepping works without
hardware support).
I experience sigtraps when trying to singlestep my way down. Ignoring them,
I end up
in the scheduler, but don't understand too much of what is going on there.
(Not sure if I can get any meaningful results this way.)

>Or if it gets stuck, press Ctrl-C and then "info threads", then switch to
the main thread
>and do a backtrace.

Ctrl+C doesn't work for my Hitachi SH3 target. I help myself with an NMI
button, so I can see memory contents, but have no easy way to get back into
the main() context.

Peter


  reply	other threads:[~2001-07-12  5:57 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-07-11 14:09 [ECOS] Linux over RedBoot Venkat Mynampati
2001-07-11 14:36 ` Jonathan Larmour
2001-07-11 14:53 ` Gary Thomas
2001-07-11 20:32   ` Fabrice Gautier
2001-07-11 23:37     ` Jesper Skov
2001-07-12  5:11       ` Gary Thomas
2001-07-12  5:30         ` Fabrice Gautier
2001-07-12  5:39           ` Gary Thomas
2001-07-12  5:45             ` Jesper Skov
2001-07-12  1:54 ` [ECOS] sscanf() vs. fgetc() Peter Graf
2001-07-12  3:23   ` Peter Graf
2001-07-12  3:28   ` Robin Farine
2001-07-12  3:42     ` Jonathan Larmour
2001-07-12  5:02       ` Robin Farine
2001-07-12  3:45     ` Peter Graf
2001-07-12  4:00   ` Jonathan Larmour
2001-07-12  5:57     ` Peter Graf [this message]
2001-07-12  6:13       ` Jonathan Larmour
2001-07-12  7:43         ` Peter Graf
2001-07-12 11:17           ` Robin Farine
2001-07-12 11:55             ` Jonathan Larmour
2001-07-13  2:33               ` Peter Graf
2001-07-13  2:33             ` Peter Graf

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=3.0.5.32.20010712145511.0093c540@128.128.128.220 \
    --to=p.graf@itknet.de \
    --cc=ecos-discuss@sources.redhat.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).