public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Gary Thomas <gary@mlbassoc.com>
To: Tathagata Das <tathagata@alumnux.com>
Cc: ecos-discuss@ecos.sourceware.org
Subject: Re: [ECOS] printf problem
Date: Thu, 10 Aug 2006 15:02:00 -0000	[thread overview]
Message-ID: <44DB4A7D.6000008@mlbassoc.com> (raw)
In-Reply-To: <44DB49C2.4060309@alumnux.com>

Tathagata Das wrote:
> Hi all,
>       I am trying to write serial driver.
> My problem is printf is working in cyg_user_start function, but does not 
> work from any thread.
> I have debugged. From thread context, serial_write function is not invoked.
> 
> diag_printf is working in thread.
> 
> Here is my program ----
> 
> void entry_point1(cyg_addrword_t data)
> {
>        for(;;) {
>                cyg_thread_delay(100);
>                diag_printf("\n5");
>                printf("0");
>        }
> }
> 
> void entry_point2(cyg_addrword_t data)
> {
>        for(;;) {
>                cyg_thread_delay(200);
>                diag_printf("\n6");
>                printf("1");
>        }
> }
> 
> void cyg_user_start(void)
> {
>        printf("tatha");
>        cyg_thread_create(4, entry_point1, (cyg_addrword_t) "A", "Thread 
> 1", (void *) stack[0], 4096,  &thread1, &thread_s[0]);
>        cyg_thread_create(4, entry_point2, (cyg_addrword_t) "B", "Thread 
> 2", (void *) stack[1], 4096,  &thread2, &thread_s[1]);
>        cyg_thread_resume(thread1);
>        cyg_thread_resume(thread2);
> 
> }
> 
> I am geting "tatha", "5" and "6" ... but not getting "0" or "1"
> 
> Probably I am missing something.
> I will be very pleased if somebody help me.

How did you configure 'printf' to use your serial driver?
Does your serial driver (any functions) ever get called?

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

  reply	other threads:[~2006-08-10 15:02 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-10 14:57 Tathagata Das
2006-08-10 15:02 ` Gary Thomas [this message]
2006-08-10 15:09   ` Tathagata Das
  -- strict thread matches above, loose matches on Subject: below --
2010-05-31 18:27 Manuel Borchers
     [not found] ` <alpine.DEB.2.00.1005312056160.5904@sg-laptop>
2010-06-01  8:49   ` Manuel Borchers
2010-06-01 10:52     ` Manuel Borchers
2010-06-01 16:56       ` Manuel Borchers
2004-08-30 15:52 [ECOS] Printf problem Aniket S Joshi
2004-08-30 14:10 Aniket S Joshi
2004-08-30 14:31 ` Andrew Lunn

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=44DB4A7D.6000008@mlbassoc.com \
    --to=gary@mlbassoc.com \
    --cc=ecos-discuss@ecos.sourceware.org \
    --cc=tathagata@alumnux.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).