Hi:

I'm working with a c8051f120 from SiLabs. I'm using SDCC, my programs get compiled without any problem, but in the building of the project an error message appears:

?ASxxxx-Error-<q> in line 1 of blink.c
              <q> missing or improper operators, terminators, or delimiters

Here is a copy of my code:

//------------------------------------------------------------------------------------
// Blinky.c
//------------------------------------------------------------------------------------
//
// This program flashes the green LED on the C8051F020 target board about five times
// a second using the interrupt handler for Timer3.
//
// Target: C8051F02x
//
// Date: 23 MAY 05
//
// Tool chain: SDCC 'c'
//
// Release 1.1
//
// Change Log:
//
// Revisions from 1.0 to 1.1:
// Changed LED = ~LED; to LED = !LED; because using the ~ operator causes SDCC
// to upcast to INT which leads to an incorrect result (always 1)
//------------------------------------------------------------------------------------
// Includes
//------------------------------------------------------------------------------------
#include <c8051f120.h>

//------------------------------------------------------------------------------------
// Global CONSTANTS
//------------------------------------------------------------------------------------
#define SYSCLK 2000000 // approximate SYSCLK frequency in Hz
sbit at 0x96 LED; // green LED: '1' = ON; '0' = OFF

//------------------------------------------------------------------------------------
// Function PROTOTYPES
//------------------------------------------------------------------------------------
void PORT_Init (void);
void Timer3_Init (int counts);
void Timer3_ISR (void) interrupt 14;
//------------------------------------------------------------------------------------
// MAIN Routine
//------------------------------------------------------------------------------------
void main (void) {
// disable watchdog timer
WDTCN = 0xde;
WDTCN = 0xad;

SFRPAGE = CONFIG_PAGE;                 // Switch to configuration page

PORT_Init ();

SFRPAGE = TMR3_PAGE;

Timer3_Init (SYSCLK / 12 / 10); // Init Timer3 to generate interrupts

EA = 1; // enable global interrupts

SFRPAGE = LEGACY_PAGE;

while (1) { // spin forever
}
}


//------------------------------------------------------------------------------------
// PORT_Init
//------------------------------------------------------------------------------------
//
// Configure the Crossbar and GPIO ports

void PORT_Init (void)
{
XBR2 = 0x40; // Enable crossbar and weak pull-ups
P1MDOUT |= 0x40; // enable P1.6 (LED) as push-pull output
}
//------------------------------------------------------------------------------------
// Timer3_Init
//------------------------------------------------------------------------------------
//
// Configure Timer3 to auto-reload and generate an interrupt at interval
// specified by <counts> using SYSCLK/12 as its time base.
//
void Timer3_Init (int counts)
{
TMR3CN = 0x00; // Stop Timer3; Clear TF3;
// use SYSCLK/12 as timebase
RCAP3 =(-counts); // Init reload values
TMR3H = 0xff; // set to reload immediately
TMR3L = 0xff; // set to reload immediately
EIE2 |= 0x01; // enable Timer3 interrupts
TMR3 = 1; // start Timer3
}
//------------------------------------------------------------------------------------
// Interrupt Service Routines
//------------------------------------------------------------------------------------
//------------------------------------------------------------------------------------
// Timer3_ISR
//------------------------------------------------------------------------------------
// This routine changes the state of the LED whenever Timer3 overflows.
//

void Timer3_ISR (void) interrupt 14
{
TF3= 0; // clear TF3
LED = (int)~LED; // change state of LED
}

Compiler output:

Invoking project defined compiler.
X:\sdcc\bin\sdcc.exe -c --debug --use-stdout -V  -IX:\8051Code X:\8051Code\blink.c
....
+ X:\sdcc\bin\sdcpp.exe -nostdinc -Wall -std=c99 -DSDCC=1 -I"X:\8051Code" -obj-ext=.rel -DSDCC_MODEL_SMALL -DSDCC_mcs51 -D__mcs51 -I"X:\sdcc\bin\..\include\mcs51" -I"X:\sdcc\bin\..\include"  "X:\8051Code\blink.c"
+ X:\sdcc\bin\asx8051.exe -plosgffc "blink.asm"

Builder output:


Invoking project defined assembler.
X:\sdcc\bin\asx8051.exe -plosgff  blink.c

?ASxxxx-Error-<q> in line 1 of blink.c
              <q> missing or improper operators, terminators, or delimiters
?ASxxxx-Error-<q> in line 2 of blink.c
              <q> missing or improper operators, terminators, or delimiters
?ASxxxx-Error-<q> in line 3 of blink.c
              <q> missing or improper operators, terminators, or delimiters
?ASxxxx-Error-<q> in line 4 of blink.c
              <q> missing or improper operators, terminators, or delimiters
