Flowcode 6 & PicKit 2 [SOLVED]

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 6.

Moderator: Benj

User avatar
JLeith
Posts: 537
Joined: Wed Nov 14, 2012 7:49 pm
Location: British Columbia Canada
Has thanked: 146 times
Been thanked: 26 times
Contact:

Flowcode 6 & PicKit 2 [SOLVED]

Post by JLeith »

Hello all
I finally got my program back running after my old laptop crashed.

Now I found my old program on the forum.

but now I have a issue with the Flowcode 6 program working with PicKit 2.

I understand that my Flowcode 6 and PicKit 2 are old but still do the trick with my loading of Pic16 chips.

I have the CD version of PicKit 2 maybe I need a upgrade to PicKit 2 Version 2.50

I believe I have the wrong settings for the Compiler.

Getting a error message
C:\Program Files (x86)\Flowcode 6\compilers\pic\boostc\boostlink_picmicro.exe reported error code -2
I can't even save the Hex flies.

John
Attachments
Compiler.jpg
Compiler.jpg (59.72 KiB) Viewed 10001 times

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: Flowcode 6 & PicKit 2

Post by medelec35 »

Hi John,
If I remember correctly, with PICkit2 you can't have any spaces within your project name.
Try replacing spaces with underscores.
Also, can you post the programmer settings as well?
Can you actually see the hex file within the project folder?
Martin

User avatar
JLeith
Posts: 537
Joined: Wed Nov 14, 2012 7:49 pm
Location: British Columbia Canada
Has thanked: 146 times
Been thanked: 26 times
Contact:

Re: Flowcode 6 & PicKit 2

Post by JLeith »

Hello Martin
I'm in a total mess
I have googled for 6 hrs and still not getting Flowcode 6 to generate a Hex file never mind using the Pickit 2 with flowcode.

I do have a new laptop running Windows 10

I tried to even tried to download a Flowcode 6 program and it looks like the Compiler settings are part of my PC.

I have posted the Compiler messages and the program

I will add a few changes to my program hopping the Compiler works out.

John
Attachments
Compiler Messages.jpg
Compiler Messages.jpg (51.28 KiB) Viewed 9982 times
PitcherMasterPICSep14.fcfx
(178.28 KiB) Downloaded 214 times

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: Flowcode 6 & PicKit 2

Post by medelec35 »

Hi John,
Have you read this post?
Martin

User avatar
JLeith
Posts: 537
Joined: Wed Nov 14, 2012 7:49 pm
Location: British Columbia Canada
Has thanked: 146 times
Been thanked: 26 times
Contact:

Re: Flowcode 6 & PicKit 2

Post by JLeith »

Hi Martin

I looked into the Post and it was a lot of data.

It was for Flowcode 3 & 4 and MLAB applications.

Back in the old laptop I was able to use my exact chip in flowcode and the same PicKit2.
I have the 10K battery on MCLR.

Now only difference between Windows 8 on the old laptop and the New Windows 10 is the way windows 10 has a directory 'Program 86" Which was not in Windows 8.

I have C:/program and the C:/Program 86
I see Flowcode is in Program 86 and Pickit2 in Program 86

I have tried and tried to find the settings for the Compiler & Parameters for Flowcode 6 to work with Pickit2.

Several forum conversations point to dropping PICKit2 and getting PICKit3. I don't see the need to go to PICKit3 when PicKit2 worked just 6 months ago.

I used Flowcode 6 & PicKit2 on the 1st project I built for the Master Keypad design. Only issue is I lost all my past 2yrs design and rebuilt the program with help of forum conversation with yourself and others when I posted the program.

John

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: Flowcode 6 & PicKit 2

Post by medelec35 »

JLeith wrote:It was for Flowcode 3 & 4 and MLAB applications.
No the post shows links to program chips directly using Flowcode 6
you will set at the start of the message:
medelec35 wrote:I successfully programmed a 12F1840 directly with Flowcode V6
I was refering to PICkit2
If you follow the links I posted, you will find two files.
One of them are the PICkit2 settings to load into Flowcode V6 and the other is an updated PICkit2 dat file to place in specified directory.
Martin

User avatar
JLeith
Posts: 537
Joined: Wed Nov 14, 2012 7:49 pm
Location: British Columbia Canada
Has thanked: 146 times
Been thanked: 26 times
Contact:

Re: Flowcode 6 & PicKit 2

Post by JLeith »

Hi Martin

I think I did it right.
I thought I would just try to do a Hex copy and not do a direct to chip.

Crash.
I googled and there was a issue with Flowcode and PicKit2 working in 64 bit windows 10.

