Jump to content

Recommended Posts

Hello,

 

I'm trying to begin using the C language for PIC's, having done my previous projects in assembly. (ra68gi's post for beginners makes it seem pretty straight-forward! Thanks!)

 

This is my first program, written simply to learn the compiler's ropes, before I start to flash a few lights.

 

I've read the BoostC compiler manual, done searches, and am still stumped as to why I get a "FATAL: Unexpected EOF" error from this:

 

#include <system.h>

#pragma CLOCK_FREQ 20000000 //20MHz

#pragma DATA _CONFIG, _CP_OFF &_DEBUG_OFF & _WRT_OFF & _CPD_OFF & _LVP_OFF & _BODEN_OFF & _PWRTE_OFF & _WDT_OFF & _HS_OSC

void main()
{
unsigned char test;
trisa = 0xFF;
trisb = 0xFF;
trisc = 0xFF;

//OPTION_REG

clear_bit(option_reg,T0CS);	//internal clock
clear_bit(option_reg,PSA);	//prescaller assigned to T0
clear_bit(option_reg,PS2);	//prescaler 000 = 1:2 T0
clear_bit(option_reg,PS1);
clear_bit(option_reg,PS0;

while( 1 )
{
	test = 0x1;
}
}

 

The full error message:

 

"Building...

<snip>

876a_flash_led.c

FATAL: Unexpected EOF

 

failure

Error: preprocessing error

"C:\Program Files\SourceBoost\boostc.pic16.exe" 876a_flash_led.c -t PIC16F876A

Exit code was 1.

Removing target: 876a_flash_led.obj

Failed to locate output file 'C:\Program Files\SourceBoost\Projects\876a flash\876a_flash_led.hex'

Done

 

Failed"

 

So what am I missing? Is it in the code, or some setup issue?

 

Thanks!

Link to post
Share on other sites

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...