?ASxxxx-Error-<q> in line 5 of blink.c
              <q> missing or improper operators, terminators, or delimiters
?ASxxxx-Error-<q> in line 6 of blink.c
              <q> missing or improper operators, terminators, or delimiters
?ASxxxx-Error-<q> in line 7 of blink.c
              <q> missing or improper operators, terminators, or delimiters
?ASxxxx-Error-<q> in line 8 of blink.c
              <q> missing or improper operators, terminators, or delimiters
?ASxxxx-Error-<q> in line 9 of blink.c
              <q> missing or improper operators, terminators, or delimiters
?ASxxxx-Error-<q> in line 10 of blink.c
              <q> missing or improper operators, terminators, or delimiters
?ASxxxx-Error-<q> in line 11 of blink.c
              <q> missing or improper operators, terminators, or delimiters
?ASxxxx-Error-<q> in line 12 of blink.c
              <q> missing or improper operators, terminators, or delimiters
?ASxxxx-Error-<q> in line 13 of blink.c
              <q> missing or improper operators, terminators, or delimiters
?ASxxxx-Error-<q> in line 14 of blink.c
              <q> missing or improper operators, terminators, or delimiters
?ASxxxx-Error-<q> in line 15 of blink.c
              <q> missing or improper operators, terminators, or delimiters
?ASxxxx-Error-<q> in line 16 of blink.c
              <q> missing or improper operators, terminators, or delimiters
?ASxxxx-Error-<q> in line 17 of blink.c
              <q> missing or improper operators, terminators, or delimiters
?ASxxxx-Error-<q> in line 18 of blink.c
              <q> missing or improper operators, terminators, or delimiters
?ASxxxx-Error-<q> in line 19 of blink.c
              <q> missing or improper operators, terminators, or delimiters
?ASxxxx-Error-<q> in line 20 of blink.c
              <q> missing or improper operators, terminators, or delimiters
?ASxxxx-Error-<q> in line 21 of blink.c
              <q> missing or improper operators, terminators, or delimiters
?ASxxxx-Error-<q> in line 22 of blink.c
              <q> missing or improper operators, terminators, or delimiters
?ASxxxx-Error-<q> in line 23 of blink.c
              <q> missing or improper operators, terminators, or delimiters
?ASxxxx-Error-<q> in line 24 of blink.c
              <q> missing or improper operators, terminators, or delimiters
?ASxxxx-Error-<q> in line 26 of blink.c
              <q> missing or improper operators, terminators, or delimiters
?ASxxxx-Error-<q> in line 27 of blink.c
              <q> missing or improper operators, terminators, or delimiters
?ASxxxx-Error-<q> in line 28 of blink.c
              <q> missing or improper operators, terminators, or delimiters
?ASxxxx-Error-<q> in line 29 of blink.c
              <q> missing or improper operators, terminators, or delimiters
?ASxxxx-Error-<o> in line 30 of blink.c
              <o> .org in REL area or directive / mnemonic error
?ASxxxx-Error-<q> in line 32 of blink.c
              <q> missing or improper operators, terminators, or delimiters
?ASxxxx-Error-<q> in line 33 of blink.c
              <q> missing or improper operators, terminators, or delimiters
?ASxxxx-Error-<q> in line 34 of blink.c
              <q> missing or improper operators, terminators, or delimiters
?ASxxxx-Error-<o> in line 35 of blink.c
              <o> .org in REL area or directive / mnemonic error
?ASxxxx-Error-<o> in line 36 of blink.c
              <o> .org in REL area or directive / mnemonic error
?ASxxxx-Error-<o> in line 37 of blink.c
              <o> .org in REL area or directive / mnemonic error
?ASxxxx-Error-<q> in line 38 of blink.c
              <q> missing or improper operators, terminators, or delimiters
?ASxxxx-Error-<q> in line 39 of blink.c
              <q> missing or improper operators, terminators, or delimiters
?ASxxxx-Error-<q> in line 40 of blink.c
              <q> missing or improper operators, terminators, or delimiters
?ASxxxx-Error-<o> in line 41 of blink.c
              <o> .org in REL area or directive / mnemonic error
?ASxxxx-Error-<q> in line 42 of blink.c
              <q> missing or improper operators, terminators, or delimiters
?ASxxxx-Error-<o> in line 48 of blink.c
              <o> .org in REL area or directive / mnemonic error
?ASxxxx-Error-<o> in line 52 of blink.c
              <o> .org in REL area or directive / mnemonic error
?ASxxxx-Error-<o> in line 58 of blink.c
              <o> .org in REL area or directive / mnemonic error
