Page 1 of 1

12F617 not compiling

Posted: Thu Aug 19, 2010 3:38 pm
by medelec35
Created a simple toggle port test. Compiled to hex, since compile to chip is not working because 12F617 is missing from PPP.
Following errors were reported:

Code: Select all


Test 12F617 chip.c

Starting preprocessor: C:\PROGRA~1\MATRIX~1\FLOWCO~2\BoostC\pp.exe "m:\Test 12F617 chip.c" -i C:\PROGRA~1\MATRIX~1\FLOWCO~2\BoostC\include -d _PIC12F617 -la -c2 -o "m:\Test 12F617 chip.pp" -v -d _BOOSTC -d _PIC16 





..........



m:\Test 12F617 chip.c(64:2): error: unknown identifier 'ansel'

m:\Test 12F617 chip.c(64:2): error: invalid operand 'ansel'

m:\Test 12F617 chip.c(64:8): error: failed to generate expression

m:\Test 12F617 chip.c(68:2): error: unknown identifier 'option_reg'

m:\Test 12F617 chip.c(68:2): error: invalid operand 'option_reg'

m:\Test 12F617 chip.c(68:13): error: failed to generate expression

m:\Test 12F617 chip.c(77:2): error: unknown identifier 'trisio'

m:\Test 12F617 chip.c(77:2): error: invalid operand 'trisio'

m:\Test 12F617 chip.c(77:9): error: failed to generate expression

m:\Test 12F617 chip.c(79:2): error: unknown identifier 'gpio'

m:\Test 12F617 chip.c(79:2): error: invalid operand 'gpio'

m:\Test 12F617 chip.c(79:7): error: failed to generate expression

m:\Test 12F617 chip.c(79:2): error: error in the body of 'if' expression

m:\Test 12F617 chip.c(92:2): error: unknown identifier 'trisio'

m:\Test 12F617 chip.c(92:2): error: invalid operand 'trisio'

m:\Test 12F617 chip.c(92:9): error: failed to generate expression

m:\Test 12F617 chip.c(94:2): error: unknown identifier 'gpio'

m:\Test 12F617 chip.c(94:2): error: invalid operand 'gpio'

m:\Test 12F617 chip.c(94:7): error: failed to generate expression

m:\Test 12F617 chip.c(94:2): error: error in the body of 'if' expression

Test 12F617 chip.c success



failure



Return code = 1
Created new PIC12F617 header and TDF files, since these are both missing.
Recompiled and still the same errors.
Any help would be great.
Thank You.

Re: 12F617 not compiling

Posted: Fri Aug 20, 2010 1:55 pm
by medelec35
I’m puzzled why adding a definition file, and/or adding defines in supplementary table does not work :?

Re: 12F617 not compiling

Posted: Fri Aug 20, 2010 3:13 pm
by Benj
Hello Medelec,

There is also a map.txt file in the TDF folder. Have you updated this to add the 12F617 device?

If you can get the compilation to work then I can provide an updated config file for PPP which should allow you to program.

One doubt I have about this is that BoostC would not leave a device out of their list unless it was very new or significantly different from the other devices. I guess you could always go down the HITECH route to allow the code to compile as this supports all the PIC10, 12, 16, 18 devices.

Re: 12F617 not compiling

Posted: Fri Aug 20, 2010 5:13 pm
by medelec35
Benj wrote:There is also a map.txt file in the TDF folder. Have you updated this to add the 12F617 device?
No, did know about that, thanks.
Added PIC12F617 but Still the same errors.
Ben, Have you created and compiled a simple flashing output? Just was wondering if you get the same errors appearing?
Benj wrote:I can provide an updated config file for PPP which should allow you to program.
Please that would be great!
Benj wrote:One doubt I have about this is that BoostC would not leave a device out of their list unless it was very new or significantly different from the other devices

Hmm, not sure about that since 12F617 appears on the same data sheet as 12F615. That's why I got the 12F615 header & TDF files, renamed to 12F617, then changed any references within from 12F615 to 12F617.

