diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2008-01-12 17:37:22 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2008-01-12 17:37:22 +0000 |
commit | cbb53cff763928f52d5d4851d9993b0b0fc73d8a (patch) | |
tree | 711c711784c08e8432505184aa94924ec9308075 | |
parent | 097fc3af9818099ae912de57fb504c4faf1dfc7a (diff) | |
download | px4-nuttx-cbb53cff763928f52d5d4851d9993b0b0fc73d8a.tar.gz px4-nuttx-cbb53cff763928f52d5d4851d9993b0b0fc73d8a.tar.bz2 px4-nuttx-cbb53cff763928f52d5d4851d9993b0b0fc73d8a.zip |
Fixes for compile
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@555 42af7a65-404d-4744-a932-0658087f49c3
-rw-r--r-- | nuttx/arch/z16/src/Makefile | 27 | ||||
-rw-r--r-- | nuttx/arch/z16/src/z16f/chip.h | 8 | ||||
-rw-r--r-- | nuttx/arch/z16/src/z16f/z16f_clkinit.c | 7 |
3 files changed, 35 insertions, 7 deletions
diff --git a/nuttx/arch/z16/src/Makefile b/nuttx/arch/z16/src/Makefile index 31b5671cd..fc579baf1 100644 --- a/nuttx/arch/z16/src/Makefile +++ b/nuttx/arch/z16/src/Makefile @@ -36,14 +36,21 @@ -include $(TOPDIR)/Make.defs -include chip/Make.defs +COMPILER = ${shell basename $(CC)} ARCHSRCDIR = $(TOPDIR)/arch/$(CONFIG_ARCH)/src +ifeq ($(COMPILER),zneocc.exe) WARCHSRCDIR = ${shell cygpath -w $(ARCHSRCDIR)} USRINCLUDES = -usrinc:'.;$(WTOPDIR)\sched;$(WARCHSRCDIR);$(WARCHSRCDIR)\common' +else +WARCHSRCDIR = $(ARCHSRCDIR) +USRINCLUDES = -I$(TOPDIR)/sched -I$(ARCHSRCDIR) -I$(ARCHSRCDIR)/common +endif INCLUDES = $(ARCHSTDINCLUDES) $(USRINCLUDES) CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(INCLUDES) $(ARCHDEFINES) CPPFLAGS += -I$(ARCHSRCDIR) -WLINKLIBS = +ifeq ($(COMPILER),zneocc.exe) LDFLAGS = @"${shell cygpath -w $(ARCHSRCDIR)/nuttx.linkcmd}" +endif HEAD_ASRC = $(HEAD_SSRC:.S=$(ASMEXT)) HEAD_AOBJ = $(HEAD_SSRC:.S=$(OBJEXT)) @@ -64,6 +71,7 @@ VPATH = chip:common all: $(HEAD_OBJ) libarch$(LIBEXT) +ifeq ($(COMPILER),zneocc.exe) $(ASRCS) $(HEAD_ASRC): %$(ASMEXT): %.S @$(CPP) $(CPPFLAGS) $< -o $@.tmp @cat $@.tmp | sed -e "s/^#/;/g" > $@ @@ -71,9 +79,17 @@ $(ASRCS) $(HEAD_ASRC): %$(ASMEXT): %.S $(AOBJS) $(HEAD_AOBJ): %$(OBJEXT): %$(ASMEXT) $(call ASSEMBLE, $<, $@) +else +$(OBJS) $(HEAD_AOBJ): %$(OBJEXT): %.S + $(call ASSEMBLE, $<, $@)endif +endif $(COBJS): %$(OBJEXT): %.c +ifeq ($(COMPILER),zneocc.exe) + $(call COMPILE, `cygpath -w $<`, $@) +else $(call COMPILE, $<, $@) +endif libarch$(LIBEXT): $(OBJS) @( for obj in $(OBJS) ; do \ @@ -83,6 +99,7 @@ libarch$(LIBEXT): $(OBJS) board/libboard$(LIBEXT): @$(MAKE) -C board TOPDIR="$(TOPDIR)" libboard$(LIBEXT) +ifeq ($(COMPILER),zneocc.exe) nuttx.linkcmd: $(LINKCMDTEMPLATE) @cp -f $(LINKCMDTEMPLATE) nuttx.linkcmd @echo "\"${shell cygpath -w $(TOPDIR)/nuttx}\"= \\" >>nuttx.linkcmd @@ -91,6 +108,9 @@ nuttx.linkcmd: $(LINKCMDTEMPLATE) echo " `cygpath -w $(TOPDIR)/$${lib}`, \\" >>nuttx.linkcmd; \ done ; ) @echo " ${shell cygpath -w $(ARCHSRCDIR)/board/libboard$(LIBEXT)}" >>nuttx.linkcmd +else +nuttx.linkcmd: +endif nuttx$(EXEEXT): $(HEAD_AOBJ) board/libboard$(LIBEXT) nuttx.linkcmd @echo "LD: nuttx.hex" @@ -109,7 +129,10 @@ clean: @if [ -e board/Makefile ]; then \ $(MAKE) -C board TOPDIR="$(TOPDIR)" clean ; \ fi - @rm -f libarch$(LIBEXT) nuttx.linkcmd *~ .*.swp *.asm *.tmp *.map + @rm -f libarch$(LIBEXT) *~ .*.swp +ifeq ($(COMPILER),zneocc.exe) + @rm -f nuttx.linkcmd *.asm *.tmp *.map +endif $(call CLEAN) distclean: clean diff --git a/nuttx/arch/z16/src/z16f/chip.h b/nuttx/arch/z16/src/z16f/chip.h index 2c439d1b0..095c09069 100644 --- a/nuttx/arch/z16/src/z16f/chip.h +++ b/nuttx/arch/z16/src/z16f/chip.h @@ -395,10 +395,10 @@ /* Bits 5-6: Timer configuration, * Interpretation depends on timer mode */ #define Z16F_TIMERCTL0_RELOAD _HX8(00) /* Interrupt occurs on reload or capture */ -#define Z16F_TIMERCTL0_DISABLED _HX8(40) /* Disabled */ -#define Z16F_TIMERCTL0_INACTIVE _HX8(40) /* Interrrupt occurs on inactive gate edge */ -#define Z16F_TIMERCTL0_CAPTURE _HX8(40) /* Interrupt occurs on capture */ -#define Z16F_TIMERCTL0_RELOAD _HX8(60) /* Interrupt occurs on reload */ +#define Z16F_TIMERCTL0_IDISABLED _HX8(40) /* Disabled */ +#define Z16F_TIMERCTL0_IINACTIVE _HX8(40) /* Interrrupt occurs on inactive gate edge */ +#define Z16F_TIMERCTL0_ICAPTURE _HX8(40) /* Interrupt occurs on capture */ +#define Z16F_TIMERCTL0_IRELOAD _HX8(60) /* Interrupt occurs on reload */ #define Z16F_TIMERCTL0_CASCADE _HX8(10) /* Bit 4: Timer is cascaded */ /* Bits 1-2: PW mode */ #define Z16F_TIMERCTL0_NODELAY _HZ8(00) /* No delay */ diff --git a/nuttx/arch/z16/src/z16f/z16f_clkinit.c b/nuttx/arch/z16/src/z16f/z16f_clkinit.c index 3b8fa87e8..6ddec5a0a 100644 --- a/nuttx/arch/z16/src/z16f/z16f_clkinit.c +++ b/nuttx/arch/z16/src/z16f/z16f_clkinit.c @@ -39,6 +39,9 @@ * Included Files
***************************************************************************/
+#include <sys/types.h>
+#include "chip/chip.h"
+
/***************************************************************************
* Definitions
***************************************************************************/
@@ -55,14 +58,16 @@ extern _Erom unsigned long SYS_CLK_FREQ; /* Setup FLASH options at address 0x00000000 */
+#if 0 /* Setup in z16f_head.S */
Z16F_FLOPTION0 = (Z16F_FLOPTION0_MAXPWR|Z16F_FLOPTION0_WDTRES|\
Z16F_FLOPTION0_WDTA0|Z16F_FLOPTION0_VBOA0|\
- Z16F_FLOPTION0_DBGUART|Z16F_FLOPTION0_FWP|
+ Z16F_FLOPTION0_DBGUART|Z16F_FLOPTION0_FWP|\
Z16F_FLOPTION0_RP);
Z16F_FLOPTION1 = (Z16F_FLOPTION1_RESVD|Z16F_FLOPTION1_MCEN|\
Z16F_FLOPTION1_OFFH|Z16F_FLOPTION1_OFFL);
Z16F_FLOPTION2 = Z16F_FLOPTION2_RESVD;
Z16F_FLOPTION3 = (Z16F_FLOPTION3_RESVD|Z16F_FLOPTION3_NORMAL);
+#endif
/***************************************************************************
* Private Functions
|