[ECOS] I cant use gdb stubs to load hello

Bart Veer bartv@redhat.com
Wed Dec 6 04:31:00 GMT 2000

>>>>> " " == niky  <b4506051@csie.ntu.edu.tw> writes:

     > I make stubs for pc

     > ecosconfig new pc stubs
     > ecosconfig tree
     > make

     > I can execute the version 1.3 prebuild text thread_gdb.exe

     > i386-elf-gdb -nw thread_gdb.exe
     > (gdb)set remotebaud 38400
     > (gdb)target remote /dev/ttyS0
     > (gdb)load
     > (gdb)continue

     > I see

     > PASS:<GDB Thread test OK>
     > EXIT:<done>

     > but I try to execute hello (I make from the version 1.3 example,
     > XCC=i386-elf-gcc)

     > i386-elf-gdb -nw hello
     > (gdb)set remotebaud 38400
     > (gdb)target remote /dev/ttyS0
     > (gdb)load

     > then the pc reboot and does not complete the load.
     > What is wrong?

I suspect you are confusing the stubs configuration and the
application configuration.

When developing for a typical evaluation board, you will need some
kind of ROM monitor running on that board. This can be an existing ROM
monitor which will not know about things like debugging eCos threads,
or it can be RedBoot or gdb stubs or something along those lines. For
the latter you need to configure and build eCos, generating something
that can be blown into EPROM (or whatever is appropriate for your
target hardware). For the PC target you end up with a boot floppy, but
the basic concept is the same.

Then you need a separate eCos configuration for doing actual
application development. This will differ from the stubs configuration
in various ways, for example the application code will typically be
loaded into RAM rather than blown into EPROMs. Application code built
using this configuration can then be loaded into the target hardware
via the ROM monitor.

So what I think you need to do is create another eCos configuration
using e.g. "ecosconfig new pc default", build it, link the "hello
world" application with the resulting libtarget.a, and then things
should work better.


More information about the Ecos-discuss mailing list