Watch variables not working in ICD

For questions and comments on programming in general. And for any items that don't fit into the forums below.

Moderators: Benj, Mods

stewartbaker
Posts: 116
Joined: Tue Jul 17, 2012 9:34 am
Been thanked: 18 times
Contact:

Re: Watch variables not working in ICD

Post by stewartbaker »

JonnyW wrote: There must be something subtle between Flowkit and the HW. Just to clarify, it is a custom PCB you are using?
Jonny
No,
I have tried 2 types of PIC in 2 boards. 16F877A & 18F4620.
a) EasyPIC v7 with RB7 & RB6 PIC pins connected directly to FlowKit so nothing on EasyPIC is loading those pins.
b) A Protoboard with only the supply, MRST, LED on PORTC.0 and a 4MHz crystal connected.
JonnyW wrote: Have you tried running this in safe mode? We could do with finding out about the spec of your system - it has been mentioned that in the past anti-virus have caused problems. Also Flowkit uses USB2, are you using USB2 ports?
Jonny
Flowcode hangs in safe mode when accessing Flowkit, although Flowkit appears OK in the device manager list.
System is DELL OPTIPLEX 780 Pentium Dual-Core 3 Ghz 4Gb Windows 7 Pro 32 bit.
Flowcode V5.4 with latest driver software.
AV is Eset NOD32 - disabling makes no difference.
System has 9 USB2 ports. Tried using different ports - no change.
JonnyW wrote: With the default settings Flowkit uses port B. We would expect ICD to fail outright if there were any issues but have you got a fully working and unobstructed port B?
Jonny
Nothing is connected or allocated to PortB
JonnyW wrote: You could try increasing the communication speed in the ICD settings to 1000 - this is a timeout that ICD will wait for a response for requests.
Jonny
Increasing communication speed in the ICD settings to 1000 causes Flowcode to hang when trying to connect to Flowkit.
JonnyW wrote: Also, going back to the values of the variables:
On start up the variables are always zero. Is this true for pre-initialised (to a non-zero value) variables too?
Jonny
No, the variables are not always zero. They are however what the were on previous runs i.e. they don't change.
JonnyW wrote: If you stop simulation and restart it do the variables retain their previous values or do they get reset to zero again?
Jonny
They retain their previous values.
JonnyW wrote: Can you add a string variable - pre-initialised - and see the values of the string?
Jonny
The watched value of a string pre-initialised to "Hello" returned "" under ICD.

From the tests I have carried out I think there is little else left to try, and I believe that my Flowkit is defective.

Before starting the returns procedure, are then any diagnostics that I can run on my Flowkit to show that the fault lies elsewhere ?

I am about to start an important project, and am fast running out of time trying to get this vital tool to work as advertised.

regards
Stewart

User avatar
JonnyW
Posts: 1230
Joined: Fri Oct 29, 2010 9:13 am
Location: Matrix Multimedia Ltd
Has thanked: 63 times
Been thanked: 290 times
Contact:

Re: Watch variables not working in ICD

Post by JonnyW »

Hello.

No, I'm afraid there is nothing else we can do diagnostic wise. I have tried your COFF file with our HW and it all works OK.

My concern is there is something strange on the Windows side of things and replacing Flowkit will not change this as we can not think of any specific issues that would cause this fault. Steve has suggested if you wish to return your FlowKit and have a spare PCB you can send us we can try to diagnose any issue here as this is such a strange problem.

I still suspect this is some strange time-out issue and the rate the data is sent at may be slightly different to the rate the breakpoints and monitoring is done at, but this is so difficult to prove without your exact setup. I am told the ICD timeout in the Flowcode options is tied to clock speeds and other such and will only work in certain ranges so it is not too surprising this can not just be set to 1000.

I'm sorry we couldn't get to the bottom of this issue.

Jonny

dazz
Posts: 1314
Joined: Sun Jan 15, 2012 3:15 pm
Has thanked: 474 times
Been thanked: 458 times
Contact:

Re: Watch variables not working in ICD

Post by dazz »

Hi Stewart

Just had a quick look at the config on your icd zip files, can you enable background debug on the chip config and try again and see if that works

Regards
Dazz
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php

User avatar
Steve
Matrix Staff
Posts: 3426
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times
Contact:

Re: Watch variables not working in ICD

Post by Steve »

Thanks for the suggestion dazz, and it's worth giving it a go. But I think it's unlikely to solve it as our ICD mode has nothing to do with the inbuilt ICD capabilities of some chips. In fact, I've seen enabling the "background debug" setting actually prevent program execution.

