Debugging Hardware and Software

From Flowcode Help
Revision as of 15:01, 30 August 2013 by BenR (talk | contribs)
Jump to navigationJump to search

<sidebar>Sidebar: What Is a Component?</sidebar>

Debugging can be a tricky task especially if you are unfamiliar with a specific routine or component and the way it is meant to behave.

The first step towards debugging is usually to get hold of a known working example either by browsing through the existing examples or requesting an example via the user forums. Once you have the working example try and get it running as is or with as few mods as possible to allow the program to run on your hardware.

Key things to check for include

  • Is the clock speed in the project options dialogue setup correctly for your hardware?
  • Is the device configuration in the project options setup correctly for your hardware?
  • Are the component properties setup correctly for your hardware?
  • Is the ICD mode enabled in the project options but no ICD hardware available?

Another good technique for debugging in v6 is to use the simulation to light the way but also use the downloaded code to sanity check that the simulation and the downloaded code match up. If you start getting inconsistencies then it may well be worth checking your code or asking the author of any specific component code to check and see if they get the same issue.

If these two steps fail to help your problem then it may be worth using a user interface device like a LCD or gLCD to display values at runtime to double check that values are as they should be.

The Flowcode ICD interface can also be enabled to allow the embedded code to be investigated in more detail if necessary.

If all of the above techniques have failed then report the bug you are having to the Matrix user forums providing as much detail as you can to allow others to replicate the problem. Attaching your Flowcode project file to the post is usually an easy way to ensure that others are able to help you around any potential pitfalls or problems.