Hello All,
I've put together a brief demonstration vide here showing the serial ICD capabilities in Flowcode 11.
https://youtu.be/NAqDwGC7qGM
Please feel free to add comments or questions below.
Flowcode 11 Serial In Circuit Debug (ICD)
-
BenR
- Matrix Staff
- Posts: 2254
- http://meble-kuchenne.info.pl
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 618 times
- Been thanked: 818 times
Flowcode 11 Serial In Circuit Debug (ICD)
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Re: Flowcode 11 Serial In Circuit Debug (ICD)
Hi Ben,
This ICD feature looks really interesting.
At the ned of your video, you mention that it may require a custom file to work with certain microcontrollers.
My projects are mostly using PICs and controlleres that all have UART which I typically dump diagnostics out to through an FTDI Serial to USB and into a Terminal (or more often now, FC App dev)
18F2585
16F15324
dsPIC33EV....
Pi PICO
Are these suitable candidates for the ICD method you covered in the video?
Thanks, J.
This ICD feature looks really interesting.
At the ned of your video, you mention that it may require a custom file to work with certain microcontrollers.
My projects are mostly using PICs and controlleres that all have UART which I typically dump diagnostics out to through an FTDI Serial to USB and into a Terminal (or more often now, FC App dev)
18F2585
16F15324
dsPIC33EV....
Pi PICO
Are these suitable candidates for the ICD method you covered in the video?
Thanks, J.
-
BenR
- Matrix Staff
- Posts: 2254
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 618 times
- Been thanked: 818 times
Re: Flowcode 11 Serial In Circuit Debug (ICD)
Hello,
Yes those are all great targets and should all work fine with the new ICD.
The two 8-bit PIC devices should work fine with a simple tweak to the device definition file. You can amend the original FCD file in the "C:\ProgramData\MatrixTSL\FlowcodeV11\FCD\PIC" folder or you can make a copy of the file and that way you are immune to library updates overwriting your changes. If you want to overwrite the original then make a backup of your changes so you can restore them if you happen to do a full library update.
The change you need to make is right at the bottom of the chip definition FCD file. Open the file with a text editor and scroll right down to the bottom of the file to find the test section. It will probably look like this.
Simply change to add the ICD3 definition. Channel is the hardware Channel to use, RXPort and TXPort are the port letter, 0=A, 1=B etc, RXPin and TXPin are the bit of the pin being used.
If your chip has a remappable UART then you can set the default pins by adding to the end of the inline main start code section of the FCD. Add the UART to your project and setup the pins to see the registers and values.
Last to add the option to let you select the COM port in the project options or to auto detect the port you can add the comminfo section as the first child node inside the device section.
If your making your own version of a FCD then you also need to scroll to the top of the file and do a couple of things.
1) Delete the header lines from the top of the file - they look like this.
2) In the device section add in a new file="" option with the filename of the new FCD file.
would become
If you have specific channels, port and pins you want to use on specific devices then let me know and I can make all the FCD changes for you.
16-bit PIC and Pico families don't have ICD support yet but I can happily look into this if it's useful for you.
Yes those are all great targets and should all work fine with the new ICD.
The two 8-bit PIC devices should work fine with a simple tweak to the device definition file. You can amend the original FCD file in the "C:\ProgramData\MatrixTSL\FlowcodeV11\FCD\PIC" folder or you can make a copy of the file and that way you are immune to library updates overwriting your changes. If you want to overwrite the original then make a backup of your changes so you can restore them if you happen to do a full library update.
The change you need to make is right at the bottom of the chip definition FCD file. Open the file with a text editor and scroll right down to the bottom of the file to find the test section. It will probably look like this.
Code: Select all
<test >
<icd >
<clock port='0' pin='1' />
<data port='0' pin='0' />
</icd>
</test>Code: Select all
<test >
<icd >
<clock port='0' pin='1' />
<data port='0' pin='0' />
</icd>
<icd3 type='com' channel='5' baud='115200' rxport='6' rxpin='3' txport='6' txpin='2' autodetect='0' />
</test>Code: Select all
\n\tRX5PPS = 0x33;\n\tRG2PPS = 0x14;\nCode: Select all
<device file="E-blocks3 8-bit PIC Programmer" name='E-blocks3 8-bit PIC' namealt='18F67K40' product='PIC' cal='PIC' family='18F' bits='8' scannable='EB3' >
<comminfo>
<com pid="0031" vid="12BF" devdesc="E-blocks3 PIC" />
<com pid="0403" vid="6015" devdesc="E-blocks3 PIC" />
</comminfo>1) Delete the header lines from the top of the file - they look like this.
Code: Select all
<!-- CRC: 90CF26913586BBA787FE92D5537719330A836487DCEEAA0B715200033895AA96FC1CCCFA5F4233CFD1787D44233A22EA9A0D46BD3B6AACB92DE4D84759EBB5079CA9DA2D2BBCDAE2A4D1C56CD1580BF5FE80C4F0E92FCB49B91C6DBCE39A5FCDEF4D23B1B19957934047C2A628B885B8ADFFB39369AE4C02500452164639148AE79202B87CB6969266B11C77E5F1405E961B9896EC0DFA49A041DF81AFAACC767F96566B6F27940E086944AE325796A68F555CCBBDFD86D98F6218D9A7B28036E96C0ED9BC8FA8DE08DB0CC5B99E58558FAE3087E8A87EE9 -->
<!-- REVISION: 1.0 -->
<!-- GUID: 3E48EC1C-B96E-47FC-AA98-AF9A0CAC6C54 -->
<!-- DATE: 08\08\2022 -->
<!-- DIR: FCD\PIC\16F1503.fcdx -->Code: Select all
<device name='16F1503' product='PIC' cal='PIC' family='16F' bits='8' >Code: Select all
<device file='16F1503_custom' name='16F1503' product='PIC' cal='PIC' family='16F' bits='8' >16-bit PIC and Pico families don't have ICD support yet but I can happily look into this if it's useful for you.
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Re: Flowcode 11 Serial In Circuit Debug (ICD)
Hi Ben,
Finally got time to look at this again.
PIC18F2585 on a stand alone custom PCB.
Can this method only be used with direct USB programmed devices? since you need to Program & do ICD over a common serial link.
I use PICKIT3 or PICKIT5 for programming, but also have various old Eblocks systems, flowkit1 & 2 etc.
I followed the instructions as given above and created an custom FCD for a PIC18F2585. Attached. and change to this in my FC project and enable ICD, this seems to send OK to the PIC.
For the Port and Pin settings, should I be using the UART hardware pins. Tx C6 Rx C7
or the programming pins?
Thanks, J.
Finally got time to look at this again.
PIC18F2585 on a stand alone custom PCB.
Can this method only be used with direct USB programmed devices? since you need to Program & do ICD over a common serial link.
I use PICKIT3 or PICKIT5 for programming, but also have various old Eblocks systems, flowkit1 & 2 etc.
I followed the instructions as given above and created an custom FCD for a PIC18F2585. Attached. and change to this in my FC project and enable ICD, this seems to send OK to the PIC.
For the Port and Pin settings, should I be using the UART hardware pins. Tx C6 Rx C7
or the programming pins?
Thanks, J.