Error when compiling to HEX for 12F683

A forums to allow resolved bugs and problems with Flowcode v7 to be stored and marked as resolved.

Moderator: Benj

Posts: 6
Joined: Fri Jul 15, 2016 3:38 am
Has thanked: 3 times

Error when compiling to HEX for 12F683

Postby MTTweaker » Tue Sep 06, 2016 2:30 pm

I get an error when I compile it to hex for the 12F683 chip.

It seems to be an issue with FC7 only, it worked with FC6.

I have the file attached:
RSSI monitor 12F683.fcfx
(7.19 KiB) Downloaded 132 times

Valued Contributor
Valued Contributor
Posts: 431
Joined: Tue Apr 15, 2014 4:19 pm
Location: Kajaani, Finland
Has thanked: 346 times
Been thanked: 224 times

Re: Error when compiling to HEX for 12F683

Postby EtsDriver » Tue Sep 06, 2016 3:02 pm

To Matrix team: Seems to be problem with PWM component?

Code: Select all

C:\Program Files (x86)\Flowcode 7\CAL\PIC\PIC_CAL_PWM.c: FC_CAL_PWM_Enable_1()
    84:   {trisa &= ~(1 << (2)); porta &= ~(1 << (2));};
    ^ (192) undefined identifier "trisa"
                          ^ (192) undefined identifier "porta"
C:\Program Files (x86)\Flowcode 7\CAL\PIC\PIC_CAL_PWM.c: FC_CAL_PWM_Disable_1()
   296:   trisa |= (1 << (2));
   ^ (192) undefined identifier "trisa"

Seems that FC7 has defined the trisa and porta in uppercase as TRISA and PORTA, but in the functions these are referenced as lower case, and could it be thats why its not generating hex correctly?
(55.2 KiB) Downloaded 692 times

(31.91 KiB) Downloaded 692 times
Ill just keep the good work up!

User avatar
Matrix Staff
Posts: 14681
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4665 times
Been thanked: 4287 times

Re: Error when compiling to HEX for 12F683

Postby Benj » Wed Sep 07, 2016 12:56 pm


You are correct in your hypothesis that the compile error was being caused by those lower case register names. Strange we hadn't seen the issue previously but must be very device dependent.

Anyway the attached component should fix the problem for you, just copy to your "Flowcode 7/Components" folder and restart Flowcode for the changes to be loaded.

(8.04 KiB) Downloaded 142 times
These users thanked the author Benj for the post:
EtsDriver (Wed Sep 07, 2016 2:27 pm)
Rating: 5%