GDB
2004-05-28 by Micron Engineering
Yahoo Groups archive
Index last updated: 2026-04-28 23:31 UTC
Thread
2004-05-28 by Micron Engineering
I have a simple question: is it possible debug a program running from flash with gdb and a jtag interface? If yes, please tell me the configuration and/or where I may download gdb and/or the gdb stub. Best regards, Massimo Manca, Micron Engineering
2004-05-28 by Michael Anburaj
Hi Massimo, --- Micron Engineering <micronpn@...> wrote: > I have a simple question: is it possible debug a > program running from > flash with gdb and a jtag interface? Yes. > If yes, please > tell me the > configuration and/or where I may download gdb and/or > the gdb stub. You can download the arm-elf binaries from http://www.ariusdsp.com/~gnuarm/files.html or any other source. Invoke insight (arm-elf-gdb should invoke insight debugger or \ufffdarm-elf-gdb \ufffdw\ufffd): $ arm-elf-insight Your_image.elf Choose ARM/ethernet target & give the IP of the JTAG OCD box. You can do a connect & set break point at the target debug location & reset the board, it should run & break at the location if it ever hits. [ FYI: you cannot exceed more than 2 break points when debugging flash area, since the debugger can only make use of the hardware breakpoints ] You don't need GDB stubs on your target hardware for debugging through JTAG interface. I guess the target option ARM/ethernet talks to the JTAG interface using Angel debug protocol. I used JEENI & it worked fine for me (except when it encountered a \ufffdbx\ufffd, stepi or nexti acts like continue). Cheers, -Mike. __________________________________ Do you Yahoo!? Friends. Fun. Try the all-new Yahoo! Messenger. http://messenger.yahoo.com/
2004-06-03 by Charles Manning
On Friday 28 May 2004 20:30, Micron Engineering wrote: > I have a simple question: is it possible debug a program running from > flash with gdb and a jtag interface? If yes, please tell me the > configuration and/or where I may download gdb and/or the gdb stub. > Best regards, > Massimo Manca, Micron Engineering I don't think jtag +flash really works via a gdbstub, but I could be wrong. The jtag EmbeddedICE interface uses special debug registers in the core which, AFAIK, are not visible from code space which means that the gdbstub cannot access them. AFAIK gdbstub only works for executing programs in RAM. Some JTAG debuggers (eg. bdi2000) emulate the gdb remote interface and convert the gdbremote commands into their corresponding JTAG embedded ICE commands. There are two ways of trapping code in the EmbeddedICE(ie for breakpoints and single stepping). One is to trap on a specific pattern (software breakpt) and the other is to trap at a specific address (hardware breakpt). When debugging a RAM program we can trap on specific patterns and can have (almost) unlimited breakpoints by just setting those patterns in RAM at the breakpoint addresses. Since we can't easily modify code in flash we have to use the trap on address approach which means we can only set one or two breakpoints. -- CHarles