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: Booting from floppy and debug


Roland Caßebohm wrote:
> 
> My target is an i386-PC and I configered ecos to boot from floppy.
> 
> ecosconfig new pc net
> ecosconfig add ne2000
> ecosconfig check
> ecosconfig tree
> 
> After this I open the configuration with configtool and change the startup
> type to FLOPPY.
> 
> Then build ecos.

Not entirely sure here because of what you say below, but it looks like you
are mixing command line use and GUI use. This may not work well as they
expect different layouts. You may find that your change to FLOPPY startup
didn't take effect.

> Last I build a test program as follows:
> 
> i386-elf-gcc -c -o net.o -g -D__ECOS -Wall -I../ecos_install/include
> -ffunction-sections -fdata-sections net.c
> i386-elf-gcc -nostartfiles -L../ecos_install/lib -Wl,--gc-sections -o net
> net.o -Ttarget.ld -nostdlib
> i386-elf-objcopy -O binary net net.bin
> 
> And copy to floppy whith:
> dd if=net.bin of=/dev/fd0
> 
> Ecos is booting from this floppy and starts correctly the test program.

It does start? Good.

> Because of the ne2000 driver which isn't working correct I want to debug the
> test program with gdb over serial line.
> I tryed to connect to ecos with the folowing commands:
> 
> i386-elf-gdb -nw net
> 
> (gdb) set remotebaud 38400
> (gdb) target remote /dev/ttyS0
> 
> but the connection fails.
> 
> What can I do to get this work?

It's busy running your program, not a GDB stub :-). If you want to debug
your program it's better to write RedBoot onto a floppy and then download
your program over serial to it using GDB, and then run it using GDB.

Jifl
-- 
Red Hat, Rustat House, Clifton Road, Cambridge, UK. Tel: +44 (1223) 271062
Maybe this world is another planet's Hell -Aldous Huxley || Opinions==mine


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