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

Post Reply
MTTweaker
Posts: 7
Joined: Fri Jul 15, 2016 3:38 am
Contact:

Error when compiling to HEX for 12F683

Post by MTTweaker »

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:
Attachments
RSSI monitor 12F683.fcfx
(7.19 KiB) Downloaded 158 times

EtsDriver
Valued Contributor
Valued Contributor
Posts: 438
Joined: Tue Apr 15, 2014 4:19 pm
Location: Kajaani, Finland
Contact:

Re: Error when compiling to HEX for 12F683

Post by EtsDriver »

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?
fc6-v7-Pwm.PNG
(55.2 KiB) Downloaded 692 times
fc6-v7-Pwm2.PNG
(31.91 KiB) Downloaded 692 times
Ill just keep the good work up!

User avatar
Benj
Matrix Staff
Posts: 14950
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Contact:

Re: Error when compiling to HEX for 12F683

Post by Benj »

Hello,

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.
cal_pwm.fcpx
(8.04 KiB) Downloaded 169 times

Post Reply