public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] A hello world problem
@ 2000-12-04  9:32 Lewin A.R.W. Edwards
  2000-12-04  9:52 ` Andrew Lunn
  2000-12-04 11:21 ` Bart Veer
  0 siblings, 2 replies; 8+ messages in thread
From: Lewin A.R.W. Edwards @ 2000-12-04  9:32 UTC (permalink / raw)
  To: ecos-discuss

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/

^ permalink raw reply	[flat|nested] 8+ messages in thread
* Re: [ECOS] A hello world problem
@ 2000-12-06  1:04 Fano Ramparany
  0 siblings, 0 replies; 8+ messages in thread
From: Fano Ramparany @ 2000-12-06  1:04 UTC (permalink / raw)
  To: larwe; +Cc: eCos Disuss

Did you try the Makefile provided in the same directory than hello.c?
I used it w/o any pb.

Fano

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2000-12-06  1:04 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-12-04  9:32 [ECOS] A hello world problem Lewin A.R.W. Edwards
2000-12-04  9:52 ` Andrew Lunn
2000-12-04 10:13   ` Lewin A.R.W. Edwards
2000-12-04 10:26     ` Andrew Lunn
2000-12-04 10:37       ` Lewin A.R.W. Edwards
2000-12-04 11:21 ` Bart Veer
2000-12-04 11:39   ` Lewin A.R.W. Edwards
2000-12-06  1:04 Fano Ramparany

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).