A system where a production microcontroller is partially copied in a FPGA of
an
ICE to form a virtual microcontroller. The virtual microcontroller and the production
microcontroller simultaneously and independently run a microcontroller code to
be debugged at a high frequency. The debugging logic can substantially reside in
the ICE and the ICE can perform all debugging functions. The debug interface, residing
in the production microcontroller, can enable the production microcontroller to
communicate with the ICE in low frequencies. The production microcontroller may
request the ICE to lower its frequency when the production microcontroller encounters
a halt due to outside events. A user may command resumption of the operation of
both the production microcontroller and the virtual microcontroller when debugging
of the codes is completed.