FvM
Joined: 22 Jan 2008 Posts: 5161 Helped: 767 Location: Bochum, Germany
|
27 Jan 2008 11:36 Re: How debugger works? |
|
|
|
|
Hello,
I want to mention a few keywords.
At the processor side, you need hardware debugging capabilities. Minimum would be the ability of single step code execution and existence of a break instruction. To set breakpoints in ROM (or flash) code without changing the ROM content, you need breakpoint registers. A versatile option would be a breakpoint on data space operations. PIC processors have some hardware debugging capabilties excluding data space breakpoints.
As a supplement to hardware debugging capabilities, most debugers use a onchip firmware component, a debug monitor. The monitor has been written using regular procssor instructions, but may access special debugging registers. It could be either permantly resident on chip or loaded to flash when required, as with PIC. Finally, you need a communication channel to external debugger component. Can be a proprietary debugging interface as Microchip ICSP, generalized debugging as JTAG or a standard interface present at the processor as UART, USB or Ethernet.
These are, I think, the basic components needed for in-circuit debugging. The external debugger component could use either in-circuit debugger or a simulator. Cause it only exists in software, it's operation can be understood without knowing about hardware details.
Regards,
Frank
|
|