Can be linked with MPLAB ICD2 debugger/programmer?

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 4.
To post in this forum you must have a registered copy of Flowcode 4 or higher. To sign up for this forum topic please use the "Online Resources" link in the Flowcode Help Menu.

Moderator: Benj

Post Reply
User avatar
fotios
Posts: 458
Joined: Mon Feb 08, 2010 10:17 am
Location: Greece
Has thanked: 109 times
Been thanked: 117 times
Contact:

Can be linked with MPLAB ICD2 debugger/programmer?

Post by fotios »

I have the first version of MPLAD ICD for flash PICs from 1998 bought for 250 EU. I have the Microchip development kit DV164006 – which includes the MPLAB ICD2 programmer/debugger and the Picdem 2 Plus evaluation board, power supply, cables etc - from 2007 bought for 210 EU. I had never time to mess-up with PIC assembly, i know few things about. For this reason i purchased the Flowcode V4 (i did the upgrade in v4.7.3) from Farnell UK. Until now i have spent around 700 EU for this endless story with PICs. I am electronic engineer occupied mainly with audio. Before proceed in further purchases, i tried everything to link the MPLAB ICD2 with Flowcode. The curious thing is that Flowcode supports the cheap Pickit2 or 3 programmers, instead the Mplab ICD2 no!! I came across the forum for 2 days and i tried everything proposed - there is only one suggestion in reality, the use of PikLab of SourceForge within Flowcode v2 and v3. I did everything suggested with great care within Flowcode v4 but always i receive a message that the USB cable is not connected. In the background, i can detect a MSDOS window that pop-ups momentarily. This shows an effort of communication with ICD2. Indeed, when i put the Flowcode to assemble the project in the appropriate PIC, the process is running but at the end the BoostC compiler it shows a general "FAILURE" message. I tried to configure the chip via the config. menu but i receive the message “USB cable is not connected”. I tried to run the PikLab directly, it pop-ups a MSDOS window with the parameters setting, but it pop-ups a second error window that says "can not find the libusb0.dll". After all, i have an instinctive sense that the main problem is caused from the BoostC compiler used from Flowcode. It is only a part of the SourceBoost C compiler, which as i have seen is a stand-alone application which costs around 180 EU. I am sure that with the SourceBoost C compiler the work can be done! But i am sure as well, that i am not available to spend this amount. Enough! The only that i had in my mind, was to share my project - a control board to manage some Latching relays, a LCD display and a motorized pot either manually or remotely via RC5, for use in audio preamplifiers - within the members of diyAudio forum in a hex file compatible with any assembler or programmer except Flowcode. Such type hex files, can be generated e.g. from MPLAB IDE. Now,to use the Flowcode that I bought, i am forced to use a programmer like the EB006 or the new FlowKit. And to share (for free of course, not for getting money) ready programmed PICs like 18F4520 or 16F887 within my friends in diyAudio forum. I hope you can understand my place.
I have read the manuals of both EB006-V7 and FlowKit carefully:
1) The EB006 offers a RJ socket for connection of ICD2. As i can perceive, in this configuration the USB cable came from PC, must be connected in ICD2. Thus the debugging/programming mode will be executed thru MPLAB IDE and the EB006 will be a target board like a PicDem Plus 2, but with bigger flexibility due to the lot of connectors which offers for peripherals. That is good.
2) The new FlowKit it is another story. Basically, i think that the same job (of debugging in real mode on hardware) can be done as well from EB006-v7 because the same host controller used (PIC18F4455). I can't perceive exactly the further benefits offered from FlowKit against EB006.
I am not sure if my conclusions are right. In any case, please correct me before i proceed again in expenses. The cost is the same either for EB006 or for FlowKit. EB006 has a lot of parts mounted on board (IC sockets, XTAL, etc) and it is ready for use with some extra E-blocks like LCDs, buttons etc. OTOH, i have a different idea for using the FlowKit. That is according to the lot of unused parts which i have in my stock. My idea is to design a PCB board including a 40 pin ZIF socket, 8 push buttons assignable separately in either port of MCU, a LCD display, 1 socket for a XTAL, 1 socket for a canned XTAL, and everything else is needed for a complete demo board with a pinstrip to be connected in FlowKit programmer.
In general, i have the sense that the FlowKit will be the future in your programmers/debuggers.
In any case, you may know a lot of things better than me. For this reason, i ask your advice of what i may prefer: EB006-v7 or FlowKit?
Cheers
Fotios Anagnostou
Best Regards FOTIS ANAGNOSTOU

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

