Progress toward a z80 native Windows build -- still needs some work
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5411 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
parent
edc3eace2b
commit
06e6e9e43c
@ -66,7 +66,7 @@ EXEEXT = .hex
|
||||
|
||||
define ASSEMBLE
|
||||
@echo "AS: $1"
|
||||
@$(AS) $(ASFLAGS) $1
|
||||
@$(AS) $(AFLAGS) $1
|
||||
endef
|
||||
|
||||
define CLEAN
|
||||
|
@ -36,56 +36,129 @@
|
||||
include ${TOPDIR}/.config
|
||||
include ${TOPDIR}/tools/Config.mk
|
||||
|
||||
CROSSDEV =
|
||||
CC = sdcc
|
||||
CPP = sdcpp
|
||||
AR = sdcclib -a
|
||||
# These are the directories where the SDCC 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.
|
||||
|
||||
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
|
||||
SDCC_INSTALLDIR = C:\PROGRA~2\SDCC
|
||||
SDCC_BINDIR = $(SDCC_INSTALLDIR)\bin
|
||||
SDCC_LIBDIR = $(SDCC_INSTALLDIR)\lib\z80
|
||||
else
|
||||
SDCC_INSTALLDIR = /usr/local
|
||||
SDCC_BINDIR = $(SDCC_INSTALLDIR)/bin
|
||||
SDCC_LIBDIR = $(SDCC_INSTALLDIR)/share/sdcc/lib/z80
|
||||
endif
|
||||
|
||||
CROSSDEV =
|
||||
CC = sdcc
|
||||
CPP = sdcpp
|
||||
AR = sdcclib -a
|
||||
|
||||
ifeq ($(CONFIG_SDCC_OLD),y)
|
||||
|
||||
LD = link-z80
|
||||
AS = as-z80
|
||||
ARCHCPUFLAGS = -mz80 --stack-auto --int-long-reent --float-reent
|
||||
|
||||
LD = link-z80
|
||||
AS = as-z80
|
||||
ARCHCPUFLAGS = -mz80 --stack-auto --int-long-reent --float-reent
|
||||
else
|
||||
|
||||
LD = sdldz80
|
||||
AS = sdasz80
|
||||
ARCHCPUFLAGS = -mz80
|
||||
|
||||
LD = sdldz80
|
||||
AS = sdasz80
|
||||
ARCHCPUFLAGS = -mz80
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
|
||||
ARCHOPTIMIZATION = --debug
|
||||
ARCHOPTIMIZATION = --debug
|
||||
else
|
||||
ARCHOPTIMIZATION =
|
||||
ARCHOPTIMIZATION =
|
||||
endif
|
||||
|
||||
ARCHPICFLAGS =
|
||||
ARCHWARNINGS =
|
||||
ARCHDEFINES =
|
||||
ARCHINCLUDES = -I. -I$(TOPDIR)/include
|
||||
ARCHPICFLAGS =
|
||||
ARCHWARNINGS =
|
||||
ARCHDEFINES =
|
||||
ARCHINCLUDES = -I. -I$(TOPDIR)$(DELIM)include
|
||||
|
||||
CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) \
|
||||
$(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
|
||||
CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
|
||||
ASFLAGS = -x -a -l -o -s
|
||||
CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
|
||||
CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
|
||||
AFLAGS = -x -a -l -o -s
|
||||
|
||||
SDCCLIBDIR = /usr/local/share/sdcc/lib/z80
|
||||
SDCCLIB = z80.lib
|
||||
SDCCLIB = z80.lib
|
||||
|
||||
ASMEXT = .asm
|
||||
OBJEXT = .o
|
||||
LIBEXT = .lib
|
||||
EXEEXT = .cmd
|
||||
ASMEXT = .asm
|
||||
OBJEXT = .o
|
||||
LIBEXT = .lib
|
||||
EXEEXT = .cmd
|
||||
|
||||
define CLEAN
|
||||
@rm -f *.o *.asm *.rel *.lst *.rst *.sym *.adb *.lnk *.map *.mem *.hex
|
||||
# Custom ASSEMBLE definition. The most common toolchain, GCC, uses the
|
||||
# compiler to assemble files because this has the advantage of running the C
|
||||
# Pre-Processor against. This is not possible with other SDCC; we need to
|
||||
# define AS and over-ride the common definition in order to use the assembler
|
||||
# directly.
|
||||
|
||||
define ASSEMBLE
|
||||
@echo "AS: $1"
|
||||
$(Q) $(AS) $(AFLAGS) $2 $1
|
||||
endef
|
||||
|
||||
MKDEP = $(TOPDIR)/tools/mkdeps.sh
|
||||
# Custom CLEAN definition
|
||||
|
||||
HOSTCC = gcc
|
||||
HOSTINCLUDES = -I.
|
||||
HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -g -pipe
|
||||
HOSTLDFLAGS =
|
||||
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
|
||||
define CLEAN
|
||||
$(Q) if exist *.o (del /f /q *.o)
|
||||
$(Q) if exist *.asm (del /f /q *.asm)
|
||||
$(Q) if exist *.rel (del /f /q *.rel)
|
||||
$(Q) if exist *.lst (del /f /q *.lst)
|
||||
$(Q) if exist *.rst (del /f /q *.rst)
|
||||
$(Q) if exist *.sym (del /f /q *.sym)
|
||||
$(Q) if exist *.adb (del /f /q *.adb)
|
||||
$(Q) if exist *.lnk (del /f /q *.lnk)
|
||||
$(Q) if exist *.map (del /f /q *.map)
|
||||
$(Q) if exist *.mem (del /f /q *.mem)
|
||||
$(Q) if exist *.hex (del /f /q *.hex)
|
||||
$(Q) if exist *.cmd (del /f /q *.cmd)
|
||||
endef
|
||||
else
|
||||
define CLEAN
|
||||
$(Q) rm -f *.o *.asm *.rel *.lst *.rst *.sym *.adb *.lnk *.map *.mem *.hex *.cmd
|
||||
endef
|
||||
endif
|
||||
|
||||
# Windows native host tool definitions
|
||||
|
||||
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
|
||||
HOSTCC = mingw32-gcc.exe
|
||||
HOSTINCLUDES = -I.
|
||||
HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -g -pipe
|
||||
HOSTLDFLAGS =
|
||||
HOSTEXEEXT = .exe
|
||||
|
||||
# Windows-native host tools
|
||||
|
||||
MKDEP = $(TOPDIR)\tools\mkdeps.exe --winnative
|
||||
else
|
||||
|
||||
# Linux/Cygwin host tool definitions
|
||||
|
||||
HOSTCC = gcc
|
||||
HOSTINCLUDES = -I.
|
||||
HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -g -pipe
|
||||
HOSTLDFLAGS =
|
||||
|
||||
# This is the tool to use for dependencies (i.e., none)
|
||||
|
||||
MKDEP = $(TOPDIR)$(DELIM)tools$(DELIM)mknulldeps.sh
|
||||
|
||||
# SDCC for Linux, OSX, or Cygwin understands symbolic links. Windows SDCC
|
||||
# running under Cygwin does not
|
||||
|
||||
ifeq ($(WINTOOL),y)
|
||||
DIRLINK = $(TOPDIR)$(DELIM)tools$(DELIM)winlink.sh
|
||||
DIRUNLINK = $(TOPDIR)$(DELIM)tools$(DELIM)unlink.sh
|
||||
else
|
||||
DIRLINK = $(TOPDIR)$(DELIM)tools$(DELIM)link.sh
|
||||
DIRUNLINK = $(TOPDIR)$(DELIM)tools$(DELIM)unlink.sh
|
||||
endif
|
||||
endif
|
||||
|
@ -36,56 +36,129 @@
|
||||
include ${TOPDIR}/.config
|
||||
include ${TOPDIR}/tools/Config.mk
|
||||
|
||||
CROSSDEV =
|
||||
CC = sdcc
|
||||
CPP = sdcpp
|
||||
AR = sdcclib -a
|
||||
# These are the directories where the SDCC 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.
|
||||
|
||||
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
|
||||
SDCC_INSTALLDIR = C:\PROGRA~2\SDCC
|
||||
SDCC_BINDIR = $(SDCC_INSTALLDIR)\bin
|
||||
SDCC_LIBDIR = $(SDCC_INSTALLDIR)\lib\z80
|
||||
else
|
||||
SDCC_INSTALLDIR = /usr/local
|
||||
SDCC_BINDIR = $(SDCC_INSTALLDIR)/bin
|
||||
SDCC_LIBDIR = $(SDCC_INSTALLDIR)/share/sdcc/lib/z80
|
||||
endif
|
||||
|
||||
CROSSDEV =
|
||||
CC = sdcc
|
||||
CPP = sdcpp
|
||||
AR = sdcclib -a
|
||||
|
||||
ifeq ($(CONFIG_SDCC_OLD),y)
|
||||
|
||||
LD = link-z80
|
||||
AS = as-z80
|
||||
ARCHCPUFLAGS = -mz80 --stack-auto --int-long-reent --float-reent
|
||||
|
||||
LD = link-z80
|
||||
AS = as-z80
|
||||
ARCHCPUFLAGS = -mz80 --stack-auto --int-long-reent --float-reent
|
||||
else
|
||||
|
||||
LD = sdldz80
|
||||
AS = sdasz80
|
||||
ARCHCPUFLAGS = -mz80
|
||||
|
||||
LD = sdldz80
|
||||
AS = sdasz80
|
||||
ARCHCPUFLAGS = -mz80
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
|
||||
ARCHOPTIMIZATION = --debug
|
||||
ARCHOPTIMIZATION = --debug
|
||||
else
|
||||
ARCHOPTIMIZATION =
|
||||
ARCHOPTIMIZATION =
|
||||
endif
|
||||
|
||||
ARCHPICFLAGS =
|
||||
ARCHWARNINGS =
|
||||
ARCHDEFINES =
|
||||
ARCHINCLUDES = -I. -I$(TOPDIR)/include
|
||||
ARCHPICFLAGS =
|
||||
ARCHWARNINGS =
|
||||
ARCHDEFINES =
|
||||
ARCHINCLUDES = -I. -I$(TOPDIR)$(DELIM)include
|
||||
|
||||
CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) \
|
||||
$(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
|
||||
CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
|
||||
ASFLAGS = -x -a -l -o -s
|
||||
CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
|
||||
CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
|
||||
AFLAGS = -x -a -l -o -s
|
||||
|
||||
SDCCLIBDIR = /usr/local/share/sdcc/lib/z80
|
||||
SDCCLIB = z80.lib
|
||||
SDCCLIB = z80.lib
|
||||
|
||||
ASMEXT = .asm
|
||||
OBJEXT = .o
|
||||
LIBEXT = .lib
|
||||
EXEEXT = .cmd
|
||||
ASMEXT = .asm
|
||||
OBJEXT = .o
|
||||
LIBEXT = .lib
|
||||
EXEEXT = .cmd
|
||||
|
||||
define CLEAN
|
||||
@rm -f *.o *.asm *.rel *.lst *.rst *.sym *.adb *.lnk *.map *.mem *.hex
|
||||
# Custom ASSEMBLE definition. The most common toolchain, GCC, uses the
|
||||
# compiler to assemble files because this has the advantage of running the C
|
||||
# Pre-Processor against. This is not possible with other SDCC; we need to
|
||||
# define AS and over-ride the common definition in order to use the assembler
|
||||
# directly.
|
||||
|
||||
define ASSEMBLE
|
||||
@echo "AS: $1"
|
||||
$(Q) $(AS) $(AFLAGS) $2 $1
|
||||
endef
|
||||
|
||||
MKDEP = $(TOPDIR)/tools/mkdeps.sh
|
||||
# Custom CLEAN definition
|
||||
|
||||
HOSTCC = gcc
|
||||
HOSTINCLUDES = -I.
|
||||
HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -g -pipe
|
||||
HOSTLDFLAGS =
|
||||
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
|
||||
define CLEAN
|
||||
$(Q) if exist *.o (del /f /q *.o)
|
||||
$(Q) if exist *.asm (del /f /q *.asm)
|
||||
$(Q) if exist *.rel (del /f /q *.rel)
|
||||
$(Q) if exist *.lst (del /f /q *.lst)
|
||||
$(Q) if exist *.rst (del /f /q *.rst)
|
||||
$(Q) if exist *.sym (del /f /q *.sym)
|
||||
$(Q) if exist *.adb (del /f /q *.adb)
|
||||
$(Q) if exist *.lnk (del /f /q *.lnk)
|
||||
$(Q) if exist *.map (del /f /q *.map)
|
||||
$(Q) if exist *.mem (del /f /q *.mem)
|
||||
$(Q) if exist *.hex (del /f /q *.hex)
|
||||
$(Q) if exist *.cmd (del /f /q *.cmd)
|
||||
endef
|
||||
else
|
||||
define CLEAN
|
||||
$(Q) rm -f *.o *.asm *.rel *.lst *.rst *.sym *.adb *.lnk *.map *.mem *.hex *.cmd
|
||||
endef
|
||||
endif
|
||||
|
||||
# Windows native host tool definitions
|
||||
|
||||
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
|
||||
HOSTCC = mingw32-gcc.exe
|
||||
HOSTINCLUDES = -I.
|
||||
HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -g -pipe
|
||||
HOSTLDFLAGS =
|
||||
HOSTEXEEXT = .exe
|
||||
|
||||
# Windows-native host tools
|
||||
|
||||
MKDEP = $(TOPDIR)\tools\mkdeps.exe --winnative
|
||||
else
|
||||
|
||||
# Linux/Cygwin host tool definitions
|
||||
|
||||
HOSTCC = gcc
|
||||
HOSTINCLUDES = -I.
|
||||
HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -g -pipe
|
||||
HOSTLDFLAGS =
|
||||
|
||||
# This is the tool to use for dependencies (i.e., none)
|
||||
|
||||
MKDEP = $(TOPDIR)$(DELIM)tools$(DELIM)mknulldeps.sh
|
||||
|
||||
# SDCC for Linux, OSX, or Cygwin understands symbolic links. Windows SDCC
|
||||
# running under Cygwin does not
|
||||
|
||||
ifeq ($(WINTOOL),y)
|
||||
DIRLINK = $(TOPDIR)$(DELIM)tools$(DELIM)winlink.sh
|
||||
DIRUNLINK = $(TOPDIR)$(DELIM)tools$(DELIM)unlink.sh
|
||||
else
|
||||
DIRLINK = $(TOPDIR)$(DELIM)tools$(DELIM)link.sh
|
||||
DIRUNLINK = $(TOPDIR)$(DELIM)tools$(DELIM)unlink.sh
|
||||
endif
|
||||
endif
|
||||
|
@ -36,56 +36,129 @@
|
||||
include ${TOPDIR}/.config
|
||||
include ${TOPDIR}/tools/Config.mk
|
||||
|
||||
CROSSDEV =
|
||||
CC = sdcc
|
||||
CPP = sdcpp
|
||||
AR = sdcclib -a
|
||||
# These are the directories where the SDCC 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.
|
||||
|
||||
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
|
||||
SDCC_INSTALLDIR = C:\PROGRA~2\SDCC
|
||||
SDCC_BINDIR = $(SDCC_INSTALLDIR)\bin
|
||||
SDCC_LIBDIR = $(SDCC_INSTALLDIR)\lib\z80
|
||||
else
|
||||
SDCC_INSTALLDIR = /usr/local
|
||||
SDCC_BINDIR = $(SDCC_INSTALLDIR)/bin
|
||||
SDCC_LIBDIR = $(SDCC_INSTALLDIR)/share/sdcc/lib/z80
|
||||
endif
|
||||
|
||||
CROSSDEV =
|
||||
CC = sdcc
|
||||
CPP = sdcpp
|
||||
AR = sdcclib -a
|
||||
|
||||
ifeq ($(CONFIG_SDCC_OLD),y)
|
||||
|
||||
LD = link-z80
|
||||
AS = as-z80
|
||||
ARCHCPUFLAGS = -mz80 --stack-auto --int-long-reent --float-reent
|
||||
|
||||
LD = link-z80
|
||||
AS = as-z80
|
||||
ARCHCPUFLAGS = -mz80 --stack-auto --int-long-reent --float-reent
|
||||
else
|
||||
|
||||
LD = sdldz80
|
||||
AS = sdasz80
|
||||
ARCHCPUFLAGS = -mz80
|
||||
|
||||
LD = sdldz80
|
||||
AS = sdasz80
|
||||
ARCHCPUFLAGS = -mz80
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
|
||||
ARCHOPTIMIZATION = --debug
|
||||
ARCHOPTIMIZATION = --debug
|
||||
else
|
||||
ARCHOPTIMIZATION =
|
||||
ARCHOPTIMIZATION =
|
||||
endif
|
||||
|
||||
ARCHPICFLAGS =
|
||||
ARCHWARNINGS =
|
||||
ARCHDEFINES =
|
||||
ARCHINCLUDES = -I. -I$(TOPDIR)/include
|
||||
ARCHPICFLAGS =
|
||||
ARCHWARNINGS =
|
||||
ARCHDEFINES =
|
||||
ARCHINCLUDES = -I. -I$(TOPDIR)$(DELIM)include
|
||||
|
||||
CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) \
|
||||
$(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
|
||||
CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
|
||||
ASFLAGS = -x -a -l -o -s
|
||||
CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
|
||||
CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
|
||||
AFLAGS = -x -a -l -o -s
|
||||
|
||||
SDCCLIBDIR = /usr/local/share/sdcc/lib/z80
|
||||
SDCCLIB = z80.lib
|
||||
SDCCLIB = z80.lib
|
||||
|
||||
ASMEXT = .asm
|
||||
OBJEXT = .o
|
||||
LIBEXT = .lib
|
||||
EXEEXT = .cmd
|
||||
ASMEXT = .asm
|
||||
OBJEXT = .o
|
||||
LIBEXT = .lib
|
||||
EXEEXT = .cmd
|
||||
|
||||
define CLEAN
|
||||
@rm -f *.o *.asm *.rel *.lst *.rst *.sym *.adb *.lnk *.map *.mem *.hex
|
||||
# Custom ASSEMBLE definition. The most common toolchain, GCC, uses the
|
||||
# compiler to assemble files because this has the advantage of running the C
|
||||
# Pre-Processor against. This is not possible with other SDCC; we need to
|
||||
# define AS and over-ride the common definition in order to use the assembler
|
||||
# directly.
|
||||
|
||||
define ASSEMBLE
|
||||
@echo "AS: $1"
|
||||
$(Q) $(AS) $(AFLAGS) $2 $1
|
||||
endef
|
||||
|
||||
MKDEP = $(TOPDIR)/tools/mkdeps.sh
|
||||
# Custom CLEAN definition
|
||||
|
||||
HOSTCC = gcc
|
||||
HOSTINCLUDES = -I.
|
||||
HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -g -pipe
|
||||
HOSTLDFLAGS =
|
||||
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
|
||||
define CLEAN
|
||||
$(Q) if exist *.o (del /f /q *.o)
|
||||
$(Q) if exist *.asm (del /f /q *.asm)
|
||||
$(Q) if exist *.rel (del /f /q *.rel)
|
||||
$(Q) if exist *.lst (del /f /q *.lst)
|
||||
$(Q) if exist *.rst (del /f /q *.rst)
|
||||
$(Q) if exist *.sym (del /f /q *.sym)
|
||||
$(Q) if exist *.adb (del /f /q *.adb)
|
||||
$(Q) if exist *.lnk (del /f /q *.lnk)
|
||||
$(Q) if exist *.map (del /f /q *.map)
|
||||
$(Q) if exist *.mem (del /f /q *.mem)
|
||||
$(Q) if exist *.hex (del /f /q *.hex)
|
||||
$(Q) if exist *.cmd (del /f /q *.cmd)
|
||||
endef
|
||||
else
|
||||
define CLEAN
|
||||
$(Q) rm -f *.o *.asm *.rel *.lst *.rst *.sym *.adb *.lnk *.map *.mem *.hex *.cmd
|
||||
endef
|
||||
endif
|
||||
|
||||
# Windows native host tool definitions
|
||||
|
||||
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
|
||||
HOSTCC = mingw32-gcc.exe
|
||||
HOSTINCLUDES = -I.
|
||||
HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -g -pipe
|
||||
HOSTLDFLAGS =
|
||||
HOSTEXEEXT = .exe
|
||||
|
||||
# Windows-native host tools
|
||||
|
||||
MKDEP = $(TOPDIR)\tools\mkdeps.exe --winnative
|
||||
else
|
||||
|
||||
# Linux/Cygwin host tool definitions
|
||||
|
||||
HOSTCC = gcc
|
||||
HOSTINCLUDES = -I.
|
||||
HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -g -pipe
|
||||
HOSTLDFLAGS =
|
||||
|
||||
# This is the tool to use for dependencies (i.e., none)
|
||||
|
||||
MKDEP = $(TOPDIR)$(DELIM)tools$(DELIM)mknulldeps.sh
|
||||
|
||||
# SDCC for Linux, OSX, or Cygwin understands symbolic links. Windows SDCC
|
||||
# running under Cygwin does not
|
||||
|
||||
ifeq ($(WINTOOL),y)
|
||||
DIRLINK = $(TOPDIR)$(DELIM)tools$(DELIM)winlink.sh
|
||||
DIRUNLINK = $(TOPDIR)$(DELIM)tools$(DELIM)unlink.sh
|
||||
else
|
||||
DIRLINK = $(TOPDIR)$(DELIM)tools$(DELIM)link.sh
|
||||
DIRUNLINK = $(TOPDIR)$(DELIM)tools$(DELIM)unlink.sh
|
||||
endif
|
||||
endif
|
||||
|
@ -41,11 +41,38 @@ Configuring NuttX
|
||||
b. Execute 'make menuconfig' in nuttx/ in order to start the
|
||||
reconfiguration process.
|
||||
|
||||
2. The current configuration is untested. When last attempted
|
||||
on Ubuntu 12.10 with SDCC 3.2.0, the build failed with the
|
||||
following internal error:
|
||||
2. The default setup for this configuration uses a windows native build.
|
||||
NOTE that build does *NOT* work build successfully using SDCC 3.2.0:
|
||||
Windows halts claiming that sdcclib is no long responding. 3.2.0 is
|
||||
the latest released version as of this writing. This problem has,
|
||||
apparently been corrected in the repository; a snapshot data 11-23-2012
|
||||
(3.2.1) did not have this problem.
|
||||
|
||||
*** glibc detected *** sdcclib: malloc(): memory corruption: 0x09f09768 ***
|
||||
This configuration was last verified sucessfully prior to the
|
||||
the configure to Kconfig/mconf tool using SDCC 2.6.0 built to run
|
||||
natively under Cygwin.
|
||||
|
||||
3. This configuration can be converted to run under Linux (or Cygwin or
|
||||
OSX), by modifying the configuration file as follows:
|
||||
|
||||
-CONFIG_HOST_WINDOWS=y
|
||||
-CONFIG_WINDOWS_NATIVE=y
|
||||
+CONFIG_HOST_LINUX=y
|
||||
|
||||
-CONFIG_Z80_TOOLCHAIN_SDCCW=y
|
||||
+CONFIG_Z80_TOOLCHAIN_SDCCL=y
|
||||
|
||||
You make also have to change the value of CONFIG_APPS_DIR. You cannot
|
||||
use the default setenv.bat. Use configs/z80sim/script/setenv.sh instead.
|
||||
|
||||
When last attempted on Ubuntu 12.10 with SDCC 3.2.0 for Linux, the build
|
||||
failed with the following internal error:
|
||||
|
||||
*** glibc detected *** sdcclib: malloc(): memory corruption: 0x09f09768 ***
|
||||
|
||||
I believe that this is related to the sdcclib error also reported under
|
||||
windows for SDCC 3.2.0. It can probably also be avoided by updating to
|
||||
a more recent snapshot.
|
||||
|
||||
nsh
|
||||
|
||||
|
@ -36,56 +36,129 @@
|
||||
include ${TOPDIR}/.config
|
||||
include ${TOPDIR}/tools/Config.mk
|
||||
|
||||
CROSSDEV =
|
||||
CC = sdcc
|
||||
CPP = sdcpp
|
||||
AR = sdcclib -a
|
||||
# These are the directories where the SDCC 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.
|
||||
|
||||
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
|
||||
SDCC_INSTALLDIR = C:\PROGRA~2\SDCC
|
||||
SDCC_BINDIR = $(SDCC_INSTALLDIR)\bin
|
||||
SDCC_LIBDIR = $(SDCC_INSTALLDIR)\lib\z80
|
||||
else
|
||||
SDCC_INSTALLDIR = /usr/local
|
||||
SDCC_BINDIR = $(SDCC_INSTALLDIR)/bin
|
||||
SDCC_LIBDIR = $(SDCC_INSTALLDIR)/share/sdcc/lib/z80
|
||||
endif
|
||||
|
||||
CROSSDEV =
|
||||
CC = sdcc
|
||||
CPP = sdcpp
|
||||
AR = sdcclib -a
|
||||
|
||||
ifeq ($(CONFIG_SDCC_OLD),y)
|
||||
|
||||
LD = link-z80
|
||||
AS = as-z80
|
||||
ARCHCPUFLAGS = -mz80 --stack-auto --int-long-reent --float-reent
|
||||
|
||||
LD = link-z80
|
||||
AS = as-z80
|
||||
ARCHCPUFLAGS = -mz80 --stack-auto --int-long-reent --float-reent
|
||||
else
|
||||
|
||||
LD = sdldz80
|
||||
AS = sdasz80
|
||||
ARCHCPUFLAGS = -mz80
|
||||
|
||||
LD = sdldz80
|
||||
AS = sdasz80
|
||||
ARCHCPUFLAGS = -mz80
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
|
||||
ARCHOPTIMIZATION = --debug
|
||||
ARCHOPTIMIZATION = --debug
|
||||
else
|
||||
ARCHOPTIMIZATION =
|
||||
ARCHOPTIMIZATION =
|
||||
endif
|
||||
|
||||
ARCHPICFLAGS =
|
||||
ARCHWARNINGS =
|
||||
ARCHDEFINES =
|
||||
ARCHINCLUDES = -I. -I$(TOPDIR)/include
|
||||
ARCHPICFLAGS =
|
||||
ARCHWARNINGS =
|
||||
ARCHDEFINES =
|
||||
ARCHINCLUDES = -I. -I$(TOPDIR)$(DELIM)include
|
||||
|
||||
CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) \
|
||||
$(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
|
||||
CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
|
||||
ASFLAGS = -x -a -l -o -s
|
||||
CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
|
||||
CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
|
||||
AFLAGS = -x -a -l -o -s
|
||||
|
||||
SDCCLIBDIR = /usr/local/share/sdcc/lib/z80
|
||||
SDCCLIB = z80.lib
|
||||
SDCCLIB = z80.lib
|
||||
|
||||
ASMEXT = .asm
|
||||
OBJEXT = .o
|
||||
LIBEXT = .lib
|
||||
EXEEXT = .hex
|
||||
ASMEXT = .asm
|
||||
OBJEXT = .o
|
||||
LIBEXT = .lib
|
||||
EXEEXT = .hex
|
||||
|
||||
define CLEAN
|
||||
@rm -f *.o *.asm *.rel *.lst *.rst *.sym *.adb *.lnk *.map *.mem *.hex
|
||||
# Custom ASSEMBLE definition. The most common toolchain, GCC, uses the
|
||||
# compiler to assemble files because this has the advantage of running the C
|
||||
# Pre-Processor against. This is not possible with other SDCC; we need to
|
||||
# define AS and over-ride the common definition in order to use the assembler
|
||||
# directly.
|
||||
|
||||
define ASSEMBLE
|
||||
@echo "AS: $1"
|
||||
$(Q) $(AS) $(AFLAGS) $2 $1
|
||||
endef
|
||||
|
||||
MKDEP = $(TOPDIR)/tools/mkdeps.sh
|
||||
# Custom CLEAN definition
|
||||
|
||||
HOSTCC = gcc
|
||||
HOSTINCLUDES = -I.
|
||||
HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -g -pipe
|
||||
HOSTLDFLAGS =
|
||||
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
|
||||
define CLEAN
|
||||
$(Q) if exist *.o (del /f /q *.o)
|
||||
$(Q) if exist *.asm (del /f /q *.asm)
|
||||
$(Q) if exist *.rel (del /f /q *.rel)
|
||||
$(Q) if exist *.lst (del /f /q *.lst)
|
||||
$(Q) if exist *.rst (del /f /q *.rst)
|
||||
$(Q) if exist *.sym (del /f /q *.sym)
|
||||
$(Q) if exist *.adb (del /f /q *.adb)
|
||||
$(Q) if exist *.lnk (del /f /q *.lnk)
|
||||
$(Q) if exist *.map (del /f /q *.map)
|
||||
$(Q) if exist *.mem (del /f /q *.mem)
|
||||
$(Q) if exist *.hex (del /f /q *.hex)
|
||||
$(Q) if exist *.cmd (del /f /q *.cmd)
|
||||
endef
|
||||
else
|
||||
define CLEAN
|
||||
$(Q) rm -f *.o *.asm *.rel *.lst *.rst *.sym *.adb *.lnk *.map *.mem *.hex *.cmd
|
||||
endef
|
||||
endif
|
||||
|
||||
# Windows native host tool definitions
|
||||
|
||||
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
|
||||
HOSTCC = mingw32-gcc.exe
|
||||
HOSTINCLUDES = -I.
|
||||
HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -g -pipe
|
||||
HOSTLDFLAGS =
|
||||
HOSTEXEEXT = .exe
|
||||
|
||||
# Windows-native host tools
|
||||
|
||||
MKDEP = $(TOPDIR)\tools\mkdeps.exe --winnative
|
||||
else
|
||||
|
||||
# Linux/Cygwin host tool definitions
|
||||
|
||||
HOSTCC = gcc
|
||||
HOSTINCLUDES = -I.
|
||||
HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -g -pipe
|
||||
HOSTLDFLAGS =
|
||||
|
||||
# This is the tool to use for dependencies (i.e., none)
|
||||
|
||||
MKDEP = $(TOPDIR)$(DELIM)tools$(DELIM)mknulldeps.sh
|
||||
|
||||
# SDCC for Linux, OSX, or Cygwin understands symbolic links. Windows SDCC
|
||||
# running under Cygwin does not
|
||||
|
||||
ifeq ($(WINTOOL),y)
|
||||
DIRLINK = $(TOPDIR)$(DELIM)tools$(DELIM)winlink.sh
|
||||
DIRUNLINK = $(TOPDIR)$(DELIM)tools$(DELIM)unlink.sh
|
||||
else
|
||||
DIRLINK = $(TOPDIR)$(DELIM)tools$(DELIM)link.sh
|
||||
DIRUNLINK = $(TOPDIR)$(DELIM)tools$(DELIM)unlink.sh
|
||||
endif
|
||||
endif
|
||||
|
@ -36,56 +36,129 @@
|
||||
include ${TOPDIR}/.config
|
||||
include ${TOPDIR}/tools/Config.mk
|
||||
|
||||
CROSSDEV =
|
||||
CC = sdcc
|
||||
CPP = sdcpp
|
||||
AR = sdcclib -a
|
||||
# These are the directories where the SDCC 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.
|
||||
|
||||
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
|
||||
SDCC_INSTALLDIR = C:\PROGRA~2\SDCC
|
||||
SDCC_BINDIR = $(SDCC_INSTALLDIR)\bin
|
||||
SDCC_LIBDIR = $(SDCC_INSTALLDIR)\lib\z80
|
||||
else
|
||||
SDCC_INSTALLDIR = /usr/local
|
||||
SDCC_BINDIR = $(SDCC_INSTALLDIR)/bin
|
||||
SDCC_LIBDIR = $(SDCC_INSTALLDIR)/share/sdcc/lib/z80
|
||||
endif
|
||||
|
||||
CROSSDEV =
|
||||
CC = sdcc
|
||||
CPP = sdcpp
|
||||
AR = sdcclib -a
|
||||
|
||||
ifeq ($(CONFIG_SDCC_OLD),y)
|
||||
|
||||
LD = link-z80
|
||||
AS = as-z80
|
||||
ARCHCPUFLAGS = -mz80 --stack-auto --int-long-reent --float-reent
|
||||
|
||||
LD = link-z80
|
||||
AS = as-z80
|
||||
ARCHCPUFLAGS = -mz80 --stack-auto --int-long-reent --float-reent
|
||||
else
|
||||
|
||||
LD = sdldz80
|
||||
AS = sdasz80
|
||||
ARCHCPUFLAGS = -mz80
|
||||
|
||||
LD = sdldz80
|
||||
AS = sdasz80
|
||||
ARCHCPUFLAGS = -mz80
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
|
||||
ARCHOPTIMIZATION = --debug
|
||||
ARCHOPTIMIZATION = --debug
|
||||
else
|
||||
ARCHOPTIMIZATION =
|
||||
ARCHOPTIMIZATION =
|
||||
endif
|
||||
|
||||
ARCHPICFLAGS =
|
||||
ARCHWARNINGS =
|
||||
ARCHDEFINES =
|
||||
ARCHINCLUDES = -I. -I$(TOPDIR)/include
|
||||
ARCHPICFLAGS =
|
||||
ARCHWARNINGS =
|
||||
ARCHDEFINES =
|
||||
ARCHINCLUDES = -I. -I$(TOPDIR)$(DELIM)include
|
||||
|
||||
CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) \
|
||||
$(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
|
||||
CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
|
||||
ASFLAGS = -x -a -l -o -s
|
||||
CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
|
||||
CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
|
||||
AFLAGS = -x -a -l -o -s
|
||||
|
||||
SDCCLIBDIR = /usr/local/share/sdcc/lib/z80
|
||||
SDCCLIB = z80.lib
|
||||
SDCCLIB = z80.lib
|
||||
|
||||
ASMEXT = .asm
|
||||
OBJEXT = .o
|
||||
LIBEXT = .lib
|
||||
EXEEXT = .hex
|
||||
ASMEXT = .asm
|
||||
OBJEXT = .o
|
||||
LIBEXT = .lib
|
||||
EXEEXT = .hex
|
||||
|
||||
define CLEAN
|
||||
@rm -f *.o *.asm *.rel *.lst *.rst *.sym *.adb *.lnk *.map *.mem *.hex
|
||||
# Custom ASSEMBLE definition. The most common toolchain, GCC, uses the
|
||||
# compiler to assemble files because this has the advantage of running the C
|
||||
# Pre-Processor against. This is not possible with other SDCC; we need to
|
||||
# define AS and over-ride the common definition in order to use the assembler
|
||||
# directly.
|
||||
|
||||
define ASSEMBLE
|
||||
@echo "AS: $1"
|
||||
$(Q) $(AS) $(AFLAGS) $2 $1
|
||||
endef
|
||||
|
||||
MKDEP = $(TOPDIR)/tools/mkdeps.sh
|
||||
# Custom CLEAN definition
|
||||
|
||||
HOSTCC = gcc
|
||||
HOSTINCLUDES = -I.
|
||||
HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -g -pipe
|
||||
HOSTLDFLAGS =
|
||||
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
|
||||
define CLEAN
|
||||
$(Q) if exist *.o (del /f /q *.o)
|
||||
$(Q) if exist *.asm (del /f /q *.asm)
|
||||
$(Q) if exist *.rel (del /f /q *.rel)
|
||||
$(Q) if exist *.lst (del /f /q *.lst)
|
||||
$(Q) if exist *.rst (del /f /q *.rst)
|
||||
$(Q) if exist *.sym (del /f /q *.sym)
|
||||
$(Q) if exist *.adb (del /f /q *.adb)
|
||||
$(Q) if exist *.lnk (del /f /q *.lnk)
|
||||
$(Q) if exist *.map (del /f /q *.map)
|
||||
$(Q) if exist *.mem (del /f /q *.mem)
|
||||
$(Q) if exist *.hex (del /f /q *.hex)
|
||||
$(Q) if exist *.cmd (del /f /q *.cmd)
|
||||
endef
|
||||
else
|
||||
define CLEAN
|
||||
$(Q) rm -f *.o *.asm *.rel *.lst *.rst *.sym *.adb *.lnk *.map *.mem *.hex *.cmd
|
||||
endef
|
||||
endif
|
||||
|
||||
# Windows native host tool definitions
|
||||
|
||||
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
|
||||
HOSTCC = mingw32-gcc.exe
|
||||
HOSTINCLUDES = -I.
|
||||
HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -g -pipe
|
||||
HOSTLDFLAGS =
|
||||
HOSTEXEEXT = .exe
|
||||
|
||||
# Windows-native host tools
|
||||
|
||||
MKDEP = $(TOPDIR)\tools\mkdeps.exe --winnative
|
||||
else
|
||||
|
||||
# Linux/Cygwin host tool definitions
|
||||
|
||||
HOSTCC = gcc
|
||||
HOSTINCLUDES = -I.
|
||||
HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -g -pipe
|
||||
HOSTLDFLAGS =
|
||||
|
||||
# This is the tool to use for dependencies (i.e., none)
|
||||
|
||||
MKDEP = $(TOPDIR)$(DELIM)tools$(DELIM)mknulldeps.sh
|
||||
|
||||
# SDCC for Linux, OSX, or Cygwin understands symbolic links. Windows SDCC
|
||||
# running under Cygwin does not
|
||||
|
||||
ifeq ($(WINTOOL),y)
|
||||
DIRLINK = $(TOPDIR)$(DELIM)tools$(DELIM)winlink.sh
|
||||
DIRUNLINK = $(TOPDIR)$(DELIM)tools$(DELIM)unlink.sh
|
||||
else
|
||||
DIRLINK = $(TOPDIR)$(DELIM)tools$(DELIM)link.sh
|
||||
DIRUNLINK = $(TOPDIR)$(DELIM)tools$(DELIM)unlink.sh
|
||||
endif
|
||||
endif
|
||||
|
@ -8,15 +8,20 @@ CONFIG_NUTTX_NEWCONFIG=y
|
||||
# Build Setup
|
||||
#
|
||||
# CONFIG_EXPERIMENTAL is not set
|
||||
CONFIG_HOST_LINUX=y
|
||||
# CONFIG_HOST_LINUX is not set
|
||||
# CONFIG_HOST_OSX is not set
|
||||
# CONFIG_HOST_WINDOWS is not set
|
||||
CONFIG_HOST_WINDOWS=y
|
||||
# CONFIG_HOST_OTHER is not set
|
||||
CONFIG_WINDOWS_NATIVE=y
|
||||
# CONFIG_WINDOWS_CYGWIN is not set
|
||||
# CONFIG_WINDOWS_MSYS is not set
|
||||
# CONFIG_WINDOWS_OTHER is not set
|
||||
# CONFIG_WINDOWS_MKLINK is not set
|
||||
|
||||
#
|
||||
# Build Configuration
|
||||
#
|
||||
# CONFIG_APPS_DIR="../apps"
|
||||
# CONFIG_APPS_DIR="..\apps"
|
||||
# CONFIG_BUILD_2PASS is not set
|
||||
|
||||
#
|
||||
@ -64,7 +69,8 @@ CONFIG_ARCH_CHIP_Z80=y
|
||||
# CONFIG_ARCH_CHIP_EZ80F91 is not set
|
||||
# CONFIG_ARCH_CHIP_EZ80F92 is not set
|
||||
# CONFIG_ARCH_CHIP_EZ80F93 is not set
|
||||
CONFIG_Z80_TOOLCHAIN_SDCCL=y
|
||||
# CONFIG_Z80_TOOLCHAIN_SDCCL is not set
|
||||
CONFIG_Z80_TOOLCHAIN_SDCCW=y
|
||||
|
||||
#
|
||||
# Architecture Options
|
||||
|
50
configs/z80sim/ostest/setenv.bat
Normal file
50
configs/z80sim/ostest/setenv.bat
Normal file
@ -0,0 +1,50 @@
|
||||
@echo off
|
||||
|
||||
rem configs/z80sim/ostest/setenv.bat
|
||||
rem
|
||||
rem Copyright (C) 2012 Gregory Nutt. All rights reserved.
|
||||
rem Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
rem
|
||||
rem Redistribution and use in source and binary forms, with or without
|
||||
rem modification, are permitted provided that the following conditions
|
||||
rem are met:
|
||||
rem
|
||||
rem 1. Redistributions of source code must retain the above copyright
|
||||
rem notice, this list of conditions and the following disclaimer.
|
||||
rem 2. Redistributions in binary form must reproduce the above copyright
|
||||
rem notice, this list of conditions and the following disclaimer in
|
||||
rem the documentation and/or other materials provided with the
|
||||
rem distribution.
|
||||
rem 3. Neither the name NuttX nor the names of its contributors may be
|
||||
rem used to endorse or promote products derived from this software
|
||||
rem without specific prior written permission.
|
||||
rem
|
||||
rem THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
rem "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
rem LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
rem FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
rem COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
rem INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
rem BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
rem OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
rem AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
rem LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
rem ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
rem POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
rem This is the location where I installed in the MinGW compiler. With
|
||||
rem this configuration, it is recommended that you do NOT install the
|
||||
rem MSYS tools; they conflict with the GNUWin32 tools. See
|
||||
rem http://www.mingw.org/ for further info.
|
||||
|
||||
set PATH=C:\MinGW\bin;%PATH%
|
||||
|
||||
rem This is the location where I installed the SDCC toolchain for windows.
|
||||
|
||||
set PATH=C:\Program Files (x86)\SDCC/bin;%PATH%
|
||||
|
||||
rem This is the location where I installed the GNUWin32 tools. See
|
||||
rem http://gnuwin32.sourceforge.net/.
|
||||
|
||||
set PATH=C:\gnuwin32\bin;%PATH%
|
||||
echo %PATH%
|
@ -36,56 +36,129 @@
|
||||
include ${TOPDIR}/.config
|
||||
include ${TOPDIR}/tools/Config.mk
|
||||
|
||||
CROSSDEV =
|
||||
CC = sdcc
|
||||
CPP = sdcpp
|
||||
AR = sdcclib -a
|
||||
# These are the directories where the SDCC 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.
|
||||
|
||||
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
|
||||
SDCC_INSTALLDIR = C:\PROGRA~2\SDCC
|
||||
SDCC_BINDIR = $(SDCC_INSTALLDIR)\bin
|
||||
SDCC_LIBDIR = $(SDCC_INSTALLDIR)\lib\z80
|
||||
else
|
||||
SDCC_INSTALLDIR = /usr/local
|
||||
SDCC_BINDIR = $(SDCC_INSTALLDIR)/bin
|
||||
SDCC_LIBDIR = $(SDCC_INSTALLDIR)/share/sdcc/lib/z80
|
||||
endif
|
||||
|
||||
CROSSDEV =
|
||||
CC = sdcc
|
||||
CPP = sdcpp
|
||||
AR = sdcclib -a
|
||||
|
||||
ifeq ($(CONFIG_SDCC_OLD),y)
|
||||
|
||||
LD = link-z80
|
||||
AS = as-z80
|
||||
ARCHCPUFLAGS = -mz80 --stack-auto --int-long-reent --float-reent
|
||||
|
||||
LD = link-z80
|
||||
AS = as-z80
|
||||
ARCHCPUFLAGS = -mz80 --stack-auto --int-long-reent --float-reent
|
||||
else
|
||||
|
||||
LD = sdldz80
|
||||
AS = sdasz80
|
||||
ARCHCPUFLAGS = -mz80
|
||||
|
||||
LD = sdldz80
|
||||
AS = sdasz80
|
||||
ARCHCPUFLAGS = -mz80
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
|
||||
ARCHOPTIMIZATION = --debug
|
||||
ARCHOPTIMIZATION = --debug
|
||||
else
|
||||
ARCHOPTIMIZATION =
|
||||
ARCHOPTIMIZATION =
|
||||
endif
|
||||
|
||||
ARCHPICFLAGS =
|
||||
ARCHWARNINGS =
|
||||
ARCHDEFINES =
|
||||
ARCHINCLUDES = -I. -I$(TOPDIR)/include
|
||||
ARCHPICFLAGS =
|
||||
ARCHWARNINGS =
|
||||
ARCHDEFINES =
|
||||
ARCHINCLUDES = -I. -I$(TOPDIR)$(DELIM)include
|
||||
|
||||
CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) \
|
||||
$(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
|
||||
CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
|
||||
ASFLAGS = -x -a -l -o -s
|
||||
CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
|
||||
CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
|
||||
AFLAGS = -x -a -l -o -s
|
||||
|
||||
SDCCLIBDIR = /usr/local/share/sdcc/lib/z80
|
||||
SDCCLIB = z80.lib
|
||||
SDCCLIB = z80.lib
|
||||
|
||||
ASMEXT = .asm
|
||||
OBJEXT = .o
|
||||
LIBEXT = .lib
|
||||
EXEEXT = .hex
|
||||
ASMEXT = .asm
|
||||
OBJEXT = .o
|
||||
LIBEXT = .lib
|
||||
EXEEXT = .hex
|
||||
|
||||
define CLEAN
|
||||
@rm -f *.o *.asm *.rel *.lst *.rst *.sym *.adb *.lnk *.map *.mem *.hex
|
||||
# Custom ASSEMBLE definition. The most common toolchain, GCC, uses the
|
||||
# compiler to assemble files because this has the advantage of running the C
|
||||
# Pre-Processor against. This is not possible with other SDCC; we need to
|
||||
# define AS and over-ride the common definition in order to use the assembler
|
||||
# directly.
|
||||
|
||||
define ASSEMBLE
|
||||
@echo "AS: $1"
|
||||
$(Q) $(AS) $(AFLAGS) $2 $1
|
||||
endef
|
||||
|
||||
MKDEP = $(TOPDIR)/tools/mkdeps.sh
|
||||
# Custom CLEAN definition
|
||||
|
||||
HOSTCC = gcc
|
||||
HOSTINCLUDES = -I.
|
||||
HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -g -pipe
|
||||
HOSTLDFLAGS =
|
||||
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
|
||||
define CLEAN
|
||||
$(Q) if exist *.o (del /f /q *.o)
|
||||
$(Q) if exist *.asm (del /f /q *.asm)
|
||||
$(Q) if exist *.rel (del /f /q *.rel)
|
||||
$(Q) if exist *.lst (del /f /q *.lst)
|
||||
$(Q) if exist *.rst (del /f /q *.rst)
|
||||
$(Q) if exist *.sym (del /f /q *.sym)
|
||||
$(Q) if exist *.adb (del /f /q *.adb)
|
||||
$(Q) if exist *.lnk (del /f /q *.lnk)
|
||||
$(Q) if exist *.map (del /f /q *.map)
|
||||
$(Q) if exist *.mem (del /f /q *.mem)
|
||||
$(Q) if exist *.hex (del /f /q *.hex)
|
||||
$(Q) if exist *.cmd (del /f /q *.cmd)
|
||||
endef
|
||||
else
|
||||
define CLEAN
|
||||
$(Q) rm -f *.o *.asm *.rel *.lst *.rst *.sym *.adb *.lnk *.map *.mem *.hex *.cmd
|
||||
endef
|
||||
endif
|
||||
|
||||
# Windows native host tool definitions
|
||||
|
||||
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
|
||||
HOSTCC = mingw32-gcc.exe
|
||||
HOSTINCLUDES = -I.
|
||||
HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -g -pipe
|
||||
HOSTLDFLAGS =
|
||||
HOSTEXEEXT = .exe
|
||||
|
||||
# Windows-native host tools
|
||||
|
||||
MKDEP = $(TOPDIR)\tools\mkdeps.exe --winnative
|
||||
else
|
||||
|
||||
# Linux/Cygwin host tool definitions
|
||||
|
||||
HOSTCC = gcc
|
||||
HOSTINCLUDES = -I.
|
||||
HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -g -pipe
|
||||
HOSTLDFLAGS =
|
||||
|
||||
# This is the tool to use for dependencies (i.e., none)
|
||||
|
||||
MKDEP = $(TOPDIR)$(DELIM)tools$(DELIM)mknulldeps.sh
|
||||
|
||||
# SDCC for Linux, OSX, or Cygwin understands symbolic links. Windows SDCC
|
||||
# running under Cygwin does not
|
||||
|
||||
ifeq ($(WINTOOL),y)
|
||||
DIRLINK = $(TOPDIR)$(DELIM)tools$(DELIM)winlink.sh
|
||||
DIRUNLINK = $(TOPDIR)$(DELIM)tools$(DELIM)unlink.sh
|
||||
else
|
||||
DIRLINK = $(TOPDIR)$(DELIM)tools$(DELIM)link.sh
|
||||
DIRUNLINK = $(TOPDIR)$(DELIM)tools$(DELIM)unlink.sh
|
||||
endif
|
||||
endif
|
||||
|
50
configs/z80sim/scripts/setenv.bat
Normal file
50
configs/z80sim/scripts/setenv.bat
Normal file
@ -0,0 +1,50 @@
|
||||
@echo off
|
||||
|
||||
rem configs/z80sim/scripts/setenv.bat
|
||||
rem
|
||||
rem Copyright (C) 2012 Gregory Nutt. All rights reserved.
|
||||
rem Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
rem
|
||||
rem Redistribution and use in source and binary forms, with or without
|
||||
rem modification, are permitted provided that the following conditions
|
||||
rem are met:
|
||||
rem
|
||||
rem 1. Redistributions of source code must retain the above copyright
|
||||
rem notice, this list of conditions and the following disclaimer.
|
||||
rem 2. Redistributions in binary form must reproduce the above copyright
|
||||
rem notice, this list of conditions and the following disclaimer in
|
||||
rem the documentation and/or other materials provided with the
|
||||
rem distribution.
|
||||
rem 3. Neither the name NuttX nor the names of its contributors may be
|
||||
rem used to endorse or promote products derived from this software
|
||||
rem without specific prior written permission.
|
||||
rem
|
||||
rem THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
rem "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
rem LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
rem FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
rem COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
rem INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
rem BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
rem OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
||||
rem AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
rem LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
rem ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
rem POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
rem This is the location where I installed in the MinGW compiler. With
|
||||
rem this configuration, it is recommended that you do NOT install the
|
||||
rem MSYS tools; they conflict with the GNUWin32 tools. See
|
||||
rem http://www.mingw.org/ for further info.
|
||||
|
||||
set PATH=C:\MinGW\bin;%PATH%
|
||||
|
||||
rem This is the location where I installed the SDCC toolchain for windows.
|
||||
|
||||
set PATH=C:\Program Files (x86)\SDCC/bin;%PATH%
|
||||
|
||||
rem This is the location where I installed the GNUWin32 tools. See
|
||||
rem http://gnuwin32.sourceforge.net/.
|
||||
|
||||
set PATH=C:\gnuwin32\bin;%PATH%
|
||||
echo %PATH%
|
@ -1,7 +1,7 @@
|
||||
#!/bin/bash
|
||||
# configs/z80sim/ostest/setenv.sh
|
||||
#
|
||||
# Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
# Copyright (C) 2007, 2008, 2012 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
@ -32,14 +32,35 @@
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
if [ "$(basename $0)" = "setenv.sh" ] ; then
|
||||
if [ "$_" = "$0" ] ; then
|
||||
echo "You must source this script, not run it!" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z ${PATH_ORIG} ]; then export PATH_ORIG=${PATH}; fi
|
||||
WD=`pwd`
|
||||
if [ ! -x "setenv.sh" ]; then
|
||||
echo "This script must be executed from the top-level NuttX build directory"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
export SDCC_BIN=/usr/local/bin
|
||||
export PATH=${SDCC_BIN}:/sbin:/usr/sbin:${PATH_ORIG}
|
||||
if [ -z "${PATH_ORIG}" ]; then
|
||||
export PATH_ORIG="${PATH}"
|
||||
fi
|
||||
|
||||
#
|
||||
# This is the normal installation directory for SDCC under Linux, OSX
|
||||
# or Linux:
|
||||
#
|
||||
export TOOLCHAIN_BIN=/usr/local/bin
|
||||
|
||||
#
|
||||
# This is the normal installation directory for SDCC under Windows
|
||||
#
|
||||
#export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/SDCC/bin"
|
||||
|
||||
#
|
||||
# Add the path to the toolchain to the PATH varialble
|
||||
#
|
||||
export PATH="${TOOLCHAIN_BIN}":/sbin:/usr/sbin:${PATH_ORIG}
|
||||
|
||||
echo "PATH : ${PATH}"
|
Loading…
Reference in New Issue
Block a user