From: sandeep Date: Sun, 18 Feb 2001 01:07:01 +0000 (+0000) Subject: Changed a few Makefiles & Fixed 3 bugs. X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=f4f097b91aab55fb5fe55566e870dd201bafee19;p=fw%2Fsdcc Changed a few Makefiles & Fixed 3 bugs. a) Constant pointer b) constant case label c) scope of variables git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@621 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/debugger/mcs51/Makefile.in b/debugger/mcs51/Makefile.in index e2b240c2..33f9fb5a 100644 --- a/debugger/mcs51/Makefile.in +++ b/debugger/mcs51/Makefile.in @@ -62,6 +62,8 @@ install: all installdirs # -------------------------------- uninstall: rm -f $(bindir)/sdcdb + rm -f $(bindir)/sdcdb.el + rm -f $(bindir)/sdcdbsrc.el # Performing self-test diff --git a/device/examples/main8051.c b/device/examples/main8051.c new file mode 100644 index 00000000..e9d88424 --- /dev/null +++ b/device/examples/main8051.c @@ -0,0 +1,73 @@ +/*------------------------------------------------------------------------- + CPU Startup Code + + Written By - Dipl.-Ing. (FH) Michael Schmitt + Bug-Fix Oct 15 1999 + mschmitt@mainz-online.de + michael.schmitt@t-online.de + + This program is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2, or (at your option) any + later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + + In other words, you are welcome to use, share and improve this program. + You are forbidden to forbid anyone else to use, share and improve + what you give them. Help stamp out software-hoarding! +-------------------------------------------------------------------------*/ + +/* here are some definition about the CPU */ +#include +#include +#define CPUCLKHZ 11059200 +//#define CPUCLKHZ 24000000 +#define BAUDRATE 9600 + +// For serial com. we use the internal UART and data exchange is done by interrupt and not via polling +#define SERIAL_VIA_INTERRUPT +#define SERIAL_VIA_INTERRUPT_XBUFLEN 64 +#define SERIAL_VIA_INTERRUPT_RBUFLEN 4 +//#define SERIAL_VIA_POLLING + +// include a 1msec timer +#define USE_SYSTEM_TIMER + +// all 8051-CPU utils can be found here +#include "cpu_tools.h" +#include "cpu_tools.c" + +// that is needed for printf, will be removed after the debug version + +// if the following files are copied to the local folder, enable the next two lines and comment out +// the two lines above +//#include "vprintf.c" +//#include "printf_large.c" + +//#include "harddisk.c" + +void main() +{ + // This has to be done first + init_hardware(); + + + printf( "\n\r<<< RESET >>>\r\n" ); + + printf( "\n\rStartTime : " ); + printf( "%ld \n\r",SystemTicks1msec ); + + while( 1 ) + { + printf( "\r%ld ", SystemTicks1msec); + delayMsec( 999 ); + } +} diff --git a/doc/random-notes.txt b/doc/random-notes.txt index 75ec188c..6c66ca47 100644 --- a/doc/random-notes.txt +++ b/doc/random-notes.txt @@ -2,6 +2,36 @@ Random notes ------------ A random set of notes about sdcc and how it works. +Sandeep: +-------- +The Register Allocation story. + +Before I get into this there are a few important fields +on the iCode & oprtand data structures that need to be +addressed. + +iCode. +----- + ->key - is an unique number assigned to this + iCode when this icode is allocated. + + ->seq - sequence number of the iCode given in + acesnding order of execution. + +operand. +------- + ->key - unique number for an operand when operand + is allocated. + +OP_LIVEFROM(op) - sequence number of the iCode where it was + first defined. Computed in SDCClrange.c + +OP_LIVETO(op) - sequence number of the iCode where it is + last used. Computed in SDCClrange.c + + + + Sandeep: -------- Adding memory maps for AVR, setup default map for diff --git a/sim/ucsim/configure b/sim/ucsim/configure index c32c027c..365d6ccf 100755 --- a/sim/ucsim/configure +++ b/sim/ucsim/configure @@ -523,7 +523,7 @@ fi -for ac_prog in mawk gawk nawk awk +for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 diff --git a/sim/ucsim/s51.src/temp.lnk b/sim/ucsim/s51.src/temp.lnk index 567863a8..f9569477 100644 --- a/sim/ucsim/s51.src/temp.lnk +++ b/sim/ucsim/s51.src/temp.lnk @@ -1,11 +1,11 @@ -muxi -z --b CODE = 0x0000 +-b CSEG = 0x0000 -b DSEG = 0x0030 -b XSEG = 0x0000 -b ISEG = 0x0080 -b BSEG = 0x0000 --k /stuff/sdcc/share/sdcc51lib/small +-k /sandeep/work/sdcc/share/lib/small -l libsdcc -l libint -l liblong diff --git a/sim/ucsim/sim.src/uc.cc b/sim/ucsim/sim.src/uc.cc index 73ea3d20..026648b0 100644 --- a/sim/ucsim/sim.src/uc.cc +++ b/sim/ucsim/sim.src/uc.cc @@ -304,7 +304,7 @@ cl_uc::MEM(enum mem_class type) //FIXME {printf("TROUBLE\n"); return(0); } - return((TYPE_UBYTE *)(m->mem)); + return((uchar *)(m->mem)); }