fix for makefile
authormschmitt <mschmitt@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Tue, 28 Mar 2000 20:25:20 +0000 (20:25 +0000)
committermschmitt <mschmitt@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Tue, 28 Mar 2000 20:25:20 +0000 (20:25 +0000)
git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@213 4a8a32a2-be11-0410-ad9d-d568d2c75423

device/examples/startupcode/inc/hardware_describtion.h [deleted file]
device/examples/startupcode/inc/hardware_description.h [new file with mode: 0644]
device/examples/startupcode/inc/startup_code.h
device/examples/startupcode/src/cpu_c515a.c
device/examples/startupcode/src/makefile
device/examples/startupcode/src/makefile.dep [new file with mode: 0644]

diff --git a/device/examples/startupcode/inc/hardware_describtion.h b/device/examples/startupcode/inc/hardware_describtion.h
deleted file mode 100644 (file)
index d60e097..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-// INCLUDES & DEFINES ===============================================
-// here are some definition about the CPU type
-
-#ifndef __FILE_HARDWARE_DESCRIBTION_H
-#define __FILE_HARDWARE_DESCRIBTION_H
-
-#define CPUTYPE C515A
-
-#include "..\inc\c515a.h"         // Definitions of registers, SFRs and Bits
-#include <stdarg.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <ctype.h>
-#include <assert.h>
-#include <limits.h>
-#include <malloc.h>
-
-// First some useful definitions
-#define FALSE 0
-#define TRUE !FALSE
-
-// here is a definition of a single nop command as it has to be declared under keil-C and sdcc
-#ifdef SDCC
-#define NOP _asm nop _endasm
-//#define UBYTE unsigned char
-//#define UINT unsigned int
-//#define BOOL unsigned char
-#else
-// This is for Keil-C
-#define NOP _nop_()
-#endif
-
-// now we specify at what crystal speed the cpu runs (unit is Hz !!)
-//#define CPUCLKHZ                11059200
-#define CPUCLKHZ                24000000
-
-// We use the internal UART, so we have to set the desired BAUDRATE
-//#define BAUDRATE                9600
-//#define BAUDRATE                19200
-#define BAUDRATE                57600
-
-// For serial com. we use the internal UART and data exchange is done by interrupt and not via polling
-#define SERIAL_VIA_INTERRUPT
-// Achtung maximal 127Bytes ! Puffer
-#define SERIAL_VIA_INTERRUPT_XBUFLEN 100
-#define SERIAL_VIA_INTERRUPT_RBUFLEN 100
-// disable the above three lines and enable the next one if polling method is used
-//#define SERIAL_VIA_POLLING
-
-// to measure time and delays we include a 1msec timer
-#define USE_SYSTEM_TIMER
-
-// CPU-Ports
-
-#define CPUIDLE             P3_3
-#define EXTWATCHDOG         P3_5
-
-#include "..\inc\cpu_c515a.h"
-
-#endif
\ No newline at end of file
diff --git a/device/examples/startupcode/inc/hardware_description.h b/device/examples/startupcode/inc/hardware_description.h
new file mode 100644 (file)
index 0000000..af89fb8
--- /dev/null
@@ -0,0 +1,65 @@
+// INCLUDES & DEFINES ===============================================
+// here are some definition about the CPU type
+
+#ifndef __FILE_HARDWARE_DESCRIBTION_H
+#define __FILE_HARDWARE_DESCRIBTION_H
+
+#define CPUTYPE C515A
+
+#include "..\inc\c515a.h"         // Definitions of registers, SFRs and Bits
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <assert.h>
+#include <limits.h>
+#include <malloc.h>
+
+// First some useful definitions
+#define FALSE 0
+#define TRUE !FALSE
+
+// here is a definition of a single nop command as it has to be declared under keil-C and sdcc
+#ifdef SDCC
+#define NOP _asm nop _endasm
+//#define UBYTE unsigned char
+//#define UINT unsigned int
+//#define BOOL unsigned char
+#else
+// This is for Keil-C
+#define NOP _nop_()
+#endif
+
+// now we specify at what crystal speed the cpu runs (unit is Hz !!)
+//#define CPUCLKHZ                11059200
+#define CPUCLKHZ                24000000
+
+// We use the internal UART, so we have to set the desired BAUDRATE
+//#define BAUDRATE                9600
+//#define BAUDRATE                19200
+#define BAUDRATE                57600
+
+// For serial com. we use the internal UART and data exchange is done by interrupt and not via polling
+#define SERIAL_VIA_INTERRUPT
+// Achtung maximal 127Bytes ! Puffer
+#define SERIAL_VIA_INTERRUPT_XBUFLEN 100
+#define SERIAL_VIA_INTERRUPT_RBUFLEN 100
+// disable the above three lines and enable the next one if polling method is used
+//#define SERIAL_VIA_POLLING
+
+// The Siemens CPU C515A has a build in Baudrategenerator, therefore we use it instead
+// of timer 1 this gives a better resolution
+#define BAUDRATEGENENATOR_USED
+
+// to measure time and delays we include a 1msec timer
+#define USE_SYSTEM_TIMER
+
+// CPU-Ports
+
+#define CPUIDLE             P3_3
+#define EXTWATCHDOG         P3_5
+
+#include "..\inc\cpu_c515a.h"
+
+#endif
\ No newline at end of file
index 95ab03916d5c9a0c8a92ad4a7114d120fbad99a1..a1955a02d0a7ff7cd876664afe5beb329556c151 100644 (file)
@@ -4,7 +4,7 @@
 #ifndef __FILE_WSI_128KFLASH_H
 #define __FILE_WSI_128KFLASH_H
 
