Page 1 of 1

Error when compiling to HEX for 12F683

Posted: Tue Sep 06, 2016 2:30 pm
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:

Re: Error when compiling to HEX for 12F683

Posted: Tue Sep 06, 2016 3:02 pm
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

Re: Error when compiling to HEX for 12F683

Posted: Wed Sep 07, 2016 12:56 pm
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 172 times