This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: A hello world problem
- To: "Lewin A.R.W. Edwards" <larwe at larwe dot com>
- Subject: Re: [ECOS] A hello world problem
- From: Andrew Lunn <andrew dot lunn at ascom dot ch>
- Date: Mon, 4 Dec 2000 18:52:33 +0100
- Cc: ecos-discuss at sourceware dot cygnus dot com
- References: <4.3.2.7.2.20001204120947.00ab8e50@larwe.com>
> 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 don't use the GUI, i stick to the nice and friendly CLI on
Linux. Having said that im supprised to see the DigiOS_ bit. My
directories are always without such a prefix. Its a long time since i
read the instructions. Does it suggest you give the ecc config file a
name such as DigiOS? Mine is always ecos.ecc.
> 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:
That looks nearly right. I would of used
arm-elf-gcc -g -I\ARMDigi\ecos_work\DigiOS_install\include hello.c -L \ARMDigi\ecos_work\DigiOS_install\lib -Ttarget.ld -nostdlib
Note the arm-elf-gcc not gcc. Without that it may still use the native
compiler.
See if that makes any difference? The other thing to check is the way
you have the file systems mounted. Some bits have to be mounted text
mode and other binary. Since i unix with grown up line endings i never
looked into this.
Andrew