?ASxxxx-Error-<q> in line 59 of blink.c
              <q> missing or improper operators, terminators, or delimiters
?ASxxxx-Error-<q> in line 60 of blink.c
              <q> missing or improper operators, terminators, or delimiters
?ASxxxx-Error-<q> in line 63 of blink.c
              <q> missing or improper operators, terminators, or delimiters
?ASxxxx-Error-<q> in line 64 of blink.c
              <q> missing or improper operators, terminators, or delimiters
?ASxxxx-Error-<q> in line 65 of blink.c
              <q> missing or improper operators, terminators, or delimiters
?ASxxxx-Error-<q> in line 66 of blink.c
              <q> missing or improper operators, terminators, or delimiters
?ASxxxx-Error-<q> in line 67 of blink.c
              <q> missing or improper operators, terminators, or delimiters
?ASxxxx-Error-<o> in line 69 of blink.c
              <o> .org in REL area or directive / mnemonic error
?ASxxxx-Error-<q> in line 70 of blink.c
              <q> missing or improper operators, terminators, or delimiters
?ASxxxx-Error-<o> in line 72 of blink.c
              <o> .org in REL area or directive / mnemonic error
?ASxxxx-Error-<q> in line 73 of blink.c
              <q> missing or improper operators, terminators, or delimiters
?ASxxxx-Error-<q> in line 74 of blink.c
              <q> missing or improper operators, terminators, or delimiters
?ASxxxx-Error-<q> in line 75 of blink.c
              <q> missing or improper operators, terminators, or delimiters
?ASxxxx-Error-<q> in line 76 of blink.c
              <q> missing or improper operators, terminators, or delimiters
?ASxxxx-Error-<q> in line 77 of blink.c
              <q> missing or improper operators, terminators, or delimiters
?ASxxxx-Error-<q> in line 78 of blink.c
              <q> missing or improper operators, terminators, or delimiters
?ASxxxx-Error-<q> in line 79 of blink.c
              <q> missing or improper operators, terminators, or delimiters
?ASxxxx-Error-<q> in line 80 of blink.c
              <q> missing or improper operators, terminators, or delimiters
?ASxxxx-Error-<o> in line 81 of blink.c
              <o> .org in REL area or directive / mnemonic error
?ASxxxx-Error-<q> in line 82 of blink.c
              <q> missing or improper operators, terminators, or delimiters
?ASxxxx-Error-<q> in line 84 of blink.c
              <q> missing or improper operators, terminators, or delimiters
?ASxxxx-Error-<r> in line 85 of blink.c
              <r> relocation error
?ASxxxx-Error-<o> in line 88 of blink.c
              <o> .org in REL area or directive / mnemonic error
?ASxxxx-Error-<q> in line 90 of blink.c
              <q> missing or improper operators, terminators, or delimiters
?ASxxxx-Error-<q> in line 91 of blink.c
              <q> missing or improper operators, terminators, or delimiters
?ASxxxx-Error-<q> in line 92 of blink.c
              <q> missing or improper operators, terminators, or delimiters
?ASxxxx-Error-<q> in line 93 of blink.c
              <q> missing or improper operators, terminators, or delimiters
?ASxxxx-Error-<q> in line 94 of blink.c
              <q> missing or improper operators, terminators, or delimiters
?ASxxxx-Error-<q> in line 95 of blink.c
              <q> missing or improper operators, terminators, or delimiters
?ASxxxx-Error-<q> in lremoving blink.rel
ine 96 of blink.c
              <q> missing or improper operators, terminators, or delimiters
?ASxxxx-Error-<q> in line 97 of blink.c
              <q> missing or improper operators, terminators, or delimiters
?ASxxxx-Error-<q> in line 98 of blink.c
              <q> missing or improper operators, terminators, or delimiters
?ASxxxx-Error-<o> in line 100 of blink.c
              <o> .org in REL area or directive / mnemonic error
?ASxxxx-Error-<q> in line 101 of blink.c
              <q> missing or improper operators, terminators, or delimiters
?ASxxxx-Error-<q> in line 103 of blink.c
              <q> missing or improper operators, terminators, or delimiters
?ASxxxx-Error-<q> in line 104 of blink.c
              <q> missing or improper operators, terminators, or delimiters

Link in progress...
X:\sdcc\bin\sdcc.exe --debug --use-stdout -V  -IX:\8051Code -oX:\8051Code\blink.hex X:\8051Code\.rel 

X:\8051Code\.rel: cannot open.
+ X:\sdcc\bin\aslink.exe -nf "X:\8051Code\blink.lnk"




How can I make my work be builded succcesfully?
By the way I'm using SiLabs IDE

Thanks


Do you Yahoo!?
Get on board. You're invited to try the new Yahoo! Mail.