-#include "..\inc\hardware_describtion.h"
+#include "..\inc\hardware_description.h"
 
 // place all 8051-CPU depending tools ISR and functions here
 
index 6333a4f3c9b8149bbae2010d71ab5f35b455e8e1..098f6f4bf7f69bcaf5a3e3d7847874be5125b66d 100644 (file)
@@ -18,7 +18,7 @@
 
 // All that has to be included and / or defined is done here
 
-#include "../inc/hardware_describtion.h"
+#include "../inc/hardware_description.h"
 
 // END INCLUDES & DEFINES ===========================================
 
@@ -129,7 +129,7 @@ volatile xdata static unsigned char SERIAL_VIA_INTERRUPT_BUSY;
 #endif
 // The Siemens CPU C515A has a build in Baudrategenerator, therefore we use it instead
 // of timer 1 this gives a better resolution
-#define BAUDRATEGENENATOR_USED
+
 #define BAUDRATEGENRELOADVALUE (1024-(2*CPUCLKHZ/64/BAUDRATE))
 #define TIMER1MODE2RELOADVALUE  (256-(2*CPUCLKHZ/32/12/BAUDRATE))
 
index c806bb86fea7269716ec6b8f4c9f1e43cdae37cb..ce26a37a1362ae83e45762aaa12f9442b4eb64f1 100644 (file)
@@ -8,38 +8,38 @@ RM              = rm -f
 CFLAGS          = --debug --stack-after-data --model-large
 LDFLAGS         = --debug --stack-after-data
 
-COBJECTS        = startup_code.rel \
-                  cpu_c515a.rel
+COBJECTS        =      startup_code.rel \
+                       cpu_c515a.rel
 
 CSOURCES        = $(patsubst %.rel,%.c,$(COBJECTS))
 
 .SUFFIXES: .rel
 
 .c.rel:
-        $(SDCC) $(CFLAGS) -c $<
+       $(SDCC) $(CFLAGS) -c $<
 
 all: startup
-        $(SDCC) $(LDFLAGS) $(COBJECTS)
+       $(SDCC) $(LDFLAGS) $(COBJECTS)
 
 c: $(COBJECTS)
 
 startup: $(COBJECTS)
 
 clean:
-        $(RM) *.lst
-        $(RM) *.asm
-        $(RM) *.bak
-        $(RM) *.rst
-        $(RM) *.sym
-        $(RM) *.hex
-        $(RM) *.map
-
-include Makefile.dep
-
-dep: Makefile.dep
-
-Makefile.dep: $(CSOURCES)
-        rm -f Makefile.dep
-        for csrc in $(CSOURCES) ;do\
-          $(SDCC) -MM $$csrc >>Makefile.dep ;\
-        done
+       $(RM) *.lst
+       $(RM) *.asm
+       $(RM) *.bak
+       $(RM) *.rst
+       $(RM) *.sym
+       $(RM) *.hex
+       $(RM) *.map
+
+include makefile.dep
+
+dep: makefile.dep
+
+makefile.dep: $(CSOURCES)
+       rm -f makefile.dep
+       for csrc in $(CSOURCES) ;do\
+       $(SDCC) -MM $$csrc >>makefile.dep ;\
+       done
diff --git a/device/examples/startupcode/src/makefile.dep b/device/examples/startupcode/src/makefile.dep
new file mode 100644 (file)
index 0000000..37237eb
--- /dev/null
@@ -0,0 +1,5 @@
+startup_code.rel: startup_code.c ../inc/startup_code.h \
+  ../inc/..\inc\hardware_description.h ../inc/..\inc\c515a.h \
+  ../inc/..\inc\cpu_c515a.h
+cpu_c515a.rel: cpu_c515a.c ../inc/hardware_description.h \
+  ../inc/..\inc\c515a.h ../inc/..\inc\cpu_c515a.h