From bf8d0c68312793631ed4ade1541ec36168b3722b Mon Sep 17 00:00:00 2001 From: patacongo Date: Thu, 13 Sep 2012 22:04:47 +0000 Subject: Fixes for z80 compilation with SDCC toolchain. There are still a few header file and linker issues git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5149 42af7a65-404d-4744-a932-0658087f49c3 --- nuttx/configs/xtrs/nsh/Make.defs | 39 +++++++++++++++++++++++++-------------- nuttx/configs/xtrs/nsh/defconfig | 2 +- nuttx/configs/xtrs/nsh/setenv.sh | 2 +- 3 files changed, 27 insertions(+), 16 deletions(-) (limited to 'nuttx/configs/xtrs/nsh') diff --git a/nuttx/configs/xtrs/nsh/Make.defs b/nuttx/configs/xtrs/nsh/Make.defs index e1d147dc4..947deb5af 100644 --- a/nuttx/configs/xtrs/nsh/Make.defs +++ b/nuttx/configs/xtrs/nsh/Make.defs @@ -1,5 +1,5 @@ ############################################################################ -# configs/xtrs/Make.defs +# configs/xtrs/nsh/Make.defs # # Copyright (C) 2007, 2008, 2012 Gregory Nutt. All rights reserved. # Author: Gregory Nutt @@ -36,27 +36,38 @@ include ${TOPDIR}/.config include ${TOPDIR}/tools/Config.mk -ifeq ("${CONFIG_DEBUG_SYMBOLS}","y") +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 + +else + +LD = sdldz80 +AS = sdasz80 +ARCHCPUFLAGS = -mz80 + +endif + +ifeq ($(CONFIG_DEBUG_SYMBOLS),y) ARCHOPTIMIZATION = --debug else ARCHOPTIMIZATION = endif -ARCHCPUFLAGS = -mz80 --stack-auto --int-long-reent --float-reent -ARCHPICFLAGS = -ARCHWARNINGS = +ARCHPICFLAGS = +ARCHWARNINGS = ARCHDEFINES = -ARCHINCLUDES = -I. -I$(TOPDIR)/include - -CROSSDEV = -CC = sdcc -CPP = sdcpp -LD = link-z80 -AS = as-z80 -AR = sdcclib -a +ARCHINCLUDES = -I. -I$(TOPDIR)/include CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) \ - $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) + $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) ASFLAGS = -x -a -l -o -s diff --git a/nuttx/configs/xtrs/nsh/defconfig b/nuttx/configs/xtrs/nsh/defconfig index 76f4e7fa9..b8bd5d6f2 100644 --- a/nuttx/configs/xtrs/nsh/defconfig +++ b/nuttx/configs/xtrs/nsh/defconfig @@ -1,5 +1,5 @@ ############################################################################ -# sim/xtrs/nsh/defconfig +# configs/xtrs/nsh/defconfig # # Copyright (C) 2007-2010, 2012 Gregory Nutt. All rights reserved. # Author: Gregory Nutt diff --git a/nuttx/configs/xtrs/nsh/setenv.sh b/nuttx/configs/xtrs/nsh/setenv.sh index c59e0abc1..99d45f97a 100755 --- a/nuttx/configs/xtrs/nsh/setenv.sh +++ b/nuttx/configs/xtrs/nsh/setenv.sh @@ -1,5 +1,5 @@ #!/bin/bash -# xtrs/setenv.sh +# configs/xtrs/nsh/setenv.sh # # Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. # Author: Gregory Nutt -- cgit v1.2.3