mirror of
https://github.com/apache/nuttx.git
synced 2026-05-29 04:19:37 +08:00
ZNEO configurations updated to use ZDS-II version 5.0.1
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5400 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
* arch/z16f/irq.h
|
* arch/z16f/irq.h
|
||||||
* arch/chip/irq.h
|
* arch/chip/irq.h
|
||||||
*
|
*
|
||||||
* Copyright (C) 2008 Gregory Nutt. All rights reserved.
|
* Copyright (C) 2008, 2012 Gregory Nutt. All rights reserved.
|
||||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without
|
* Redistribution and use in source and binary forms, with or without
|
||||||
@@ -188,8 +188,8 @@ struct xcptcontext
|
|||||||
|
|
||||||
/* The following retains that state during signal execution */
|
/* The following retains that state during signal execution */
|
||||||
|
|
||||||
uint32_t saved_pc; /* Saved return address */
|
uint32_t saved_pc; /* Saved return address */
|
||||||
uint16_t saved_i; /* Saved interrupt state */
|
uint16_t saved_i; /* Saved interrupt state */
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
@@ -231,7 +231,7 @@ extern "C" {
|
|||||||
EXTERN intrinsic void EI(void);
|
EXTERN intrinsic void EI(void);
|
||||||
EXTERN intrinsic void DI(void);
|
EXTERN intrinsic void DI(void);
|
||||||
EXTERN intrinsic void RI(unsigned short);
|
EXTERN intrinsic void RI(unsigned short);
|
||||||
EXTERN intrinsic SET_VECTOR(int,void (* func) (void));
|
EXTERN intrinsic void SET_VECTOR(int,void (* func) (void));
|
||||||
EXTERN intrinsic unsigned short TDI(void);
|
EXTERN intrinsic unsigned short TDI(void);
|
||||||
|
|
||||||
#ifndef __ZILOG__
|
#ifndef __ZILOG__
|
||||||
|
|||||||
+26
-6
@@ -38,18 +38,29 @@
|
|||||||
|
|
||||||
COMPILER = ${shell basename "$(CC)"}
|
COMPILER = ${shell basename "$(CC)"}
|
||||||
ARCHSRCDIR = $(TOPDIR)/arch/$(CONFIG_ARCH)/src
|
ARCHSRCDIR = $(TOPDIR)/arch/$(CONFIG_ARCH)/src
|
||||||
ifeq ($(COMPILER),zneocc.exe)
|
|
||||||
WARCHSRCDIR := ${shell cygpath -w $(ARCHSRCDIR)}
|
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
|
||||||
USRINCLUDES = -usrinc:'.;$(WTOPDIR)\sched;$(WARCHSRCDIR);$(WARCHSRCDIR)\common'
|
USRINCLUDES = -usrinc:'.;$(TOPDIR)/sched;$(ARCHSRCDIR);$(ARCHSRCDIR)/common'
|
||||||
else
|
else
|
||||||
WARCHSRCDIR = $(ARCHSRCDIR)
|
ifeq ($(COMPILER),zneocc.exe)
|
||||||
USRINCLUDES = -I$(TOPDIR)/sched -I$(ARCHSRCDIR) -I$(ARCHSRCDIR)/common
|
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
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
INCLUDES = $(ARCHSTDINCLUDES) $(USRINCLUDES)
|
INCLUDES = $(ARCHSTDINCLUDES) $(USRINCLUDES)
|
||||||
CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(INCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
|
CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(INCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
|
||||||
CPPFLAGS += -I$(ARCHSRCDIR)
|
CPPFLAGS += -I$(ARCHSRCDIR)
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
|
||||||
|
LDFLAGS += @"$(ARCHSRCDIR)/nuttx.linkcmd"
|
||||||
|
else
|
||||||
ifeq ($(COMPILER),zneocc.exe)
|
ifeq ($(COMPILER),zneocc.exe)
|
||||||
LDFLAGS += "${shell cygpath -w $(ARCHSRCDIR)/nuttx.linkcmd}"
|
LDFLAGS += @"${shell cygpath -w $(ARCHSRCDIR)/nuttx.linkcmd}"
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
HEAD_ASRC = $(HEAD_SSRC:.S=$(ASMEXT))
|
HEAD_ASRC = $(HEAD_SSRC:.S=$(ASMEXT))
|
||||||
@@ -96,6 +107,14 @@ board/libboard$(LIBEXT):
|
|||||||
ifeq ($(COMPILER),zneocc.exe)
|
ifeq ($(COMPILER),zneocc.exe)
|
||||||
nuttx.linkcmd: $(LINKCMDTEMPLATE)
|
nuttx.linkcmd: $(LINKCMDTEMPLATE)
|
||||||
$(Q) cp -f $(LINKCMDTEMPLATE) nuttx.linkcmd
|
$(Q) cp -f $(LINKCMDTEMPLATE) nuttx.linkcmd
|
||||||
|
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
|
||||||
|
@echo "$(TOPDIR)\nuttx}"= \>>nuttx.linkcmd
|
||||||
|
@echo "$(ARCHSRCDIR)\$(HEAD_OBJ)", \>>nuttx.linkcmd
|
||||||
|
$(Q) for %%G in ($(LINKLIBS)) do ( echo "$(TOPDIR)\lib\%%G", \>>nuttx.linkcmd )
|
||||||
|
@echo "$(ARCHSRCDIR)\board\libboard$(LIBEXT)", \>>nuttx.linkcmd
|
||||||
|
@echo "$(ZDSSTDLIBDIR)\chelpld$(LIBEXT)", \>>nuttx.linkcmd
|
||||||
|
@echo "$(ZDSSTDLIBDIR)\fpld$(LIBEXT)">>nuttx.linkcmd
|
||||||
|
else
|
||||||
@echo "\"${shell cygpath -w $(TOPDIR)/nuttx}\"= \\" >>nuttx.linkcmd
|
@echo "\"${shell cygpath -w $(TOPDIR)/nuttx}\"= \\" >>nuttx.linkcmd
|
||||||
@echo " \"${shell cygpath -w $(ARCHSRCDIR)/$(HEAD_OBJ)}\", \\" >>nuttx.linkcmd
|
@echo " \"${shell cygpath -w $(ARCHSRCDIR)/$(HEAD_OBJ)}\", \\" >>nuttx.linkcmd
|
||||||
$(Q) ( for lib in $(LINKLIBS); do \
|
$(Q) ( for lib in $(LINKLIBS); do \
|
||||||
@@ -104,6 +123,7 @@ nuttx.linkcmd: $(LINKCMDTEMPLATE)
|
|||||||
@echo " \"${shell cygpath -w $(ARCHSRCDIR)/board/libboard$(LIBEXT)}\", \\" >>nuttx.linkcmd
|
@echo " \"${shell cygpath -w $(ARCHSRCDIR)/board/libboard$(LIBEXT)}\", \\" >>nuttx.linkcmd
|
||||||
@echo " \"${shell cygpath -w $(ZDSSTDLIBDIR)/chelpld$(LIBEXT)}\", \\" >>nuttx.linkcmd
|
@echo " \"${shell cygpath -w $(ZDSSTDLIBDIR)/chelpld$(LIBEXT)}\", \\" >>nuttx.linkcmd
|
||||||
@echo " \"${shell cygpath -w $(ZDSSTDLIBDIR)/fpld$(LIBEXT)}\"" >>nuttx.linkcmd
|
@echo " \"${shell cygpath -w $(ZDSSTDLIBDIR)/fpld$(LIBEXT)}\"" >>nuttx.linkcmd
|
||||||
|
endif
|
||||||
else
|
else
|
||||||
nuttx.linkcmd:
|
nuttx.linkcmd:
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ FAR chipreg_t *up_doirq(int irq, FAR chipreg_t *regs)
|
|||||||
* interrupt level context switches.
|
* interrupt level context switches.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
savestate = (uint32_t*)current_regs;
|
savestate = (FAR chipreg_t *)current_regs;
|
||||||
current_regs = regs;
|
current_regs = regs;
|
||||||
|
|
||||||
/* Mask and acknowledge the interrupt */
|
/* Mask and acknowledge the interrupt */
|
||||||
@@ -120,7 +120,9 @@ FAR chipreg_t *up_doirq(int irq, FAR chipreg_t *regs)
|
|||||||
|
|
||||||
up_enable_irq(irq);
|
up_enable_irq(irq);
|
||||||
}
|
}
|
||||||
|
|
||||||
up_ledoff(LED_INIRQ);
|
up_ledoff(LED_INIRQ);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ typedef void (*up_vector_t)(void);
|
|||||||
* interrupt processing.
|
* interrupt processing.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
extern voltile FAR chipreg_t *current_regs;
|
extern volatile FAR chipreg_t *current_regs;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
|||||||
@@ -6,12 +6,14 @@ This is the README file for the NuttX port to the ZiLog ZNEO MCU.
|
|||||||
ZDS-II Compiler Versions
|
ZDS-II Compiler Versions
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
4.10.2
|
Version 4.10.2
|
||||||
|
|
||||||
The ZDS-II version 4.10.2 will not compile NuttX. It reports "internal
|
The ZDS-II version 4.10.2 will not compile NuttX. It reports "internal
|
||||||
errors" on some of the files. Upgrades to ZDS-II are available for
|
errors" on some of the files. Upgrades to ZDS-II are available for
|
||||||
download from the Zilog website: http://www.zilog.com/software/zds2.asp
|
download from the Zilog website: http://www.zilog.com/software/zds2.asp
|
||||||
|
|
||||||
4.11.0
|
Version 4.11.0
|
||||||
|
|
||||||
NuttX compiles correctly with the newer 4.11.0 version of the ZDS-II
|
NuttX compiles correctly with the newer 4.11.0 version of the ZDS-II
|
||||||
toolchain. However, I have found a few issues:
|
toolchain. However, I have found a few issues:
|
||||||
|
|
||||||
@@ -25,17 +27,31 @@ ZDS-II Compiler Versions
|
|||||||
- The Pascal add-on interpreter includes a large switch statement and
|
- The Pascal add-on interpreter includes a large switch statement and
|
||||||
exposes another compiler problem. This is reported as incident 81459.
|
exposes another compiler problem. This is reported as incident 81459.
|
||||||
|
|
||||||
4.11.1
|
Version 4.11.1
|
||||||
|
|
||||||
As of this writing (30 September 2010), the latest release of ZDS-II for the
|
As of this writing (30 September 2010), the latest release of ZDS-II for the
|
||||||
ZNEO is 4.11.1. It is unknown if this release includes fixes for incidents
|
ZNEO is 4.11.1. It is unknown if this release includes fixes for incidents
|
||||||
81400 and 81459 or not. It is unknown if the code will run without -reduceopt
|
81400 and 81459 or not. It is unknown if the code will run without -reduceopt
|
||||||
either. (Basically, it compiles with 4.11.1, but is untested with that version).
|
either. (Basically, it compiles with 4.11.1, but is untested with that version).
|
||||||
|
|
||||||
If you use any version of ZDS-II other than 4.11.1 or if you install ZDS-II
|
Version 5.0.1
|
||||||
at any location other than the default location, you will have to modify
|
|
||||||
two files: (1) configs/z16f2800100zcog/*/setenv.sh and (2)
|
On November 29, 2012, all of the z16f configurations were converted to use 5.0.1,
|
||||||
configs/z16f2800100zcog/*/Make.defs. Simply edit these two files, changing
|
but have not been verified on a running target.
|
||||||
4.11.1 to whatever.
|
|
||||||
|
Paths were also updated that are specific to a 32-bit toolchain running on
|
||||||
|
a 64 bit windows platform. Change to a different toolchain, you will need
|
||||||
|
to modify the versioning in Make.defs and setenv.sh; if you want to build
|
||||||
|
on a different platform, you will need to change the path in the ZDS binaries
|
||||||
|
in those same files.
|
||||||
|
|
||||||
|
Other Versions
|
||||||
|
|
||||||
|
If you use any version of ZDS-II other than 5.0.1 or if you install ZDS-II
|
||||||
|
at any location other than the default location, you will have to modify
|
||||||
|
two files: (1) configs/z16f2800100zcog/*/setenv.sh and (2)
|
||||||
|
configs/z16f2800100zcog/*/Make.defs. Simply edit these two files, changing
|
||||||
|
5.0.1 to whatever.
|
||||||
|
|
||||||
Issues
|
Issues
|
||||||
^^^^^^
|
^^^^^^
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
############################################################################
|
############################################################################
|
||||||
# configs/z16f2800100zcog/ostest/Make.defs
|
# configs/z16f2800100zcog/ostest/Make.defs
|
||||||
#
|
#
|
||||||
# Copyright (C) 2008, 2010 Gregory Nutt. All rights reserved.
|
# Copyright (C) 2008, 2010, 2012 Gregory Nutt. All rights reserved.
|
||||||
# Author: Gregory Nutt <gnutt@nuttx.org>
|
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
#
|
#
|
||||||
# Redistribution and use in source and binary forms, with or without
|
# Redistribution and use in source and binary forms, with or without
|
||||||
@@ -33,44 +33,68 @@
|
|||||||
#
|
#
|
||||||
############################################################################
|
############################################################################
|
||||||
|
|
||||||
include ${TOPDIR}/.config
|
include $(TOPDIR)/.config
|
||||||
include ${TOPDIR}/tools/Config.mk
|
include $(TOPDIR)/tools/Config.mk
|
||||||
|
|
||||||
# These are the directories where the ZNeo-II toolchain is installed
|
# These are the directories where the ZDS-II toolchain is installed. NOTE
|
||||||
|
# that short 8.3 path names are used in order to avoid spaces. On my machine
|
||||||
|
# I have:
|
||||||
|
#
|
||||||
|
# C:\PROGRA~1\ = C:\Profram Files\
|
||||||
|
# C:\PROGRA~2\ = C:\Program Files (x86)\
|
||||||
|
#
|
||||||
|
# Your PC may be configured differently.
|
||||||
|
|
||||||
ZDSINSTALLDIR := C:/Program Files (x86)/ZiLOG/ZDSII_ZNEO_4.11.1
|
ZDSVERSION = 5.0.1
|
||||||
|
|
||||||
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
|
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
|
||||||
ZDSBINDIR := $(ZDSINSTALLDIR)\bin
|
ZDSINSTALLDIR = C:/PROGRA~2/ZiLOG/ZDSII_ZNEO_$(ZDSVERSION)
|
||||||
ZDSSTDINCDIR := $(ZDSINSTALLDIR)\include\std
|
INSTALLDIR = ${shell echo $(ZDSINSTALLDIR)| sed -e "s/\//\\/g"}
|
||||||
ZDSZILOGINCDIR := $(ZDSINSTALLDIR)\include\zilog
|
ZDSBINDIR = $(INSTALLDIR)\bin
|
||||||
ZDSSTDLIBDIR := $(ZDSINSTALLDIR)\lib\std
|
ZDSSTDINCDIR = $(INSTALLDIR)\include\std
|
||||||
ZDSZILOGLIBDIR := $(ZDSINSTALLDIR)\lib\zilog
|
ZDSZILOGINCDIR = $(INSTALLDIR)\include\zilog
|
||||||
|
ZDSSTDLIBDIR = $(INSTALLDIR)\lib\std
|
||||||
|
ZDSZILOGLIBDIR = $(INSTALLDIR)\lib\zilog
|
||||||
|
|
||||||
|
# CFLAGs
|
||||||
|
|
||||||
|
ARCHASMINCLUDES = -include:$(TOPDIR)\include;$(ZDSSTDINCDIR);$(ZDSZILOGINCDIR)
|
||||||
|
EARCHASMINCLUDES = -include:$(TOPDIR)\include;$(ZDSSTDINCDIR);$(ZDSZILOGINCDIR)
|
||||||
|
ARCHSTDINCLUDES = -stdinc:$(TOPDIR)\include;$(ZDSSTDINCDIR);$(ZDSZILOGINCDIR)
|
||||||
|
ARCHUSRINCLUDES = -usrinc:.
|
||||||
else
|
else
|
||||||
WINTOOL := y
|
WINTOOL = y
|
||||||
|
ZDSINSTALLDIR = C:/PROGRA~2/ZiLOG/ZDSII_ZNEO_$(ZDSVERSION)
|
||||||
INSTALLDIR = ${shell cygpath -u "$(ZDSINSTALLDIR)"}
|
INSTALLDIR = ${shell cygpath -u "$(ZDSINSTALLDIR)"}
|
||||||
ZDSBINDIR := $(INSTALLDIR)/bin
|
ZDSBINDIR = $(INSTALLDIR)/bin
|
||||||
ZDSSTDINCDIR := $(INSTALLDIR)/include/std
|
ZDSSTDINCDIR = $(INSTALLDIR)/include/std
|
||||||
ZDSZILOGINCDIR := $(INSTALLDIR)/include/zilog
|
ZDSZILOGINCDIR = $(INSTALLDIR)/include/zilog
|
||||||
ZDSSTDLIBDIR := $(INSTALLDIR)/lib/std
|
ZDSSTDLIBDIR = $(INSTALLDIR)/lib/std
|
||||||
ZDSZILOGLIBDIR := $(INSTALLDIR)/lib/zilog
|
ZDSZILOGLIBDIR = $(INSTALLDIR)/lib/zilog
|
||||||
|
|
||||||
|
# These are the same directories but with the directory separator
|
||||||
|
# character swapped as needed by the ZDS-II compiler
|
||||||
|
|
||||||
|
WTOPDIR = ${shell cygpath -w "$(TOPDIR)"}
|
||||||
|
WZDSSTDINCDIR = ${shell cygpath -w "$(ZDSSTDINCDIR)"}
|
||||||
|
WZDSZILOGINCDIR = ${shell cygpath -w "$(ZDSZILOGINCDIR)"}
|
||||||
|
WZDSSTDLIBDIR = ${shell cygpath -w "$(ZDSSTDLIBDIR)"}
|
||||||
|
WZDSZILOGLIBDIR = ${shell cygpath -w "$(ZDSZILOGLIBDIR)"}
|
||||||
|
|
||||||
|
# Escaped versions
|
||||||
|
|
||||||
|
ETOPDIR = ${shell echo "$(WTOPDIR)" | sed -e "s/ /%20/g"}
|
||||||
|
EZDSSTDINCDIR = ${shell echo "$(WZDSSTDINCDIR)" | sed -e "s/ /%20/g"}
|
||||||
|
EZDSZILOGINCDIR = ${shell echo "$(WZDSZILOGINCDIR)" | sed -e "s/ /%20/g"}
|
||||||
|
|
||||||
|
# CFLAGs
|
||||||
|
|
||||||
|
ARCHASMINCLUDES = -include:'$(WTOPDIR)\include;$(WZDSSTDINCDIR);$(WZDSZILOGINCDIR)'
|
||||||
|
EARCHASMINCLUDES = -include:'$(ETOPDIR)\include;$(EZDSSTDINCDIR);$(EZDSZILOGINCDIR)'
|
||||||
|
ARCHSTDINCLUDES = -stdinc:'$(WTOPDIR)\include;$(WZDSSTDINCDIR);$(WZDSZILOGINCDIR)'
|
||||||
|
ARCHUSRINCLUDES = -usrinc:'.'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# These are the same directories but with the directory separator
|
|
||||||
# character swapped as needed by the ZNeo-II compiler
|
|
||||||
|
|
||||||
WTOPDIR := ${shell cygpath -w "$(TOPDIR)"}
|
|
||||||
WZDSSTDINCDIR := ${shell cygpath -w "$(ZDSSTDINCDIR)"}
|
|
||||||
WZDSZILOGINCDIR := ${shell cygpath -w "$(ZDSZILOGINCDIR)"}
|
|
||||||
WZDSSTDLIBDIR := ${shell cygpath -w "$(ZDSSTDLIBDIR)"}
|
|
||||||
WZDSZILOGLIBDIR := ${shell cygpath -w "$(ZDSZILOGLIBDIR)"}
|
|
||||||
|
|
||||||
# Escaped versions
|
|
||||||
|
|
||||||
ETOPDIR := ${shell echo "$(WTOPDIR)" | sed -e "s/ /%20/g"}
|
|
||||||
EZDSSTDINCDIR := ${shell echo "$(WZDSSTDINCDIR)" | sed -e "s/ /%20/g"}
|
|
||||||
EZDSZILOGINCDIR := ${shell echo "$(WZDSZILOGINCDIR)" | sed -e "s/ /%20/g"}
|
|
||||||
|
|
||||||
# Assembler definitions
|
# Assembler definitions
|
||||||
|
|
||||||
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
|
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
|
||||||
@@ -83,7 +107,6 @@ ARCHASMCPUFLAGS = -cpu:Z16F2811AL -NOigcase
|
|||||||
ARCHASMLIST = -NOlistmac -name -pagelen:56 -pagewidth:80 -quiet
|
ARCHASMLIST = -NOlistmac -name -pagelen:56 -pagewidth:80 -quiet
|
||||||
ARCHASMWARNINGS = -warn
|
ARCHASMWARNINGS = -warn
|
||||||
ARCHASMDEFINES = -define:_Z16F2811AL=1 -define:_Z16K_SERIES=1 -define:_Z16F_SERIES=1 -define:__ASSEMBLY__
|
ARCHASMDEFINES = -define:_Z16F2811AL=1 -define:_Z16K_SERIES=1 -define:_Z16F_SERIES=1 -define:__ASSEMBLY__
|
||||||
ARCHASMINCLUDES = -include:'$(ETOPDIR)\include;$(EZDSSTDINCDIR);$(EZDSZILOGINCDIR)'
|
|
||||||
AFLAGS = $(ARCHASMCPUFLAGS) $(ARCHASMINCLUDES) $(ARCHASMLIST) $(ARCHASMWARNINGS) $(ARCHASMOPTIMIZATION)
|
AFLAGS = $(ARCHASMCPUFLAGS) $(ARCHASMINCLUDES) $(ARCHASMLIST) $(ARCHASMWARNINGS) $(ARCHASMOPTIMIZATION)
|
||||||
|
|
||||||
# Compiler definitions
|
# Compiler definitions
|
||||||
@@ -95,18 +118,16 @@ else
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
ARCHCPUFLAGS = -chartype:S -model:L -NOmodsect -cpu:Z16F2811AL -NOgenprint \
|
ARCHCPUFLAGS = -chartype:S -model:L -NOmodsect -cpu:Z16F2811AL -NOgenprint \
|
||||||
-asmsw:" $(ARCHASMCPUFLAGS) $(ARCHASMINCLUDES) $(ARCHASMWARNINGS) $(ARCHASMOPTIMIZATION)"
|
-asmsw:" $(ARCHASMCPUFLAGS) $(ARCHASMINCLUDES) $(ARCHASMWARNINGS) $(ARCHASMOPTIMIZATION)"
|
||||||
ARCHLIST = -keeplst -NOlist -NOlistinc -NOkeepasm
|
ARCHLIST = -keeplst -NOlist -NOlistinc -NOkeepasm
|
||||||
ARCHPICFLAGS =
|
ARCHPICFLAGS =
|
||||||
ARCHWARNINGS = -warn
|
ARCHWARNINGS = -warn
|
||||||
ARCHDEFINES = -define:_Z16F2811AL -define:_Z16K_SERIES -define:_Z16F_SERIES
|
ARCHDEFINES = -define:_Z16F2811AL -define:_Z16K_SERIES -define:_Z16F_SERIES
|
||||||
ARCHSTDINCLUDES = -stdinc:'$(WTOPDIR)\include;$(WZDSSTDINCDIR);$(WZDSZILOGINCDIR)'
|
|
||||||
ARCHUSRINCLUDES = -usrinc:'.'
|
|
||||||
ARCHINCLUDES = $(ARCHSTDINCLUDES) $(ARCHUSRINCLUDES)
|
ARCHINCLUDES = $(ARCHSTDINCLUDES) $(ARCHUSRINCLUDES)
|
||||||
CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHLIST) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
|
CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHLIST) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
|
||||||
|
|
||||||
CPPDEFINES = -D_Z16F2811AL -D_Z16K_SERIES -D_Z16F_SERIES -D__ASSEMBLY__
|
CPPDEFINES = -D_Z16F2811AL -D_Z16K_SERIES -D_Z16F_SERIES -D__ASSEMBLY__
|
||||||
CPPINCLUDES = -I$(TOPDIR)/include
|
CPPINCLUDES = -I$(TOPDIR)$(DELIM)include
|
||||||
CPPFLAGS = $(CPPDEFINES) $(CPPINCLUDES)
|
CPPFLAGS = $(CPPDEFINES) $(CPPINCLUDES)
|
||||||
|
|
||||||
# Librarian definitions
|
# Librarian definitions
|
||||||
@@ -115,16 +136,16 @@ ARFLAGS = -quiet -warn
|
|||||||
|
|
||||||
# Linker definitions
|
# Linker definitions
|
||||||
|
|
||||||
LINKCMDTEMPLATE = $(TOPDIR)/configs/z16f2800100zcog/ostest/ostest.linkcmd
|
LINKCMDTEMPLATE = $(TOPDIR)$(DELIM)configs$(DELIM)z16f2800100zcog$(DELIM)ostest$(DELIM)ostest.linkcmd
|
||||||
|
|
||||||
# Tool names/pathes
|
# Tool names/pathes
|
||||||
|
|
||||||
CROSSDEV =
|
CROSSDEV =
|
||||||
CC = $(ZDSBINDIR)/zneocc.exe
|
CC = zneocc.exe
|
||||||
CPP = gcc -E
|
CPP = gcc -E
|
||||||
LD = $(ZDSBINDIR)/zneolink.exe
|
LD = zneolink.exe
|
||||||
AS = $(ZDSBINDIR)/zneoasm.exe
|
AS = zneoasm.exe
|
||||||
AR = $(ZDSBINDIR)/zneolib.exe
|
AR = zneolib.exe
|
||||||
|
|
||||||
# File extensions
|
# File extensions
|
||||||
|
|
||||||
@@ -137,51 +158,89 @@ EXEEXT = .hex
|
|||||||
# to compile and assembly source files and to insert the resulting
|
# to compile and assembly source files and to insert the resulting
|
||||||
# object files into an archive
|
# object files into an archive
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
|
||||||
|
|
||||||
|
define PREPROCESS
|
||||||
|
@echo CPP: $1->$2
|
||||||
|
$(Q) "$(CPP)" $(CPPFLAGS) $1 -o $2
|
||||||
|
endef
|
||||||
|
|
||||||
|
define COMPILE
|
||||||
|
$(Q) "$(CC)" $(CFLAGS) ${shell echo $1 | sed -e "s/\//\\/g"}
|
||||||
|
endef
|
||||||
|
|
||||||
|
define ASSEMBLE
|
||||||
|
$(Q) "$(AS)" $(AFLAGS) ${shell echo $1 | sed -e "s/\//\\/g"}
|
||||||
|
endef
|
||||||
|
|
||||||
|
define ARCHIVE
|
||||||
|
echo AR: $2
|
||||||
|
$(Q) for %%G in ($(2)) do ( "$(AR)" $(ARFLAGS) $1=-+%%G )
|
||||||
|
endef
|
||||||
|
|
||||||
|
define CLEAN
|
||||||
|
$(Q) if exist *.obj (del /f /q *.obj)
|
||||||
|
$(Q) if exist *.src (del /f /q *.src)
|
||||||
|
$(Q) if exist *.lib (del /f /q *.lib)
|
||||||
|
$(Q) if exist *.hex (del /f /q *.hex)
|
||||||
|
$(Q) if exist *.lod (del /f /q *.lod)
|
||||||
|
$(Q) if exist *.lst (del /f /q *.lst)
|
||||||
|
endef
|
||||||
|
|
||||||
|
else
|
||||||
|
|
||||||
define PREPROCESS
|
define PREPROCESS
|
||||||
@echo "CPP: $1->$2"
|
@echo "CPP: $1->$2"
|
||||||
$(Q) "$(CPP)" $(CPPFLAGS) $1 -o $2
|
$(Q) "$(CPP)" $(CPPFLAGS) $1 -o $2
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define COMPILE
|
define COMPILE
|
||||||
@#echo "CC: $1"
|
|
||||||
$(Q) (wfile=`cygpath -w "$1"`; "$(CC)" $(CFLAGS) $$wfile)
|
$(Q) (wfile=`cygpath -w "$1"`; "$(CC)" $(CFLAGS) $$wfile)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define ASSEMBLE
|
define ASSEMBLE
|
||||||
@#echo "AS: $1"
|
|
||||||
$(Q) (wfile=`cygpath -w "$1"`; "$(AS)" $(AFLAGS) $$wfile)
|
$(Q) (wfile=`cygpath -w "$1"`; "$(AS)" $(AFLAGS) $$wfile)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
|
|
||||||
define ARCHIVE
|
|
||||||
echo "AR: $2";
|
|
||||||
$(Q) for %%G in ($(2)) do ( "$(AR)" $(ARFLAGS) $1=-+%%G )
|
|
||||||
endef
|
|
||||||
else
|
|
||||||
define ARCHIVE
|
define ARCHIVE
|
||||||
$(Q) for __obj in $(2) ; do \
|
$(Q) for __obj in $(2) ; do \
|
||||||
echo "AR: $$__obj"; \
|
echo "AR: $$__obj"; \
|
||||||
"$(AR)" $(ARFLAGS) $1=-+$$__obj || { echo "$(AR) $1=-+$$__obj FAILED!" ; exit 1 ; } \
|
"$(AR)" $(ARFLAGS) $1=-+$$__obj || { echo "$(AR) $1=-+$$__obj FAILED!" ; exit 1 ; } \
|
||||||
done
|
done
|
||||||
endef
|
endef
|
||||||
endif
|
|
||||||
|
|
||||||
define CLEAN
|
define CLEAN
|
||||||
$(Q) rm -f *.obj *.src *.lib *.hex *.lst
|
$(Q) rm -f *.obj *.src *.lib *.hex *.lod *.lst
|
||||||
endef
|
endef
|
||||||
|
endif
|
||||||
|
|
||||||
# This is the tool to use for dependencies (i.e., none)
|
# Windows native host tool definitions
|
||||||
|
|
||||||
MKDEP = $(TOPDIR)/tools/mknulldeps.sh
|
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
|
||||||
|
HOSTCC = mingw32-gcc.exe
|
||||||
|
HOSTINCLUDES = -I.
|
||||||
|
HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -g -pipe
|
||||||
|
HOSTLDFLAGS =
|
||||||
|
HOSTEXEEXT = .exe
|
||||||
|
|
||||||
# ZNeo-II cannot follow Cygwin soft links, so we will have to use directory copies
|
# Windows-native host tools
|
||||||
|
|
||||||
DIRLINK = $(TOPDIR)/tools/winlink.sh
|
MKDEP = $(TOPDIR)\tools\mkdeps.exe --winnative
|
||||||
DIRUNLINK = $(TOPDIR)/tools/unlink.sh
|
else
|
||||||
|
|
||||||
# Linux/Cygwin host tool definitions
|
# Linux/Cygwin host tool definitions
|
||||||
|
|
||||||
HOSTCC = gcc
|
HOSTCC = gcc
|
||||||
HOSTINCLUDES = -I.
|
HOSTINCLUDES = -I.
|
||||||
HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -g -pipe
|
HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -g -pipe
|
||||||
HOSTLDFLAGS =
|
HOSTLDFLAGS =
|
||||||
|
|
||||||
|
# This is the tool to use for dependencies (i.e., none)
|
||||||
|
|
||||||
|
MKDEP = $(TOPDIR)$(DELIM)tools$(DELIM)mknulldeps.sh
|
||||||
|
|
||||||
|
# ZDS-II cannot follow Cygwin soft links, so we will have to use directory copies
|
||||||
|
|
||||||
|
DIRLINK = $(TOPDIR)$(DELIM)tools$(DELIM)winlink.sh
|
||||||
|
DIRUNLINK = $(TOPDIR)$(DELIM)tools$(DELIM)unlink.sh
|
||||||
|
endif
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# configs/z16f2800100zcog/ostest/setenv.sh
|
# configs/z16f2800100zcog/ostest/setenv.sh
|
||||||
#
|
#
|
||||||
# Copyright (C) 2008, 2010 Gregory Nutt. All rights reserved.
|
# Copyright (C) 2008, 2009, 2012 Gregory Nutt. All rights reserved.
|
||||||
# Author: Gregory Nutt <gnutt@nuttx.org>
|
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
#
|
#
|
||||||
# Redistribution and use in source and binary forms, with or without
|
# Redistribution and use in source and binary forms, with or without
|
||||||
@@ -33,19 +33,31 @@
|
|||||||
#
|
#
|
||||||
# Check how we were executed
|
# Check how we were executed
|
||||||
#
|
#
|
||||||
if [ "$(basename $0)" = "setenv.sh" ] ; then
|
if [ "$_" = "$0" ] ; then
|
||||||
echo "You must source this script, not run it!" 1>&2
|
echo "You must source this script, not run it!" 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
WD=`pwd`
|
||||||
|
if [ ! -x "setenv.sh" ]; then
|
||||||
|
echo "This script must be executed from the top-level NuttX build directory"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "${PATH_ORIG}" ]; then
|
||||||
|
export PATH_ORIG="${PATH}"
|
||||||
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
# The ZDS-II toolchain lies outside of the Cygwin "sandbox" and
|
# This is the Cygwin path to location where the XDS-II tools were installed
|
||||||
# attempts to set the PATH variable do not have the desired effect.
|
|
||||||
# Instead, alias are provided for all of the ZDS-II command line tools.
|
|
||||||
# Version 4.11.1 installed in the default location is assumed here.
|
|
||||||
#
|
#
|
||||||
ZDSBINDIR="C:/Program\ Files/ZiLOG/ZDSII_ZNEO_4.11.1/bin"
|
TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/ZiLOG/ZDSII_ZNEO_5.0.1/bin"
|
||||||
alias zneoasm="${ZDSBINDIR}/zneoasm.exe"
|
|
||||||
alias zneocc="${ZDSBINDIR}/zneocc.exe"
|
#
|
||||||
alias zneolib="${ZDSBINDIR}/zneolib.exe"
|
# Add the path to the toolchain to the PATH variable. NOTE that /bin and /usr/bin
|
||||||
alias zneolink="${ZDSBINDIR}/zneolink.exe"
|
# preceded the toolchain bin directory. This is because the ZDSII bin directory
|
||||||
|
# includes binaries like make.exe that will interfere with the normal build process
|
||||||
|
# if we do not give priority to the versions at /bin and /usr/bin.
|
||||||
|
#
|
||||||
|
export PATH="/bin:/usr/bin:${TOOLCHAIN_BIN}:/sbin:/usr/sbin:${PATH_ORIG}"
|
||||||
|
echo "PATH : ${PATH}"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
############################################################################
|
############################################################################
|
||||||
# configs/z16f2800100zcog/pashello/Make.defs
|
# configs/z16f2800100zcog/pashello/Make.defs
|
||||||
#
|
#
|
||||||
# Copyright (C) 2008, 2010 Gregory Nutt. All rights reserved.
|
# Copyright (C) 2008, 2010, 2012 Gregory Nutt. All rights reserved.
|
||||||
# Author: Gregory Nutt <gnutt@nuttx.org>
|
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
#
|
#
|
||||||
# Redistribution and use in source and binary forms, with or without
|
# Redistribution and use in source and binary forms, with or without
|
||||||
@@ -33,44 +33,68 @@
|
|||||||
#
|
#
|
||||||
############################################################################
|
############################################################################
|
||||||
|
|
||||||
include ${TOPDIR}/.config
|
include $(TOPDIR)/.config
|
||||||
include ${TOPDIR}/tools/Config.mk
|
include $(TOPDIR)/tools/Config.mk
|
||||||
|
|
||||||
# These are the directories where the ZNeo-II toolchain is installed
|
# These are the directories where the ZDS-II toolchain is installed. NOTE
|
||||||
|
# that short 8.3 path names are used in order to avoid spaces. On my machine
|
||||||
|
# I have:
|
||||||
|
#
|
||||||
|
# C:\PROGRA~1\ = C:\Profram Files\
|
||||||
|
# C:\PROGRA~2\ = C:\Program Files (x86)\
|
||||||
|
#
|
||||||
|
# Your PC may be configured differently.
|
||||||
|
|
||||||
ZDSINSTALLDIR := C:/Program Files (x86)/ZiLOG/ZDSII_ZNEO_4.11.1
|
ZDSVERSION = 5.0.1
|
||||||
|
|
||||||
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
|
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
|
||||||
ZDSBINDIR := $(ZDSINSTALLDIR)\bin
|
ZDSINSTALLDIR = C:/PROGRA~2/ZiLOG/ZDSII_ZNEO_$(ZDSVERSION)
|
||||||
ZDSSTDINCDIR := $(ZDSINSTALLDIR)\include\std
|
INSTALLDIR = ${shell echo $(ZDSINSTALLDIR)| sed -e "s/\//\\/g"}
|
||||||
ZDSZILOGINCDIR := $(ZDSINSTALLDIR)\include\zilog
|
ZDSBINDIR = $(INSTALLDIR)\bin
|
||||||
ZDSSTDLIBDIR := $(ZDSINSTALLDIR)\lib\std
|
ZDSSTDINCDIR = $(INSTALLDIR)\include\std
|
||||||
ZDSZILOGLIBDIR := $(ZDSINSTALLDIR)\lib\zilog
|
ZDSZILOGINCDIR = $(INSTALLDIR)\include\zilog
|
||||||
|
ZDSSTDLIBDIR = $(INSTALLDIR)\lib\std
|
||||||
|
ZDSZILOGLIBDIR = $(INSTALLDIR)\lib\zilog
|
||||||
|
|
||||||
|
# CFLAGs
|
||||||
|
|
||||||
|
ARCHASMINCLUDES = -include:$(TOPDIR)\include;$(ZDSSTDINCDIR);$(ZDSZILOGINCDIR)
|
||||||
|
EARCHASMINCLUDES = -include:$(TOPDIR)\include;$(ZDSSTDINCDIR);$(ZDSZILOGINCDIR)
|
||||||
|
ARCHSTDINCLUDES = -stdinc:$(TOPDIR)\include;$(ZDSSTDINCDIR);$(ZDSZILOGINCDIR)
|
||||||
|
ARCHUSRINCLUDES = -usrinc:.
|
||||||
else
|
else
|
||||||
WINTOOL := y
|
WINTOOL = y
|
||||||
|
ZDSINSTALLDIR = C:/PROGRA~2/ZiLOG/ZDSII_ZNEO_$(ZDSVERSION)
|
||||||
INSTALLDIR = ${shell cygpath -u "$(ZDSINSTALLDIR)"}
|
INSTALLDIR = ${shell cygpath -u "$(ZDSINSTALLDIR)"}
|
||||||
ZDSBINDIR := $(INSTALLDIR)/bin
|
ZDSBINDIR = $(INSTALLDIR)/bin
|
||||||
ZDSSTDINCDIR := $(INSTALLDIR)/include/std
|
ZDSSTDINCDIR = $(INSTALLDIR)/include/std
|
||||||
ZDSZILOGINCDIR := $(INSTALLDIR)/include/zilog
|
ZDSZILOGINCDIR = $(INSTALLDIR)/include/zilog
|
||||||
ZDSSTDLIBDIR := $(INSTALLDIR)/lib/std
|
ZDSSTDLIBDIR = $(INSTALLDIR)/lib/std
|
||||||
ZDSZILOGLIBDIR := $(INSTALLDIR)/lib/zilog
|
ZDSZILOGLIBDIR = $(INSTALLDIR)/lib/zilog
|
||||||
|
|
||||||
|
# These are the same directories but with the directory separator
|
||||||
|
# character swapped as needed by the ZDS-II compiler
|
||||||
|
|
||||||
|
WTOPDIR = ${shell cygpath -w "$(TOPDIR)"}
|
||||||
|
WZDSSTDINCDIR = ${shell cygpath -w "$(ZDSSTDINCDIR)"}
|
||||||
|
WZDSZILOGINCDIR = ${shell cygpath -w "$(ZDSZILOGINCDIR)"}
|
||||||
|
WZDSSTDLIBDIR = ${shell cygpath -w "$(ZDSSTDLIBDIR)"}
|
||||||
|
WZDSZILOGLIBDIR = ${shell cygpath -w "$(ZDSZILOGLIBDIR)"}
|
||||||
|
|
||||||
|
# Escaped versions
|
||||||
|
|
||||||
|
ETOPDIR = ${shell echo "$(WTOPDIR)" | sed -e "s/ /%20/g"}
|
||||||
|
EZDSSTDINCDIR = ${shell echo "$(WZDSSTDINCDIR)" | sed -e "s/ /%20/g"}
|
||||||
|
EZDSZILOGINCDIR = ${shell echo "$(WZDSZILOGINCDIR)" | sed -e "s/ /%20/g"}
|
||||||
|
|
||||||
|
# CFLAGs
|
||||||
|
|
||||||
|
ARCHASMINCLUDES = -include:'$(WTOPDIR)\include;$(WZDSSTDINCDIR);$(WZDSZILOGINCDIR)'
|
||||||
|
EARCHASMINCLUDES = -include:'$(ETOPDIR)\include;$(EZDSSTDINCDIR);$(EZDSZILOGINCDIR)'
|
||||||
|
ARCHSTDINCLUDES = -stdinc:'$(WTOPDIR)\include;$(WZDSSTDINCDIR);$(WZDSZILOGINCDIR)'
|
||||||
|
ARCHUSRINCLUDES = -usrinc:'.'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# These are the same directories but with the directory separator
|
|
||||||
# character swapped as needed by the ZNeo-II compiler
|
|
||||||
|
|
||||||
WTOPDIR := ${shell cygpath -w $(TOPDIR)}
|
|
||||||
WZDSSTDINCDIR := ${shell cygpath -w $(ZDSSTDINCDIR)}
|
|
||||||
WZDSZILOGINCDIR := ${shell cygpath -w $(ZDSZILOGINCDIR)}
|
|
||||||
WZDSSTDLIBDIR := ${shell cygpath -w $(ZDSSTDLIBDIR)}
|
|
||||||
WZDSZILOGLIBDIR := ${shell cygpath -w $(ZDSZILOGLIBDIR)}
|
|
||||||
|
|
||||||
# Escaped versions
|
|
||||||
|
|
||||||
ETOPDIR := ${shell echo "$(WTOPDIR)" | sed -e "s/ /%20/g"}
|
|
||||||
EZDSSTDINCDIR := ${shell echo "$(WZDSSTDINCDIR)" | sed -e "s/ /%20/g"}
|
|
||||||
EZDSZILOGINCDIR := ${shell echo "$(WZDSZILOGINCDIR)" | sed -e "s/ /%20/g"}
|
|
||||||
|
|
||||||
# Assembler definitions
|
# Assembler definitions
|
||||||
|
|
||||||
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
|
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
|
||||||
@@ -83,7 +107,6 @@ ARCHASMCPUFLAGS = -cpu:Z16F2811AL -NOigcase
|
|||||||
ARCHASMLIST = -NOlistmac -name -pagelen:56 -pagewidth:80 -quiet
|
ARCHASMLIST = -NOlistmac -name -pagelen:56 -pagewidth:80 -quiet
|
||||||
ARCHASMWARNINGS = -warn
|
ARCHASMWARNINGS = -warn
|
||||||
ARCHASMDEFINES = -define:_Z16F2811AL=1 -define:_Z16K_SERIES=1 -define:_Z16F_SERIES=1 -define:__ASSEMBLY__
|
ARCHASMDEFINES = -define:_Z16F2811AL=1 -define:_Z16K_SERIES=1 -define:_Z16F_SERIES=1 -define:__ASSEMBLY__
|
||||||
ARCHASMINCLUDES = -include:'$(ETOPDIR)\include;$(EZDSSTDINCDIR);$(EZDSZILOGINCDIR)'
|
|
||||||
AFLAGS = $(ARCHASMCPUFLAGS) $(ARCHASMINCLUDES) $(ARCHASMLIST) $(ARCHASMWARNINGS) $(ARCHASMOPTIMIZATION)
|
AFLAGS = $(ARCHASMCPUFLAGS) $(ARCHASMINCLUDES) $(ARCHASMLIST) $(ARCHASMWARNINGS) $(ARCHASMOPTIMIZATION)
|
||||||
|
|
||||||
# Compiler definitions
|
# Compiler definitions
|
||||||
@@ -95,18 +118,16 @@ else
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
ARCHCPUFLAGS = -chartype:S -model:L -NOmodsect -cpu:Z16F2811AL -NOgenprint \
|
ARCHCPUFLAGS = -chartype:S -model:L -NOmodsect -cpu:Z16F2811AL -NOgenprint \
|
||||||
-asmsw:" $(ARCHASMCPUFLAGS) $(ARCHASMINCLUDES) $(ARCHASMWARNINGS) $(ARCHASMOPTIMIZATION)"
|
-asmsw:" $(ARCHASMCPUFLAGS) $(ARCHASMINCLUDES) $(ARCHASMWARNINGS) $(ARCHASMOPTIMIZATION)"
|
||||||
ARCHLIST = -keeplst -NOlist -NOlistinc -NOkeepasm
|
ARCHLIST = -keeplst -NOlist -NOlistinc -NOkeepasm
|
||||||
ARCHPICFLAGS =
|
ARCHPICFLAGS =
|
||||||
ARCHWARNINGS = -warn
|
ARCHWARNINGS = -warn
|
||||||
ARCHDEFINES = -define:_Z16F2811AL -define:_Z16K_SERIES -define:_Z16F_SERIES
|
ARCHDEFINES = -define:_Z16F2811AL -define:_Z16K_SERIES -define:_Z16F_SERIES
|
||||||
ARCHSTDINCLUDES = -stdinc:'$(WTOPDIR)\include;$(WZDSSTDINCDIR);$(WZDSZILOGINCDIR)'
|
|
||||||
ARCHUSRINCLUDES = -usrinc:'.'
|
|
||||||
ARCHINCLUDES = $(ARCHSTDINCLUDES) $(ARCHUSRINCLUDES)
|
ARCHINCLUDES = $(ARCHSTDINCLUDES) $(ARCHUSRINCLUDES)
|
||||||
CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHLIST) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
|
CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHLIST) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
|
||||||
|
|
||||||
CPPDEFINES = -D_Z16F2811AL -D_Z16K_SERIES -D_Z16F_SERIES -D__ASSEMBLY__
|
CPPDEFINES = -D_Z16F2811AL -D_Z16K_SERIES -D_Z16F_SERIES -D__ASSEMBLY__
|
||||||
CPPINCLUDES = -I$(TOPDIR)/include
|
CPPINCLUDES = -I$(TOPDIR)$(DELIM)include
|
||||||
CPPFLAGS = $(CPPDEFINES) $(CPPINCLUDES)
|
CPPFLAGS = $(CPPDEFINES) $(CPPINCLUDES)
|
||||||
|
|
||||||
# Librarian definitions
|
# Librarian definitions
|
||||||
@@ -115,16 +136,16 @@ ARFLAGS = -quiet -warn
|
|||||||
|
|
||||||
# Linker definitions
|
# Linker definitions
|
||||||
|
|
||||||
LINKCMDTEMPLATE = $(TOPDIR)/configs/z16f2800100zcog/pashello/pashello.linkcmd
|
LINKCMDTEMPLATE = $(TOPDIR)$(DELIM)configs$(DELIM)z16f2800100zcog$(DELIM)pashello$(DELIM)pashello.linkcmd
|
||||||
|
|
||||||
# Tool names/pathes
|
# Tool names/pathes
|
||||||
|
|
||||||
CROSSDEV =
|
CROSSDEV =
|
||||||
CC = $(ZDSBINDIR)/zneocc.exe
|
CC = zneocc.exe
|
||||||
CPP = gcc -E
|
CPP = gcc -E
|
||||||
LD = $(ZDSBINDIR)/zneolink.exe
|
LD = zneolink.exe
|
||||||
AS = $(ZDSBINDIR)/zneoasm.exe
|
AS = zneoasm.exe
|
||||||
AR = $(ZDSBINDIR)/zneolib.exe
|
AR = zneolib.exe
|
||||||
|
|
||||||
# File extensions
|
# File extensions
|
||||||
|
|
||||||
@@ -137,51 +158,89 @@ EXEEXT = .hex
|
|||||||
# to compile and assembly source files and to insert the resulting
|
# to compile and assembly source files and to insert the resulting
|
||||||
# object files into an archive
|
# object files into an archive
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
|
||||||
|
|
||||||
define PREPROCESS
|
define PREPROCESS
|
||||||
@echo "CPP: $1->$2"
|
@echo CPP: $1->$2
|
||||||
@$(CPP) $(CPPFLAGS) $1 -o $2
|
$(Q) "$(CPP)" $(CPPFLAGS) $1 -o $2
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define COMPILE
|
define COMPILE
|
||||||
@#echo "CC: $1"
|
$(Q) "$(CC)" $(CFLAGS) ${shell echo $1 | sed -e "s/\//\\/g"}
|
||||||
@(wfile=`cygpath -w $1`; $(CC) $(CFLAGS) $$wfile)
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define ASSEMBLE
|
define ASSEMBLE
|
||||||
@#echo "AS: $1"
|
$(Q) "$(AS)" $(AFLAGS) ${shell echo $1 | sed -e "s/\//\\/g"}
|
||||||
@(wfile=`cygpath -w $1`; $(AS) $(AFLAGS) $$wfile)
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
|
|
||||||
define ARCHIVE
|
define ARCHIVE
|
||||||
echo "AR: $2";
|
echo AR: $2
|
||||||
$(Q) for %%G in ($(2)) do ( "$(AR)" $(ARFLAGS) $1=-+%%G )
|
$(Q) for %%G in ($(2)) do ( "$(AR)" $(ARFLAGS) $1=-+%%G )
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
define CLEAN
|
||||||
|
$(Q) if exist *.obj (del /f /q *.obj)
|
||||||
|
$(Q) if exist *.src (del /f /q *.src)
|
||||||
|
$(Q) if exist *.lib (del /f /q *.lib)
|
||||||
|
$(Q) if exist *.hex (del /f /q *.hex)
|
||||||
|
$(Q) if exist *.lod (del /f /q *.lod)
|
||||||
|
$(Q) if exist *.lst (del /f /q *.lst)
|
||||||
|
endef
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
|
define PREPROCESS
|
||||||
|
@echo "CPP: $1->$2"
|
||||||
|
$(Q) "$(CPP)" $(CPPFLAGS) $1 -o $2
|
||||||
|
endef
|
||||||
|
|
||||||
|
define COMPILE
|
||||||
|
$(Q) (wfile=`cygpath -w "$1"`; "$(CC)" $(CFLAGS) $$wfile)
|
||||||
|
endef
|
||||||
|
|
||||||
|
define ASSEMBLE
|
||||||
|
$(Q) (wfile=`cygpath -w "$1"`; "$(AS)" $(AFLAGS) $$wfile)
|
||||||
|
endef
|
||||||
|
|
||||||
define ARCHIVE
|
define ARCHIVE
|
||||||
$(Q) for __obj in $(2) ; do \
|
$(Q) for __obj in $(2) ; do \
|
||||||
echo "AR: $$__obj"; \
|
echo "AR: $$__obj"; \
|
||||||
"$(AR)" $(ARFLAGS) $1=-+$$__obj || { echo "$(AR) $1=-+$$__obj FAILED!" ; exit 1 ; } \
|
"$(AR)" $(ARFLAGS) $1=-+$$__obj || { echo "$(AR) $1=-+$$__obj FAILED!" ; exit 1 ; } \
|
||||||
done
|
done
|
||||||
endef
|
endef
|
||||||
endif
|
|
||||||
|
|
||||||
define CLEAN
|
define CLEAN
|
||||||
@rm -f *.obj *.src *.lib *.hex *.lst
|
$(Q) rm -f *.obj *.src *.lib *.hex *.lod *.lst
|
||||||
endef
|
endef
|
||||||
|
endif
|
||||||
|
|
||||||
# This is the tool to use for dependencies (i.e., none)
|
# Windows native host tool definitions
|
||||||
|
|
||||||
MKDEP = $(TOPDIR)/tools/mknulldeps.sh
|
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
|
||||||
|
HOSTCC = mingw32-gcc.exe
|
||||||
|
HOSTINCLUDES = -I.
|
||||||
|
HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -g -pipe
|
||||||
|
HOSTLDFLAGS =
|
||||||
|
HOSTEXEEXT = .exe
|
||||||
|
|
||||||
# ZNeo-II cannot follow Cygwin soft links, so we will have to use directory copies
|
# Windows-native host tools
|
||||||
|
|
||||||
DIRLINK = $(TOPDIR)/tools/winlink.sh
|
MKDEP = $(TOPDIR)\tools\mkdeps.exe --winnative
|
||||||
DIRUNLINK = $(TOPDIR)/tools/unlink.sh
|
else
|
||||||
|
|
||||||
# Linux/Cygwin host tool definitions
|
# Linux/Cygwin host tool definitions
|
||||||
|
|
||||||
HOSTCC = gcc
|
HOSTCC = gcc
|
||||||
HOSTINCLUDES = -I.
|
HOSTINCLUDES = -I.
|
||||||
HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -g -pipe
|
HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -g -pipe
|
||||||
HOSTLDFLAGS =
|
HOSTLDFLAGS =
|
||||||
|
|
||||||
|
# This is the tool to use for dependencies (i.e., none)
|
||||||
|
|
||||||
|
MKDEP = $(TOPDIR)$(DELIM)tools$(DELIM)mknulldeps.sh
|
||||||
|
|
||||||
|
# ZDS-II cannot follow Cygwin soft links, so we will have to use directory copies
|
||||||
|
|
||||||
|
DIRLINK = $(TOPDIR)$(DELIM)tools$(DELIM)winlink.sh
|
||||||
|
DIRUNLINK = $(TOPDIR)$(DELIM)tools$(DELIM)unlink.sh
|
||||||
|
endif
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# z16f2800100zcog/setenv.sh
|
# configs/z16f2800100zcog/pashello/setenv.sh
|
||||||
#
|
#
|
||||||
# Copyright (C) 2008, 2010 Gregory Nutt. All rights reserved.
|
# Copyright (C) 2008, 2009, 2012 Gregory Nutt. All rights reserved.
|
||||||
# Author: Gregory Nutt <gnutt@nuttx.org>
|
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
#
|
#
|
||||||
# Redistribution and use in source and binary forms, with or without
|
# Redistribution and use in source and binary forms, with or without
|
||||||
@@ -33,19 +33,31 @@
|
|||||||
#
|
#
|
||||||
# Check how we were executed
|
# Check how we were executed
|
||||||
#
|
#
|
||||||
if [ "$(basename $0)" = "setenv.sh" ] ; then
|
if [ "$_" = "$0" ] ; then
|
||||||
echo "You must source this script, not run it!" 1>&2
|
echo "You must source this script, not run it!" 1>&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
WD=`pwd`
|
||||||
|
if [ ! -x "setenv.sh" ]; then
|
||||||
|
echo "This script must be executed from the top-level NuttX build directory"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "${PATH_ORIG}" ]; then
|
||||||
|
export PATH_ORIG="${PATH}"
|
||||||
|
fi
|
||||||
|
|
||||||
#
|
#
|
||||||
# The ZDS-II toolchain lies outside of the Cygwin "sandbox" and
|
# This is the Cygwin path to location where the XDS-II tools were installed
|
||||||
# attempts to set the PATH variable do not have the desired effect.
|
|
||||||
# Instead, alias are provided for all of the ZDS-II command line tools.
|
|
||||||
# Version 4.11.1 installed in the default location is assumed here.
|
|
||||||
#
|
#
|
||||||
ZDSBINDIR="C:/Program\ Files/ZiLOG/ZDSII_ZNEO_4.11.1/bin"
|
TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/ZiLOG/ZDSII_ZNEO_5.0.1/bin"
|
||||||
alias zneoasm="${ZDSBINDIR}/zneoasm.exe"
|
|
||||||
alias zneocc="${ZDSBINDIR}/zneocc.exe"
|
#
|
||||||
alias zneolib="${ZDSBINDIR}/zneolib.exe"
|
# Add the path to the toolchain to the PATH variable. NOTE that /bin and /usr/bin
|
||||||
alias zneolink="${ZDSBINDIR}/zneolink.exe"
|
# preceded the toolchain bin directory. This is because the ZDSII bin directory
|
||||||
|
# includes binaries like make.exe that will interfere with the normal build process
|
||||||
|
# if we do not give priority to the versions at /bin and /usr/bin.
|
||||||
|
#
|
||||||
|
export PATH="/bin:/usr/bin:${TOOLCHAIN_BIN}:/sbin:/usr/sbin:${PATH_ORIG}"
|
||||||
|
echo "PATH : ${PATH}"
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ Version 4.9.5
|
|||||||
|
|
||||||
Version 5.0.0
|
Version 5.0.0
|
||||||
|
|
||||||
On November 18, 2012, all of the z8 configurations were converted to use 5.0.0,
|
On November 28, 2012, all of the z8 configurations were converted to use 5.0.0,
|
||||||
but have not been verified on a running target.
|
but have not been verified on a running target.
|
||||||
|
|
||||||
Paths were also updated that are specific to a 32-bit toolchain running on
|
Paths were also updated that are specific to a 32-bit toolchain running on
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ Version 4.9.5
|
|||||||
|
|
||||||
Version 5.0.0
|
Version 5.0.0
|
||||||
|
|
||||||
On November 18, 2012, all of the z8 configurations were converted to use 5.0.0,
|
On November 28, 2012, all of the z8 configurations were converted to use 5.0.0,
|
||||||
but have not been verified on a running target.
|
but have not been verified on a running target.
|
||||||
|
|
||||||
Paths were also updated that are specific to a 32-bit toolchain running on
|
Paths were also updated that are specific to a 32-bit toolchain running on
|
||||||
|
|||||||
@@ -2600,7 +2600,8 @@ static int mmcsd_cardidentify(FAR struct mmcsd_state_s *priv)
|
|||||||
* operating condition. CMD 8 is reserved on SD version 1.0 and MMC.
|
* operating condition. CMD 8 is reserved on SD version 1.0 and MMC.
|
||||||
*
|
*
|
||||||
* CMD8 Argument:
|
* CMD8 Argument:
|
||||||
* [31:12]: Reserved (shall be set to '0')
|
* [31:12]: Reserved (shall be set to '0')
|
||||||
|
* [11:8]: Supply Voltage (VHS) 0x1 (Range: 2.7-3.6 V)
|
||||||
* [7:0]: Check Pattern (recommended 0xaa)
|
* [7:0]: Check Pattern (recommended 0xaa)
|
||||||
* CMD8 Response: R7
|
* CMD8 Response: R7
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user