[ECOS] Problem with getchar / gets / fgets

Nicolas Brouard nicolas.brouard@silicomp.ca
Mon Sep 20 13:09:00 GMT 2004


Hi,
Does somebody have a council to solve my problem?
I have a Shell application and input lost a lot of characters. On my PowerPc
MPC860 target, I have to hit each character several times to display it on
minicom.
Thanks
Nicolas

-----Original Message-----
From: Nicolas Brouard [mailto:nicolas.brouard@silicomp.ca]
Sent: Tuesday, September 14, 2004 4:40 PM
To: Gary Thomas
Cc: eCos Discussion
Subject: RE: [ECOS] Problem with getchar / gets / fgets


Nothing special in my eCos configuration.
I use a port of eCos to an EP860CE board (based on Viper port).

the output of ecosconfig export is:
------------------------------------------------------------------
cdl_savefile_version 1;
cdl_savefile_command cdl_savefile_version {};
cdl_savefile_command cdl_savefile_command {};
cdl_savefile_command cdl_configuration { description hardware template
package };
cdl_savefile_command cdl_package { value_source user_value wizard_value
inferred_value };
cdl_savefile_command cdl_component { value_source user_value wizard_value
inferred_value };
cdl_savefile_command cdl_option { value_source user_value wizard_value
inferred_value };
cdl_savefile_command cdl_interface { value_source user_value wizard_value
inferred_value };

cdl_configuration eCos {
    description "" ;
    hardware    ep860ce ;
    template    default ;
    package -hardware CYGPKG_HAL_POWERPC current ;
    package -hardware CYGPKG_HAL_POWERPC_MPC8xx current ;
    package -hardware SILPKG_HAL_POWERPC_EP860CE current ;
    package -hardware CYGPKG_HAL_QUICC current ;
    package -hardware CYGPKG_IO_SERIAL_POWERPC_QUICC_SMC current ;
    package -hardware SILPKG_DEVS_FLASH_EP860CE current ;
    package -hardware CYGPKG_DEVS_FLASH_AMD_AM29XXXXX current ;
    package -template CYGPKG_HAL current ;
    package -template CYGPKG_IO current ;
    package -template CYGPKG_IO_SERIAL current ;
    package -template CYGPKG_INFRA current ;
    package -template CYGPKG_KERNEL current ;
    package -template CYGPKG_MEMALLOC current ;
    package -template CYGPKG_ISOINFRA current ;
    package -template CYGPKG_LIBC current ;
    package -template CYGPKG_LIBC_I18N current ;
    package -template CYGPKG_LIBC_SETJMP current ;
    package -template CYGPKG_LIBC_SIGNALS current ;
    package -template CYGPKG_LIBC_STARTUP current ;
    package -template CYGPKG_LIBC_STDIO current ;
    package -template CYGPKG_LIBC_STDLIB current ;
    package -template CYGPKG_LIBC_STRING current ;
    package -template CYGPKG_LIBC_TIME current ;
    package -template CYGPKG_LIBM current ;
    package -template CYGPKG_IO_WALLCLOCK current ;
    package -template CYGPKG_ERROR current ;
};

cdl_component CYGSEM_HAL_ENABLE_DCACHE_ON_STARTUP {
    user_value 0
};

cdl_option CYGSEM_HAL_ENABLE_ICACHE_ON_STARTUP {
    user_value 0
};

cdl_option CYGHWR_HAL_POWERPC_ENABLE_MMU {
    user_value 0
};

cdl_option CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_BAUD {
    user_value 115200
};

cdl_option CYGBLD_ISO_CTYPE_HEADER {
    inferred_value 1 <cyg/libc/i18n/ctype.inl>
};

cdl_option CYGBLD_ISO_ERRNO_CODES_HEADER {
    inferred_value 1 <cyg/error/codes.h>
};

cdl_option CYGBLD_ISO_ERRNO_HEADER {
    inferred_value 1 <cyg/error/errno.h>
};

cdl_option CYGBLD_ISO_STDIO_FILETYPES_HEADER {
    inferred_value 1 <cyg/libc/stdio/stdio.h>
};

cdl_option CYGBLD_ISO_STDIO_STREAMS_HEADER {
    inferred_value 1 <cyg/libc/stdio/stdio.h>
};

cdl_option CYGBLD_ISO_STDIO_FILEOPS_HEADER {
    inferred_value 1 <cyg/libc/stdio/stdio.h>
};

cdl_option CYGBLD_ISO_STDIO_FILEACCESS_HEADER {
    inferred_value 1 <cyg/libc/stdio/stdio.h>
};

