From: mschmitt Date: Tue, 28 Mar 2000 20:25:20 +0000 (+0000) Subject: fix for makefile X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=90101b871648df439a1a52efb57f9c74529ba69f;p=fw%2Fsdcc fix for makefile git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@213 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/device/examples/startupcode/inc/hardware_describtion.h b/device/examples/startupcode/inc/hardware_describtion.h deleted file mode 100644 index d60e0979..00000000 --- a/device/examples/startupcode/inc/hardware_describtion.h +++ /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 -#include -#include -#include -#include -#include -#include -#include - -// 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 index 00000000..af89fb8c --- /dev/null +++ b/device/examples/startupcode/inc/hardware_description.h @@ -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 +#include +#include +#include +#include +#include +#include +#include + +// 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 diff --git a/device/examples/startupcode/inc/startup_code.h b/device/examples/startupcode/inc/startup_code.h index 95ab0391..a1955a02 100644 --- a/device/examples/startupcode/inc/startup_code.h +++ b/device/examples/startupcode/inc/startup_code.h @@ -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 diff --git a/device/examples/startupcode/src/cpu_c515a.c b/device/examples/startupcode/src/cpu_c515a.c index 6333a4f3..098f6f4b 100644 --- a/device/examples/startupcode/src/cpu_c515a.c +++ b/device/examples/startupcode/src/cpu_c515a.c @@ -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)) diff --git a/device/examples/startupcode/src/makefile b/device/examples/startupcode/src/makefile index c806bb86..ce26a37a 100644 --- a/device/examples/startupcode/src/makefile +++ b/device/examples/startupcode/src/makefile @@ -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 index 00000000..37237eb3 --- /dev/null +++ b/device/examples/startupcode/src/makefile.dep @@ -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