From 2767e804593371682c76071c88c271c11513181c Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sun, 2 Jun 2019 11:05:31 -0600 Subject: [PATCH] Squashed commit of the following: ez80: Fixing a few more compile problems. I am afraid that the 5.3.0 compiler it too buggy to use. ez80: Additional build-related fixed. eZ80: Updating to use the newest ZDSII 5.3.0 toolchain. --- arch/z80/src/ez80/Kconfig | 5 +- .../{ostest => scripts}/Make.defs | 60 +++++++++++-------- .../ez80f910200kitg.linkcmd} | 4 +- configs/ez80f910200zco/scripts/Make.defs | 56 +++++++++-------- include/nuttx/wireless/bluetooth/bt_hci.h | 5 ++ .../wireless/ieee802154/ieee802154_mac.h | 4 ++ net/net_initialize.c | 1 + net/udp/udp.h | 2 +- sched/group/group_leave.c | 3 +- 9 files changed, 84 insertions(+), 56 deletions(-) rename configs/ez80f910200kitg/{ostest => scripts}/Make.defs (83%) rename configs/ez80f910200kitg/{ostest/ostest.linkcmd => scripts/ez80f910200kitg.linkcmd} (97%) diff --git a/arch/z80/src/ez80/Kconfig b/arch/z80/src/ez80/Kconfig index 7529e2c7ad..6c56817805 100644 --- a/arch/z80/src/ez80/Kconfig +++ b/arch/z80/src/ez80/Kconfig @@ -43,7 +43,7 @@ config EZ80_TOOLCHAIN_ZDSII choice prompt "ZDS-II Toolchain version" - default EZ80_ZDSII_V521 + default EZ80_ZDSII_V530 config EZ80_ZDSII_V511 bool "ZDS-II 5.1.1" @@ -51,6 +51,9 @@ config EZ80_ZDSII_V511 config EZ80_ZDSII_V521 bool "ZDS-II 5.2.1" +config EZ80_ZDSII_V530 + bool "ZDS-II 5.3.0" + endchoice # ZDS-II Toolchain version if EZ80_EMAC diff --git a/configs/ez80f910200kitg/ostest/Make.defs b/configs/ez80f910200kitg/scripts/Make.defs similarity index 83% rename from configs/ez80f910200kitg/ostest/Make.defs rename to configs/ez80f910200kitg/scripts/Make.defs index 719b4419bd..fe5b68598f 100644 --- a/configs/ez80f910200kitg/ostest/Make.defs +++ b/configs/ez80f910200kitg/scripts/Make.defs @@ -1,5 +1,5 @@ ############################################################################ -# configs/ez80f910200kitg/ostest/Make.defs +# configs/ez80f910200kitg/scripts/Make.defs # # Copyright (C) 2008, 2009, 2013 Gregory Nutt. All rights reserved. # Author: Gregory Nutt @@ -36,23 +36,31 @@ include $(TOPDIR)/.config include $(TOPDIR)/tools/Config.mk -# 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: +# These are the default 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)\ +# Versions 5.1.1 and 5.2.1 +# C:\PROGRA~1\ = C:\Program Files\ +# C:\PROGRA~2\ = C:\Program Files (x86)\ # # Your PC may be configured differently. +# +# Version 5.3.0, the default install location is C:\ZiLOG -ifeq ($(CONFIG_EZ80_ZDSII_V521),y) -ZDSVERSION := 5.2.1 -else # ifeq ($(CONFIGEZ80_ZDSII_V511),y) +ifeq ($(CONFIG_EZ80_ZDSII_V511),y) +INSTALLROOT = C:/PROGRA~2/ZiLOG ZDSVERSION := 5.1.1 +else ifeq ($(CONFIG_EZ80_ZDSII_V521),y) +INSTALLROOT = C:/PROGRA~2/ZiLOG +ZDSVERSION := 5.2.1 +else ifeq ($(CONFIG_EZ80_ZDSII_V530),y) +INSTALLROOT = C:/ZiLOG +ZDSVERSION := 5.3.0 endif ifeq ($(CONFIG_WINDOWS_NATIVE),y) - ZDSINSTALLDIR := C:/PROGRA~2/ZiLOG/ZDSII_eZ80Acclaim!_$(ZDSVERSION) + ZDSINSTALLDIR := $(INSTALLROOT)/ZDSII_eZ80Acclaim!_$(ZDSVERSION) INSTALLDIR = ${shell echo $(ZDSINSTALLDIR)| sed -e "s/\//\\/g"} ZDSBINDIR := $(INSTALLDIR)\bin ZDSSTDINCDIR := $(INSTALLDIR)\include\std @@ -68,7 +76,7 @@ ifeq ($(CONFIG_WINDOWS_NATIVE),y) ARCHUSRINCLUDES = -usrinc:. else WINTOOL := y - ZDSINSTALLDIR := C:/PROGRA~2/ZiLOG/ZDSII_eZ80Acclaim!_$(ZDSVERSION) + ZDSINSTALLDIR := $(INSTALLROOT)/ZDSII_eZ80Acclaim!_$(ZDSVERSION) INSTALLDIR = ${shell cygpath -u "$(ZDSINSTALLDIR)"} ZDSBINDIR := $(INSTALLDIR)/bin ZDSSTDINCDIR := $(INSTALLDIR)/include/std @@ -134,7 +142,7 @@ else endif ARCHCPUFLAGS = -chartype:S -promote -cpu:$(ARCHCPU) -NOgenprintf -NOmodsect \ - -asmsw:" $(ARCHASMCPUFLAGS) $(EARCHASMINCLUDES) $(ARCHASMWARNINGS) $(ARCHASMOPTIMIZATION)" + -asmsw:" $(ARCHASMCPUFLAGS) $(EARCHASMINCLUDES) $(ARCHASMWARNINGS) $(ARCHASMOPTIMIZATION)" ARCHLIST = -keeplst -NOlist -NOlistinc -keepasm ARCHPICFLAGS = ARCHWARNINGS = -warn @@ -152,16 +160,16 @@ ARFLAGS = -quiet -warn # Linker definitions -LINKCMDTEMPLATE = $(TOPDIR)$(DELIM)configs$(DELIM)ez80f910200kitg$(DELIM)ostest$(DELIM)ostest.linkcmd +LINKCMDTEMPLATE = $(TOPDIR)$(DELIM)configs$(DELIM)ez80f910200kitg$(DELIM)scripts$(DELIM)ez80f910200kitg.linkcmd.linkcmd -# Tool names/pathes +# Tool names/paths. CROSSDEV = -CC = ez80cc.exe +CC = $(ZDSBINDIR)$(DELIM)ez80cc.exe CPP = gcc -E -LD = ez80link.exe -AS = ez80asm.exe -AR = ez80lib.exe +LD = $(ZDSBINDIR)$(DELIM)ez80link.exe +AS = $(ZDSBINDIR)$(DELIM)ez80asm.exe +AR = $(ZDSBINDIR)$(DELIM)ez80lib.exe # File extensions @@ -179,15 +187,15 @@ ifeq ($(CONFIG_WINDOWS_NATIVE),y) define PREPROCESS @echo CPP: $1->$2 - $(Q) "$(CPP)" $(CPPFLAGS) $1 -o $2 + $(Q) $(CPP) $(CPPFLAGS) $1 -o $2 endef define COMPILE - $(Q) "$(CC)" $(CFLAGS) ${shell echo $1 | sed -e "s/\//\\/g"} + $(Q) $(CC) $(CFLAGS) ${shell echo $1 | sed -e "s/\//\\/g"} endef define ASSEMBLE - $(Q) "$(AS)" $(AFLAGS) ${shell echo $1 | sed -e "s/\//\\/g"} + $(Q) $(AS) $(AFLAGS) ${shell echo $1 | sed -e "s/\//\\/g"} endef define MOVEOBJ @@ -198,7 +206,7 @@ endef define ARCHIVE @echo AR: $2 - $(Q) for %%G in ($(2)) do ( "$(AR)" $(ARFLAGS) $1=-+%%G ) + $(Q) for %%G in ($(2)) do ( $(AR) $(ARFLAGS) $1=-+%%G ) endef define CLEAN @@ -214,15 +222,15 @@ else define PREPROCESS @echo "CPP: $1->$2" - $(Q) "$(CPP)" $(CPPFLAGS) $1 -o $2 + $(Q) $(CPP) $(CPPFLAGS) $1 -o $2 endef define COMPILE - $(Q) (wfile=`cygpath -w "$1"`; "$(CC)" $(CFLAGS) $$wfile) + $(Q) $(CC) $(CFLAGS) `cygpath -w "$1"` endef define ASSEMBLE - $(Q) (wfile=`cygpath -w "$1"`; "$(AS)" $(AFLAGS) $$wfile) + $(Q) $(AS) $(AFLAGS) `cygpath -w "$1"` endef define MOVEOBJ @@ -234,7 +242,7 @@ endef define ARCHIVE $(Q) for __obj in $(2) ; do \ 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 endef diff --git a/configs/ez80f910200kitg/ostest/ostest.linkcmd b/configs/ez80f910200kitg/scripts/ez80f910200kitg.linkcmd similarity index 97% rename from configs/ez80f910200kitg/ostest/ostest.linkcmd rename to configs/ez80f910200kitg/scripts/ez80f910200kitg.linkcmd index 3ddee5f855..66c90c79b4 100644 --- a/configs/ez80f910200kitg/ostest/ostest.linkcmd +++ b/configs/ez80f910200kitg/scripts/ez80f910200kitg.linkcmd @@ -1,8 +1,8 @@ /****************************************************************************/ -/* configs/ez80f910200kitg/ostest/ostest.linkcmd */ +/* configs/ez80f910200kitg/scripts/ez80f910200kitg.linkcmd */ /* */ /* Copyright (C) 2008 Gregory Nutt. All rights reserved. */ -/* Author: Gregory Nutt */ +/* Author: Gregory Nutt */ /* */ /* Redistribution and use in source and binary forms, with or without */ /* modification, are permitted provided that the following conditions */ diff --git a/configs/ez80f910200zco/scripts/Make.defs b/configs/ez80f910200zco/scripts/Make.defs index 92189957e3..535dbea0c0 100644 --- a/configs/ez80f910200zco/scripts/Make.defs +++ b/configs/ez80f910200zco/scripts/Make.defs @@ -36,23 +36,31 @@ include $(TOPDIR)/.config include $(TOPDIR)/tools/Config.mk -# 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: +# These are the default 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)\ +# Versions 5.1.1 and 5.2.1 +# C:\PROGRA~1\ = C:\Program Files\ +# C:\PROGRA~2\ = C:\Program Files (x86)\ # # Your PC may be configured differently. +# +# Version 5.3.0, the default install location is C:\ZiLOG -ifeq ($(CONFIG_EZ80_ZDSII_V521),y) -ZDSVERSION := 5.2.1 -else # ifeq ($(CONFIGEZ80_ZDSII_V511),y) +ifeq ($(CONFIG_EZ80_ZDSII_V511),y) +INSTALLROOT = C:/PROGRA~2/ZiLOG ZDSVERSION := 5.1.1 +else ifeq ($(CONFIG_EZ80_ZDSII_V521),y) +INSTALLROOT = C:/PROGRA~2/ZiLOG +ZDSVERSION := 5.2.1 +else ifeq ($(CONFIG_EZ80_ZDSII_V530),y) +INSTALLROOT = C:/ZiLOG +ZDSVERSION := 5.3.0 endif ifeq ($(CONFIG_WINDOWS_NATIVE),y) - ZDSINSTALLDIR := C:/PROGRA~2/ZiLOG/ZDSII_eZ80Acclaim!_$(ZDSVERSION) + ZDSINSTALLDIR := $(INSTALLROOT)/ZDSII_eZ80Acclaim!_$(ZDSVERSION) INSTALLDIR = ${shell echo $(ZDSINSTALLDIR)| sed -e "s/\//\\/g"} ZDSBINDIR := $(INSTALLDIR)\bin ZDSSTDINCDIR := $(INSTALLDIR)\include\std @@ -68,7 +76,7 @@ ifeq ($(CONFIG_WINDOWS_NATIVE),y) ARCHUSRINCLUDES = -usrinc:. else WINTOOL := y - ZDSINSTALLDIR := C:/PROGRA~2/ZiLOG/ZDSII_eZ80Acclaim!_$(ZDSVERSION) + ZDSINSTALLDIR := $(INSTALLROOT)/ZDSII_eZ80Acclaim!_$(ZDSVERSION) INSTALLDIR = ${shell cygpath -u "$(ZDSINSTALLDIR)"} ZDSBINDIR := $(INSTALLDIR)/bin ZDSSTDINCDIR := $(INSTALLDIR)/include/std @@ -134,7 +142,7 @@ else endif ARCHCPUFLAGS = -chartype:S -promote -cpu:$(ARCHCPU) -NOgenprintf -NOmodsect \ - -asmsw:" $(ARCHASMCPUFLAGS) $(EARCHASMINCLUDES) $(ARCHASMWARNINGS) $(ARCHASMOPTIMIZATION)" + -asmsw:" $(ARCHASMCPUFLAGS) $(EARCHASMINCLUDES) $(ARCHASMWARNINGS) $(ARCHASMOPTIMIZATION)" ARCHLIST = -keeplst -NOlist -NOlistinc -keepasm ARCHPICFLAGS = ARCHWARNINGS = -warn @@ -154,14 +162,14 @@ ARFLAGS = -quiet -warn LINKCMDTEMPLATE = $(TOPDIR)$(DELIM)configs$(DELIM)ez80f910200zco$(DELIM)scripts$(DELIM)ez80f910200zco.linkcmd -# Tool names/pathes +# Tool names/paths. CROSSDEV = -CC = ez80cc.exe +CC = $(ZDSBINDIR)$(DELIM)ez80cc.exe CPP = gcc -E -LD = ez80link.exe -AS = ez80asm.exe -AR = ez80lib.exe +LD = $(ZDSBINDIR)$(DELIM)ez80link.exe +AS = $(ZDSBINDIR)$(DELIM)ez80asm.exe +AR = $(ZDSBINDIR)$(DELIM)ez80lib.exe # File extensions @@ -179,15 +187,15 @@ ifeq ($(CONFIG_WINDOWS_NATIVE),y) define PREPROCESS @echo CPP: $1->$2 - $(Q) "$(CPP)" $(CPPFLAGS) $1 -o $2 + $(Q) $(CPP) $(CPPFLAGS) $1 -o $2 endef define COMPILE - $(Q) "$(CC)" $(CFLAGS) ${shell echo $1 | sed -e "s/\//\\/g"} + $(Q) $(CC) $(CFLAGS) ${shell echo $1 | sed -e "s/\//\\/g"} endef define ASSEMBLE - $(Q) "$(AS)" $(AFLAGS) ${shell echo $1 | sed -e "s/\//\\/g"} + $(Q) $(AS) $(AFLAGS) ${shell echo $1 | sed -e "s/\//\\/g"} endef define MOVEOBJ @@ -198,7 +206,7 @@ endef define ARCHIVE @echo AR: $2 - $(Q) for %%G in ($(2)) do ( "$(AR)" $(ARFLAGS) $1=-+%%G ) + $(Q) for %%G in ($(2)) do ( $(AR) $(ARFLAGS) $1=-+%%G ) endef define CLEAN @@ -214,15 +222,15 @@ else define PREPROCESS @echo "CPP: $1->$2" - $(Q) "$(CPP)" $(CPPFLAGS) $1 -o $2 + $(Q) $(CPP) $(CPPFLAGS) $1 -o $2 endef define COMPILE - $(Q) (wfile=`cygpath -w "$1"`; "$(CC)" $(CFLAGS) $$wfile) + $(Q) $(CC) $(CFLAGS) `cygpath -w "$1"` endef define ASSEMBLE - $(Q) (wfile=`cygpath -w "$1"`; "$(AS)" $(AFLAGS) $$wfile) + $(Q) $(AS) $(AFLAGS) `cygpath -w "$1"` endef define MOVEOBJ @@ -234,7 +242,7 @@ endef define ARCHIVE $(Q) for __obj in $(2) ; do \ 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 endef diff --git a/include/nuttx/wireless/bluetooth/bt_hci.h b/include/nuttx/wireless/bluetooth/bt_hci.h index d9a707e94d..482681970c 100644 --- a/include/nuttx/wireless/bluetooth/bt_hci.h +++ b/include/nuttx/wireless/bluetooth/bt_hci.h @@ -46,8 +46,12 @@ * Included Files ****************************************************************************/ +#include + #include +#ifdef CONFIG_WIRELESS_BLUETOOTH + /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ @@ -465,4 +469,5 @@ begin_packed_struct struct bt_hci_evt_le_ltk_request_s uint16_t ediv; } end_packed_struct; +#endif /* CONFIG_WIRELESS_BLUETOOTH */ #endif /* __INCLUDE_NUTTX_WIRELESS_BLUETOOTH_BT_HCI_H */ diff --git a/include/nuttx/wireless/ieee802154/ieee802154_mac.h b/include/nuttx/wireless/ieee802154/ieee802154_mac.h index 765d05a37d..813f9b235c 100644 --- a/include/nuttx/wireless/ieee802154/ieee802154_mac.h +++ b/include/nuttx/wireless/ieee802154/ieee802154_mac.h @@ -677,16 +677,20 @@ union ieee802154_phyattr_u /* TODO: Fill this out as we implement supported get/set commands */ }; +#if 0 /* Empty union causes errors on some compilers */ union ieee802154_secattr_u { /* TODO: Fill this out as we implement supported get/set commands */ }; +#endif union ieee802154_attr_u { union ieee802154_macattr_u mac; union ieee802154_phyattr_u phy; +#if 0 /* Empty union causes errors on some compilers */ union ieee802154_secattr_u sec; +#endif }; struct ieee802154_gts_info_s diff --git a/net/net_initialize.c b/net/net_initialize.c index eb82777d0f..9353c6fe07 100644 --- a/net/net_initialize.c +++ b/net/net_initialize.c @@ -210,3 +210,4 @@ void net_initialize(void) } #endif /* CONFIG_NET */ + diff --git a/net/udp/udp.h b/net/udp/udp.h index b9397d3fa0..6bf3a9448b 100644 --- a/net/udp/udp.h +++ b/net/udp/udp.h @@ -353,7 +353,7 @@ void udp_poll(FAR struct net_driver_s *dev, FAR struct udp_conn_s *conn); ****************************************************************************/ int psock_udp_cansend(FAR struct socket *psock); -; + /**************************************************************************** * Name: udp_send * diff --git a/sched/group/group_leave.c b/sched/group/group_leave.c index 126fded99c..47f4d56292 100644 --- a/sched/group/group_leave.c +++ b/sched/group/group_leave.c @@ -142,9 +142,9 @@ static void group_remove(FAR struct task_group_s *group) static inline void group_release(FAR struct task_group_s *group) { +#if defined(CONFIG_SCHED_HAVE_PARENT) && defined(CONFIG_SCHED_CHILD_STATUS) /* Free all un-reaped child exit status */ -#if defined(CONFIG_SCHED_HAVE_PARENT) && defined(CONFIG_SCHED_CHILD_STATUS) group_removechildren(group); #endif @@ -170,7 +170,6 @@ static inline void group_release(FAR struct task_group_s *group) /* Free resource held by the stream list */ lib_stream_release(group); - #endif /* CONFIG_NFILE_STREAMS */ #ifdef CONFIG_NET