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]
Other format: [Raw text]

Re: comiling and running 'hello world'


On Thu, 2003-10-16 at 02:53, Bier Meister wrote:
> Hi,
> 
> I compiled the 'hello world!' example from the eCos 2.0 user guide using 
> the following command:
> (my current directory is <proj>/proj_install/lib)
> 
> arm-elf-gcc -g -I ../include/ hello.c -L ./ -Ttarget.ld -nostdlib
> 
> I try to run it in the simulator using the following command: $ 
> arm-elf-gdb -nw a.out
> 
> The result is this output and thats it. i can only stop gdb using ctrl+c
> 
> 
> $ arm-elf-gdb -nw a.out
> GNU gdb 5.3
> Copyright 2002 Free Software Foundation, Inc.
> GDB is free software, covered by the GNU General Public License, and you are
> welcome to change it and/or distribute copies of it under certain 
> conditions.
> Type "show copying" to see the conditions.
> There is absolutely no warranty for GDB.  Type "show warranty" for details.
> This GDB was configured as "--host=i686-pc-linux-gnu --target=arm-elf"...
> (gdb) target sim
> Connected to the simulator.
> (gdb) load
> Loading section .rom_vectors, size 0x40 vma 0x8000
> Loading section .text, size 0xfcfc vma 0x8040
> Loading section .rodata, size 0x310 vma 0x17d3c
> Loading section .data, size 0x330 vma 0x1804c
> Start address 0x8040
> Transfer rate: 531424 bits in <1 sec.
> (gdb) run
> Starting program: 
> /home/bcsdohi/programming/1610hello/hello_install/lib/a.out
> *sim: unknown SWI encountered - ffffff - ignoring*
> 

How did you configure the eCos kernel?

> However, if i issue the comiple command : $ arm-elf-gcc -g -I 
> ../include/ hello.c -L ./
> and then try to debug the executable in the simjulator, it works just fine.

Because you're not using the eCos startup code in this case.

-- 
Gary Thomas <gary@mlbassoc.com>
MLB Associates


-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


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