cdl_option CYGBLD_ISO_STDIO_FORMATTED_IO_HEADER {
    inferred_value 1 <cyg/libc/stdio/stdio.h>
};

cdl_option CYGBLD_ISO_STDIO_CHAR_IO_HEADER {
    inferred_value 1 <cyg/libc/stdio/stdio.h>
};

cdl_option CYGBLD_ISO_STDIO_DIRECT_IO_HEADER {
    inferred_value 1 <cyg/libc/stdio/stdio.h>
};

cdl_option CYGBLD_ISO_STDIO_FILEPOS_HEADER {
    inferred_value 1 <cyg/libc/stdio/stdio.h>
};

cdl_option CYGBLD_ISO_STDIO_ERROR_HEADER {
    inferred_value 1 <cyg/libc/stdio/stdio.h>
};

cdl_option CYGBLD_ISO_STDLIB_STRCONV_HEADER {
    inferred_value 1 <cyg/libc/stdlib/atox.inl>
};

cdl_option CYGBLD_ISO_STDLIB_ABS_HEADER {
    inferred_value 1 <cyg/libc/stdlib/abs.inl>
};

cdl_option CYGBLD_ISO_STDLIB_DIV_HEADER {
    inferred_value 1 <cyg/libc/stdlib/div.inl>
};

cdl_option CYGBLD_ISO_STRERROR_HEADER {
    inferred_value 1 <cyg/error/strerror.h>
};

cdl_option CYGBLD_ISO_STRTOK_R_HEADER {
    inferred_value 1 <cyg/libc/string/string.h>
};

cdl_option CYGBLD_ISO_STRING_LOCALE_FUNCS_HEADER {
    inferred_value 1 <cyg/libc/string/string.h>
};

cdl_option CYGBLD_ISO_STRING_BSD_FUNCS_HEADER {
    inferred_value 1 <cyg/libc/string/bsdstring.h>
};

cdl_option CYGBLD_ISO_STRING_MEMFUNCS_HEADER {
    inferred_value 1 <cyg/libc/string/string.h>
};

cdl_option CYGBLD_ISO_STRING_STRFUNCS_HEADER {
    inferred_value 1 <cyg/libc/string/string.h>
};

cdl_option CYGBLD_ISO_C_TIME_TYPES_HEADER {
    inferred_value 1 <cyg/libc/time/time.h>
};

cdl_option CYGBLD_ISO_C_CLOCK_FUNCS_HEADER {
    inferred_value 1 <cyg/libc/time/time.h>
};

cdl_option CYGBLD_ISO_SIGNAL_NUMBERS_HEADER {
    inferred_value 1 <cyg/libc/signals/signal.h>
};

cdl_option CYGBLD_ISO_SIGNAL_IMPL_HEADER {
    inferred_value 1 <cyg/libc/signals/signal.h>
};

cdl_option CYGBLD_ISO_SETJMP_HEADER {
    inferred_value 1 <cyg/libc/setjmp/setjmp.h>
};
------------------------------------------------------------------
If I enable MMU, DCACHE and ICACHE, I have better results : less characters
are lost in minicom (about 10% lost).
If I disable MMU, DCACHE and ICACHE, about 80% are lost.

If I use CYGNUM_HAL_VIRTUAL_VECTOR_CONSOLE_CHANNEL_BAUD = 9600, I have
exactly the same results.

I didn't try a simplified setup.

Nicolas


-----Original Message-----
From: Gary Thomas [mailto:gary@mlbassoc.com]
Sent: Tuesday, September 14, 2004 4:09 PM
To: Nicolas Brouard
Cc: eCos Discussion
Subject: RE: [ECOS] Problem with getchar / gets / fgets


On Tue, 2004-09-14 at 13:59, Nicolas Brouard wrote:
> This program behaves perfectly too for me on Powerpc simulator or on
linux.
> But with my powerpc MPC860 target, I have to hit each character several
> times to display it on minicom.
> At the end of the line, I have to hit several times ENTER. When ENTER is
> take into account, the printf("%s", line); works perfectly...
>
> I think it's a problem of communication on the serial port. It seems to be
> the configuration of my ecos library.
>
> But my RedBoot shell works perfectly!

What's special with your eCos configuration?  Can you send the output
of 'ecosconfig export'?  I just ran with a default configuration:
  % ecosconfig new adder852 net
  % ecosconfig tree; make

Have you tried such a simplified setup?

--
Gary Thomas <gary@mlbassoc.com>
MLB Associates


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




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




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



More information about the Ecos-discuss mailing list