Difference between revisions of "In Circuit Debugging"

From Flowcode Help
Jump to navigationJump to search
 
(4 intermediate revisions by 2 users not shown)
Line 15: Line 15:
 
*Matrix EB006 PIC Multiprogrammer Versions 7, 8 and 9
 
*Matrix EB006 PIC Multiprogrammer Versions 7, 8 and 9
 
*Matrix EB064 dsPIC Multiprogrammer Version 2
 
*Matrix EB064 dsPIC Multiprogrammer Version 2
 +
*Matrix EB091 dsPIC Programmer
 
*Matrix Flowkit ICD tool - Compatible with MIAC, ECIO, FormulaFlowcode and 3rd party hardware.
 
*Matrix Flowkit ICD tool - Compatible with MIAC, ECIO, FormulaFlowcode and 3rd party hardware.
 +
*Matrix Flowkit II ICD tool - Compatible with Arduino and 3rd party hardware.
 
*More coming soon...
 
*More coming soon...
  
  
==Enabling Ghost==
+
==Ghost Settings==
  
The Ghost features must be enabled by pressing the Ghost button or using the "Debug -> Ghost -> Enable" menu setting
+
Information on setting up and using Ghost is available from the link below.
  
[[File:Ghbut1.jpg|left]][[File:Ghmen1.jpg|240px|center]]
+
[[Ghost_Settings]]
  
  
When the Ghost button is pressed, any Matrix hardware connected to the PC via USB will be detected, and the Ghost capabilities are reported, like this :-
+
==Icon Step Through==
  
[[File:hwdetv9.jpg]]
+
When ICD is active, clicking play on the simulation will cause Flowcode to communicate with the ICD hardware and allow the execution of the simulation to sync up with the execution of the target Microcontroller.
 
 
 
 
If nothing is detected, then the following message is given,
 
 
 
[[File:hwdetnone.jpg]]
 
 
 
 
 
at which point some suitable hardware can be connected to the PC.
 
 
 
 
 
Once you have some Ghost features available, press OK to use the in circuit debugger and port monitor (ICT).
 
 
 
For any new hardware or flowchart changes you must re-compile to chip before using the debugger (but with Ghost still enabled).
 
 
 
 
 
 
 
If you see the following :
 
 
 
[[File:noghost.jpg]]
 
 
 
it means your current FlowCode licence does not support Ghost features, so you will need to upgrade.
 
 
 
 
 
==Configuring Ghost==
 
 
 
[[File:OptsDbg.jpg|right]]
 
 
 
Once enabled you can configure the Ghost Debugger options by clicking the "Debug -> Ghost -> Debugger (ICD)" menu, this will open a new window containing the debugger options.
 
 
 
 
 
===Enable Icon Step Through===
 
 
 
Controls if the ICD functionality is active or not. When active, clicking play on the simulation will cause Flowcode to communicate with the ICD hardware and allow the execution of the simulation to sync up with the execution of the target Microcontroller.
 
  
 
One indication that you are indeed simulating through hardware rather than purely on-screen, is the colour of the position marker being green instead of red -
 
One indication that you are indeed simulating through hardware rather than purely on-screen, is the colour of the position marker being green instead of red -
Line 69: Line 38:
 
The toolbar also shows that you are in debugger mode by changing colour to green :-
 
The toolbar also shows that you are in debugger mode by changing colour to green :-
  
[[File:toolbDbg.jpg]]
+
[[File:GhostButtons_ICDOn.jpg]]
 
 
 
 
===Breakpoint Count===
 
 
 
Specifies the maximum number of breakpoints that can be set in the program.
 
 
 
 
 
===Callstack Depth===
 
 
 
Specifies the maximum number of jumps away from main the target Microcontroller can cope with.
 
 
 
 
 
===Comms Delay===
 
 
 
Specifies the bit delay when talking to the ICD target Microcontroller device. A larger number relates to slower communications speeds so if your having problems getting ICD running try increasing this value.
 
 
 
===Override ICD pins===
 
 
 
By default the ICD pins are wired to the programming pins to allow boards like the EB006 to work correctly. However if your using the Matrix Flowkit hardware then you can in theory use any I/O pin for the ICD communications. Regardless of which pins you are using you must take care not to read or write to the port pins used for ICD to be sure your not corrupting the communications. If you are reading or writing to the same port then be sure to use the masking feature of the input and output icons to leave the ICD pins untouched by the operation.
 

Latest revision as of 11:02, 2 March 2017

<sidebar>Sidebar: Flowcode Help Overview:ChipSpecific</sidebar>


Ghost functionality (formerly ICD - In Circuit Debug) allows Breakpoints, single stepping, and other simulation features such as the Simulation Debugger to work seamlessly with the Flowcode simulation allowing you to rapidly debug your program running directly from the target Microcontroller.


When Ghost is enabled you must re-program the target device to allow the ghost specific code to be loaded onto the target device. Once the device has been programmed it will stay in a waiting state waiting for Flowcode to allow it to start running. Clicking the simulation run or step buttons in Flowcode will trigger the target device to react accordingly. Clicking the simulation stop button will reset the target device so that it restarts from the very start of the program. When disabling Ghost you again need to re-compile and program the device to allow the ghost specific code to be removed from the program.



Ghost Hardware Targets

  • Matrix EB006 PIC Multiprogrammer Versions 7, 8 and 9
  • Matrix EB064 dsPIC Multiprogrammer Version 2
  • Matrix EB091 dsPIC Programmer
  • Matrix Flowkit ICD tool - Compatible with MIAC, ECIO, FormulaFlowcode and 3rd party hardware.
  • Matrix Flowkit II ICD tool - Compatible with Arduino and 3rd party hardware.
  • More coming soon...


Ghost Settings

Information on setting up and using Ghost is available from the link below.

Ghost_Settings


Icon Step Through

When ICD is active, clicking play on the simulation will cause Flowcode to communicate with the ICD hardware and allow the execution of the simulation to sync up with the execution of the target Microcontroller.

One indication that you are indeed simulating through hardware rather than purely on-screen, is the colour of the position marker being green instead of red -

Icdstep.jpg

The toolbar also shows that you are in debugger mode by changing colour to green :-

GhostButtons ICDOn.jpg