Page 1 of 1

HP299 - Flowkit ICD tool to debug MIAC

Posted: Thu Aug 25, 2016 3:04 pm
by go233
Hello,
can I use the HP299 - Flowkit ICD tool to debug a program running on the MIAC V2 and flowcode 6?
I cannot find the option ICD in the Project option: where is it gone?
Giovanni
(I bought it only 1 year ago and istalled on my pc but never used)

Re: HP299 - Flowkit ICD tool to debug MIAC

Posted: Tue Aug 30, 2016 9:54 am
by go233
why no one is commenting this post?
:cry:

Re: HP299 - Flowkit ICD tool to debug MIAC

Posted: Tue Aug 30, 2016 10:59 am
by Benj
Hello,

Yes this should be possible.

The ICD option is now available under the Debug -> Ghost menu.

Re: HP299 - Flowkit ICD tool to debug MIAC

Posted: Wed Aug 31, 2016 4:22 pm
by go233
It does not work for me....I have attached the pictures with the error.
Could you help?
Giovanni

Re: HP299 - Flowkit ICD tool to debug MIAC

Posted: Wed Aug 31, 2016 4:54 pm
by LeighM
Hi, Did you re-compile and download to MIAC after selecting ICD mode?

Re: HP299 - Flowkit ICD tool to debug MIAC

Posted: Thu Sep 01, 2016 10:09 am
by go233
during compilation I have this error ???
C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_ICD.c(178): WARNING: 'Possible sw stack corruption' messages can safely be ignored for 'MARKER', 'PUSH' and 'POP' ICD functions

could you give me some instructions please? I am confused.
I have got a switch on the HP299-00-1, two positions do I toggle to PROG or ICD? and when I do it?
In the Debug menu there is the option Ghost which is enabled and then other two: debuger ICD and monitor ICT.
If I select debugger ICD another window opens asking
when do you want me to compile? what do you want me to select?
(see pictures)

Re: HP299 - Flowkit ICD tool to debug MIAC

Posted: Thu Sep 01, 2016 11:01 am
by LeighM
You can ignore this, it is just a warning ..
C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_ICD.c(178): WARNING: 'Possible sw stack corruption' messages can safely be ignored for 'MARKER', 'PUSH' and 'POP' ICD functions
Your screen shots are OK, they are the correct settings.

The switch on Flowkit is to there to save you needing to swap USB cables in order to program the MIAC.

If you connect a USB cable from the PC to the Flowkit, then a second cable from the Flowkit to the MIAC, you can then use the switch:
In the PROG position your PC is connected directly through to the MIAC so that you can program it.
In the ICD position your PC is connected to the Flowkit so that it can work with the MIAC to give you the Ghost ICD functions.

So the steps are:
Put the switch in ICD position so that Flowcode can detect Ghost hardware and let you enable the ICD functions.
Then move the switch to PROG and compile to chip.
Then move the switch to ICD and run Flowcode in Debug mode.

Re: HP299 - Flowkit ICD tool to debug MIAC

Posted: Thu Sep 01, 2016 1:07 pm
by go233
Ouccchhhhhhh!!!!!!
I think I have run out of memory? Is it possible?
:cry:
see attached log file.
Giovanni

Re: HP299 - Flowkit ICD tool to debug MIAC

Posted: Thu Sep 01, 2016 1:15 pm
by LeighM
Yes, you sure have.
Maybe you could disable sections of your program and debug them separately?

Re: HP299 - Flowkit ICD tool to debug MIAC

Posted: Thu Sep 01, 2016 4:56 pm
by go233
yes off course. let me try.
Giovanni

Re: HP299 - Flowkit ICD tool to debug MIAC

Posted: Fri Sep 02, 2016 1:06 pm
by go233
No, it doesn't work.
Sometimes it crashes/freeze flowcode and I have to shut it down manually using windows task manager.
Sometime it replays with the following error messages when I press step-into, step-over or play (see pictures); the switch position is on ICD.
I have attached my flowcode prog and log.

Re: HP299 - Flowkit ICD tool to debug MIAC

Posted: Fri Sep 02, 2016 1:06 pm
by go233
program and log.

Re: HP299 - Flowkit ICD tool to debug MIAC

Posted: Fri Sep 02, 2016 3:33 pm
by LeighM
Hi,
I am getting better results when I disabled the icon "Enable INT2", in Main. I can then step OK.
But I do get a crash at the end of Purge_the_System, I will look further into those.

I noticed that you are using strings, e.g. "OFF", in S1-S6 to indicate the output states, and then use string compares.
You would save a lot of memory space if you used a single byte for each S1-S6 state, set to either 0 or 1 to indicate the state.
(You could also then use global Constants, e.g. OFF=0 and ON=1, to help readability of your code)

Re: HP299 - Flowkit ICD tool to debug MIAC

Posted: Mon Sep 05, 2016 10:51 am
by go233
Yes! I'll use the global variable as you suggested.
Thanks
Giovanni

P.S.
Perhaps is a good idea to increase the memory of the MIAC in the future in order to have plenty of space for the in-circuit debugger firmare to live together with the customer application software.......

Re: HP299 - Flowkit ICD tool to debug MIAC

Posted: Wed Sep 07, 2016 12:02 pm
by go233
This HP299 does not work, so can I return it to MATRIX to check it?
maybe it is broken?
or
if it is not broken....what we do?
Giovanni

Re: HP299 - Flowkit ICD tool to debug MIAC

Posted: Wed Sep 07, 2016 1:21 pm
by LeighM
Hi Giovanni,

Sorry to hear you are still having problems.

Another thing you could try is, after you have enabled Ghost and downloaded the program to the MIAC ...

Flowkit switch set to ICD
Disable Ghost
Reset the MIAC (with the push switch)
Enable Ghost
Click the Step icon.... etc

Or if that still fails, try this ...

Flowkit switch set to ICD
Restart Flowcode
Reset the MIAC (with the push switch)
Enable Ghost
Click the Step icon.... etc

If that all fails, then yes, please return the Flowkit,
see the details here http://www.matrixtsl.com/returns_policy.php
Please email Nichola for a returns number (I will let her know about this) NicholaN@matrixtsl.com

But hope the above helps,
Leigh

Re: HP299 - Flowkit ICD tool to debug MIAC

Posted: Fri Sep 09, 2016 12:05 pm
by go233
the behavior it is erratic, but it doesn't not work 9 out of 10 even if I apply what you suggested.
However, it works for short simple programs though, LED blinking or simple LCD writing etc.
I don't understand.
I am reluctant to ship it back, beccause I feel that it is not an hardware problem and is either a flowcode problem or a firware ghost problem.
what do you say?
Giovanni

Re: HP299 - Flowkit ICD tool to debug MIAC

Posted: Fri Sep 09, 2016 12:21 pm
by LeighM
Hi Giovanni,
Yes, I agree with you, if it is working for more simple programs then it looks like the Flowkit hardware is OK.
I think it must be something connected with the number of ICD markers, or stack depth and it looks like the USB data stream is getting out of sync.
I've got the issue logged as a bug here, for further investigation.
Leigh

Re: HP299 - Flowkit ICD tool to debug MIAC

Posted: Tue Nov 08, 2016 5:24 pm
by LeighM
Hi Giovanni,
The ICD issue has now been fixed in V6, as well as V7.
This ICD bug was associated with macros that return values.
The updated Flowcode V6, which is version 6.1.4, should be available on our servers later today.
Please use the “Check for Updates” feature to upgrade your installation.
Best regards,
Leigh