This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
confused about running program on remote target
- From: michael shiloh <michael at magrittesystems dot com>
- To: <ecos-discuss at sources dot redhat dot com>
- Date: Wed, 30 Jan 2002 14:18:56 -0800 (PST)
- Subject: [ECOS] confused about running program on remote target
hello,
summary: i'm having trouble running an ecos application on a
target, via gdb and a serial port. i tried both "run" and
"continue".
setup:
ecos: from cvs (updated today)
host: linux redhat 7.2
target: x86 pc
binutils: 2.11.2
gcc core: 3.0.3
gcc c, c++: 3.0.3
gdb: 5.1.1
my target is connected to my host via a serial port. target
is booting from redboot.bin on a floppy. redboot.bin is the
precompiled version from the website.
target screen shows a boot, and if i run minicom on the
serial port instead of gdb i get the boot messages there:
RedBoot(tm) bootstrap and debug environment - built
05:37:52, Jun 8 2001
Platform: PC (I386)
Copyright (C) 2000, 2001, Red Hat, Inc.
RAM: 0x00000000-0x000a0000, 0x0007c080-0x000a0000 available
RedBoot>
(now quit minicom and reboot)
i build hello.c for my target:
# file hello
hello: ELF 32-bit LSB executable, Intel 80386, version 1,
statically linked, not stripped
and attach using gdb:
# i386-elf-gdb -nw hello
GNU gdb 5.1.1
[...]
This GDB was configured as "--host=i686-pc-linux-gnu --target=i386-elf"...
(gdb) set remotebaud 38400
(gdb) target remote /dev/ttyS0
Remote debugging using /dev/ttyS0
0x00007f38 in ?? ()
at
/home/mshiloh/ecos/cvs/ecos/packages/language/c/libc/startup/current/src/atexit.cxx:123
123 } // atexit()
Current language: auto; currently c++
(gdb) load
Loading section .text, size 0x7ab0 lma 0x108000
Loading section .rodata, size 0x265 lma 0x10fab0
Loading section .data, size 0x248 lma 0x10fd18
Start address 0x108000, load size 32605
Transfer rate: 20064 bits/sec, 74 bytes/write.
(gdb) run
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /home/mshiloh/ecos/cvs/ecos/examples/hello
Don't know how to run. Try "help target".
now try using "continue" instead of "run":
[...]
(gdb) continue
Continuing.
(at this point it hangs, without having printed anything)
so my main question is how do i run a program on my target?
possibly related, can anyone tell me if there is a problem
with the "atexit()" line? is it an error, or is it just
telling me where it's stopped? is this ok?
any help much appreciated.
thanks,
michael