Re: [Sdcc-user] error 2:Initializer element is not constant?

2011-03-23 Thread roelof 't Hooft
Hi Donald, On Wed, 2011-03-23 at 14:13 +0800, duck donal wrote: > Hi,Krish > Thank you so much for answering my questions detailedly! Krish does a much better job in explaining then I do, I can learn form him :-) > I‘ve got it.Thus next time I'll check the <.h> file to find out > the sp

Re: [Sdcc-user] error 2:Initializer element is not constant?

2011-03-23 Thread Krishnendu Chatterjee
C compiler works in three stages --- 1) compiler, 2) assembler and 3) linker. 1) Compiler: Takes C code and generates assembly code. 2) Assembler: Takes assembly code and generates machine specific binary code. 3) Linker: Combines binary codes and fills up all address references. SDCC and GCC are

Re: [Sdcc-user] [sdcc - Open Discussion] Syntax error -> 'void'

2011-03-23 Thread roelof 't Hooft
On Wed, 2011-03-23 at 08:22 +, SourceForge.net wrote: > I am fairly new using C and I am getting this error when > compiling some code: > APTE.c: 317: syntax error: token -> 'void' : column 4 > > The code at line 317 in the source file is the following: > > void KeyPadScan (void) > { >

Re: [Sdcc-user] error 2:Initializer element is not constant?

2011-03-23 Thread duck donal
Hi roelof, Thank u for ur advices! I have a new trouble with simulating the .hex code on my 8051. The newpp.hex according to the newpp.c(as follow): //newpp.c #include #include<8051.h> __sfr __at (0xf1) f_wren; __sfr __at (0xf2) f_pp; __sfr __at (0xf3) f_wr_adrH; __sfr __at (0x

Re: [Sdcc-user] error 2:Initializer element is not constant?

2011-03-23 Thread duck donal
Hi Krish, Thank u for the detail! Actually I've konwn the three stages. What I want to konw is the anatomy of each stage.e.g,for compile stage,a c source file need to pasing,generating icode etc,I want to konw that what's the Intermediate language of SDCC,does it generate a language like

Re: [Sdcc-user] error 2:Initializer element is not constant?

2011-03-23 Thread Philipp Klaus Krause
Am 23.03.2011 18:16, schrieb duck donal: > Hi Krish, >Thank u for the detail! >Actually I've konwn the three stages. >What I want to konw is the anatomy of each stage.e.g,for compile > stage,a c source file need to pasing,generating icode etc,I want to konw > that what's the Intermedia

Re: [Sdcc-user] error 2:Initializer element is not constant?

2011-03-23 Thread roelof 't Hooft
On Thu, 2011-03-24 at 00:56 +0800, duck donal wrote: > #include > #include<8051.h> You only have to use the header which is appropriate for the processor you are using, 2 mostly the same header files is overkill :-) > __sfr __at (0xfb) f_work; > f_work=0x01; > while(F1==0) >

[Sdcc-user] GPL+LE/LP pic/pic16 header Interest?

2011-03-23 Thread Weston Schmidt
Hello, I am curious if there is any interest in GPL+LE/LP pic/pic16 headers? I ask because I need to add a few new pic16 devices to SDCC & GPUTILS, and I figure if I'm going to spend time to add my chips, I might be able to figure out some way to create the rest of the headers from the facts in t

Re: [Sdcc-user] error 2:Initializer element is not constant?

2011-03-23 Thread Krishnendu Chatterjee
Hi Doland, The program is perfectly fine. The simulation is producing the expecting result as well. How are you simulating the program? You should not call the assembler or linker explicitly. Let it be called by sdcc itself. Krish On Wed, Mar 23, 2011 at 10:26 PM, duck donal wrote: > Hi roelof