[ECOS] A hello world problem

Bart Veer bartv@redhat.com
Mon Dec 4 11:21:00 GMT 2000

>>>>> "Lewin" == Lewin A R W Edwards <larwe@larwe.com> writes:

    Lewin> In file included from ../ecos_work/DigiOS_install/include/stdio.h:56, from 
    Lewin> hello.c:1:
    Lewin> ../ecos_work/DigiOS_install/include/cyg/infra/cyg_type.h:160: parse error 
    Lewin> before '__tmp1'
    Lewin> ../ecos_work/DigiOS_install/include/cyg/infra/cyg_type.h:160: '_name_' 
    Lewin> undeclared here (not in a function)
    Lewin> ../ecos_work/DigiOS_install/include/cyg/infra/cyg_type.h:160: warning: data 
    Lewin> definition has no type or storage class
    Lewin> ../ecos_work/DigiOS_install/include/cyg/infra/cyg_type.h:160: stray '\' in 
    Lewin> program

    Lewin> [and many more errors]

    Lewin> Can anyone help? This is using a "canonical" installation of eCos cygwin 
    Lewin> arm-elf, ie binutils 2.10 and gcc 2.95.2, and eCos 1.3.1 so it ought to work.

Looking at the relevant header file, it appears to be the following
macro that is causing the problem:

#define CYG_UNUSED_PARAM( _type_, _name_ ) CYG_MACRO_START      \
  _type_ __tmp1 = (_name_);                                     \
  _type_ __tmp2 = __tmp1;                                       \
  __tmp1 = __tmp2;                                              \

Note the backslashes at the end of the line. The error messages you
are seeing are a sure sign that they are ignored, i.e. there is junk
data at the end of the line. Under Windows the most likely problem is
that you are using a file containing carriage-return/linefeed pairs
via a binary mount point. The eCos sources and build trees should be
kept on a text mount point. The sources as supplied contain carriage
returns for the benefit of any Windows users who want to use utilities
like notepad. The instructions for installing under Windows,
http://sources.redhat.com/ecos/install-windows.html ,
specifically mention text mount points.

See e.g.
http://sources.redhat.com/ml/ecos-discuss/2000-10/msg00283.html and
http://sources.redhat.com/ml/ecos-discuss/2000-10/msg00297.html for
an earlier discussion.


More information about the Ecos-discuss mailing list