here`s "where" output: (gdb) where #0 0x8000c44c in ?? () #1 0x800400bc in debug_vector () at /home/.../build/../eCos/packages/hal/mips/arch/current/src/vectors.S:131 #2 0x80000ab8 in ?? () Backtrace stopped: previous frame inner to this frame (corrupt stack?) (gdb)
best regards Bernd -------- Original-Nachricht -------- > Datum: Tue, 18 Dec 2012 10:28:13 +0000 > Von: John Dallaway <j...@dallaway.org.uk> > An: schuster_be...@gmx.net > CC: eCos Discussion <ecos-discuss@ecos.sourceware.org> > Betreff: [ECOS] Re: GDB stub support > Bernd > > On 17/12/12 21:04, Bernd Schuster wrote: > > >> It is perfectly feasible to use a single channel for both debug and > >> diagnostics as you suggest. You should configure eCos (for your > >> application build) with CYG_HAL_STARTUP == "RAM" and with > >> CYGSEM_HAL_USE_ROM_MONITOR enabled. You should then find that (by > >> default) diagnostic/trace messages from your application are routed via > >> the GDB stub and appear within your GDB session on the host. > > > > That means, it is much more comfortable to download only the redboot > > bootloader to my flash memory and download the application (eCos O/S > > together with my own software app) by GDB instead of having already > > everything installed on my MIPS board? I asked this because it will > > take some time to download the application by serial port instead of > > being able to download a new file by ethernet. > > If you have ethernet support built into RedBoot you should also be able > to connect to the GDB stub via TCP for faster download. The default port > number is 9000, so the GDB command would be: > > target remote <target IP address>:9000 > > > I already found the specific ecm file where > > cdl_component CYG_HAL_STARTUP { > > user_value ROMRAM > > }; > > I have to specify RAM instead of ROMRAM. It seams that > > CYGSEM_HAL_USE_ROM_MONITOR is already enabled if I use RAM instead of > > ROMRAM. > > That makes sense. > > >> For avoidance of doubt, you can use the GDB "load" command to download > >> your application to RAM when debugging an application configured for > RAM > >> startup. It is not necessary to load it at the "RedBoot>" prompt. > > > > Do I have to specify the correct RAM-addr where the application has to > be > > downloaded? Because the load command consists only of "load filename". > > If you specify the ELF executable filename when you launch GDB then > symbols will be loaded automatically. You can just use "load" with no > filename and "continue" to start execution. The section records in the > elf file will indicate where each section must be loaded. You do not > need to specify the addresses manually. > > bash$ mipsisa32-elf-gdb myProgram.elf > (gdb) target remote <your parameters> > (gdb) load > (gdb) break web_init > (gdb) continue > > I hope this helps... > > John Dallaway > eCos maintainer > http://www.dallaway.org.uk/john > > -- > Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos > and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss > -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss