Debugging Hardware and Software

From Flowcode Help
Jump to navigationJump to search

<sidebar>Sidebar: Flowcode Help Overview:ChipSpecific</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?
Try running a One second LED flasher program on your hardware to sanity check.
Try running a One second LED flasher program on your hardware to sanity check.
Try to test the basics on hardware before moving onto more advanced features. Take your time and do a bit at a time. The more stages you can break your required functionality into means the easier it is to pinpoint a problem and resolve it.
  • Is the ICD mode enabled in the Project Options but no ICD hardware available?
A program designed for ICD will not be allowed to run without the start instruction passed from the ICD hardware.


Another good technique for debugging in Flowcode 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 be enabled via the Project Options to allow the embedded code to be investigated in more detail if necessary. When ICD is enabled you have the ability to start, stop, pause and step through the code on the microcontroller from within the Flowcode environment. The Matrix EB006 and FlowKit are currently the only means of connecting the Flowcode ICD system to your hardware but there are plans for more ICD and Test platforms in the future.

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 and describing your hardware setup is usually an easy way to ensure that others are able to help you around any potential pitfalls or problems.