diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-06-22 15:22:56 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-06-22 15:22:56 +0000 |
commit | 87d1c58d9c735d2e032654d41568ba322b116ae1 (patch) | |
tree | 865ca20a763a1f8a7419024d8abe44039b653c36 | |
parent | 1bb291cf7f2c16a645a702dfcf70f8a2a3685147 (diff) | |
download | nuttx-87d1c58d9c735d2e032654d41568ba322b116ae1.tar.gz nuttx-87d1c58d9c735d2e032654d41568ba322b116ae1.tar.bz2 nuttx-87d1c58d9c735d2e032654d41568ba322b116ae1.zip |
Changes for clean ez80 ZDS-II compile
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3733 42af7a65-404d-4744-a932-0658087f49c3
-rwxr-xr-x | apps/ChangeLog.txt | 2 | ||||
-rwxr-xr-x | apps/Make.defs | 2 | ||||
-rw-r--r-- | apps/namedapp/namedapp.c | 2 | ||||
-rw-r--r-- | nuttx/ChangeLog | 5 | ||||
-rw-r--r-- | nuttx/configs/ez80f910200kitg/ostest/Make.defs | 1 | ||||
-rw-r--r-- | nuttx/configs/ez80f910200zco/dhcpd/Make.defs | 1 | ||||
-rw-r--r-- | nuttx/configs/ez80f910200zco/httpd/Make.defs | 1 | ||||
-rw-r--r-- | nuttx/configs/ez80f910200zco/nettest/Make.defs | 1 | ||||
-rw-r--r-- | nuttx/configs/ez80f910200zco/nsh/Make.defs | 1 | ||||
-rw-r--r-- | nuttx/configs/ez80f910200zco/ostest/Make.defs | 1 | ||||
-rw-r--r-- | nuttx/configs/ez80f910200zco/poll/Make.defs | 1 | ||||
-rw-r--r-- | nuttx/configs/z16f2800100zcog/ostest/Make.defs | 1 | ||||
-rwxr-xr-x | nuttx/configs/z16f2800100zcog/pashello/Make.defs | 1 | ||||
-rw-r--r-- | nuttx/configs/z8encore000zco/ostest/Make.defs | 1 | ||||
-rw-r--r-- | nuttx/configs/z8f64200100kit/ostest/Make.defs | 1 | ||||
-rwxr-xr-x | nuttx/drivers/mtd/ramtron.c | 94 | ||||
-rw-r--r-- | nuttx/fs/fs_fdopen.c | 2 | ||||
-rw-r--r-- | nuttx/include/nuttx/mii.h | 24 | ||||
-rw-r--r-- | nuttx/include/nuttx/net.h | 3 | ||||
-rw-r--r-- | nuttx/net/net_checksd.c | 4 |
20 files changed, 86 insertions, 63 deletions
diff --git a/apps/ChangeLog.txt b/apps/ChangeLog.txt index a69959606..aeb403fc0 100755 --- a/apps/ChangeLog.txt +++ b/apps/ChangeLog.txt @@ -63,3 +63,5 @@ 6.6 2011-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr> + * Make.defs, namedapp/namedapp.c: Several structural changes made to get a + clean compile under the ez80 ZDS-II toolchain (no design changes). diff --git a/apps/Make.defs b/apps/Make.defs index e8c1d0d6c..f37a654c4 100755 --- a/apps/Make.defs +++ b/apps/Make.defs @@ -36,6 +36,6 @@ define REGISTER @echo "Register: $1" - @echo "{ .name = \"$1\", .priority = $2, .stacksize = $3, .main = $4 }," >> "$(APPDIR)/namedapp/namedapp_list.h" + @echo "{ \"$1\", $2, $3, $4 }," >> "$(APPDIR)/namedapp/namedapp_list.h" @echo "EXTERN int $4(int argc, char *argv[]);" >> "$(APPDIR)/namedapp/namedapp_proto.h" endef diff --git a/apps/namedapp/namedapp.c b/apps/namedapp/namedapp.c index 96a2942d6..a5c2bee0e 100644 --- a/apps/namedapp/namedapp.c +++ b/apps/namedapp/namedapp.c @@ -67,7 +67,7 @@ extern "C" { const struct namedapp_s namedapps[] = { # include "namedapp_list.h" - {.name = NULL} + { NULL, 0, 0, 0 } }; #undef EXTERN diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog index ce9c92235..31d8d81d8 100644 --- a/nuttx/ChangeLog +++ b/nuttx/ChangeLog @@ -1830,3 +1830,8 @@ is only 16-bits. 6.6 2011-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr> + + * drivers/mtd/ramtron.c, net/net_checksd.c, fs/fs_fdopen.c, and include/nuttx/mii.h: + Several structural changes made to get a clean compile under the ez80 ZDS-II + toolchain (no design changes). + diff --git a/nuttx/configs/ez80f910200kitg/ostest/Make.defs b/nuttx/configs/ez80f910200kitg/ostest/Make.defs index c8c776c75..7e5b80260 100644 --- a/nuttx/configs/ez80f910200kitg/ostest/Make.defs +++ b/nuttx/configs/ez80f910200kitg/ostest/Make.defs @@ -48,6 +48,7 @@ ZDSZILOGLIBDIR := $(ZDSINSTALLDIR)/lib/zilog # These are the same directories but with the directory separator # character swapped as needed by the ZDS-II compiler +WINTOOL := y WTOPDIR := ${shell cygpath -w $(TOPDIR)} WZDSSTDINCDIR := ${shell cygpath -w $(ZDSSTDINCDIR)} WZDSZILOGINCDIR := ${shell cygpath -w $(ZDSZILOGINCDIR)} diff --git a/nuttx/configs/ez80f910200zco/dhcpd/Make.defs b/nuttx/configs/ez80f910200zco/dhcpd/Make.defs index abaa11feb..06b08c2e4 100644 --- a/nuttx/configs/ez80f910200zco/dhcpd/Make.defs +++ b/nuttx/configs/ez80f910200zco/dhcpd/Make.defs @@ -48,6 +48,7 @@ ZDSZILOGLIBDIR := $(ZDSINSTALLDIR)/lib/zilog # These are the same directories but with the directory separator # character swapped as needed by the ZDS-II compiler +WINTOOL := y WTOPDIR := ${shell cygpath -w $(TOPDIR)} WZDSSTDINCDIR := ${shell cygpath -w $(ZDSSTDINCDIR)} WZDSZILOGINCDIR := ${shell cygpath -w $(ZDSZILOGINCDIR)} diff --git a/nuttx/configs/ez80f910200zco/httpd/Make.defs b/nuttx/configs/ez80f910200zco/httpd/Make.defs index 8889c9b97..08979608a 100644 --- a/nuttx/configs/ez80f910200zco/httpd/Make.defs +++ b/nuttx/configs/ez80f910200zco/httpd/Make.defs @@ -48,6 +48,7 @@ ZDSZILOGLIBDIR := $(ZDSINSTALLDIR)/lib/zilog # These are the same directories but with the directory separator # character swapped as needed by the ZDS-II compiler +WINTOOL := y WTOPDIR := ${shell cygpath -w $(TOPDIR)} WZDSSTDINCDIR := ${shell cygpath -w $(ZDSSTDINCDIR)} WZDSZILOGINCDIR := ${shell cygpath -w $(ZDSZILOGINCDIR)} diff --git a/nuttx/configs/ez80f910200zco/nettest/Make.defs b/nuttx/configs/ez80f910200zco/nettest/Make.defs index 17c15cc13..5111f8f05 100644 --- a/nuttx/configs/ez80f910200zco/nettest/Make.defs +++ b/nuttx/configs/ez80f910200zco/nettest/Make.defs @@ -48,6 +48,7 @@ ZDSZILOGLIBDIR := $(ZDSINSTALLDIR)/lib/zilog # These are the same directories but with the directory separator # character swapped as needed by the ZDS-II compiler +WINTOOL := y WTOPDIR := ${shell cygpath -w $(TOPDIR)} WZDSSTDINCDIR := ${shell cygpath -w $(ZDSSTDINCDIR)} WZDSZILOGINCDIR := ${shell cygpath -w $(ZDSZILOGINCDIR)} diff --git a/nuttx/configs/ez80f910200zco/nsh/Make.defs b/nuttx/configs/ez80f910200zco/nsh/Make.defs index b4f731853..1d935f781 100644 --- a/nuttx/configs/ez80f910200zco/nsh/Make.defs +++ b/nuttx/configs/ez80f910200zco/nsh/Make.defs @@ -48,6 +48,7 @@ ZDSZILOGLIBDIR := $(ZDSINSTALLDIR)/lib/zilog # These are the same directories but with the directory separator # character swapped as needed by the ZDS-II compiler +WINTOOL := y WTOPDIR := ${shell cygpath -w $(TOPDIR)} WZDSSTDINCDIR := ${shell cygpath -w $(ZDSSTDINCDIR)} WZDSZILOGINCDIR := ${shell cygpath -w $(ZDSZILOGINCDIR)} diff --git a/nuttx/configs/ez80f910200zco/ostest/Make.defs b/nuttx/configs/ez80f910200zco/ostest/Make.defs index 92af42061..5fcc43c4b 100644 --- a/nuttx/configs/ez80f910200zco/ostest/Make.defs +++ b/nuttx/configs/ez80f910200zco/ostest/Make.defs @@ -48,6 +48,7 @@ ZDSZILOGLIBDIR := $(ZDSINSTALLDIR)/lib/zilog # These are the same directories but with the directory separator # character swapped as needed by the ZDS-II compiler +WINTOOL := y WTOPDIR := ${shell cygpath -w $(TOPDIR)} WZDSSTDINCDIR := ${shell cygpath -w $(ZDSSTDINCDIR)} WZDSZILOGINCDIR := ${shell cygpath -w $(ZDSZILOGINCDIR)} diff --git a/nuttx/configs/ez80f910200zco/poll/Make.defs b/nuttx/configs/ez80f910200zco/poll/Make.defs index a1558e8e2..ca7de28ca 100644 --- a/nuttx/configs/ez80f910200zco/poll/Make.defs +++ b/nuttx/configs/ez80f910200zco/poll/Make.defs @@ -48,6 +48,7 @@ ZDSZILOGLIBDIR := $(ZDSINSTALLDIR)/lib/zilog # These are the same directories but with the directory separator # character swapped as needed by the ZDS-II compiler +WINTOOL := y WTOPDIR := ${shell cygpath -w $(TOPDIR)} WZDSSTDINCDIR := ${shell cygpath -w $(ZDSSTDINCDIR)} WZDSZILOGINCDIR := ${shell cygpath -w $(ZDSZILOGINCDIR)} diff --git a/nuttx/configs/z16f2800100zcog/ostest/Make.defs b/nuttx/configs/z16f2800100zcog/ostest/Make.defs index 1eafbdf9e..9b7ac4179 100644 --- a/nuttx/configs/z16f2800100zcog/ostest/Make.defs +++ b/nuttx/configs/z16f2800100zcog/ostest/Make.defs @@ -48,6 +48,7 @@ ZDSZILOGLIBDIR := $(ZDSINSTALLDIR)/lib/zilog # These are the same directories but with the directory separator # character swapped as needed by the ZNeo-II compiler +WINTOOL := y WTOPDIR := ${shell cygpath -w $(TOPDIR)} WZDSSTDINCDIR := ${shell cygpath -w $(ZDSSTDINCDIR)} WZDSZILOGINCDIR := ${shell cygpath -w $(ZDSZILOGINCDIR)} diff --git a/nuttx/configs/z16f2800100zcog/pashello/Make.defs b/nuttx/configs/z16f2800100zcog/pashello/Make.defs index 6f725da11..36c4f5772 100755 --- a/nuttx/configs/z16f2800100zcog/pashello/Make.defs +++ b/nuttx/configs/z16f2800100zcog/pashello/Make.defs @@ -48,6 +48,7 @@ ZDSZILOGLIBDIR := $(ZDSINSTALLDIR)/lib/zilog # These are the same directories but with the directory separator # character swapped as needed by the ZNeo-II compiler +WINTOOL := y WTOPDIR := ${shell cygpath -w $(TOPDIR)} WZDSSTDINCDIR := ${shell cygpath -w $(ZDSSTDINCDIR)} WZDSZILOGINCDIR := ${shell cygpath -w $(ZDSZILOGINCDIR)} diff --git a/nuttx/configs/z8encore000zco/ostest/Make.defs b/nuttx/configs/z8encore000zco/ostest/Make.defs index 8e4e7e90b..a14f9b615 100644 --- a/nuttx/configs/z8encore000zco/ostest/Make.defs +++ b/nuttx/configs/z8encore000zco/ostest/Make.defs @@ -53,6 +53,7 @@ ZDSZILOGLIBDIR := $(ZDSINSTALLDIR)/lib/zilog # These are the same directories but with the directory separator # character swapped as needed by the ZDS-II compiler +WINTOOL := y WTOPDIR := ${shell cygpath -w $(TOPDIR)} WZDSSTDINCDIR := ${shell cygpath -w $(ZDSSTDINCDIR)} WZDSZILOGINCDIR := ${shell cygpath -w $(ZDSZILOGINCDIR)} diff --git a/nuttx/configs/z8f64200100kit/ostest/Make.defs b/nuttx/configs/z8f64200100kit/ostest/Make.defs index 3b82fba27..7324c7952 100644 --- a/nuttx/configs/z8f64200100kit/ostest/Make.defs +++ b/nuttx/configs/z8f64200100kit/ostest/Make.defs @@ -53,6 +53,7 @@ ZDSZILOGLIBDIR := $(ZDSINSTALLDIR)/lib/zilog # These are the same directories but with the directory separator # character swapped as needed by the ZDS-II compiler +WINTOOL := y WTOPDIR := ${shell cygpath -w $(TOPDIR)} WZDSSTDINCDIR := ${shell cygpath -w $(ZDSSTDINCDIR)} WZDSZILOGINCDIR := ${shell cygpath -w $(ZDSZILOGINCDIR)} diff --git a/nuttx/drivers/mtd/ramtron.c b/nuttx/drivers/mtd/ramtron.c index f1149df6d..9f1844762 100755 --- a/nuttx/drivers/mtd/ramtron.c +++ b/nuttx/drivers/mtd/ramtron.c @@ -127,7 +127,8 @@ struct ramtron_parts_s
{
const char *name;
- uint8_t id1, id2;
+ uint8_t id1;
+ uint8_t id2;
uint32_t size;
uint8_t addr_len;
uint32_t speed;
@@ -160,64 +161,69 @@ struct ramtron_dev_s static struct ramtron_parts_s ramtron_parts[] =
{
{
- .size = 32L*1024L,
- .addr_len = 2,
- .id1 = 0x22,
- .id2 = 0x00,
- .speed = 40000000,
- .name = "FM25V02",
+ "FM25V02", /* name */
+ 0x22, /* id1 */
+ 0x00, /* id2 */
+ 32L*1024L, /* size */
+ 2, /* addr_len */
+ 40000000 /* speed */
},
{
- .size = 32L*1024L,
- .addr_len = 2,
- .id1 = 0x22,
- .id2 = 0x01,
- .speed = 40000000,
- .name = "FM25VN02",
+ "FM25VN02", /* name */
+ 0x22, /* id1 */
+ 0x01, /* id2 */
+ 32L*1024L, /* size */
+ 2, /* addr_len */
+ 40000000 /* speed */
},
{
- .size = 64L*1024L,
- .addr_len = 2,
- .id1 = 0x23,
- .id2 = 0x00,
- .speed = 40000000,
- .name = "FM25V05",
+ "FM25V05", /* name */
+ 0x23, /* id1 */
+ 0x00, /* id2 */
+ 64L*1024L, /* size */
+ 2, /* addr_len */
+ 40000000 /* speed */
},
{
- .size = 64L*1024L,
- .addr_len = 2,
- .id1 = 0x23,
- .id2 = 0x01,
- .speed = 40000000,
- .name = "FM25VN05",
+ "FM25VN05", /* name */
+ 0x23, /* id1 */
+ 0x01, /* id2 */
+ 64L*1024L, /* size */
+ 2, /* addr_len */
+ 40000000 /* speed */
},
{
- .size = 128L*1024L,
- .addr_len = 3,
- .id1 = 0x24,
- .id2 = 0x00,
- .speed = 40000000,
- .name = "FM25V10",
+ "FM25V10", /* name */
+ 0x24, /* id1 */
+ 0x00, /* id2 */
+ 128L*1024L, /* size */
+ 3, /* addr_len */
+ 40000000 /* speed */
},
{
- .size = 128L*1024L,
- .addr_len = 3,
- .id1 = 0x24,
- .id2 = 0x01,
- .speed = 40000000,
- .name = "FM25VN10",
+ "FM25VN10", /* name */
+ 0x24, /* id1 */
+ 0x01, /* id2 */
+ 128L*1024L, /* size */
+ 3, /* addr_len */
+ 40000000 /* speed */
},
#ifdef CONFIG_RAMTRON_FRAM_NON_JEDEC
{
- .size = 256L*1024L,
- .addr_len = 3,
- .id1 = 0xff,
- .id2 = 0xff,
- .speed = 40000000,
- .name = "FM25H20",
+ "FM25H20", /* name */
+ 0xff, /* id1 */
+ 0xff, /* id2 */
+ 256L*1024L, /* size */
+ 3, /* addr_len */
+ 40000000 /* speed */
},
{
- .name = NULL,
+ NULL, /* name */
+ 0, /* id1 */
+ 0, /* id2 */
+ 0, /* size */
+ 0, /* addr_len */
+ 0 /* speed */
}
#endif
};
diff --git a/nuttx/fs/fs_fdopen.c b/nuttx/fs/fs_fdopen.c index 176ba1bf4..930aec26f 100644 --- a/nuttx/fs/fs_fdopen.c +++ b/nuttx/fs/fs_fdopen.c @@ -159,7 +159,7 @@ FAR struct file_struct *fs_fdopen(int fd, int oflags, FAR _TCB *tcb) */ #if defined(CONFIG_NET) && CONFIG_NSOCKET_DESCRIPTORS > 0 - ret = net_checksd(tcb, fd, oflags); + ret = net_checksd(fd, oflags); #else /* No networking... it is just a bad descriptor */ diff --git a/nuttx/include/nuttx/mii.h b/nuttx/include/nuttx/mii.h index ea63b154b..59458ec3f 100644 --- a/nuttx/include/nuttx/mii.h +++ b/nuttx/include/nuttx/mii.h @@ -396,15 +396,15 @@ #define KS8721_INTCS_REMFAULTE (1 << 9) /* Bit 9: Enable remote fault interrupt */ #define KS8721_INTCS_LINKDOWNE (1 << 10) /* Bit 10: Enable link down interrupt */ #define KS8721_INTCS_LPACKE (1 << 11) /* Bit 11: Enable link partner acknowldgement interrupt */ -#define KS8721_INTCS_PDFAULT (1 << 12) /* Bit 12: Enable parallel detect fault interrupt */ +#define KS8721_INTCS_PDFAULTE (1 << 12) /* Bit 12: Enable parallel detect fault interrupt */ #define KS8721_INTCS_PGRCVDE (1 << 13) /* Bit 13: Enable page received interrupt */ #define KS8721_INTCS_RXERRE (1 << 14) /* Bit 14: Enable receive error interrupt */ #define KS8721_INTCS_JABBERE (1 << 15) /* Bit 15: Enable Jabber Interrupt */ /* KS8921 10BASE-TX PHY control register */ -#define KS8721_10BTCR_ xxx (1 << 0) /* Bit 0: xxx */ -#define KS8721_10BTCR_ xxx (1 << 1) /* Bit 1: xxx */ +#define KS8721_10BTCR_BIT0 (1 << 0) /* Bit 0: xxx */ +#define KS8721_10BTCR_BIT1 (1 << 1) /* Bit 1: xxx */ #define KS8721_10BTCR_MODE_SHIFT (2) /* Bits 2-4: Operation Mode Indication */ #define KS8721_10BTCR_MODE_MASK (7 << KS8721_10BTCR_MODE_SHIFT) # define KS8721_10BTCR_MODE_ANEG (0 << KS8721_10BTCR_MODE_SHIFT) /* Still in auto-negotiation */ @@ -414,15 +414,15 @@ # define KS8721_10BTCR_MODE_10BTFD (5 << KS8721_10BTCR_MODE_SHIFT) /* 10BASE-T full duplex */ # define KS8721_10BTCR_MODE_100BTFD (6 << KS8721_10BTCR_MODE_SHIFT) /* 100BASE-T full duplex */ # define KS8721_10BTCR_MODE_ISOLATE (7 << KS8721_10BTCR_MODE_SHIFT) /* PHY/MII isolate */ -#define KS8721_10BTCR_ ISOLATE (1 << 5) /* Bit 5: PHY isolate */ -#define KS8721_10BTCR_ PAUSE (1 << 6) /* Bit 6: Enable pause */ -#define KS8721_10BTCR_ ANEGCOMP (1 << 7) /* Bit 7: Auto-negotiation complete */ -#define KS8721_10BTCR_ JABBERE (1 << 8) /* Bit 8: Enable Jabber */ -#define KS8721_10BTCR_ INTLVL (1 << 9) /* Bit 9: Interrupt level */ -#define KS8721_10BTCR_ POWER (1 << 10) /* Bit 10: Power saving */ -#define KS8721_10BTCR_ FORCE (1 << 11) /* Bit 11: Force link */ -#define KS8721_10BTCR_ ENERGY (1 << 12) /* Bit 12: Energy detect */ -#define KS8721_10BTCR_ PAIRSWAPD (1 << 13) /* Bit 13: Pairswap disable */ +#define KS8721_10BTCR_ISOLATE (1 << 5) /* Bit 5: PHY isolate */ +#define KS8721_10BTCR_PAUSE (1 << 6) /* Bit 6: Enable pause */ +#define KS8721_10BTCR_ANEGCOMP (1 << 7) /* Bit 7: Auto-negotiation complete */ +#define KS8721_10BTCR_JABBERE (1 << 8) /* Bit 8: Enable Jabber */ +#define KS8721_10BTCR_INTLVL (1 << 9) /* Bit 9: Interrupt level */ +#define KS8721_10BTCR_POWER (1 << 10) /* Bit 10: Power saving */ +#define KS8721_10BTCR_FORCE (1 << 11) /* Bit 11: Force link */ +#define KS8721_10BTCR_ENERGY (1 << 12) /* Bit 12: Energy detect */ +#define KS8721_10BTCR_PAIRSWAPD (1 << 13) /* Bit 13: Pairswap disable */ /**************************************************************************** * Type Definitions diff --git a/nuttx/include/nuttx/net.h b/nuttx/include/nuttx/net.h index 1d514e888..62dfa2bd8 100644 --- a/nuttx/include/nuttx/net.h +++ b/nuttx/include/nuttx/net.h @@ -136,8 +136,7 @@ extern "C" { * supports the requested access. */ -typedef struct _TCB _TCB; /* Forward reference */ -EXTERN int net_checksd(FAR _TCB *tcb, int fd, int oflags); +EXTERN int net_checksd(int fd, int oflags); /* net_sockets.c *************************************************************/ /* There interfaces are called only from OS scheduling and iniialization logic diff --git a/nuttx/net/net_checksd.c b/nuttx/net/net_checksd.c index 76d30fbee..3da3cea62 100644 --- a/nuttx/net/net_checksd.c +++ b/nuttx/net/net_checksd.c @@ -64,7 +64,7 @@ ****************************************************************************/ #if defined(CONFIG_NET) && CONFIG_NFILE_DESCRIPTORS > 0 -int net_checksd(FAR _TCB *tcb, int sd, int oflags) +int net_checksd(int sd, int oflags) { FAR struct socket *psock = sockfd_socket(sd); @@ -84,5 +84,5 @@ int net_checksd(FAR _TCB *tcb, int sd, int oflags) return OK; } -#endif /* CONIG_NET && ONFIG_NFILE_DESCRIPTORS > 0 */ +#endif /* CONIG_NET && CONFIG_NFILE_DESCRIPTORS > 0 */ |