Page 1 of 1

Unable to program a PIC18F2685 in ICD mode

Posted: Mon Jan 26, 2015 12:22 pm
by Zane
Hi,

I have tried to program the above chip using the ICD mode and the compiler comes up with errors. If it is programmed normally, switching off the ICD mode all is ok. I have tried the using the same piece of test code (toggling an output in a loop) to program a PIC18F4685 in ICD mode and that compiles ok. I have a tried in Flowcode 6 too with the same results. Any help would be appreciated.

Thanks

C:\Program Files\Flowcode\v5\Tools\boostc\boostc_pic18_flowcode.exe -v -t PIC18F2685 "a.c"
BoostC Optimizing C Compiler Version 7.04 (for PIC18 architecture)
http://www.sourceboost.com
Copyright(C) 2004-2011 Pavel Baranov
Copyright(C) 2004-2011 David Hobday
Licensed to FlowCode User under Single user Pro License for 1 node(s)
Limitations: PIC18 max code size:Unlimited, max RAM banks:Unlimited
a.c
Starting preprocessor: C:\PROGRA~1\Flowcode\v5\Tools\boostc\pp.exe a.c -i C:\PROGRA~1\Flowcode\v5\Tools\boostc\include -d _PIC18F2685 -la -c2 -o a.pp -v -d _BOOSTC -d _PIC18 -d _CHAR_INDEX
......................
C:\Program Files\Flowcode\v5\FCD\..\CAL\PIC\PIC_CAL_ICD.c(649:2): error: unknown identifier 'trise'
C:\Program Files\Flowcode\v5\FCD\..\CAL\PIC\PIC_CAL_ICD.c(649:2): error: invalid operand 'trise'
C:\Program Files\Flowcode\v5\FCD\..\CAL\PIC\PIC_CAL_ICD.c(649:8): error: failed to generate expression
a.c success
failure
Return code = 1
Flowcode was unable to compile the flowchart's C code due to the following errors:

Re: Unable to program a PIC18F2685 in ICD mode

Posted: Mon Jan 26, 2015 12:27 pm
by Benj
Hello,

If you click on Build -> Project Options -> ICD Options

You might need to click the "Override ICD pins" to set the pins you wish to use for ICD. The defaults should be Clock - B6 and Data - B7.

If this doesn't help then please could you attach your .FCF program so we can have a look.

Re: Unable to program a PIC18F2685 in ICD mode

Posted: Mon Jan 26, 2015 2:16 pm
by Zane
Hi Ben,

This makes no difference either, I have attached the file for you. as soon as you try to compile to hex or chip it will fail with errors.

Thanks

Re: Unable to program a PIC18F2685 in ICD mode

Posted: Wed Feb 04, 2015 9:25 am
by Zane
Hi Ben,

Just wondering if you have been able to make any progress with this?

Thanks

Zane

Re: Unable to program a PIC18F2685 in ICD mode

Posted: Fri Feb 06, 2015 3:13 pm
by LeighM
Hi

It looks like a bug in the Boostc header file PIC18F2685.h
Usually found here…
C:\Program Files (x86)\Flowcode\v5\Tools\boostc\include

Your program will compile if you comment out lines 305 and 4201 as follows:

// #define PORTE 0x00000F84
// volatile char porte @PORTE;

Regards,
Leigh