From: Emanuel M. <em...@bi...> - 2003-07-17 11:27:43
|
In sdcc it has to be: sfr at 0x89 TMOD; and so on. See Chapter 3.4.5 of sdcc manual. Eric Rector wrote: >Here is a code snip-it from the second part of my question: > >sfr TMOD =3D 0x89; >sfr SCON =3D 0x98; > >sfr SBUF =3D 0x99; >sbit TR1 =3D 0x8e; >sbit TI =3D 0x99; > >sfr TH1 =3D 0x8D; >sfr PCON =3D 0x87; > >#define SMOD 0x80 > >void main(void) >{ > SCON =3D 0x50; > TMOD =3D 0x20; > > TH1 =3D 0xff; > PCON =3D SMOD; > > TR1 =3D 1; > TI =3D 1; > > while(1) > { > while(TI!=3D1); > TI =3D 0; > SBUF =3D 0x41; > } >} > >XTAL =3D 11.0582 mhz > >I compiled using: > > =20 > >>sdcc serial.c -mmcs51 --model-small -V >> =20 >> >+ C:\SDCC\bin\sdcpp.exe -nostdinc -Wall -std=3Dc99 -DSDCC=3D1 -DSDCC_MOD= EL_SMALL > -DSDCC_mcs51 -D__mcs51 -I"C:\SDCC\bin\..\include" "serial.c" >+ C:\SDCC\bin\asx8051.exe -plosgff "serial.asm" >+ C:\SDCC\bin\aslink.exe -nf "serial" > >Again, I am using the atmel at89s8252. This code works with keil, so I t= hink >i'm using sdcc incorrectly. I've read the doc two times just incase i >missed something the first time. But ??? > >Thanks > >Eric > >-----Original Message----- >From: sdc...@li... >[mailto:sdc...@li...]On Behalf Of Eric Rector >Sent: Thursday, July 17, 2003 9:17 AM >To: sdc...@li... >Subject: [Sdcc-user] Hex file too big. > > >Hallo, > >I have be currently been using the Keil eval IDE for programming my >at89s8252. At first Keil severed its purpose well (Thanks Keil). Now I >need more functionality than the Keil eval version can deliver. I have >installed sdcc and mingw (al latest snapshots). Everything works wonder= ful >except the fact that the asm file sdcc produces from "void main(void){;}= " is >to big. It seems there is a lot of extra code I don't want, nor really >need, I know that there are compiler opts '-nooverlay', '#pragma NOIV' = and >others options to eliminate some of this 'extra' code, but the end resul= t is >still a lot of code extra code. > >Q1: What is the smallest asm file that can be produced for the program >above? or hex file only adding up how many bits are writen to the chip? > >I also have a small c program that prints a's to the serial port. If I >compile it with Keil, download the hex file to the =B5Proc, it works. B= ut >when I do the same procedure only compiling the code with sdcc it won't >work. I used the s1 simulator and it also verifies that the keil hex fil= e >works and the sdcc hex file doesn't > >Q2: Has anyone had this same experience? > >Q3: Does anyone have any suggestions? > >Thank you to whom ever replies. > >Eric > >--- >Outgoing mail is certified Virus Free. >Checked by AVG anti-virus system (http://www.grisoft.com). >Version: 6.0.500 / Virus Database: 298 - Release Date: 7/10/2003 > > > >------------------------------------------------------- >This SF.net email is sponsored by: VM Ware >With VMware you can run multiple operating systems on a single machine. >WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the >same time. Free trial click here: http://www.vmware.com/wl/offer/345/0 >_______________________________________________ >Sdcc-user mailing list >Sdc...@li... >https://lists.sourceforge.net/lists/listinfo/sdcc-user > =20 > |