Unable to program a PIC18F2685 in ICD mode

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 5.
To post in this forum you must have a registered copy of Flowcode 5 or higher.

Moderator: Benj

Post Reply
Zane
Flowcode v5 User
Posts: 199
Joined: Thu Sep 10, 2009 10:57 pm
Location: New Zealand
Has thanked: 93 times
Been thanked: 76 times
Contact:

Unable to program a PIC18F2685 in ICD mode

Post 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:

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: Unable to program a PIC18F2685 in ICD mode

Post 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.

Zane
Flowcode v5 User
Posts: 199
Joined: Thu Sep 10, 2009 10:57 pm
Location: New Zealand
Has thanked: 93 times
Been thanked: 76 times
Contact:

Re: Unable to program a PIC18F2685 in ICD mode

Post 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
Attachments
Flowcode1.fcf
Test program
(6 KiB) Downloaded 350 times

Zane
Flowcode v5 User
Posts: 199
Joined: Thu Sep 10, 2009 10:57 pm
Location: New Zealand
Has thanked: 93 times
Been thanked: 76 times
Contact:

Re: Unable to program a PIC18F2685 in ICD mode

Post by Zane »

Hi Ben,

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

Thanks

Zane

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: Unable to program a PIC18F2685 in ICD mode

Post 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
Attachments
PIC18F2685.h
(191.3 KiB) Downloaded 300 times

Post Reply