Re: 12F617 not compiling

Posted: Wed Aug 25, 2010 10:24 am
by Benj
Hello,

Right here is a config file for PPP that includes the 12F617 device. The device may not autodetect or program correctly as for some reason it shares its ID value with the 18F8527.

Basically copy the cfg file from the archive into your "Flowcode v4\Tools\PPP" directory and the device should then appear in the PPP device list. Fingers crossed it should also work if the afore mentioned ID value does not cause an issue.

Have you tried the HiTech compiler? This may be easier then trying to add the device to the BoostC. There may be hidden or precompiled files that are also used. I will send the guys at sourceboost a message and ask if this is possible without reversioning the entire compiler.

Let me know how you get on.

Re: 12F617 not compiling

Posted: Wed Aug 25, 2010 12:14 pm
by medelec35
Benj wrote:I guess you could always go down the HITECH route to allow the code to compile as this supports all the PIC10, 12, 16, 18 devices.
Thanks for your help Ben, Program does compile OK using Hitec C

Re: 12F617 not compiling

Posted: Fri Nov 12, 2010 12:16 pm
by medelec35
Benj wrote: I will send the guys at sourceboost a message and ask if this is possible without reversioning the entire compiler.
Let me know how you get on.
Back to using this device.
Any luck with sourceboost?
I was wondering if this is achievable mow?
I would like to stick to the one compiler if this is possible.
Thanks.

Re: 12F617 not compiling

Posted: Fri Nov 12, 2010 2:45 pm
by medelec35
Im not sure why, but I can get a very basic program to compile anymore with Hi-Tec Compiler
I have checked and pic.h and 12F617.h are both present in hi-tec folder.
Any help is appreciated.
Thanks.

Code: Select all

File name:     D:\Flowcode Flowcharts all\HitecTest1.c

Generated by:  Flowcode v4.3.7.63

Date:          Friday, November 12, 2010 14:46:43

Licence:       Professional

Registered to: Martin





http://www.matrixmultimedia.com





Launching the compiler...

C:\Program Files (x86)\HI-TECH Software\PICC\9.71a\bin\picc.exe --CHIP=12F617 -N48 HitecTest1.c

HitecTest1.c: main()

    63:	ansel = 0;

	^ (192) undefined identifier "ansel"

    67:	OPTION = 0xC0;

	^ (192) undefined identifier "OPTION"

    76:	trisio = trisio & 0xfe;

	^ (192) undefined identifier "trisio"

    78:	gpio = (gpio & 0xfe) | 0x01;

	^ (192) undefined identifier "gpio"

(1273) Omniscient Code Generation not available in Lite mode (warning)

HI-TECH C Compiler for PIC10/12/16 MCUs (Lite Mode)  V9.71a

Copyright (C) 2010 Microchip Technology Inc.

(908) exit status = 1



Return code = 1



Flowcode was unable to compile the flowchart's C code due to the following errors:





If your flowchart contains C code, please review this carefully. If your flowchart contains no C-code or you have thoroughly reviewed the code, contact Technical Support.



FINISHED

Re: 12F617 not compiling

Posted: Thu Nov 18, 2010 3:43 pm
by Benj
Hi Medelec.

Thats a strange one. Can you confirm that the "definitions.h" file is present in the "Flowcode v4\FCD" directory. Also I don't know if that device is supported in the definitions file. Im guessing that the family is referenced rather then the device. The 12F615 is in the file so maybe you could simply copy the block for the 615 and change the #ifdef to 617 instead.

Let me know how you get on.

Re: 12F617 not compiling

Posted: Wed Oct 05, 2011 11:34 am
by Creative25
Hi there I am just about to start programming a 12F617
Do these problems still exist or are the problems solved with the newest version of flowcode?
Let me know what your experiences are so I can decide if I should use this chip which I already have, or rather look for something else.
I want to try make a water Level controller for the pump in our well.
Uli