dazz
Posts: 1314
Joined: Sun Jan 15, 2012 3:15 pm
Has thanked: 474 times
Been thanked: 458 times
Contact:

Re: Watch variables not working in ICD

Post by dazz »

Ah
cheers steve, only mentioned it because the icd i have(not matrix one) ,will not work unless background debug is on.

Regards
Dazz
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php

stewartbaker
Posts: 116
Joined: Tue Jul 17, 2012 9:34 am
Been thanked: 18 times
Contact:

Re: Watch variables not working in ICD

Post by stewartbaker »

dazz wrote:Hi Stewart

Just had a quick look at the config on your icd zip files, can you enable background debug on the chip config and try again and see if that works

Regards
Dazz
Thanks for your suggestion Dazz. I have tried background debug enabled, however Flowkit does not connect at all.

Cheers
Stewart

stewartbaker
Posts: 116
Joined: Tue Jul 17, 2012 9:34 am
Been thanked: 18 times
Contact:

Re: Watch variables not working in ICD

Post by stewartbaker »

JonnyW wrote:Hello.

No, I'm afraid there is nothing else we can do diagnostic wise. I have tried your COFF file with our HW and it all works OK.

My concern is there is something strange on the Windows side of things and replacing Flowkit will not change this as we can not think of any specific issues that would cause this fault. Steve has suggested if you wish to return your FlowKit and have a spare PCB you can send us we can try to diagnose any issue here as this is such a strange problem.

I still suspect this is some strange time-out issue and the rate the data is sent at may be slightly different to the rate the breakpoints and monitoring is done at, but this is so difficult to prove without your exact setup. I am told the ICD timeout in the Flowcode options is tied to clock speeds and other such and will only work in certain ranges so it is not too surprising this can not just be set to 1000.

I'm sorry we couldn't get to the bottom of this issue.

Jonny
Gents,
I am puzzled, and some what disappointed.

I think that we in agreement that, because nobody else seems to have experienced this problem and that you are not able to reproduce it using files I sent to you, that the issue does not lie with Flowcode. Likewise if it were a Flowkit driver problem others would have reported it.

However, it is quite a leap to start questioning Windows. Surely others are using Windows 7 Pro on a bog standard Dell computer ?
I am beginning to sense that you already know the answer to the problem...

My Dell runs just about everything I can throw at it from processor/graphics intensive applications such as Flight Simulation, Circuit Simulation and CAD. As for as the USB I/O goes - many different time critical applications like Data Capture and Robotic Control.
Not to mention Development systems and ICD from other suppliers. All of these with no issues - what so ever....

So if it's not Windows, then what ? You suggest some strange time-out issue or data rate - what/where ?

Is this between Flowkit and the PIC ?
As I have said before I have tried 2 different PIC types, including the 16F877A (the first PIC to have ICD).

I did not suggest replacing my Flowkit, only investigate whether it is faulty.

Again, if you re-read my previous mails you will see that my H/W is about the minimum necessary to support the chip.
However, if you really believe that this is the problem, and that you will not see it using an "E" module then I will supply the PIC mounted on VeroBoard as a PCB substitute.

In your mail you are questioning my computer, operating system and PIC board. Short of shipping the whole lot to you I don't know what else to do.

In contrast, all you have to do is check my Flowkit module.

regards
Stewart

dazz
Posts: 1314
Joined: Sun Jan 15, 2012 3:15 pm
Has thanked: 474 times
Been thanked: 458 times
Contact:

Re: Watch variables not working in ICD

Post by dazz »

Hi Stewart
Yes i can understand you are frustrated, but if you reread jonny's reply , jonny has said that as you have tried all possible solutions and tests matrix have offered they have reached the limit of remote diagnostics, they have also stated that if you send them your flowkit and the board you are trying to debug they will take a look at it and see if they can resolve the issues you are experiencing, whilst frustrating what other company gives that level of supprt, they need the board you are using so they can rule the board out, as jonny has stated that steve suggested returning the board and flowkit. i would PM Steve and see what happens next and how to get the board back, Imo thats a very generous offer and by taking it up it will allow flowkit to be better supported in the future.
Regards
Dazz
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php

User avatar
DavidA
Matrix Staff
Posts: 1076
Joined: Fri Apr 23, 2010 2:18 pm
Location: Matrix Multimedia Ltd
Has thanked: 58 times
Been thanked: 258 times
Contact:

Re: Watch variables not working in ICD

Post by DavidA »

Hi Stewart,

What dazz says is correct, Jonny was simply saying that we have exhausted all possible methods of remote diagnostics and the only way we can move forward with this would be to have the Flowkit returned to us to test it.

