Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
11/12/03 15:49
Read: times


 
#58407 - RE: help!compile error!!
Responding to: ???'s previous message
no,it doesn't work. i add your code on the top of the line which generate the error,however,this time error
line moves to your code( sbit xxx = 0xa7;) see the code below:

#include "reg1210.h"
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include "Timer.h"
#include "ADC.h"
#include "DataStruct.h"



#define low 0
#define high 1
#define Enable 0
#define Disable 1
#define SET 1
#define CLEAR 0
#define s 10
#define OneUE 475.308

sbit xxx = 0xa7; // line 20

sbit LowUpSel = P2^7; // 0= lower 8 channel,1= upper 8 channel
sbit Ext0Sel = P2^0; // bit P2.0-p2.3 control 2x8 channel,
sbit Ext1Sel = P2^1;
sbit Ext2Sel = P2^2;
sbit Ext3Sel = P2^3;

sbit s1 = P2^5;
sbit s0 = P2^4;
sbit s2 = P2^6;



extern xdata union LongInt flashcount;
extern xdata unsigned char MaterialType;
extern xdata unsigned char GScale;
extern xdata unsigned char Diameter;
extern bdata unsigned char ValidChan;
extern xdata union LongInt IniData[8];
extern xdata union LongInt LoadData[8];
/* list end */
extern bit CH0;
extern bit CH1;
extern bit CH2;
extern bit CH3;
extern bit CH4;
extern bit CH5;
extern bit CH6;
extern bit CH7;




xdata signed long adres[10];
xdata float ave,sd;


following is the complete compile message:

Build target 'Target 1'
compiling Timer.c...
compiling ADC.C...
ADC.C(20): error C141: syntax error near 'sbit'
compiling key.c...
compiling LCDdisp.c...
compiling LCDdrv.c...
compiling main.c...
MAIN.C(10): error C141: syntax error near 'extern'
compiling menu.c...
MENU.C(5): error C141: syntax error near 'extern'
compiling SysInit.C...
assembling 1210A.asm...
assembling ROM.A51...
assembling Counter.a51...
assembling HCRConfig.a51...
compiling DataFlash.c...
DATAFLASH.C(13): error C141: syntax error near 'extern'
compiling DataStruct.c...
DATASTRUCT.C(6): error C141: syntax error near 'union'
Target not created

List of 17 messages in thread
TopicAuthorDate
help!compile error!!            01/01/70 00:00      
   RE: help!compile error!!            01/01/70 00:00      
      RE: help!compile error!!            01/01/70 00:00      
   more compile information!            01/01/70 00:00      
   RE: help!compile error!!            01/01/70 00:00      
      RE: help!compile error!!            01/01/70 00:00      
   Preprocessor?            01/01/70 00:00      
   RE: help!compile error!!            01/01/70 00:00      
      RE: help!compile error!!            01/01/70 00:00      
         RE: help!compile error!!            01/01/70 00:00      
            Preprocessor misconceptions            01/01/70 00:00      
               RE: Preprocessor misconceptions            01/01/70 00:00      
   RE: help!compile error!!            01/01/70 00:00      
      RE: help!compile error!!            01/01/70 00:00      
         RE: help!compile error!!            01/01/70 00:00      
      RE:compile error!! which compiler?            01/01/70 00:00      
         RE: RE:compile error!! which compiler?            01/01/70 00:00      

Back to Subject List