Re: Can be linked with MPLAB ICD2 debugger/programmer?

Post by Steve »

I know that others have been able to use the cmd-line interface of the ICD2 tool with Flowcode. I will ask my colleagues to comment on this as they know more about it than I do.

As for your comments on FlowKit and our EB006 boards, these do offer similar functionality. But we do not see one replacing the other. PICmicro E-Blocks users will best get Flowcode's ICD functionality via an EB-006 (v7). The intention of the FlowKit device is to allow this ICD functionality on all development platforms outside of PICmicro E-Blocks - e.g. AVRs and ARMs, Microchip or 3rd-party boards, your own hardware, our other products (Formula Flowcode, ECIO, MIAC, etc).

I hope this helps answer your question.

User avatar
fotios
Posts: 458
Joined: Mon Feb 08, 2010 10:17 am
Location: Greece
Has thanked: 109 times
Been thanked: 117 times
Contact:

Re: Can be linked with MPLAB ICD2 debugger/programmer?

Post by fotios »

Thanks Steve for the reply. I am in waiting for instructions about ICD2 cmd-line to try AT LEAST one time in my life to assemble a WORKING project with this perverse ICD2 tool. After this, i will try to sell the full packet to get back some of my moneys. Is there any interested for the MPLAB ICD2 evaluation kit DV164006 (practically unused!) in half price? For 150 GBP (i don't know the real value of them) i offer as bonus and the first version of MPLAB ICD evaluation kit unused as well! :lol:
As for the programmers, according to your confirmation in my thoughts, i will preffer the FlowKit. I have a lot of parts to build a complete development board to suit in my demands. Like two 3M 40pin ZIF sockets which can accept either narrow or large ICs (thus the complete range of PICs), two 2X20 LCD displays, power supplies, XTALs and sockets, D-sub sockets, high quality OMRON tactile switches and a lot of others. I can make double sided PCBs in my home. I will try to make the board as much as flexible is posible and after i will post here the complette plans.
Best regards
Fotios
Best Regards FOTIS ANAGNOSTOU

Sean
Valued Contributor
Valued Contributor
Posts: 548
Joined: Tue Jun 26, 2007 11:23 am
Has thanked: 6 times
Been thanked: 44 times
Contact:

Re: Can be linked with MPLAB ICD2 debugger/programmer?

Post by Sean »

The reason for not supporting ICD2 as a Flowcode programmer is that there are no official 'command-line-interpreters' available for it.

Piklab is available under the Free Software Foundation General Public License (GPL) for download from the Sourceforge website:

http://piklab.sourceforge.net/download.php

LibUSB-win32 is also available under the same license:

http://sourceforge.net/projects/libusb-win32/files/

This is currently the only way we have been able to use ICD2 directly from Flowcode.

User avatar
fotios
Posts: 458
Joined: Mon Feb 08, 2010 10:17 am
Location: Greece
Has thanked: 109 times
Been thanked: 117 times
Contact:

Re: Can be linked with MPLAB ICD2 debugger/programmer?

Post by fotios »

Thanks Sean for the help.
As i wrote in my first post, i have already instaled the PikLab utility within the Flowcode v4.3 root directory in my PC. And it seems that it works, except the "libusb0.dll" not found. I did just now a download of the second utility that you inform me, and i extracted the zip file into the PikLab directory. I seen that this library "libusb0.dll" indeed it exists after the extraction.
I will inform you later in the afternoon for the results.
Thanks a lot
Fotios
Best Regards FOTIS ANAGNOSTOU

saschech@gmx.de
Posts: 714
Joined: Wed Jan 31, 2007 12:41 pm
Has thanked: 1 time
Been thanked: 26 times
Contact:

Re: Can be linked with MPLAB ICD2 debugger/programmer?

Post by saschech@gmx.de »

Hello sean

I have the ICD2 also.You have more information for the :

"installing directory" and settings in the "compiler option"

Regards Wolfgang

Sean
Valued Contributor
Valued Contributor
Posts: 548
Joined: Tue Jun 26, 2007 11:23 am
Has thanked: 6 times
Been thanked: 44 times
Contact:

Re: Can be linked with MPLAB ICD2 debugger/programmer?

Post by Sean »

Thanks Wolfgang,

Yes, all the information in this thread is related to the information already provided in the thread linked below:

http://www.matrixmultimedia.com/mmforum ... lit=piklab

User avatar
fotios
Posts: 458
Joined: Mon Feb 08, 2010 10:17 am
Location: Greece
Has thanked: 109 times
Been thanked: 117 times
Contact:

Re: Can be linked with MPLAB ICD2 debugger/programmer?

Post by fotios »

Nothing, nothing and nothing...
I tried any possible combination. I tried the PikLab.exe directly, this time it founds the "libusb0.dll" but then is asking for another "gcc..." file which does not exists nowhere. I am not a big expert in PCs but i use them from 1985 (my first was a RadioShack equiped with a MC68000 running under... nothing OS, i had to write any program in Basic to run, and i used a TV as monitor) then again arround 1995 (when the first real handy OS, the Win95 was launched) up to now where i am working currently on a workstation under x64 OS (i have as well one old running under MSDOS to use an EPROM programer and an old programmer of ST, and another one runing under WinXP 32bit to try everything is not runing under 64bit) thus i have a sense (from instinct probably) of what it has no posibilities to working properly, or to not working absolutelly.
Now i have to buy one handy programmer of Matrix Multimedia, unless my expense to by the flowcode v4 will be unreasonable. I can't perceive where is the conflict between Microchip and Matrix Multimedia. Only one or two times in my 30 years career i have seen a such thing! Why the compatibility with PicKit and the uncompatibility with MPLAB ICD? I will post a same message in Microchip forums. I got a reasoning from Matrix Multimedia. When i will have reasoning and from Microchip, then i will judge.
Best Regards FOTIS ANAGNOSTOU

Sean
Valued Contributor
Valued Contributor
Posts: 548
Joined: Tue Jun 26, 2007 11:23 am
Has thanked: 6 times
Been thanked: 44 times
Contact:

Re: Can be linked with MPLAB ICD2 debugger/programmer?

Post by Sean »

If you can let us know what files your system is still looking for we might be able to locate them for you.

ICD2 is not a programming option that is officially supported by Flowcode. This is a 3rd party solution that has been found to work in a number of cases. It is also the only solution to this problem that we have been able to find and test.

User avatar
fotios
Posts: 458
Joined: Mon Feb 08, 2010 10:17 am
Location: Greece
Has thanked: 109 times
Been thanked: 117 times
Contact:

Re: Can be linked with MPLAB ICD2 debugger/programmer?

Post by fotios »

No, no Sean, please, there is no reason for you to apologize. You, as Matrix Multimedia, you do a very nice work. The problem is found in Microchip. As we know, the electronics divided in two main categories: Analog electronics and Digital electronics. Few electronic engineers have knowledge of both. Microchip is addressed mainly in the second category. For so many years Microchip does not made any effort to offer a handy tool for the first category of engineers, as you have did with Flowcode. Simply Microchip - as i think - to appear some helpful in the eyes of electronic comunity, did a conjuction of your software with a cheap tool like PicKit. A friend of mine, which is turned in digital electronics (CNC machines of high precision), he told me that for writing a precision machine code without extra command lines from external compilers - from MPLAB - which can cause delays in code execution it can be done only with PIC assembly via MPLAB, which targets directly in the heart of mcu. Instead in my case, because the timing precision is not so critical, the best solution is indeed the Flowcode. He told me as well that, the Flowcode can be a precious help for me to learn how to manage the assembly code of PICs in few time. Unless, to go directly in PIC assembly, i need 1 to 2 years at least of continuous occupation with MPLAB etc.
For this, there is no reason for you and me to we mess-up in the lot of file search, locations, paths, exchanges of messages etc. It is preferable to i spend 90 EU more, to get a ready handy programmer like EB006 or FlowKit. Be carefull, although i can buy a cheap PicKit2/3 for 30 EU, i am not interested for a such solution. I want a thing to plug into my 64bit PC and which can communicate without conflicts and imediatelly with Flowcode. Nothing more nothing less.
In any case, you are very helpfull guys over there in Matrix Multimedia, and i have to express my compliments to you.
Fotios Anagnostou
Best Regards FOTIS ANAGNOSTOU

saschech@gmx.de
Posts: 714
Joined: Wed Jan 31, 2007 12:41 pm
Has thanked: 1 time
Been thanked: 26 times
Contact:

Re: Can be linked with MPLAB ICD2 debugger/programmer?

Post by saschech@gmx.de »

Hello Team

Before i start change the settings one question more:
If the ICD2 work ok,can i debug also with the Flowcode-ICD?

Regards Wolfgang

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: Can be linked with MPLAB ICD2 debugger/programmer?

Post by Benj »

Hello Wolfgang,

Unfortunatley you need special hardware included on the FlowKIT and v7 EB006 to use the Flowcode ICD. The Microchip ICD development tools will not provide this functionality for you. To use these you have to take the assembler code / C code into MPLAB and debug from there on a code level.

User avatar
fotios
Posts: 458
Joined: Mon Feb 08, 2010 10:17 am
Location: Greece
Has thanked: 109 times
Been thanked: 117 times
Contact:

Re: Can be linked with MPLAB ICD2 debugger/programmer?

Post by fotios »

steve wrote:I know that others have been able to use the cmd-line interface of the ICD2 tool with Flowcode. I will ask my colleagues to comment on this as they know more about it than I do.

As for your comments on FlowKit and our EB006 boards, these do offer similar functionality. But we do not see one replacing the other. PICmicro E-Blocks users will best get Flowcode's ICD functionality via an EB-006 (v7). The intention of the FlowKit device is to allow this ICD functionality on all development platforms outside of PICmicro E-Blocks - e.g. AVRs and ARMs, Microchip or 3rd-party boards, your own hardware, our other products (Formula Flowcode, ECIO, MIAC, etc).

I hope this helps answer your question.
Steve, in this reply of you i was based to proceed in the purchase of FlowKit. As i had said, i had the need of a programmer/debugger in one package. Unfortunatelly, you did not mentioned that this possibility offered only from EB006-7. Maybe i was not so clear, but i had stated clearly that i am not an expert in programming devices.
What can i do now? I have a tool which does not offers ICSP. It can't programming nothing. So, i can't debugging nothing. I have the Flowcode only for playing with simulations and nothing else.
Fotios
Best Regards FOTIS ANAGNOSTOU

medelec35
Matrix Staff
Posts: 9520
Joined: Sat May 05, 2007 2:27 pm
Location: Northamptonshire, UK
Has thanked: 2585 times
Been thanked: 3815 times
Contact:

Re: Can be linked with MPLAB ICD2 debugger/programmer?

Post by medelec35 »

fotios wrote: I have the Flowcode only for playing with simulations and nothing else.
Fotios
Since you have a programmer, you can use flowcode to compile to hex, then use your third party programmer to load hex, and program chip. Flowcode can via ppp produce hex file which also includes chip configuration settings. I know you want to do debugging as well, but at least to can program until a solution is found. Unless I misunderstood what you are saying?
Martin

User avatar
fotios
Posts: 458
Joined: Mon Feb 08, 2010 10:17 am
Location: Greece
Has thanked: 109 times
Been thanked: 117 times
Contact:

Re: Can be linked with MPLAB ICD2 debugger/programmer?

Post by fotios »

medelec35 wrote:
fotios wrote: I have the Flowcode only for playing with simulations and nothing else.
Fotios
Since you have a programmer, you can use flowcode to compile to hex, then use your third party programmer to load hex, and program chip. Flowcode can via ppp produce hex file which also includes chip configuration settings. I know you want to do debugging as well, but at least to can program until a solution is found. Unless I misunderstood what you are saying?
That is true. I tried already different mcus (P16F877, 877A, 887, P18F4520) with a simple program (i.e. to run 8 leds in sequence connected in port C) developed and compiled in hex format with Flowcode. In sequence i "imported" the hex files in the MPLAB IDE, which can be loaded for debbuging or programming in the mcus via ICD2 with success. The chip configuration thru PPP is correct. BTW i tried as well the connectivity of ICD2 thru FlowKit. By changing the switch place on Flowkit in PROG mode, and by opening the MPLAB IDE the connection is succesfull with ICD2. The only problem it is the unusual long time which needed to established the connection between MPLAB and ICD2 thru the Flowkit device. Normally, with MPLAB and ICD as stand alone, this takes 2 to 3 seconds as much. Instead thru the FlowKit the time needed is arround 30 seconds. To do all the above described, the only tool that i don't used was the FlowKit. I believe that the problem of USB communication between PPP and FlowKit will be resolved in some time with the aid of Matrix Multimedia tech team.
My problem is that i don't like to use this procedure described. It is time consumpting. Take a look in the sequence:
1) I have to open the Flowcode to develop my project with the aid of flowcharts.
2) I have to run a simulation with Flowcode to debug the program.
3) I have to compile the debugged program from Flowcode in hex format.
Supposing that i have the following sequence of connections: PC-->USB cable-->FlowKit switched in PROG-->USB cable-->MPLAB ICD2-->Target MCU.
4) I have to open the MPLAB IDE and i am in waiting for 30 seconds untill the communication with ICD2 is established.
5) I have to import the hex file generated from Flowcode in MPLAB IDE.
6) I have to run a second simulation of the target MCU with the ICD2 in debug mode to be sure that there are not errors.
7) I have to turn the ICD2 in programmer to write the program in the MCU.
And all of this to have a second opportunity to run a real simulation and debugging on the target MCU with the FlowKit. For which there is the need of a second input in the target MCU. Of course, as stated in the manual of FlowKit and from those i have seen in the schematics if the switch is placed in the ICD position, then the two Data lines of USB bus are replaced from the two debugging lines ICD_Data and ICD_Clock of Flowkit proccessor. But i am sure that these data and clock lines can't pass thru the ICD2 if it is connected in the chain. So, to you have the possibility of ICD with FlowKit and to programming with third party programmer like ICD2, you have to plug - unplug sockets, to open the one software and to close the other continuously? I don't know if you can have two ICD devices connected simmultaneously in the same pins of MCU (RB6 - RB7) and as well if you can have open simultaneously two different softwares targetting on the same MCU.
Looking now at the EB006, is proved by far more flexible from this proccess described above. From the time that EB006 has the same ICD possibility like Flowkit, and it is as well a handy programmer the only that you have to do it is to plug the MCU on the dil socket and after the completion of project you can have a ready programmed device. You can as well to use an external target board, by simply transfering the signals from the EB006 board with 5 cables. Because the PIC18F4455 of EB006 it offers two lines of MCLR/Vpp, instead in the PIC18F4455 of Flowkit these lines are omitted. I can't understand the reason for this. The only that it has Matrix Multimedia to offer the first stand alone debugger/ICSP programmer compatible with Flowcode was to implement only a single MCLR/Vpp output in the P18F4455 of Flowkit.
At least, i had this idea, that the Flowkit it has the ICSP posibility; for this reason i proceeded in its purchase.
Fotios