We are just concerened that as we have never seen this type of problem before with the Flowkit (if they have a problem nothing works on them) and with our understanding of how the Flowkit works (if it can step through fine it should be able to update variables), that even if we send out a new one, it may not work as the issue may lie with your computer/hardware setup, which is something we obviously cannot recreate.

Please PM me, (not Steve as he is on holiday at the moment!) and i will arrange for a return of the Flowkit so we can test it here.

stewartbaker
Posts: 116
Joined: Tue Jul 17, 2012 9:34 am
Been thanked: 18 times
Contact:

Re: Watch variables not working in ICD

Post by stewartbaker »

Hi David,
Thank you for your reply.

PM sent

Stewart

stewartbaker
Posts: 116
Joined: Tue Jul 17, 2012 9:34 am
Been thanked: 18 times
Contact:

Re: Watch variables not working in ICD

Post by stewartbaker »

For those following this thread my FlowKit is back at Matrix being investigated...

Stewart

stewartbaker
Posts: 116
Joined: Tue Jul 17, 2012 9:34 am
Been thanked: 18 times
Contact:

Re: Watch variables not working in ICD

Post by stewartbaker »

Unit returned from Matrix with no fault found.
Back on my system the watch variables still do not work under ICD.

Further investigation reveals that although FlowKit will connect in Normal Mode, it will not under Safe Mode, although Device Manager says it's OK.
Maybe this gives further clues ?

Stewart

stewartbaker
Posts: 116
Joined: Tue Jul 17, 2012 9:34 am
Been thanked: 18 times
Contact:

Re: Watch variables not working in ICD

Post by stewartbaker »

An update on my "Watch variables not working in ICD" issue.
Having completed my major project using other tools I returned to FlowKit.

Matrix have checked my FlowKit unit and returned it with no fault found.

Jonny suggested that it might be something "subtle" between FlowKit and my H/W.

So I tried:-
a) A different development board.
b) The IC hanging in free space.
c) A different PIC clock speed.
d) A different PC, with a different type of processor and a different OS (XP instead of W7)
e) Unistalling FlowCode and FlowKit driver, cleaning the registry and reinstalling V5.4 FlowCode PRO.

No change...

It was also suggested that the COFF might be at fault.

So:-
I changed the .COF extension of the ICD program to .XYZ. No warnings - Nada. Watch variables still U/S.

However, if I change the .COF extension of the NON ICD program to .XYZ, still no warnings, but the variables are displayed and can be changed in the WW !

So is the .COF file used at all ?

Then I tried a different processor, a 18F4620 instead of a 16F877A.

Still the same problems !

Does anyone have a clue as to what might be wrong ???

Stewart

User avatar
JonnyW
Posts: 1230
Joined: Fri Oct 29, 2010 9:13 am
Location: Matrix Multimedia Ltd
Has thanked: 63 times
Been thanked: 290 times
Contact:

Re: Watch variables not working in ICD

Post by JonnyW »

Evening.
However, if I change the .COF extension of the NON ICD program to .XYZ, still no warnings, but the variables are displayed and can be changed in the WW !
Do you mean that when you deleted the non-ICD copy of the COF file the ICD program you had downloaded into the chip worked correctly? Have you got all these files in the same directory, i.e. a copy of the program with ICD enabled and an identical version without it enabled?

I am just trying to gather all the information, as I know of no reason why one build would be dependant on the other unless Flowcode is getting confused with the names somehow.

Jonny

stewartbaker
Posts: 116
Joined: Tue Jul 17, 2012 9:34 am
Been thanked: 18 times
Contact:

Re: Watch variables not working in ICD

Post by stewartbaker »

Jonny,
Before I comment on your last, will you please read my post again !

Stewart

User avatar
DavidA
Matrix Staff
Posts: 1076
Joined: Fri Apr 23, 2010 2:18 pm
Location: Matrix Multimedia Ltd
Has thanked: 58 times
Been thanked: 258 times
Contact:

Re: Watch variables not working in ICD

Post by DavidA »

Hello Stewart,

Ive read your post a couple of times and this line:
However, if I change the .COF extension of the NON ICD program to .XYZ, still no warnings, but the variables are displayed and can be changed in the WW !
Makes no sense to us without some context, which is what Jonny is trying to establish.

And yes the COF file is used for the ICD.

stewartbaker
Posts: 116
Joined: Tue Jul 17, 2012 9:34 am
Been thanked: 18 times
Contact:

Re: Watch variables not working in ICD

Post by stewartbaker »

Hello David,
Thank you for your reply.

OK, so the .cof file is used for the ICD.

