Page 1 of 1

osccon statement causes compile to hex failure

Posted: Sun Sep 27, 2015 3:26 pm
by gtc
Flowcode v6.1.2.0

Chip: PIC 12F617 (Internal 4/8MHz oscillator)

Adding the C code:
osccon = 0x70; // 8MHz clock speed

... causes the BoostC compiler to fail with the infamous and always unhelpful "error code 1" message.

The osccon statement is being inserted correctly into the generated C code.

If I disable the C Code icon, the hex compilation completes without error.

(PS: The comment "// 8MHz clock speed" makes no difference on the failure outcome whether it is present or not)

Re: osccon statement causes compile to hex failure

Posted: Sun Sep 27, 2015 3:33 pm
by kersing
Where in the data sheet did you find the OSCCON register?


(Hint, this chip is missing this register, clock related settings are available in the configuration)

Re: osccon statement causes compile to hex failure

Posted: Sun Sep 27, 2015 4:04 pm
by gtc
Thanks, that would explain it. :D

Guess I'm too used to PIC16F chips!