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
This commit is contained in:
parent
43f8b8b6c2
commit
9249d15f4d
@ -55,7 +55,6 @@ Configuring NuttX
|
||||
cd -
|
||||
. ./setenv.sh
|
||||
|
||||
|
||||
nsh
|
||||
This configuration file builds NSH (examples/nsh). This
|
||||
configuration is not functional due to issues with use of the
|
||||
@ -134,6 +133,9 @@ like compiler bugs. If you are using UBUNTU 9.10, you may have to either
|
||||
the older stable releases, or (2) wait for the next stable SDCC release
|
||||
after 2.9.0.
|
||||
|
||||
See below: If you wish to continue using the older SDCC toolchain, you
|
||||
must now also add CONFIG_SDCC_OLD=y to your configuration file.
|
||||
|
||||
Newer SDCC Versions
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
@ -154,4 +156,14 @@ This is the text of bug 3468951 reported on the SourceForge website:
|
||||
sdcc-2.6.0-asz80-symlen.patch is unnecessary, and it and the corresponding
|
||||
section from the README can be removed.
|
||||
|
||||
These changes have not yet been incorporated or verified.
|
||||
These changes *have* been incorporated but only partially verified. In order
|
||||
to get a successful compilation, I had to copy stdarg.h out of the SDCC source
|
||||
(at sdcc/device/include/stdarg.h) to include/nuttx/stdarg.h.
|
||||
|
||||
There are also some library related issues when you get to the final build
|
||||
that I have not looked into yet.
|
||||
|
||||
If you want to back out these change and continue to use the older toolchain
|
||||
in your build, simpy define the following in your configuration file:
|
||||
|
||||
CONFIG_SDCC_OLD=y
|
||||
|
@ -1,5 +1,5 @@
|
||||
/************************************************************
|
||||
* board/board.h
|
||||
* configs/xtrs/include/board.h
|
||||
*
|
||||
* Copyright (C) 2008 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
|
@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* board/trs80-m3.h
|
||||
* configs/xtrs/include/trs80-m3.h
|
||||
*
|
||||
* Copyright (C) 2008 Jacques Pelletier. All rights reserved.
|
||||
* Author: Jacques Pelletier
|
||||
|
@ -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 <gnutt@nuttx.org>
|
||||
@ -36,25 +36,36 @@
|
||||
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 =
|
||||
ARCHDEFINES =
|
||||
ARCHINCLUDES = -I. -I$(TOPDIR)/include
|
||||
|
||||
CROSSDEV =
|
||||
CC = sdcc
|
||||
CPP = sdcpp
|
||||
LD = link-z80
|
||||
AS = as-z80
|
||||
AR = sdcclib -a
|
||||
|
||||
CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) \
|
||||
$(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
|
||||
CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
|
||||
|
@ -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 <gnutt@nuttx.org>
|
||||
|
@ -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 <gnutt@nuttx.org>
|
||||
|
@ -1,5 +1,5 @@
|
||||
############################################################################
|
||||
# configs/xtrs/Make.defs
|
||||
# configs/xtrs/ostest/Make.defs
|
||||
#
|
||||
# Copyright (C) 2008, 2012 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
@ -36,25 +36,36 @@
|
||||
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 =
|
||||
ARCHDEFINES =
|
||||
ARCHINCLUDES = -I. -I$(TOPDIR)/include
|
||||
|
||||
CROSSDEV =
|
||||
CC = sdcc
|
||||
CPP = sdcpp
|
||||
LD = link-z80
|
||||
AS = as-z80
|
||||
AR = sdcclib -a
|
||||
|
||||
CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) \
|
||||
$(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
|
||||
CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/bin/bash
|
||||
# xtrs/setenv.sh
|
||||
# configs/xtrs/ostest/setenv.sh
|
||||
#
|
||||
# Copyright (C) 2008 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
|
@ -1,5 +1,5 @@
|
||||
############################################################################
|
||||
# configs/xtrs/Make.defs
|
||||
# configs/xtrs/pashello/Make.defs
|
||||
#
|
||||
# Copyright (C) 2008, 2012 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
@ -36,25 +36,36 @@
|
||||
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 =
|
||||
ARCHDEFINES =
|
||||
ARCHINCLUDES = -I. -I$(TOPDIR)/include
|
||||
|
||||
CROSSDEV =
|
||||
CC = sdcc
|
||||
CPP = sdcpp
|
||||
LD = link-z80
|
||||
AS = as-z80
|
||||
AR = sdcclib -a
|
||||
|
||||
CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) \
|
||||
$(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
|
||||
CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/bin/bash
|
||||
# xtrs/setenv.sh
|
||||
# configs/xtrs/pashello/setenv.sh
|
||||
#
|
||||
# Copyright (C) 2008 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
|
@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* board/xtr_irq.c
|
||||
* configs/xtrs/src/xtr_irq.c
|
||||
*
|
||||
* Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
|
@ -1,5 +1,5 @@
|
||||
/********************************************************************************
|
||||
* board/xtr_lowputc.c
|
||||
* configs/xtrs/src//xtr_lowputc.c
|
||||
*
|
||||
* Copyright (C) 2008 Jacques Pelletier. All rights reserved.
|
||||
* Author: Jacques Pelletier
|
||||
|
@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* board/xtr_serial.c
|
||||
* config/xtrs/src/xtr_serial.c
|
||||
*
|
||||
* Copyright (C) 2008 Jacques Pelletier. All rights reserved.
|
||||
* Author: Jacques Pelletier
|
||||
|
@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* board/xtr_timerisr.c
|
||||
* configs/xtrs/src/xtr_timerisr.c
|
||||
*
|
||||
* Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
|
@ -28,7 +28,6 @@ Configuring NuttX
|
||||
cd -
|
||||
. ./setenv.sh
|
||||
|
||||
|
||||
nsh
|
||||
This configuration file builds NSH (examples/nsh). This
|
||||
configuration is not functional due to issues with use of the
|
||||
@ -107,6 +106,9 @@ like compiler bugs. If you are using UBUNTU 9.10, you may have to either
|
||||
the older stable releases, or (2) wait for the next stable SDCC release
|
||||
after 2.9.0.
|
||||
|
||||
See below: If you wish to continue using the older SDCC toolchain, you
|
||||
must now also add CONFIG_SDCC_OLD=y to your configuration file.
|
||||
|
||||
Newer SDCC Versions
|
||||
^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
@ -127,4 +129,14 @@ This is the text of bug 3468951 reported on the SourceForge website:
|
||||
sdcc-2.6.0-asz80-symlen.patch is unnecessary, and it and the corresponding
|
||||
section from the README can be removed.
|
||||
|
||||
These changes have not yet been incorporated or verified.
|
||||
These changes *have* been incorporated but only partially verified. In order
|
||||
to get a successful compilation, I had to copy stdarg.h out of the SDCC source
|
||||
(at sdcc/device/include/stdarg.h) to include/nuttx/stdarg.h.
|
||||
|
||||
There are also some library related issues when you get to the final build
|
||||
that I have not looked into yet.
|
||||
|
||||
If you want to back out these change and continue to use the older toolchain
|
||||
in your build, simpy define the following in your configuration file:
|
||||
|
||||
CONFIG_SDCC_OLD=y
|
||||
|
@ -1,5 +1,5 @@
|
||||
/************************************************************
|
||||
* board/board.h
|
||||
* configs/z80sim/include/board.h
|
||||
*
|
||||
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
|
@ -36,25 +36,36 @@
|
||||
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 =
|
||||
ARCHDEFINES =
|
||||
ARCHINCLUDES = -I. -I$(TOPDIR)/include
|
||||
|
||||
CROSSDEV =
|
||||
CC = sdcc
|
||||
CPP = sdcpp
|
||||
LD = link-z80
|
||||
AS = as-z80
|
||||
AR = sdcclib -a
|
||||
|
||||
CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) \
|
||||
$(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
|
||||
CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -36,25 +36,36 @@
|
||||
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 =
|
||||
ARCHDEFINES =
|
||||
ARCHINCLUDES = -I. -I$(TOPDIR)/include
|
||||
|
||||
CROSSDEV =
|
||||
CC = sdcc
|
||||
CPP = sdcpp
|
||||
LD = link-z80
|
||||
AS = as-z80
|
||||
AR = sdcclib -a
|
||||
|
||||
CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) \
|
||||
$(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
|
||||
CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/bin/bash
|
||||
# z80sim/setenv.sh
|
||||
# configs/z80sim/ostest/setenv.sh
|
||||
#
|
||||
# Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
|
@ -36,25 +36,36 @@
|
||||
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 =
|
||||
ARCHDEFINES =
|
||||
ARCHINCLUDES = -I. -I$(TOPDIR)/include
|
||||
|
||||
CROSSDEV =
|
||||
CC = sdcc
|
||||
CPP = sdcpp
|
||||
LD = link-z80
|
||||
AS = as-z80
|
||||
AR = sdcclib -a
|
||||
|
||||
CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) \
|
||||
$(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
|
||||
CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
|
||||
|
@ -1,5 +1,5 @@
|
||||
#!/bin/bash
|
||||
# z80sim/setenv.sh
|
||||
# configs/z80sim/pashello/setenv.sh
|
||||
#
|
||||
# Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
|
@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* board/z80_irq.c
|
||||
* configs/z80sim/src/z80_irq.c
|
||||
*
|
||||
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
|
@ -1,5 +1,5 @@
|
||||
/********************************************************************************
|
||||
* board/z80_lowputc.c
|
||||
* configs/z80sim/src//z80_lowputc.c
|
||||
*
|
||||
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
|
@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* board/z80_serial.c
|
||||
* configs/z80sim/src/z80_serial.c
|
||||
*
|
||||
* Copyright (C) 2007-2009, 2012 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
|
@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* board/z80_timerisr.c
|
||||
* configs/z80sim/src/z80_timerisr.c
|
||||
*
|
||||
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
|
Loading…
Reference in New Issue
Block a user