So, if for some reason that file was not being found or correctly referenced, might it give the ICD Watch Variable problems I am experiencing ?

What I was trying to explain (albeit not very well) was my attempt to find out if, when stepping through a program (that does not use ICD) , looking at and changing variables, a .cof file was necessary. It would appear not.

regards

Stewart

User avatar
DavidA
Matrix Staff
Posts: 1076
Joined: Fri Apr 23, 2010 2:18 pm
Location: Matrix Multimedia Ltd
Has thanked: 58 times
Been thanked: 258 times
Contact:

Re: Watch variables not working in ICD

Post by DavidA »

Hi Stewart,

The cof file is only used when stepping through a program in hardware, it is not used at all when stepping through a program in simulation.

stewartbaker
Posts: 116
Joined: Tue Jul 17, 2012 9:34 am
Been thanked: 18 times
Contact:

Re: Watch variables not working in ICD

Post by stewartbaker »

Hi David,
Thank you for that, it helps to clarify things.

I have been doing some more testing and have found that in addition to the variable problem the Breakpoints do not work at all in ICD. An error is given that the program in the chip is out of date. This is nonsense as the program has been compiled (and run OK) with ICD selected...

I believe that the program "Runs" OK in ICD as it does not use the COF information.

However, it requires that information for both the Watch variables and Breakpoints functions.

So, if for what ever reason the COF information is not available (or corrupt) it would give rise to the problems I am seeing in ICD.

I have checked that the COF file is generated fresh each time the program is compiled.

I am interested in hearing your views on this.

Best regards

Stewart

User avatar
DavidA
Matrix Staff
Posts: 1076
Joined: Fri Apr 23, 2010 2:18 pm
Location: Matrix Multimedia Ltd
Has thanked: 58 times
Been thanked: 258 times
Contact:

Re: Watch variables not working in ICD

Post by DavidA »

Something may be stopping access to the COF files, an antivirus program or something, did you try running Flowcode in your computers safe mode?

stewartbaker
Posts: 116
Joined: Tue Jul 17, 2012 9:34 am
Been thanked: 18 times
Contact:

Re: Watch variables not working in ICD

Post by stewartbaker »

DavidA wrote:Something may be stopping access to the COF files, an antivirus program or something, did you try running Flowcode in your computers safe mode?
I stopped and exited Firewall and Antivirus on both my computers (XP-AVG and W7-EsetNOD32), then tried ICD.

It made no difference...

I am unable to run ICD on either computer in Safe Mode as, although FlowKit shows up as a recognised device with the driver
correctly installed, in the System Device Status it says "Status is not available for this device when Windows is running in Safe Mode."

So that's yet another dead end...

Stewart

User avatar
DavidA
Matrix Staff
Posts: 1076
Joined: Fri Apr 23, 2010 2:18 pm
Location: Matrix Multimedia Ltd
Has thanked: 58 times
Been thanked: 258 times
Contact:

Re: Watch variables not working in ICD

Post by DavidA »

Hello Stewart,

You could try a clean boot.

http://support.microsoft.com/kb/929135

stewartbaker
Posts: 116
Joined: Tue Jul 17, 2012 9:34 am
Been thanked: 18 times
Contact:

Re: Watch variables not working in ICD

Post by stewartbaker »

DavidA wrote:Hello Stewart,

You could try a clean boot.

http://support.microsoft.com/kb/929135
Hello David,

I have tried a clean boot. In addition I disabled all of the Startup items.

I used Task Manager to verify that the services and items were not present or running.

Same results...

Stewart

stewartbaker
Posts: 116
Joined: Tue Jul 17, 2012 9:34 am
Been thanked: 18 times
Contact:

Re: Watch variables not working in ICD

Post by stewartbaker »

There are few electronic items that have given me the level of frustration as has the FlowKit module.

It is now consigned to the bottom of a box until some bright spark comes up with a solution !

Stewart

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: Watch variables not working in ICD

Post by Benj »

Hi Stewart,

Your not using the HiTech compiler to compile the code or anything else unusual like this are you?

Also have you been asked to go into the compiler options and try hitting the restore defaults button to see if this helps at all.

The Flowkit and EB006 ICD mode in general seems very reliable and we have sold many hundreds if not thousands of units with no other customers reporting of this issue so it surprises me that we cannot get it working for you.

If I have followed this topic correctly the ICD stuff like start, stop, step etc all work correctly for you it's just the variable values that do not seem to work. Not sure if this makes any odds but have you tried lowering the simulation speed in the project options. Also pausing the ICD should allow you to add and update variables via the watch window.

Post Reply