Pickit2 Hex needed to be at ( PK2V023200.hex)
The file I got from your "This" I got the (PK2V023200.hex) Good news

Here is the current error when I do a Hex copy. Error 255

I also attached the images of the settings.

I'm at a loss as to the next steps I should take. It takes about 20min of seeing (..............) then the Error message.

I'm at a lost as to where I go now....

John :(
Attachments
Flow6&Pickit.jpg
Flow6&Pickit.jpg (104.02 KiB) Viewed 9954 times
Error255.jpg
Error255.jpg (61.18 KiB) Viewed 9954 times

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: Flowcode 6 & PicKit 2

Post by medelec35 »

I have not used PICkit 2 before on my current version of 64 bit windows 10, so just changed target to the chip I have got (16F1937).
After loading FC6 with PICkit2.FCS found on the posted link, Chip programmed first time:

Code: Select all

Licensed to FlowCode User under Single user Pro License for 1 node(s)
Limitations: PIC12,PIC16 max code size:Unlimited, max RAM banks:Unlimited


PitcherMasterPICSep14.c
Starting preprocessor: "C:\Program Files (x86)\Flowcode 6\compilers\pic\boostc\pp.exe" PitcherMasterPICSep14.c -i "C:\Program Files (x86)\Flowcode 6\compilers\pic\boostc\include" -d _PIC16F1937 -la -c2 -o PitcherMasterPICSep14.pp -v -d _BOOSTC -d _PIC16 -d _PIC16x -d _CHAR_INDEX 

.....................................................................
PitcherMasterPICSep14.c success

success
Completed BoostC compilation, return = 0

Launching the linker/assembler...
C:\Program Files (x86)\Flowcode 6\compilers\pic\boostc\boostlink_picmicro.exe  -ld "C:\Program Files (x86)\Flowcode 6\compilers\pic\boostc\lib" libc_16F.lib rand_16F.lib float_16F.lib "PitcherMasterPICSep14.obj" -t PIC16F1937 -d "D:\Flowcode testing" -p "PitcherMasterPICSep14" -swcs 6 2
BoostLink Optimizing Linker Version 7.20
http://www.sourceboost.com
Copyright(C) 2004-2013 Pavel Baranov
Copyright(C) 2004-2013 David Hobday


Warning: Recursion may cause call stack overflow in function:'FCM_Keypad'
Caution: argument of 'delay_us' calls must have a value of 1 or more
Caution: Delay inaccurrate: 'delay_us', Delay overhead:0ms, Unit delay:0.00101725ms, Delay resolution:1 units
Caution: Delay inaccurrate: 'delay_ms', Delay overhead:0ms, Unit delay:1.00016ms, Delay resolution:1 units
Warning unreferenced functions removed:
	 FC_CAL_Port_In__x	 in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_IO.c
	 FC_CAL_Port_Out__x	 in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_IO.c
	 FC_CAL_Port_Out_DDR__x	 in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_IO.c
	 Wdt_Delay_S	 in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_Delay.c
	 Wdt_Delay_Ms	 in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_Delay.c
	 FCI_DELAYINT_US	 in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_Delay.c
	 FCI_DELAYINT_MS	 in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_Delay.c
	 FCI_DELAYINTWDT_MS	 in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_Delay.c
	 FCI_DELAYINT_S	 in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_Delay.c
	 FCI_DELAYINTWDT_S	 in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_Delay.c
	 FCI_MIDSTRING	 in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_String.c
	 FCI_LEFTSTRING	 in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_String.c
	 FCI_RIGHTSTRING	 in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_String.c
	 FCI_TOSTRS16	 in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_String.c
	 FCI_TOSTRS32	 in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_String.c
	 FCI_TOSTRU16	 in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_String.c
	 FCI_TOSTRU32	 in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_String.c
	 FCI_TOLOWER	 in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_String.c
	 FCI_TOUPPER	 in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_String.c
	 FCI_COMPARE	 in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_String.c
	 FCI_FLOAT_TO_STRING	 in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_String.c
	 FCI_NUMBER_TO_HEX	 in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_String.c
	 FCI_STRING_TO_INT	 in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_String.c
	 FCI_STRING_TO_FLOAT	 in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_String.c
	 FCI_STRREV	 in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_String.c
	 FCI_STRMOV	 in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_String.c
	 FCI_SHEAD	 in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_String.c
	 isinf	 in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_Float.c
	 pow	 in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_Float.c
	 flt_round	 in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_Float.c
	 flt_floor	 in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_Float.c
	 flt_ceil	 in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_Float.c
	 flt_atan	 in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_Float.c
	 cos	 in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_Float.c
	 sin	 in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_Float.c
	 tan	 in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_Float.c
	 FCM_KeyTest	 in: D:\Flowcode testing\PitcherMasterPICSep14.c
	 FCM_Mos_Pitches	 in: D:\Flowcode testing\PitcherMasterPICSep14.c
	 FCM_tmr_service	 in: D:\Flowcode testing\PitcherMasterPICSep14.c
	 FCD_01211_CircularBuffer1__WaitForValue	 in: D:\Flowcode testing\PitcherMasterPICSep14.c
	 FCD_08c31_keypad_base__GetString	 in: D:\Flowcode testing\PitcherMasterPICSep14.c
	 FCD_03d91_led_base__TurnOn	 in: D:\Flowcode testing\PitcherMasterPICSep14.c
	 FCD_03d91_led_base__TurnOff	 in: D:\Flowcode testing\PitcherMasterPICSep14.c
	 FC_CAL_SPI_Slave_Uninit_1	 in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_SPI.c
	 FCD_01531_cal_spi__Prv_TextConsole	 in: D:\Flowcode testing\PitcherMasterPICSep14.c
	 FC_CAL_SPI_Slave_Init_1	 in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_SPI.c
	 FC_CAL_SPI_Master_Uninit_1	 in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_SPI.c
	 FC_CAL_SPI_SetPrescaler_1	 in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_SPI.c
	 FCD_06c41_SPI_Master2__SendString	 in: D:\Flowcode testing\PitcherMasterPICSep14.c
	 FCD_06c41_SPI_Master2__GetString	 in: D:\Flowcode testing\PitcherMasterPICSep14.c
	 FCD_06c41_SPI_Master2__UnInitialise	 in: D:\Flowcode testing\PitcherMasterPICSep14.c
	 FCD_04071_LCD__RAMWrite	 in: D:\Flowcode testing\PitcherMasterPICSep14.c
	 FCD_04071_LCD__Command	 in: D:\Flowcode testing\PitcherMasterPICSep14.c
	 FCD_04071_LCD__PrintFormattedNumber	 in: D:\Flowcode testing\PitcherMasterPICSep14.c
	 FCD_04071_LCD__ScrollDisplay	 in: D:\Flowcode testing\PitcherMasterPICSep14.c
	 FC_CAL_SPI_Slave_SetTxData_1	 in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_SPI.c
	 FC_CAL_SPI_Slave_GetRxData_1	 in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_SPI.c

Building CASM file
Memory Usage Report
===================
RAM available:512 bytes, used:218 bytes (42.6%), free:294 bytes (57.4%), 
Heap size:278 bytes, Heap max single alloc:79 bytes
ROM available:8192 words, used:7391 words (90.3%), free:801 words (9.7%)



success
.
Launching the programmer...
C:\Program Files (x86)\Flowcode 6\tools\PICkit2\pk2cmd.exe  -BC:\Program Files (x86)\Flowcode 6\tools\PICkit2\ -PPIC16F1937 -FPitcherMasterPICSep14.hex -M -A5 -R
\|/-.
\|/ \ \-\|/-\.
|/-\|/- \ PICkit 2 Program Report
15-Sep-2018, 22:58:17
Device Type: PIC16F1937

Program Succeeded.

Operation Succeeded


FINISHED
Did you upgrade PICkit2 with dat file found here?
Martin

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: Flowcode 6 & PicKit 2

Post by medelec35 »

Hi John,
Sorry I have been extreamly busy so only been quickly brushing over the posts.
This is clearly wrong!
Compiler settings.png
(214.48 KiB) Downloaded 3731 times
Looking at your screen capture (post error within a code box as is it's much better than screen capture) Flowchart is trying to compile with the wrong exe file instead of boostC!
What you need to do is:
Select Build, Compiler Options.
Select Import then load PICkit2.FCS
In the Setting click on the save icon:
Save.png
(34.71 KiB) Downloaded 3731 times
A new box will appear.
Enter a name E.g PICkit2 Settings.
Delete the blank settings (Click on the icon, then select delete):
Compiler settings2.png
(19.65 KiB) Downloaded 3731 times
Make sure the new PICkit2 setting have the default box ticked!

The PK2V023200.hex is the new operating system for the PICkit2 programmer.
You need to use PICkit2 programming software (download from here) to load PICkit2 with a new operating system.
Select Trusted Download file 3.9Mb only
To do that, with PICkit2 connected, run the PICkit2 software, select Tools, Download PICkit2 Operating System.
You need to select the PK2V023200.hex file.
Martin

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: Flowcode 6 & PicKit 2

Post by medelec35 »

Hi John,
Have you made any progress since the last post or do you require further help?
Martin

User avatar
JLeith
Posts: 537
Joined: Wed Nov 14, 2012 7:49 pm
Location: British Columbia Canada
Has thanked: 146 times
Been thanked: 26 times
Contact:

Re: Flowcode 6 & PicKit 2

Post by JLeith »

Hello Martin.

Well almost made it I followed your steps to the letter.

I was able to get the Compiler to see the "PICkit2 Settings" under the Settings Name.

CRASH --- I did the PICKit2 upgrade using the "Hex" file. The Interface module updated and the world started to realign.

Now I can't see the PICKit2 Settings in Flowcode Compiler ?

It looks like when I did the Upgrade to the PICKKit2 from Version 2.50 to the New 2.61 the files under PICKit2 were erased.

Martin is the a web page to get a full upgrade for Pickit2 from 2.50 to 2.61

Or could you send me a ZIP file of the missing info for 2.61. Made I can add them back in.

John
Attachments
Sept17.jpg
Sept17.jpg (23.76 KiB) Viewed 9890 times

User avatar
JLeith
Posts: 537
Joined: Wed Nov 14, 2012 7:49 pm
Location: British Columbia Canada
Has thanked: 146 times
Been thanked: 26 times
Contact:

Re: Flowcode 6 & PicKit 2

Post by JLeith »

Martin I was able to get the Pickit2 files structure back by using the V2.61 Zip file.
The file pk2cmd.exe is still missing.

Here is what I have back
1. The pk2cmd listing
2.The files in the PICKIT2v2 directory

John
Attachments
This is the step of adding pk2cmd.exe
This is the step of adding pk2cmd.exe
pk2cmd.jpg (61.62 KiB) Viewed 9888 times
The file structure for PICkit2 directory
The file structure for PICkit2 directory
Sept17Dir.jpg (88.81 KiB) Viewed 9888 times

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: Flowcode 6 & PicKit 2

Post by medelec35 »

The PICkit2 will not be compiling (BoostC compiles) so you should not see pk2cmd.exe in the compiler tab.
You should only see pk2cmd.exe in the Programmer tab as it is used for programming only!
pk2cmd.png
(39.89 KiB) Downloaded 3683 times
Martin

User avatar
JLeith
Posts: 537
Joined: Wed Nov 14, 2012 7:49 pm
Location: British Columbia Canada
Has thanked: 146 times
Been thanked: 26 times
Contact:

Re: Flowcode 6 & PicKit 2

Post by JLeith »

I missed that tab

Just so I have the correct settings. Still not working

Here is a picture of all the tabs.

On the "Compiler" Tab how do I get the values ?

John
Attachments
Tab Linker.png
(144.27 KiB) Downloaded 3681 times
Tab Programmer.png
(155.38 KiB) Downloaded 3681 times
Tab Viewer.png
(139.62 KiB) Downloaded 3681 times

User avatar
JLeith
Posts: 537
Joined: Wed Nov 14, 2012 7:49 pm
Location: British Columbia Canada
Has thanked: 146 times
Been thanked: 26 times
Contact:

Re: Flowcode 6 & PicKit 2

Post by JLeith »

Missed Compiler

Compiler is the spot I can't find the field values

John
Attachments
Tab Compiler.png
(95.62 KiB) Downloaded 3681 times

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: Flowcode 6 & PicKit 2

Post by medelec35 »

Compiler settings should have loaded in when imported PICkit2.FCS
The settings I have are:

Compiler
Location:
pic\boostc\boostc_$(family:/12F/16F).exe
Parameters :
-v -t PIC$(chip:u) "$(target).c"

Linker/Assembler
Location:
$(appdir)compilers\pic\boostc\boostlink_picmicro.exe
Parameters :
-ld "$(appdir)compilers\pic\boostc\lib" libc_$(family:/12F/16F).lib rand_$(family:/12F/16F).lib float_$(family:/12F/16F).lib "$(target).obj" -t PIC$(chip:u) -d "$(outdir:~-1)" -p "$(target)" -swcs 6 2

Programmer
Location:
$(appdir)tools\PICkit2\pk2cmd.exe
Parameters :
-B$(appdir)tools\PICkit2\ -PPIC$(chip) -F$(target).hex -M -A5 -R
Martin

User avatar
JLeith
Posts: 537
Joined: Wed Nov 14, 2012 7:49 pm
Location: British Columbia Canada
Has thanked: 146 times
Been thanked: 26 times
Contact:

Re: Flowcode 6 & PicKit 2

Post by JLeith »

Hello Martin

Getting a little closer.
Closer.jpg
Closer.jpg (4.16 KiB) Viewed 9874 times
1st time with Error 1


John
Attachments
Finished.png
(13.2 KiB) Downloaded 3675 times

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: Flowcode 6 & PicKit 2

Post by medelec35 »

I'm not sure how you imported PICkit2.FCS and the compiler field was blank, and now the settings are pointing to the project directory?? :?

One step at a time.

Re-import PICkit2.FCS .
Without changing anything, compile to target, then select the compiler messages and paste on here within a code box.
Screen captures leave things out.
Make it more difficult to see what the issues are.
Martin

User avatar
JLeith
Posts: 537
Joined: Wed Nov 14, 2012 7:49 pm
Location: British Columbia Canada
Has thanked: 146 times
Been thanked: 26 times
Contact:

Re: Flowcode 6 & PicKit 2

Post by JLeith »

What a mystery

I have imported the PickKit2.fcs

Not sure what you are asking me to capture ?
Without changing anything, compile to target, then select the compiler messages and paste on here within a code box.
Martin can you make hex files form my projects and see if I can use the PICKIT2 to load the Hex files.

John
Attachments
Team Pitch count 23 John_July 24.fcfx
(116.04 KiB) Downloaded 123 times
MasterPICSept14.fcfx
(178.28 KiB) Downloaded 126 times

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: Flowcode 6 & PicKit 2

Post by medelec35 »

JLeith wrote:Martin can you make hex files form my projects and see if I can use the PICKIT2 to load the Hex files.
It's best to get down to solving what the issue is.
After loading PICkit2.FCS and with PICkit2 connected to target that has power.
Just compile to chip.
When you compile to hex or compile to chip, there are compiler messages that are displayed.
For example the one I posted was:

Code: Select all

Licensed to FlowCode User under Single user Pro License for 1 node(s)
Limitations: PIC12,PIC16 max code size:Unlimited, max RAM banks:Unlimited


PitcherMasterPICSep14.c
Starting preprocessor: "C:\Program Files (x86)\Flowcode 6\compilers\pic\boostc\pp.exe" PitcherMasterPICSep14.c -i "C:\Program Files (x86)\Flowcode 6\compilers\pic\boostc\include" -d _PIC16F1937 -la -c2 -o PitcherMasterPICSep14.pp -v -d _BOOSTC -d _PIC16 -d _PIC16x -d _CHAR_INDEX 

.....................................................................
PitcherMasterPICSep14.c success

success
Completed BoostC compilation, return = 0

Launching the linker/assembler...
C:\Program Files (x86)\Flowcode 6\compilers\pic\boostc\boostlink_picmicro.exe  -ld "C:\Program Files (x86)\Flowcode 6\compilers\pic\boostc\lib" libc_16F.lib rand_16F.lib float_16F.lib "PitcherMasterPICSep14.obj" -t PIC16F1937 -d "D:\Flowcode testing" -p "PitcherMasterPICSep14" -swcs 6 2
BoostLink Optimizing Linker Version 7.20
http://www.sourceboost.com
Copyright(C) 2004-2013 Pavel Baranov
Copyright(C) 2004-2013 David Hobday


Warning: Recursion may cause call stack overflow in function:'FCM_Keypad'
Caution: argument of 'delay_us' calls must have a value of 1 or more
Caution: Delay inaccurrate: 'delay_us', Delay overhead:0ms, Unit delay:0.00101725ms, Delay resolution:1 units
Caution: Delay inaccurrate: 'delay_ms', Delay overhead:0ms, Unit delay:1.00016ms, Delay resolution:1 units
Warning unreferenced functions removed:
    FC_CAL_Port_In__x    in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_IO.c
    FC_CAL_Port_Out__x    in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_IO.c
    FC_CAL_Port_Out_DDR__x    in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_IO.c
    Wdt_Delay_S    in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_Delay.c
    Wdt_Delay_Ms    in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_Delay.c
    FCI_DELAYINT_US    in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_Delay.c
    FCI_DELAYINT_MS    in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_Delay.c
    FCI_DELAYINTWDT_MS    in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_Delay.c
    FCI_DELAYINT_S    in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_Delay.c
    FCI_DELAYINTWDT_S    in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_Delay.c
    FCI_MIDSTRING    in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_String.c
    FCI_LEFTSTRING    in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_String.c
    FCI_RIGHTSTRING    in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_String.c
    FCI_TOSTRS16    in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_String.c
    FCI_TOSTRS32    in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_String.c
    FCI_TOSTRU16    in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_String.c
    FCI_TOSTRU32    in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_String.c
    FCI_TOLOWER    in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_String.c
    FCI_TOUPPER    in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_String.c
    FCI_COMPARE    in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_String.c
    FCI_FLOAT_TO_STRING    in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_String.c
    FCI_NUMBER_TO_HEX    in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_String.c
    FCI_STRING_TO_INT    in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_String.c
    FCI_STRING_TO_FLOAT    in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_String.c
    FCI_STRREV    in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_String.c
    FCI_STRMOV    in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_String.c
    FCI_SHEAD    in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_String.c
    isinf    in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_Float.c
    pow    in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_Float.c
    flt_round    in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_Float.c
    flt_floor    in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_Float.c
    flt_ceil    in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_Float.c
    flt_atan    in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_Float.c
    cos    in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_Float.c
    sin    in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_Float.c
    tan    in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_Float.c
    FCM_KeyTest    in: D:\Flowcode testing\PitcherMasterPICSep14.c
    FCM_Mos_Pitches    in: D:\Flowcode testing\PitcherMasterPICSep14.c
    FCM_tmr_service    in: D:\Flowcode testing\PitcherMasterPICSep14.c
    FCD_01211_CircularBuffer1__WaitForValue    in: D:\Flowcode testing\PitcherMasterPICSep14.c
    FCD_08c31_keypad_base__GetString    in: D:\Flowcode testing\PitcherMasterPICSep14.c
    FCD_03d91_led_base__TurnOn    in: D:\Flowcode testing\PitcherMasterPICSep14.c
    FCD_03d91_led_base__TurnOff    in: D:\Flowcode testing\PitcherMasterPICSep14.c
    FC_CAL_SPI_Slave_Uninit_1    in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_SPI.c
    FCD_01531_cal_spi__Prv_TextConsole    in: D:\Flowcode testing\PitcherMasterPICSep14.c
    FC_CAL_SPI_Slave_Init_1    in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_SPI.c
    FC_CAL_SPI_Master_Uninit_1    in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_SPI.c
    FC_CAL_SPI_SetPrescaler_1    in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_SPI.c
    FCD_06c41_SPI_Master2__SendString    in: D:\Flowcode testing\PitcherMasterPICSep14.c
    FCD_06c41_SPI_Master2__GetString    in: D:\Flowcode testing\PitcherMasterPICSep14.c
    FCD_06c41_SPI_Master2__UnInitialise    in: D:\Flowcode testing\PitcherMasterPICSep14.c
    FCD_04071_LCD__RAMWrite    in: D:\Flowcode testing\PitcherMasterPICSep14.c
    FCD_04071_LCD__Command    in: D:\Flowcode testing\PitcherMasterPICSep14.c
    FCD_04071_LCD__PrintFormattedNumber    in: D:\Flowcode testing\PitcherMasterPICSep14.c
    FCD_04071_LCD__ScrollDisplay    in: D:\Flowcode testing\PitcherMasterPICSep14.c
    FC_CAL_SPI_Slave_SetTxData_1    in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_SPI.c
    FC_CAL_SPI_Slave_GetRxData_1    in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_SPI.c

Building CASM file
Memory Usage Report
===================
RAM available:512 bytes, used:218 bytes (42.6%), free:294 bytes (57.4%), 
Heap size:278 bytes, Heap max single alloc:79 bytes
ROM available:8192 words, used:7391 words (90.3%), free:801 words (9.7%)



success
.
Launching the programmer...
C:\Program Files (x86)\Flowcode 6\tools\PICkit2\pk2cmd.exe  -BC:\Program Files (x86)\Flowcode 6\tools\PICkit2\ -PPIC16F1937 -FPitcherMasterPICSep14.hex -M -A5 -R
\|/-.
\|/ \ \-\|/-\.
|/-\|/- \ PICkit 2 Program Report
15-Sep-2018, 22:58:17
Device Type: PIC16F1937

Program Succeeded.

Operation Succeeded


FINISHED
What you do is Within the compiler messages when its finished click once so there is one like that changes to blue.
Press Ctrl A so all get highlighted, then press Ctrl C to copy.
Next on the forum post, just above the text box select Code then you will see code and /code but within square brackets.
After the inbetween ] & [ just paste then you should have something similar to above compiler message.
Martin

User avatar
JLeith
Posts: 537
Joined: Wed Nov 14, 2012 7:49 pm
Location: British Columbia Canada
Has thanked: 146 times
Been thanked: 26 times
Contact:

Re: Flowcode 6 & PicKit 2

Post by JLeith »

Off to get the info.
Confirmed I have power on the PIC

John

User avatar
JLeith
Posts: 537
Joined: Wed Nov 14, 2012 7:49 pm
Location: British Columbia Canada
Has thanked: 146 times
Been thanked: 26 times
Contact:

Re: Flowcode 6 & PicKit 2

Post by JLeith »

Error 1

Code: Select all

Target folder: C:\Users\jleit\Desktop\PITCHC~1
Source name:   C:\Users\jleit\Desktop\Pitch Count\MasterPICSept14.fcfx
Title:         
Description:   
Device:        PIC.16F.16F1938
Generated by:  Flowcode v6.1.4.0
Date:          Tuesday, September 18, 2018 09:58:50
Users:         1
Registered to: Default Flowcode Name
Licence key:   EA6R55
http://www.matrixtsl.com
Launching the compiler...
C:\Program Files (x86)\Flowcode 6\compilers\pic\boostc\boostc_16F.exe  -v -t PIC16F1938 "MasterPICSept14.c"
...
Launching BoostC...
...
BoostC Optimizing C Compiler Version 7.20 (for PIC16 architecture)
http://www.sourceboost.com
Copyright(C) 2004-2013 Pavel Baranov
Copyright(C) 2004-2013 David Hobday

Single user Lite License (Unregistered) for 0 node(s)
Limitations: PIC12,PIC16 max code size:2048 words, max RAM banks:2, Non commercial use only


MasterPICSept14.c
Starting preprocessor: "C:\Program Files (x86)\Flowcode 6\compilers\pic\boostc\pp.exe" MasterPICSept14.c -i "C:\Program Files (x86)\Flowcode 6\compilers\pic\boostc\include" -d _PIC16F1938 -la -c2 -o MasterPICSept14.pp -v -d _BOOSTC -d _PIC16 -d _PIC16x -d _CHAR_INDEX 

.........................................................................................................................................................................................
MasterPICSept14.c success

success
Completed BoostC compilation, return = 0

Launching the linker/assembler...
C:\Program Files (x86)\Flowcode 6\compilers\pic\boostc\boostlink_picmicro.exe  -ld "C:\Program Files (x86)\Flowcode 6\compilers\pic\boostc\lib" libc_16F.lib rand_16F.lib float_16F.lib "MasterPICSept14.obj" -t PIC16F1938 -d "C:\Users\jleit\Desktop\PITCHC~1" -p "MasterPICSept14" -swcs 6 2
..
BoostLink Optimizing Linker Version 7.20
http://www.sourceboost.com
Copyright(C) 2004-2013 Pavel Baranov
Copyright(C) 2004-2013 David Hobday


Warning: Recursion may cause call stack overflow in function:'FCM_Keypad'
Caution: argument of 'delay_us' calls must have a value of 1 or more
Warning unreferenced functions removed:
	 FC_CAL_Port_In__x	 in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_IO.c
	 FC_CAL_Port_Out__x	 in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_IO.c
	 FC_CAL_Port_Out_DDR__x	 in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_IO.c
	 Wdt_Delay_S	 in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_Delay.c
	 Wdt_Delay_Ms	 in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_Delay.c
	 FCI_DELAYINT_US	 in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_Delay.c
	 FCI_DELAYINT_MS	 in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_Delay.c
	 FCI_DELAYINTWDT_MS	 in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_Delay.c
	 FCI_DELAYINT_S	 in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_Delay.c
	 FCI_DELAYINTWDT_S	 in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_Delay.c
	 FCI_MIDSTRING	 in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_String.c
	 FCI_LEFTSTRING	 in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_String.c
	 FCI_RIGHTSTRING	 in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_String.c
	 FCI_TOSTRS16	 in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_String.c
	 FCI_TOSTRS32	 in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_String.c
	 FCI_TOSTRU16	 in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_String.c
	 FCI_TOSTRU32	 in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_String.c
	 FCI_TOLOWER	 in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_String.c
	 FCI_TOUPPER	 in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_String.c
	 FCI_COMPARE	 in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_String.c
	 FCI_FLOAT_TO_STRING	 in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_String.c
	 FCI_NUMBER_TO_HEX	 in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_String.c
	 FCI_STRING_TO_INT	 in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_String.c
	 FCI_STRING_TO_FLOAT	 in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_String.c
	 FCI_STRREV	 in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_String.c
	 FCI_STRMOV	 in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_String.c
	 FCI_SHEAD	 in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_String.c
	 isinf	 in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_Float.c
	 pow	 in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_Float.c
	 flt_round	 in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_Float.c
	 flt_floor	 in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_Float.c
	 flt_ceil	 in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_Float.c
	 flt_atan	 in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_Float.c
	 cos	 in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_Float.c
	 sin	 in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_Float.c
	 tan	 in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_Float.c
	 FCM_KeyTest	 in: C:\Users\jleit\Desktop\PITCHC~1\MasterPICSept14.c
	 FCM_Mos_Pitches	 in: C:\Users\jleit\Desktop\PITCHC~1\MasterPICSept14.c
	 FCM_tmr_service	 in: C:\Users\jleit\Desktop\PITCHC~1\MasterPICSept14.c
	 FCD_01211_CircularBuffer1__WaitForValue	 in: C:\Users\jleit\Desktop\PITCHC~1\MasterPICSept14.c
	 FCD_08c31_keypad_base__GetString	 in: C:\Users\jleit\Desktop\PITCHC~1\MasterPICSept14.c
	 FCD_03d91_led_base__TurnOn	 in: C:\Users\jleit\Desktop\PITCHC~1\MasterPICSept14.c
	 FCD_03d91_led_base__TurnOff	 in: C:\Users\jleit\Desktop\PITCHC~1\MasterPICSept14.c
	 FC_CAL_SPI_Slave_Uninit_1	 in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_SPI.c
	 FCD_01531_cal_spi__Prv_TextConsole	 in: C:\Users\jleit\Desktop\PITCHC~1\MasterPICSept14.c
	 FC_CAL_SPI_Slave_Init_1	 in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_SPI.c
	 FC_CAL_SPI_Master_Uninit_1	 in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_SPI.c
	 FC_CAL_SPI_SetPrescaler_1	 in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_SPI.c
	 FCD_06c41_SPI_Master2__SendString	 in: C:\Users\jleit\Desktop\PITCHC~1\MasterPICSept14.c
	 FCD_06c41_SPI_Master2__GetString	 in: C:\Users\jleit\Desktop\PITCHC~1\MasterPICSept14.c
	 FCD_06c41_SPI_Master2__UnInitialise	 in: C:\Users\jleit\Desktop\PITCHC~1\MasterPICSept14.c
	 FCD_04071_LCD__RAMWrite	 in: C:\Users\jleit\Desktop\PITCHC~1\MasterPICSept14.c
	 FCD_04071_LCD__Command	 in: C:\Users\jleit\Desktop\PITCHC~1\MasterPICSept14.c
	 FCD_04071_LCD__PrintFormattedNumber	 in: C:\Users\jleit\Desktop\PITCHC~1\MasterPICSept14.c
	 FCD_04071_LCD__ScrollDisplay	 in: C:\Users\jleit\Desktop\PITCHC~1\MasterPICSept14.c
	 FC_CAL_SPI_Slave_SetTxData_1	 in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_SPI.c
	 FC_CAL_SPI_Slave_GetRxData_1	 in: C:\Program Files (x86)\Flowcode 6\CAL\PIC\PIC_CAL_SPI.c

License restricted by the following files:
	MasterPICSept14.objRecompile the code with a less restrictive compiler license!
License exceeded by RAM: 662 bytes
License exceeded by ROM: 5384 words

You have reached the limit of the Lite License (Unregistered)
PIC12,PIC16 max code size:2048 words, max RAM banks:2, Non commercial use only
You can upgrade your license. Please visit: http://www.sourceboost.com


failure
.
C:\Program Files (x86)\Flowcode 6\compilers\pic\boostc\boostlink_picmicro.exe reported error code -2


FINISHED

User avatar
JLeith
Posts: 537
Joined: Wed Nov 14, 2012 7:49 pm
Location: British Columbia Canada
Has thanked: 146 times
Been thanked: 26 times
Contact:

Re: Flowcode 6 & PicKit 2

Post by JLeith »

Hello Martin

Only message I see a little different from your coppy


BoostC Optimizing C Compiler Version 7.20 (for PIC16 architecture)
Your image stops after 7.20

User avatar
JLeith
Posts: 537
Joined: Wed Nov 14, 2012 7:49 pm
Location: British Columbia Canada
Has thanked: 146 times
Been thanked: 26 times
Contact:

Re: Flowcode 6 & PicKit 2

Post by JLeith »

This is odd

What License ?

You have reached the limit of the Lite License (Unregistered)
PIC12,PIC16 max code size:2048 words, max RAM banks:2, Non commercial use only
You can upgrade your license. Please visit: http://www.sourceboost.com

failure
.
C:\Program Files (x86)\Flowcode 6\compilers\pic\boostc\boostlink_picmicro.exe reported error code -2


FINISHED

User avatar
JLeith
Posts: 537
Joined: Wed Nov 14, 2012 7:49 pm
Location: British Columbia Canada
Has thanked: 146 times
Been thanked: 26 times
Contact:

Re: Flowcode 6 & PicKit 2

Post by JLeith »

Never came across this message in building a project

Looks like this from the web page

Thoughts
Attachments
BoostC.png
(29.28 KiB) Downloaded 3645 times

Post Reply