Advances in semiconductor Technology has brought out new dimensions to fire ware debugging.
Most of the processes/ controllers incorporate built in debug modules called on chip debugging support.
Though OCD adds silicone complexity and cost factor, from a developer perspective it is a good feature supporting fast and efficient firmware debugging.
On chip Debugging facilities that are integrated to microprocessor/ microcontroller are chip vendor dependent.
They could be added through JTAG port.
Microprocessor/ microcontroller with OCD support incorporate dedicated debug module to existing architecture.
OCD- provides means to set simple breakpoints, query external state of chip, single step through code.
OCD module- implements dedicated register for controlling debugging.