P.S.
I have a suspicion of what it maybe causes the problem of communication between PPP and Flowkit. It is the filter which exists in the USB input? You can see in the schematics that this filter is not found in the EB006 USB input... a thought only and nothing more.
Best Regards FOTIS ANAGNOSTOU

Lieuwe
Posts: 16
Joined: Fri Aug 21, 2009 1:56 pm
Location: Holland
Has thanked: 1 time
Contact:

Using Flowcode With MPlab and Microchip Tools

Post by Lieuwe »

You can use Flowcode, and MPlab together when you have a separate Hitech or Sourceboost compiler.
Hitech only with Flowcode 4, Source boost 6.96 with both FC4 and FC3
You have to create a MPlab project, in this project you have to point to the created C- File (created by flowcode).

And you have to add location of the Lib files when you use Sourceboost (default: C:\Program Files\Matrix Multimedia\Flowcode V4\boostc\Lib)
Lib files are not needed with (hittech).
Hitech programmer can be installed for free while installing MPlab, in case of Lite license, code optimisation is turned off.

Also ad Header file :internals.h to the project. (default: C:\Program Files\Matrix Multimedia\Flowcode V4\FCD)

Now you can use the C- file created with flowcode to generate hex file, and program this file with ICD2 or anny other Microchip programmer.
Also you can use the ICD debugger, to debug the C code.(not the Flowcode FCD file!, you have to use a Matrix debugger for that)

Remember MPlab projects behave like pointers to the files, if you chance your flowchart, and compile to C in Flowcode, MPlab points to that altered C file.
When you re-build your MPlab project, the modifications you made with flowcode are loaded into your MPlab project.

Lieuwe.

Post Reply