Difference between revisions of "Scratch"

From Flowcode Help
Jump to navigationJump to search
(Created page with "<sidebar>Sidebar: Flowcode Help Overview:ChipSpecific</sidebar> Ghost (formerly ICD : In Circuit Debug) functionality allows Breakpoints, singl...")
 
Line 21: Line 21:
 
==Enabling Ghost==
 
==Enabling Ghost==
  
The Ghost features must be enabled by pressing the Ghost button
+
The Ghost features must be enabled by pressing the Ghost button or using the "Debug -> Ghost -> Enable" menu setting
  
 
[[File:Ghbut.jpg]]
 
[[File:Ghbut.jpg]]
 
+
[[File:ghmen.jpg|right]]
or using the "Debug -> Ghost -> Enable" menu setting.
 
 
 
[[File:ghmen.jpg]]
 
  
 
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 :-
 
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 :-
Line 36: Line 33:
  
 
[[File:hwdetnone.jpg]]
 
[[File:hwdetnone.jpg]]
 +
 
at which point some suitable hardware can be connected to the PC.
 
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).
 
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 enabled).
+
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 :
 
If you see the following :

Revision as of 14:07, 8 October 2014

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


Ghost (formerly ICD : In Circuit Debug) functionality 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 Flowkit ICD tool - Compatible with MIAC, ECIO, FormulaFlowcode and 3rd party hardware.
  • More coming soon...


Enabling Ghost

The Ghost features must be enabled by pressing the Ghost button or using the "Debug -> Ghost -> Enable" menu setting

Ghbut.jpg

Ghmen.jpg

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 :-

Hwdetv9.jpg

If nothing is detected, then the following message is given,

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 :

Noghost.jpg

it means your current FlowCode licence does not support Ghost features, so you will need to upgrade.


Configuring Ghost

Newicdopts.jpg

Once enabled you can configure the Ghost Options by clicking the "Debug -> Ghost -> Options" menu, this will open a new window containing the ICD and ICT options.


ICD (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 -

Icdstep.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.


Communication Speed

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.