This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Problem with scanf and printf


Sorry for short of information.

It is a new platform on MIPS.
So HAL is written by me and it is new. I am also writing a Serial driver for this new platform.
Printf is working if it is called from cyg_user_start function. But if I create one thread from cyg_user_start and in that thread if i call cyg_thread_delay
then after that print is not working. This is my problem number 1.
My second problem is scanf. I have noticed that when scanf is called, serial_read (packages/io/serial/v2_0/src/common/serial.c) is called with *len = 256.
Then cotrol stuck into the while loop (size < *len).
I tried to print out the value that I scanned but control does not come out from scanf function.


Hope this time I am clear.
If you need any more information please tell me

Regards
Tatha

Gary Thomas wrote:

Tathagata Das wrote:


Hi ,
my scanf function is not working. Printf is working but after cyg_thread_delay call it is not working too.


Here is my configuration :
CYGDAT_LIBC_STDIO_DEFAULT_CONSOLE = "/dev/ser0" CYGPKG_IO_SERIAL_TTY = 1
CYGPKG_IO_SERIAL_TTY_TTY0 = 0


In Serial driver DEVTAB_ENTRY is like this

DEVTAB_ENTRY( test_serial_iol,
"/dev/ser0",
0,
&cyg_io_serial_devio,
tes_serial_init,
test_serial_lookup, // Serial driver may need initializing
&test_serial_channel );


How can you expect any real help from a message like this?
You've not told us anything about your problems:
* What's the platform?
* Have you made modifications to eCos [your own drivers, HAL, etc]?
* How does 'scanf()' fail?
etc

Without details, your query is pretty useless :-(


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]