HP299 - Flowkit ICD tool to debug MIAC

For MIAC users to discuss projects, applications, and any other issues related to the MIAC unit.

Moderators: Benj, Mods

Post Reply
go233
Posts: 96
Joined: Mon Mar 02, 2015 12:32 pm
Has thanked: 5 times
Been thanked: 11 times
Contact:

HP299 - Flowkit ICD tool to debug MIAC

Post 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)

go233
Posts: 96
Joined: Mon Mar 02, 2015 12:32 pm
Has thanked: 5 times
Been thanked: 11 times
Contact:

Re: HP299 - Flowkit ICD tool to debug MIAC

Post by go233 »

why no one is commenting this post?
:cry:

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: HP299 - Flowkit ICD tool to debug MIAC

Post by Benj »

Hello,

Yes this should be possible.

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

go233
Posts: 96
Joined: Mon Mar 02, 2015 12:32 pm
Has thanked: 5 times
Been thanked: 11 times
Contact:

Re: HP299 - Flowkit ICD tool to debug MIAC

Post by go233 »

It does not work for me....I have attached the pictures with the error.
Could you help?
Giovanni
Attachments
fig3.png
(89.24 KiB) Downloaded 5825 times
fig2.png
(96.92 KiB) Downloaded 5825 times
fig1.png
(23.45 KiB) Downloaded 5825 times

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: HP299 - Flowkit ICD tool to debug MIAC

Post by LeighM »

Hi, Did you re-compile and download to MIAC after selecting ICD mode?

go233
Posts: 96
Joined: Mon Mar 02, 2015 12:32 pm
Has thanked: 5 times
Been thanked: 11 times
Contact:

Re: HP299 - Flowkit ICD tool to debug MIAC

Post 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)
Attachments
fig33.png
(1.13 MiB) Downloaded 5805 times
fig22.png
(24.98 KiB) Downloaded 5808 times
fig11.png
(61.27 KiB) Downloaded 5808 times

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: HP299 - Flowkit ICD tool to debug MIAC

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

go233
Posts: 96
Joined: Mon Mar 02, 2015 12:32 pm
Has thanked: 5 times
Been thanked: 11 times
Contact:

Re: HP299 - Flowkit ICD tool to debug MIAC

Post by go233 »

Ouccchhhhhhh!!!!!!
I think I have run out of memory? Is it possible?
:cry:
see attached log file.
Giovanni
Attachments
Gas Switching System.msg.txt
(19.9 KiB) Downloaded 481 times

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: HP299 - Flowkit ICD tool to debug MIAC

Post by LeighM »

Yes, you sure have.
Maybe you could disable sections of your program and debug them separately?

go233
Posts: 96
Joined: Mon Mar 02, 2015 12:32 pm
Has thanked: 5 times
Been thanked: 11 times
Contact:

Re: HP299 - Flowkit ICD tool to debug MIAC

Post by go233 »

yes off course. let me try.
Giovanni

go233
Posts: 96
Joined: Mon Mar 02, 2015 12:32 pm
Has thanked: 5 times
Been thanked: 11 times
Contact:

Re: HP299 - Flowkit ICD tool to debug MIAC

Post 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.
Attachments
play.png
(15.59 KiB) Downloaded 13682 times
step-over.png
(15.92 KiB) Downloaded 13682 times
step-into.png
(16.64 KiB) Downloaded 13682 times
Last edited by go233 on Fri Sep 02, 2016 1:08 pm, edited 1 time in total.

go233
Posts: 96
Joined: Mon Mar 02, 2015 12:32 pm
Has thanked: 5 times
Been thanked: 11 times
Contact:

Re: HP299 - Flowkit ICD tool to debug MIAC

Post by go233 »

program and log.
Attachments
Gas Switching System_purging.msg.txt
(21.17 KiB) Downloaded 391 times
Gas Switching System_purging.fcfx
(72.55 KiB) Downloaded 419 times

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: HP299 - Flowkit ICD tool to debug MIAC

Post 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)

go233
Posts: 96
Joined: Mon Mar 02, 2015 12:32 pm
Has thanked: 5 times
Been thanked: 11 times
Contact:

Re: HP299 - Flowkit ICD tool to debug MIAC

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

go233
Posts: 96
Joined: Mon Mar 02, 2015 12:32 pm
Has thanked: 5 times
Been thanked: 11 times
Contact:

Re: HP299 - Flowkit ICD tool to debug MIAC

Post 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

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: HP299 - Flowkit ICD tool to debug MIAC

Post 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

go233
Posts: 96
Joined: Mon Mar 02, 2015 12:32 pm
Has thanked: 5 times
Been thanked: 11 times
Contact:

Re: HP299 - Flowkit ICD tool to debug MIAC

Post 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
Attachments
fig.png
(17.06 KiB) Downloaded 13293 times

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: HP299 - Flowkit ICD tool to debug MIAC

Post 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

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: HP299 - Flowkit ICD tool to debug MIAC

Post 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

Post Reply