[ECOS] A hello world problem

Lewin A.R.W. Edwards larwe@larwe.com
Mon Dec 4 09:32:00 GMT 2000


Well, I've been attacking the attempt to get a hello world app built for 
three hours, time to ask for help I think because at the least this 
uncovers some inconsistency in the documentation. This is not strictly an 
eCos question, more a gcc/bash/whoknowswhat type problem. Using Cygwin 
environment at the moment, building for arm-elf. eCos builds fine using the 
graphical config tool.

Now I have a directory structure like this:

c:\ARMDigi - tidy dir to hold all project files
c:\ARMDigi\ecos_work - eCos build dir
c:\ARMDigi\ecos_work\DigiOS_build
c:\ARMDigi\ecos_work\DigiOS_install
c:\ARMDigi\ecos_work\DigiOS_mlt
c:\OS3\hello.c

I open bash to start the build. The tools build/install instructions said I 
should add /tools/H-i686-pc-cygwin/bin to head of PATH, so I do it.

The ecos-tutorial-arm.pdf file says that to make the hello world app, I 
should use the command line "gcc -g -IBASE_DIR/ecos-work/install/include 
hello.c -LBASE_DIR/ecos-work/install/lib -Ttarget.ld -nostdlib". OK, first 
problem there - that commandline will run the _native target_ gcc, not the 
cross-compiler, given the step above. Second problem - the "/install/" path 
fragment is obviously wrong, since the build process appears to prepend the 
.ecc's filename to the output directories when it's building the object tree.

So instead I add /tools/H-i686-pc-cygwin/arm-elf/bin to the head of PATH, 
and replace "/install/" with "/DigiOS_install/" in the command line above, 
and now I get:

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

[and many more errors]

Can anyone help? This is using a "canonical" installation of eCos cygwin 
arm-elf, ie binutils 2.10 and gcc 2.95.2, and eCos 1.3.1 so it ought to work.
=== Lewin A.R.W. Edwards (Embedded Engineer)
Work: http://www.digi-frame.com/
Personal: http://www.zws.com/ and http://www.larwe.com/



More information about the Ecos-discuss mailing list