From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bart Veer To: b4506051@csie.ntu.edu.tw Cc: ecos-discuss@sources.redhat.com Subject: Re: [ECOS] I cant use gdb stubs to load hello Date: Wed, 06 Dec 2000 04:31:00 -0000 Message-id: <200012061231.eB6CV3922230@sheesh.cygnus> References: <200012060929.RAA13764@ntucst.csie.ntu.edu.tw> X-SW-Source: 2000-12/msg00098.html >>>>> " " == niky 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: > EXIT: > 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. Bart