This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: A hello world problem


> 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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]