Re: 12F617 not compiling

Posted: Wed Oct 05, 2011 2:44 pm
by Benj
Hello Uli,

Flowcode version 4.5 for PIC fully supports the 12F617 device using the default BoostC compiler.

Re: 12F617 not compiling

Posted: Wed Oct 05, 2011 3:37 pm
by Creative25
Does that mean i get none of the problems I had with the Pic 16f1939?

Re: 12F617 not compiling

Posted: Wed Oct 05, 2011 3:54 pm
by Benj
Hello,

The 12F617 is not a popular device to my knowledge so testing on this particular device may not have been done very thoroughly, let me know if you do experience any problems and I will do my best to get them sorted for you.

Problems with the 16F18xx and 19xx devices seem to revolve around the fact that BoostC decided to put all legacy register names in the definition file and this means our code to correctly sniff which registers the device has is falling over. Hopefully this only effects the ADC components.

Re: 12F617 not compiling

Posted: Mon Oct 17, 2011 2:24 pm
by Creative25
Hi Benji
I tried to program the 12F617
Unfortunately it does not work

I have MCLR enabled and use a 1K pullup resistor.
The Programmer I use is Pic Kit 2 which works with the 16F1939 Chip.

I get the following error message:

Launching the programmer...
C:\Program Files\Matrix Multimedia\Flowcode V4\tools\PICkit2\pk2cmd.exe -BC:\Program Files\Matrix Multimedia\Flowcode V4\Tools\PICkit2\ -PPIC12F617 -FInside Light.hex -M -A5 -R
Could not find device PIC12F617.



Return code = 36

Flowcode was unable to transfer the flowchart to the microcontroller. Check the programmer options and physical connections.

FINISHED

If I start Pic Kit directly I get the following error.

Pic Kit2 VPP voltage errror.

I have checked the board and everything and I can not find anything wrong on the board.

Best Regards:
Uli

Re: 12F617 not compiling

Posted: Mon Oct 17, 2011 3:55 pm
by medelec35
It seems like pickit programmer is not able to communicate with target device.
Have you got a higher vavle resistor you can try since microchip recommend 10K as a typical value.
If this resistor is too low, then when VPP is at 14V, VCC will pull line down via MCLR resistor and is line pulled down too much, then comms cant take place.
The other thing that will cause a problem is Data or clock lines are decoupled by caps, or have a pull-up or pull down resistor, or have a load connected to them which is greater than programmer can provide.

Perhaps you could post the full circuit diagram, then we could possible see what the issue is.

If it was me, alternatively, I would use Flowcode to compile to hex. then use pickit2 programming software to load hex, and check the communications between chip and programmer and program chip.

Then if all is well and still get same error message when trying with Flowcode, I would then look at Flowcode more closely

Martin

Re: 12F617 not compiling

Posted: Tue Oct 18, 2011 9:18 am
by Creative25
Hi Martin.
Thanks for your Message.
I got it to work with Pic Kit2
I used the troubleshoot tool of Pic kit and it said there is a short on Vpp
After carefully looking I found that on the strippboard there was a small hairline that I did not cut through properly.
Now I can program the 12F617 with pic kit2
However when I try to do it directly from Flowcode it does not find the chip.
What could be the problem?

Best Regards:
Ueli Meier

Re: 12F617 not compiling

Posted: Tue Oct 18, 2011 9:28 am
by medelec35
Have you read this?:
http://www.matrixmultimedia.com/support ... 554&p=1181

It may help.
Martin

Re: 12F617 not compiling

Posted: Wed Oct 19, 2011 12:27 pm
by Creative25
Hi Martin,
Thanks for the advice.
I cheked the settings and it is all ok.
I also tried to load a program on the Pic 16F1939 and it works directly from flowcode.

In order for Pic kit to find the 12F617 I had to download an updated device file. From the Pic Kit 2 Web page.
Could this be a reason why it works with the one chip but does not with the other?

Best Regards:
Uli