summaryrefslogtreecommitdiff
path: root/nuttx/configs/z80sim/nsh
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-09-13 22:04:47 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-09-13 22:04:47 +0000
commitbf8d0c68312793631ed4ade1541ec36168b3722b (patch)
treeb7b479778114a18c40f6fc2b874664cc61f7241a /nuttx/configs/z80sim/nsh
parent4f2e6ddbe763fd020cf82c5e1e555cba8cb7246a (diff)
downloadpx4-nuttx-bf8d0c68312793631ed4ade1541ec36168b3722b.tar.gz
px4-nuttx-bf8d0c68312793631ed4ade1541ec36168b3722b.tar.bz2
px4-nuttx-bf8d0c68312793631ed4ade1541ec36168b3722b.zip
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
Diffstat (limited to 'nuttx/configs/z80sim/nsh')
-rw-r--r--nuttx/configs/z80sim/nsh/Make.defs37
-rw-r--r--nuttx/configs/z80sim/nsh/defconfig2
-rwxr-xr-xnuttx/configs/z80sim/nsh/setenv.sh2
3 files changed, 26 insertions, 15 deletions
diff --git a/nuttx/configs/z80sim/nsh/Make.defs b/nuttx/configs/z80sim/nsh/Make.defs
index d20096ea1..7bdc9663d 100644
--- a/nuttx/configs/z80sim/nsh/Make.defs
+++ b/nuttx/configs/z80sim/nsh/Make.defs
@@ -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/z80sim/nsh/defconfig b/nuttx/configs/z80sim/nsh/defconfig
index 9d4d81a74..87195b6e8 100644
--- a/nuttx/configs/z80sim/nsh/defconfig
+++ b/nuttx/configs/z80sim/nsh/defconfig
@@ -1,5 +1,5 @@
############################################################################
-# sim/z80sim/nsh/defconfig
+# configs/z80sim/nsh/defconfig
#
# Copyright (C) 2007-2010 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org>
diff --git a/nuttx/configs/z80sim/nsh/setenv.sh b/nuttx/configs/z80sim/nsh/setenv.sh
index fa65934f1..48373b0f2 100755
--- a/nuttx/configs/z80sim/nsh/setenv.sh
+++ b/nuttx/configs/z80sim/nsh/setenv.sh
@@ -1,5 +1,5 @@
#!/bin/bash
-# z80sim/setenv.sh
+# configs/z80sim/nsh/setenv.sh
#
# Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org>