From 8c5b57d449bae1b9f5b3b501356e486439f93ae0 Mon Sep 17 00:00:00 2001 From: patacongo Date: Tue, 27 Nov 2012 15:09:12 +0000 Subject: configs/z8f64200100kit/ostest at same level as ez80 configurations; nuttx/arch/arm/src/lpc17xx/lpc17_i2c.cuninitialization fix git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5392 42af7a65-404d-4744-a932-0658087f49c3 --- apps/ChangeLog.txt | 4 ++-- apps/examples/relays/Makefile | 2 +- apps/netutils/codecs/md5.c | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) (limited to 'apps') diff --git a/apps/ChangeLog.txt b/apps/ChangeLog.txt index c1c5189c4..3d09915c3 100644 --- a/apps/ChangeLog.txt +++ b/apps/ChangeLog.txt @@ -33,7 +33,7 @@ 6.3 2011-05-15 Gregory Nutt - * apps/interpreter: Add a directory to hold interpreters. The Pascal add- + * apps/interpreter: Add a directory to hold interpreters. The Pascal add- on module now installs and builds under this directory. * apps/interpreter/ficl: Added logic to build Ficl (the "Forth Inspired Command Language"). See http://ficl.sourceforge.net/. @@ -421,4 +421,4 @@ make foreach loops instead of shell loops. * apps/examples/elf/test/*/Makefile: OSX doesn't support install -D, use mkdir -p then install without the -D. From Mike Smith. - + * apps/examples/relays/Makefile: Reduced stack requirement (Darcy Gong). diff --git a/apps/examples/relays/Makefile b/apps/examples/relays/Makefile index 9d7b036d3..8e91ab572 100644 --- a/apps/examples/relays/Makefile +++ b/apps/examples/relays/Makefile @@ -64,7 +64,7 @@ ROOTDEPPATH = --dep-path . APPNAME = relays PRIORITY = SCHED_PRIORITY_DEFAULT -STACKSIZE = 2048 +STACKSIZE = 512 # Common build diff --git a/apps/netutils/codecs/md5.c b/apps/netutils/codecs/md5.c index bf0394b9d..eb564973f 100644 --- a/apps/netutils/codecs/md5.c +++ b/apps/netutils/codecs/md5.c @@ -82,6 +82,7 @@ # define F4(x, y, z) (y ^ (x | ~z)) /* This is the central step in the MD5 algorithm. */ + # define MD5STEP(f, w, x, y, z, data, s) \ ( w += f(x, y, z) + data, w = w<>(32-s), w += x ) -- cgit v1.2.3 From 3c20b3a3cde677efa2963609d44954bfaf9c19a1 Mon Sep 17 00:00:00 2001 From: patacongo Date: Tue, 27 Nov 2012 16:26:54 +0000 Subject: Add chip ID funcitions for Shenzhou and Cloudctrl boards; Extened NSH ifconfig command and improve DHCPC -- All from Darcy Gong git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5393 42af7a65-404d-4744-a932-0658087f49c3 --- apps/ChangeLog.txt | 2 + apps/netutils/dhcpc/dhcpc.c | 23 ++++++-- apps/nshlib/README.txt | 2 +- apps/nshlib/nsh_netcmds.c | 93 ++++++++++++++++++++++++++++----- apps/nshlib/nsh_netinit.c | 2 +- apps/nshlib/nsh_parse.c | 2 +- nuttx/ChangeLog | 3 ++ nuttx/Documentation/NuttShell.html | 4 +- nuttx/configs/cloudctrl/include/board.h | 11 ++++ nuttx/configs/cloudctrl/src/Makefile | 2 +- nuttx/configs/cloudctrl/src/up_chipid.c | 93 +++++++++++++++++++++++++++++++++ nuttx/configs/shenzhou/include/board.h | 11 ++++ nuttx/configs/shenzhou/src/Makefile | 2 +- nuttx/configs/shenzhou/src/up_chipid.c | 92 ++++++++++++++++++++++++++++++++ 14 files changed, 316 insertions(+), 26 deletions(-) create mode 100644 nuttx/configs/cloudctrl/src/up_chipid.c create mode 100644 nuttx/configs/shenzhou/src/up_chipid.c (limited to 'apps') diff --git a/apps/ChangeLog.txt b/apps/ChangeLog.txt index 3d09915c3..0b4f58e77 100644 --- a/apps/ChangeLog.txt +++ b/apps/ChangeLog.txt @@ -422,3 +422,5 @@ * apps/examples/elf/test/*/Makefile: OSX doesn't support install -D, use mkdir -p then install without the -D. From Mike Smith. * apps/examples/relays/Makefile: Reduced stack requirement (Darcy Gong). + * apps/nshlib and apps/netutils/dhcpc: Extend the NSH ifconfig command plus + various DHCPC improvements(Darcy Gong). diff --git a/apps/netutils/dhcpc/dhcpc.c b/apps/netutils/dhcpc/dhcpc.c index f5e15c8dc..b34320230 100644 --- a/apps/netutils/dhcpc/dhcpc.c +++ b/apps/netutils/dhcpc/dhcpc.c @@ -351,6 +351,7 @@ void *dhcpc_open(const void *macaddr, int maclen) struct dhcpc_state_s *pdhcpc; struct sockaddr_in addr; struct timeval tv; + int ret; ndbg("MAC: %02x:%02x:%02x:%02x:%02x:%02x\n", ((uint8_t*)macaddr)[0], ((uint8_t*)macaddr)[1], ((uint8_t*)macaddr)[2], @@ -369,21 +370,24 @@ void *dhcpc_open(const void *macaddr, int maclen) /* Create a UDP socket */ - pdhcpc->sockfd = socket(PF_INET, SOCK_DGRAM, 0); + pdhcpc->sockfd = socket(PF_INET, SOCK_DGRAM, 0); if (pdhcpc->sockfd < 0) { + nvdbg("socket handle %d\n",ret); free(pdhcpc); return NULL; } - /* bind the socket */ + /* Bind the socket */ addr.sin_family = AF_INET; addr.sin_port = HTONS(DHCPC_CLIENT_PORT); addr.sin_addr.s_addr = INADDR_ANY; - if (bind(pdhcpc->sockfd, (struct sockaddr*)&addr, sizeof(struct sockaddr_in)) < 0) + ret = bind(pdhcpc->sockfd, (struct sockaddr*)&addr, sizeof(struct sockaddr_in)); + if (ret < 0) { + nvdbg("bind status %d\n",ret); close(pdhcpc->sockfd); free(pdhcpc); return NULL; @@ -393,8 +397,11 @@ void *dhcpc_open(const void *macaddr, int maclen) tv.tv_sec = 10; tv.tv_usec = 0; - if (setsockopt(pdhcpc->sockfd, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(struct timeval)) < 0) + + ret = setsockopt(pdhcpc->sockfd, SOL_SOCKET, SO_RCVTIMEO, &tv, sizeof(struct timeval)); + if (ret < 0) { + nvdbg("setsockopt status %d\n",ret); close(pdhcpc->sockfd); free(pdhcpc); return NULL; @@ -410,9 +417,15 @@ void *dhcpc_open(const void *macaddr, int maclen) void dhcpc_close(void *handle) { - struct dchcpc_state_internal *pdhcpc = (struct dchcpc_state_internal *)handle; + struct dhcpc_state_s *pdhcpc = (struct dhcpc_state_s *)handle; + if (pdhcpc) { + if (pdhcpc->sockfd) + { + close(pdhcpc->sockfd); + } + free(pdhcpc); } } diff --git a/apps/nshlib/README.txt b/apps/nshlib/README.txt index 59f0538f0..bc626e699 100644 --- a/apps/nshlib/README.txt +++ b/apps/nshlib/README.txt @@ -389,7 +389,7 @@ o hexdump Dump data in hexadecimal format from a file or character device. -o ifconfig [nic_name [ip]] [dr|gw|gateway ] [netmask ] [dns ] [hw ] +o ifconfig [nic_name [|dhcp]] [dr|gw|gateway ] [netmask ] [dns ] [hw ] Show the current configuration of the network, for example: diff --git a/apps/nshlib/nsh_netcmds.c b/apps/nshlib/nsh_netcmds.c index d28fe873d..371d30460 100644 --- a/apps/nshlib/nsh_netcmds.c +++ b/apps/nshlib/nsh_netcmds.c @@ -81,10 +81,13 @@ # endif #endif -#ifdef CONFIG_HAVE_GETHOSTBYNAME -# include -#else -# include +#if defined(CONFIG_NSH_DHCPC) || defined(CONFIG_NSH_DNS) +# ifdef CONFIG_HAVE_GETHOSTBYNAME +# include +# else +# include +# endif +# include #endif #include "nsh.h" @@ -568,8 +571,11 @@ int cmd_ifconfig(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) FAR char *tmp = NULL; FAR char *hw = NULL; FAR char *dns = NULL; - bool badarg=false; - uint8_t mac[6]; + bool badarg = false; + uint8_t mac[IFHWADDRLEN]; +#if defined(CONFIG_NSH_DHCPC) + FAR void *handle; +#endif /* With one or no arguments, ifconfig simply shows the status of ethernet * device: @@ -673,10 +679,23 @@ int cmd_ifconfig(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) uip_setmacaddr(intf, mac); } - /* Set host ip address */ +#if defined(CONFIG_NSH_DHCPC) + if (!strcmp(hostip, "dhcp")) + { + /* Set DHCP addr */ + + ndbg("DHCPC Mode\n"); + gip = addr.s_addr = 0; + } + else +#endif + { + /* Set host IP address */ + + ndbg("Host IP: %s\n", hostip); + gip = addr.s_addr = inet_addr(hostip); + } - ndbg("Host IP: %s\n", hostip); - gip = addr.s_addr = inet_addr(hostip); uip_sethostaddr(intf, &addr); /* Set gateway */ @@ -688,11 +707,15 @@ int cmd_ifconfig(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) } else { - ndbg("Gateway: default\n"); - gip = NTOHL(gip); - gip &= ~0x000000ff; - gip |= 0x00000001; - gip = HTONL(gip); + if (gip) + { + ndbg("Gateway: default\n"); + gip = NTOHL(gip); + gip &= ~0x000000ff; + gip |= 0x00000001; + gip = HTONL(gip); + } + addr.s_addr = gip; } @@ -728,6 +751,48 @@ int cmd_ifconfig(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) resolv_conf(&addr); #endif +#if defined(CONFIG_NSH_DHCPC) + /* Get the MAC address of the NIC */ + + if (!gip) + { + uip_getmacaddr("eth0", mac); + + /* Set up the DHCPC modules */ + + handle = dhcpc_open(&mac, IFHWADDRLEN); + + /* Get an IP address. Note that there is no logic for renewing the IP address in this + * example. The address should be renewed in ds.lease_time/2 seconds. + */ + + if (handle) + { + struct dhcpc_state ds; + + (void)dhcpc_request(handle, &ds); + uip_sethostaddr("eth0", &ds.ipaddr); + + if (ds.netmask.s_addr != 0) + { + uip_setnetmask("eth0", &ds.netmask); + } + + if (ds.default_router.s_addr != 0) + { + uip_setdraddr("eth0", &ds.default_router); + } + + if (ds.dnsaddr.s_addr != 0) + { + resolv_conf(&ds.dnsaddr); + } + + dhcpc_close(handle); + } + } +#endif + return OK; } #endif diff --git a/apps/nshlib/nsh_netinit.c b/apps/nshlib/nsh_netinit.c index bb1c73dff..58d238312 100644 --- a/apps/nshlib/nsh_netinit.c +++ b/apps/nshlib/nsh_netinit.c @@ -156,7 +156,7 @@ int nsh_netinit(void) { struct dhcpc_state ds; (void)dhcpc_request(handle, &ds); - uip_sethostaddr("eth1", &ds.ipaddr); + uip_sethostaddr("eth0", &ds.ipaddr); if (ds.netmask.s_addr != 0) { uip_setnetmask("eth0", &ds.netmask); diff --git a/apps/nshlib/nsh_parse.c b/apps/nshlib/nsh_parse.c index abdf5c321..27068acff 100644 --- a/apps/nshlib/nsh_parse.c +++ b/apps/nshlib/nsh_parse.c @@ -235,7 +235,7 @@ static const struct cmdmap_s g_cmdmap[] = #ifdef CONFIG_NET # ifndef CONFIG_NSH_DISABLE_IFCONFIG - { "ifconfig", cmd_ifconfig, 1, 11, "[nic_name [ip]] [dr|gw|gateway ] [netmask ] [dns ] [hw ]" }, + { "ifconfig", cmd_ifconfig, 1, 11, "[nic_name [|dhcp]] [dr|gw|gateway ] [netmask ] [dns ] [hw ]" }, # endif # ifndef CONFIG_NSH_DISABLE_IFUPDOWN { "ifdown", cmd_ifdown, 2, 2, "" }, diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog index 9e8ddf44d..810e0eb40 100644 --- a/nuttx/ChangeLog +++ b/nuttx/ChangeLog @@ -3697,3 +3697,6 @@ Windows build. * nuttx/arch/arm/src/lpc17xx/lpc17_i2c.c: Resources not being released when I2C is uninitialized. + * cloudctrl/src/up_chipid.c and shenzhou/src/up_chipid.c: Add functions to + get chip ID. Contributed by Darcy Gong. These should not be board-dependent, + but should be in arch/arm/src/stm32 where they can be used from any board. diff --git a/nuttx/Documentation/NuttShell.html b/nuttx/Documentation/NuttShell.html index 1b14f96f6..0b5f7aa11 100644 --- a/nuttx/Documentation/NuttShell.html +++ b/nuttx/Documentation/NuttShell.html @@ -8,7 +8,7 @@

NuttShell (NSH)

-

Last Updated: November 9, 2012

+

Last Updated: November 27, 2012

@@ -1219,7 +1219,7 @@ hexdump <file or device>

Command Syntax:

    -ifconfig [nic_name [ip]] [dr|gw|gateway <dr-address>] [netmask <net-mask>] [dns <dns-address>] [hw <hw-mac>]]
    +ifconfig [nic_name [<ip-address>|dhcp]] [dr|gw|gateway <dr-address>] [netmask <net-mask>] [dns <dns-address>] [hw <hw-mac>]]
     

Synopsis. diff --git a/nuttx/configs/cloudctrl/include/board.h b/nuttx/configs/cloudctrl/include/board.h index 5f5e86ebc..3afdb9cb8 100644 --- a/nuttx/configs/cloudctrl/include/board.h +++ b/nuttx/configs/cloudctrl/include/board.h @@ -406,6 +406,17 @@ EXTERN void relays_resetmodes(uint32_t relays_stat); EXTERN void relays_powermodes(uint32_t relays_stat); #endif +/************************************************************************************ + * Chip ID functions + * + * Description: + * Non-standard functions to obtain chip ID information. + * + ************************************************************************************/ + +EXTERN const char *stm32_getchipid(void); +EXTERN const char *stm32_getchipid_string(void); + #undef EXTERN #if defined(__cplusplus) } diff --git a/nuttx/configs/cloudctrl/src/Makefile b/nuttx/configs/cloudctrl/src/Makefile index 37c944f4d..e04853115 100644 --- a/nuttx/configs/cloudctrl/src/Makefile +++ b/nuttx/configs/cloudctrl/src/Makefile @@ -41,7 +41,7 @@ CFLAGS += -I$(TOPDIR)/sched ASRCS = AOBJS = $(ASRCS:.S=$(OBJEXT)) -CSRCS = up_boot.c up_spi.c +CSRCS = up_boot.c up_spi.c up_chipid.c ifeq ($(CONFIG_HAVE_CXX),y) CSRCS += up_cxxinitialize.c diff --git a/nuttx/configs/cloudctrl/src/up_chipid.c b/nuttx/configs/cloudctrl/src/up_chipid.c new file mode 100644 index 000000000..55018edd4 --- /dev/null +++ b/nuttx/configs/cloudctrl/src/up_chipid.c @@ -0,0 +1,93 @@ +/************************************************************************************ + * configs/cloudctrl/src/up_chipid.c + * arch/arm/src/board/up_chipid.c + * + * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * Darcy Gong + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +#include + +#include + +#include "up_arch.h" + +/************************************************************************************ + * Definitions + ************************************************************************************/ + +/************************************************************************************ + * Private Functions + ************************************************************************************/ + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +const char *stm32_getchipid(void) +{ + static char cpuid[12]; + int i; + + for (i = 0; i < 12; i++) + { + cpuid[i] = getreg8(0x1ffff7e8+i); + } + + return cpuid; +} + +const char *stm32_getchipid_string(void) +{ + static char cpuid[27]; + int c; + int i; + + for (i = 0, c = 0; i < 12; i++) + { + sprintf(&cpuid[c], "%02X", getreg8(0x1ffff7e8+11-i)); + c += 2; + if (i % 4 == 3) + { + cpuid[c++] = '-'; + } + } + + cpuid[26] = '\0'; + return cpuid; +} diff --git a/nuttx/configs/shenzhou/include/board.h b/nuttx/configs/shenzhou/include/board.h index efc15c73d..7c4d983a1 100644 --- a/nuttx/configs/shenzhou/include/board.h +++ b/nuttx/configs/shenzhou/include/board.h @@ -452,6 +452,17 @@ EXTERN void relays_resetmodes(uint32_t relays_stat); EXTERN void relays_powermodes(uint32_t relays_stat); #endif +/************************************************************************************ + * Chip ID functions + * + * Description: + * Non-standard functions to obtain chip ID information. + * + ************************************************************************************/ + +EXTERN const char *stm32_getchipid(void); +EXTERN const char *stm32_getchipid_string(void); + #undef EXTERN #if defined(__cplusplus) } diff --git a/nuttx/configs/shenzhou/src/Makefile b/nuttx/configs/shenzhou/src/Makefile index b70a6e9ce..28c42c392 100644 --- a/nuttx/configs/shenzhou/src/Makefile +++ b/nuttx/configs/shenzhou/src/Makefile @@ -40,7 +40,7 @@ CFLAGS += -I$(TOPDIR)/sched ASRCS = AOBJS = $(ASRCS:.S=$(OBJEXT)) -CSRCS = up_boot.c up_spi.c up_mmcsd.c +CSRCS = up_boot.c up_spi.c up_mmcsd.c up_chipid.c ifeq ($(CONFIG_HAVE_CXX),y) CSRCS += up_cxxinitialize.c diff --git a/nuttx/configs/shenzhou/src/up_chipid.c b/nuttx/configs/shenzhou/src/up_chipid.c new file mode 100644 index 000000000..e2978e54a --- /dev/null +++ b/nuttx/configs/shenzhou/src/up_chipid.c @@ -0,0 +1,92 @@ +/************************************************************************************ + * configs/shenzhou/src/up_chipid.c + * arch/arm/src/board/up_chipid.c + * + * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +/************************************************************************************ + * Included Files + ************************************************************************************/ + +#include + +#include + +#include + +#include "up_arch.h" + +/************************************************************************************ + * Definitions + ************************************************************************************/ + +/************************************************************************************ + * Private Functions + ************************************************************************************/ + +/************************************************************************************ + * Public Functions + ************************************************************************************/ + +const char *stm32_getchipid(void) +{ + static char cpuid[12]; + int i; + + for (i = 0; i < 12; i++) + { + cpuid[i] = getreg8(0x1ffff7e8+i); + } + + return cpuid; +} + +const char *stm32_getchipid_string(void) +{ + static char cpuid[27]; + int c; + int i; + + for (i = 0, c = 0; i < 12; i++) + { + sprintf(&cpuid[c], "%02X", getreg8(0x1ffff7e8+11-i)); + c += 2; + if (i % 4 == 3) + { + cpuid[c++] = '-'; + } + } + + cpuid[26] = '\0'; + return cpuid; +} -- cgit v1.2.3 From 724d3c4c0dd93354fb02cc64972448e4ea7e00a0 Mon Sep 17 00:00:00 2001 From: patacongo Date: Thu, 29 Nov 2012 13:58:53 +0000 Subject: Patches for NSH disable background, and ARMv7M assembly from Freddie Chopin git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5398 42af7a65-404d-4744-a932-0658087f49c3 --- apps/nshlib/nsh_apps.c | 41 ++++++++++++++++++++++--- nuttx/arch/arm/src/armv7-m/up_exception.S | 4 +-- nuttx/configs/z8encore000zco/scripts/setenv.bat | 2 +- nuttx/configs/z8f64200100kit/scripts/setenv.bat | 2 +- 4 files changed, 41 insertions(+), 8 deletions(-) (limited to 'apps') diff --git a/apps/nshlib/nsh_apps.c b/apps/nshlib/nsh_apps.c index e335c2e2c..7dbaf9ba8 100644 --- a/apps/nshlib/nsh_apps.c +++ b/apps/nshlib/nsh_apps.c @@ -122,13 +122,28 @@ int nsh_execapp(FAR struct nsh_vtbl_s *vtbl, FAR const char *cmd, ret = exec_namedapp(cmd, (FAR const char **)argv); if (ret >= 0) { - /* The application was successfully started (but still blocked because the - * scheduler is locked). If the application was not backgrounded, then we - * need to wait here for the application to exit. + /* The application was successfully started (but still blocked because + * the scheduler is locked). If the application was not backgrounded, + * then we need to wait here for the application to exit. These really + * only works works with the following options: + * + * - CONFIG_NSH_DISABLEBG - Do not run commands in background + * - CONFIG_SCHED_WAITPID - Required to run external commands in + * foreground + * + * These concepts do not apply cleanly to the external applications. */ #ifdef CONFIG_SCHED_WAITPID + + /* CONFIG_SCHED_WAITPID is selected, so we may run the command in + * foreground unless we were specifically requested to run the command + * in background (and running commands in background is enabled). + */ + +# ifndef CONFIG_NSH_DISABLEBG if (vtbl->np.np_bg == false) +# endif /* CONFIG_NSH_DISABLEBG */ { int rc = 0; @@ -155,8 +170,25 @@ int nsh_execapp(FAR struct nsh_vtbl_s *vtbl, FAR const char *cmd, */ } } +# ifndef CONFIG_NSH_DISABLEBG else -#endif +# endif /* CONFIG_NSH_DISABLEBG */ +#endif /* CONFIG_SCHED_WAITPID */ + + /* We get here if either: + * + * - CONFIG_SCHED_WAITPID is not selected meaning that all commands + * have to be run in background, or + * - CONFIG_SCHED_WAITPID and CONFIG_NSH_DISABLEBG are both selected, but the + * user requested to run the command in background. + * + * NOTE that the case of a) CONFIG_SCHED_WAITPID is not selected and + * b) CONFIG_NSH_DISABLEBG selected cannot be supported. In that event, all + * commands will have to run in background. The waitpid() API must be + * available to support running the command in foreground. + */ + +#if !defined(CONFIG_SCHED_WAITPID) || !defined(CONFIG_NSH_DISABLEBG) { struct sched_param param; sched_getparam(0, ¶m); @@ -168,6 +200,7 @@ int nsh_execapp(FAR struct nsh_vtbl_s *vtbl, FAR const char *cmd, ret = OK; } +#endif /* !CONFIG_SCHED_WAITPID || !CONFIG_NSH_DISABLEBG */ } sched_unlock(); diff --git a/nuttx/arch/arm/src/armv7-m/up_exception.S b/nuttx/arch/arm/src/armv7-m/up_exception.S index 31d8dbb0c..c9f216027 100644 --- a/nuttx/arch/arm/src/armv7-m/up_exception.S +++ b/nuttx/arch/arm/src/armv7-m/up_exception.S @@ -134,9 +134,9 @@ exception_common: #if CONFIG_ARCH_INTERRUPTSTACK > 3 ldr sp, =g_intstackbase - push r1 /* Save the MSP on the interrupt stack */ + push {r1} /* Save the MSP on the interrupt stack */ bl up_doirq /* R0=IRQ, R1=register save area on stack */ - pop r1 /* Recover R1=main stack pointer */ + pop {r1} /* Recover R1=main stack pointer */ #else msr msp, r1 /* We are using the main stack pointer */ bl up_doirq /* R0=IRQ, R1=register save area on stack */ diff --git a/nuttx/configs/z8encore000zco/scripts/setenv.bat b/nuttx/configs/z8encore000zco/scripts/setenv.bat index f208a6e8b..407cca97f 100644 --- a/nuttx/configs/z8encore000zco/scripts/setenv.bat +++ b/nuttx/configs/z8encore000zco/scripts/setenv.bat @@ -41,7 +41,7 @@ set PATH=C:\MinGW\bin;%PATH% rem This is the location where I installed the ZDS-II toolchain. -set PATH=C:\Program Files (x86)\ZiLOG\ZZDSII_Z8Encore!_5.0.0\bin;%PATH% +set PATH=C:\Program Files (x86)\ZiLOG\ZDSII_Z8Encore!_5.0.0\bin;%PATH% rem This is the location where I installed the GNUWin32 tools. See rem http://gnuwin32.sourceforge.net/. diff --git a/nuttx/configs/z8f64200100kit/scripts/setenv.bat b/nuttx/configs/z8f64200100kit/scripts/setenv.bat index 4281d5b11..e0526d988 100644 --- a/nuttx/configs/z8f64200100kit/scripts/setenv.bat +++ b/nuttx/configs/z8f64200100kit/scripts/setenv.bat @@ -41,7 +41,7 @@ set PATH=C:\MinGW\bin;%PATH% rem This is the location where I installed the ZDS-II toolchain. -set PATH=C:\Program Files (x86)\ZiLOG\ZZDSII_Z8Encore!_5.0.0\bin;%PATH% +set PATH=C:\Program Files (x86)\ZiLOG\ZDSII_Z8Encore!_5.0.0\bin;%PATH% rem This is the location where I installed the GNUWin32 tools. See rem http://gnuwin32.sourceforge.net/. -- cgit v1.2.3 From cdada458a18eaf892b3791e4ace1c42535350495 Mon Sep 17 00:00:00 2001 From: patacongo Date: Thu, 29 Nov 2012 15:24:27 +0000 Subject: z8 configurations will now build in Windows native environment git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5399 42af7a65-404d-4744-a932-0658087f49c3 --- apps/ChangeLog.txt | 2 + nuttx/ChangeLog | 4 ++ nuttx/configs/z16f2800100zcog/scripts/setenv.bat | 50 ++++++++++++++++++++ nuttx/configs/z8encore000zco/ostest/Make.defs | 59 ++++++++++++------------ nuttx/configs/z8encore000zco/src/Makefile | 2 +- nuttx/configs/z8f64200100kit/ostest/Make.defs | 59 ++++++++++++------------ nuttx/configs/z8f64200100kit/src/Makefile | 2 +- 7 files changed, 116 insertions(+), 62 deletions(-) create mode 100644 nuttx/configs/z16f2800100zcog/scripts/setenv.bat (limited to 'apps') diff --git a/apps/ChangeLog.txt b/apps/ChangeLog.txt index 0b4f58e77..29a54461a 100644 --- a/apps/ChangeLog.txt +++ b/apps/ChangeLog.txt @@ -424,3 +424,5 @@ * apps/examples/relays/Makefile: Reduced stack requirement (Darcy Gong). * apps/nshlib and apps/netutils/dhcpc: Extend the NSH ifconfig command plus various DHCPC improvements(Darcy Gong). + * apps/nshlib/nsh_apps.c: Fix compilation errors whenCONFIG_NSH_DISABLEBG=y. + From Freddie Chopin. diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog index 97b5b74a0..e0ca6c8dc 100644 --- a/nuttx/ChangeLog +++ b/nuttx/ChangeLog @@ -3708,3 +3708,7 @@ Denis Cariki. * z8encore000zco/ostest and z8f64200100kit/ostest: Converted to use Kconfig/ mconf configuration tool. + * arch/arm/src/armv7-m/up_exception.S: missing curly braces for push/pop + From Freddie Chopin. + * z8encore000zco/ostest and z8f64200100kit/ostest: Can now be modified to + support the Windows native builds (see corresponding README.txt files). diff --git a/nuttx/configs/z16f2800100zcog/scripts/setenv.bat b/nuttx/configs/z16f2800100zcog/scripts/setenv.bat new file mode 100644 index 000000000..4ee67c97e --- /dev/null +++ b/nuttx/configs/z16f2800100zcog/scripts/setenv.bat @@ -0,0 +1,50 @@ +@echo off + +rem configs/z16f2800100zcog/scripts/setenv.bat +rem +rem Copyright (C) 2012 Gregory Nutt. All rights reserved. +rem Author: Gregory Nutt +rem +rem Redistribution and use in source and binary forms, with or without +rem modification, are permitted provided that the following conditions +rem are met: +rem +rem 1. Redistributions of source code must retain the above copyright +rem notice, this list of conditions and the following disclaimer. +rem 2. Redistributions in binary form must reproduce the above copyright +rem notice, this list of conditions and the following disclaimer in +rem the documentation and/or other materials provided with the +rem distribution. +rem 3. Neither the name NuttX nor the names of its contributors may be +rem used to endorse or promote products derived from this software +rem without specific prior written permission. +rem +rem THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +rem "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +rem LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +rem FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +rem COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +rem INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +rem BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +rem OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +rem AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +rem LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +rem ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +rem POSSIBILITY OF SUCH DAMAGE. + +rem This is the location where I installed in the MinGW compiler. With +rem this configuration, it is recommended that you do NOT install the +rem MSYS tools; they conflict with the GNUWin32 tools. See +rem http://www.mingw.org/ for further info. + +set PATH=C:\MinGW\bin;%PATH% + +rem This is the location where I installed the ZDS-II toolchain. + +set PATH=C:\Program Files (x86)\ZiLOG\ZDSII_ZNEO_5.0.1\bin;%PATH% + +rem This is the location where I installed the GNUWin32 tools. See +rem http://gnuwin32.sourceforge.net/. + +set PATH=C:\gnuwin32\bin;%PATH% +echo %PATH% diff --git a/nuttx/configs/z8encore000zco/ostest/Make.defs b/nuttx/configs/z8encore000zco/ostest/Make.defs index bbb9a9ddc..9ce005260 100644 --- a/nuttx/configs/z8encore000zco/ostest/Make.defs +++ b/nuttx/configs/z8encore000zco/ostest/Make.defs @@ -45,66 +45,66 @@ include $(TOPDIR)/tools/Config.mk # # Your PC may be configured differently. -ZDSVERSION := 5.0.0 +ZDSVERSION = 5.0.0 ifeq ($(CONFIG_WINDOWS_NATIVE),y) - ZDSINSTALLDIR := C:/PROGRA~2/ZiLOG/ZDSII_Z8Encore!_$(ZDSVERSION) + ZDSINSTALLDIR = C:/PROGRA~2/ZiLOG/ZDSII_Z8Encore!_$(ZDSVERSION) INSTALLDIR = ${shell echo $(ZDSINSTALLDIR)| sed -e "s/\//\\/g"} - ZDSBINDIR := $(INSTALLDIR)\bin - ZDSSTDINCDIR := $(INSTALLDIR)\include\std - ZDSZILOGINCDIR := $(INSTALLDIR)\include\zilog + ZDSBINDIR = $(INSTALLDIR)\bin + ZDSSTDINCDIR = $(INSTALLDIR)\include\std + ZDSZILOGINCDIR = $(INSTALLDIR)\include\zilog ifeq ($(CONFIG_ARCH_CHIP_Z8F642X),y) - ZDSDEVINCDIR := $(INSTALLDIR)\Z8Encore_F642X + ZDSDEVINCDIR = $(INSTALLDIR)\Z8Encore_F642X endif ifeq ($(CONFIG_ARCH_CHIP_Z8F640X),y) - ZDSDEVINCDIR := $(INSTALLDIR)\Z8Encore_F640X + ZDSDEVINCDIR = $(INSTALLDIR)\Z8Encore_F640X endif - ZDSSTDLIBDIR := $(INSTALLDIR)\lib\std - ZDSZILOGLIBDIR := $(INSTALLDIR)\lib\zilog + ZDSSTDLIBDIR = $(INSTALLDIR)\lib\std + ZDSZILOGLIBDIR = $(INSTALLDIR)\lib\zilog # CFLAGs ARCHASMINCLUDES = -include:$(TOPDIR)\include;$(ZDSSTDINCDIR);$(ZDSZILOGINCDIR) EARCHASMINCLUDES = -include:$(TOPDIR)\include;$(ZDSSTDINCDIR);$(ZDSZILOGINCDIR) - ARCHSTDINCLUDES = -stdinc:$(TOPDIR)\include;$(ZDSSTDINCDIR);$(ZDSZILOGINCDIR) + ARCHSTDINCLUDES = -stdinc:$(TOPDIR)\include;$(ZDSSTDINCDIR);$(ZDSZILOGINCDIR);$(ZDSDEVINCDIR) ARCHUSRINCLUDES = -usrinc:. else - WINTOOL := y - ZDSINSTALLDIR := C:/PROGRA~2/ZiLOG/ZDSII_Z8Encore!_$(ZDSVERSION) + WINTOOL = y + ZDSINSTALLDIR = C:/PROGRA~2/ZiLOG/ZDSII_Z8Encore!_$(ZDSVERSION) INSTALLDIR = ${shell cygpath -u "$(ZDSINSTALLDIR)"} - ZDSBINDIR := $(INSTALLDIR)/bin - ZDSSTDINCDIR := $(INSTALLDIR)/include/std - ZDSZILOGINCDIR := $(INSTALLDIR)/include/zilog + ZDSBINDIR = $(INSTALLDIR)/bin + ZDSSTDINCDIR = $(INSTALLDIR)/include/std + ZDSZILOGINCDIR = $(INSTALLDIR)/include/zilog ifeq ($(CONFIG_ARCH_CHIP_Z8F642X),y) - ZDSDEVINCDIR := $(ZDSZILOGINCDIR)/Z8Encore_F642X + ZDSDEVINCDIR = $(ZDSZILOGINCDIR)/Z8Encore_F642X endif ifeq ($(CONFIG_ARCH_CHIP_Z8F640X),y) - ZDSDEVINCDIR := $(ZDSZILOGINCDIR)/Z8Encore_F640X + ZDSDEVINCDIR = $(ZDSZILOGINCDIR)/Z8Encore_F640X endif - ZDSSTDLIBDIR := $(INSTALLDIR)/lib/std - ZDSZILOGLIBDIR := $(INSTALLDIR)/lib/zilog + ZDSSTDLIBDIR = $(INSTALLDIR)/lib/std + ZDSZILOGLIBDIR = $(INSTALLDIR)/lib/zilog # These are the same directories but with the directory separator # character swapped as needed by the ZDS-II compiler - WTOPDIR := ${shell cygpath -w "$(TOPDIR)"} - WZDSSTDINCDIR := ${shell cygpath -w "$(ZDSSTDINCDIR)"} - WZDSZILOGINCDIR := ${shell cygpath -w "$(ZDSZILOGINCDIR)"} - WZDSDEVINCDIR := ${shell cygpath -w "$(ZDSDEVINCDIR)"} - WZDSSTDLIBDIR := ${shell cygpath -w "$(ZDSSTDLIBDIR)"} - WZDSZILOGLIBDIR := ${shell cygpath -w "$(ZDSZILOGLIBDIR)"} + WTOPDIR = ${shell cygpath -w "$(TOPDIR)"} + WZDSSTDINCDIR = ${shell cygpath -w "$(ZDSSTDINCDIR)"} + WZDSZILOGINCDIR = ${shell cygpath -w "$(ZDSZILOGINCDIR)"} + WZDSDEVINCDIR = ${shell cygpath -w "$(ZDSDEVINCDIR)"} + WZDSSTDLIBDIR = ${shell cygpath -w "$(ZDSSTDLIBDIR)"} + WZDSZILOGLIBDIR = ${shell cygpath -w "$(ZDSZILOGLIBDIR)"} # Escaped versions - ETOPDIR := ${shell echo "$(WTOPDIR)" | sed -e "s/ /%20/g"} - EZDSSTDINCDIR := ${shell echo "$(WZDSSTDINCDIR)" | sed -e "s/ /%20/g"} - EZDSZILOGINCDIR := ${shell echo "$(WZDSZILOGINCDIR)" | sed -e "s/ /%20/g"} + ETOPDIR = ${shell echo "$(WTOPDIR)" | sed -e "s/ /%20/g"} + EZDSSTDINCDIR = ${shell echo "$(WZDSSTDINCDIR)" | sed -e "s/ /%20/g"} + EZDSZILOGINCDIR = ${shell echo "$(WZDSZILOGINCDIR)" | sed -e "s/ /%20/g"} # CFLAGs ARCHASMINCLUDES = -include:'$(WTOPDIR)\include;$(WZDSSTDINCDIR);$(WZDSZILOGINCDIR)' EARCHASMINCLUDES = -include:'$(ETOPDIR)\include;$(EZDSSTDINCDIR);$(EZDSZILOGINCDIR)' - ARCHSTDINCLUDES = -stdinc:'$(WTOPDIR)\include;$(WZDSSTDINCDIR);$(WZDSZILOGINCDIR)' + ARCHSTDINCLUDES = -stdinc:'$(WTOPDIR)\include;$(WZDSSTDINCDIR);$(WZDSZILOGINCDIR);$(WZDSDEVINCDIR)' ARCHUSRINCLUDES = -usrinc:'.' endif @@ -156,7 +156,6 @@ ARCHLIST = -keeplst -NOlist -NOlistinc -keepasm ARCHPICFLAGS = ARCHWARNINGS = -warn ARCHDEFINES = -define:$(ARCHFAMILYDEF) -define:$(ARCHCPUDEF) -define:$(ARCHSERIESDEF) -ARCHSTDINCLUDES = -stdinc:'$(WTOPDIR)\include;$(WZDSSTDINCDIR);$(WZDSZILOGINCDIR);$(WZDSDEVINCDIR)' ARCHINCLUDES = $(ARCHSTDINCLUDES) $(ARCHUSRINCLUDES) CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHLIST) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) diff --git a/nuttx/configs/z8encore000zco/src/Makefile b/nuttx/configs/z8encore000zco/src/Makefile index 21117dd53..30a4a6285 100644 --- a/nuttx/configs/z8encore000zco/src/Makefile +++ b/nuttx/configs/z8encore000zco/src/Makefile @@ -39,7 +39,7 @@ SCHEDSRCDIR = $(TOPDIR)$(DELIM)sched ARCHSRCDIR = $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src ifeq ($(CONFIG_WINDOWS_NATIVE),y) - USRINCLUDES = -usrinc:'.;$(SCHEDSRCDIR);$(ARCHSRCDIR);$(ARCHSRCDIR)\common' + USRINCLUDES = -usrinc:".;$(SCHEDSRCDIR);$(ARCHSRCDIR);$(ARCHSRCDIR)\common" else WSCHEDSRCDIR = ${shell cygpath -w $(SCHEDSRCDIR)} WARCHSRCDIR = ${shell cygpath -w $(ARCHSRCDIR)} diff --git a/nuttx/configs/z8f64200100kit/ostest/Make.defs b/nuttx/configs/z8f64200100kit/ostest/Make.defs index 8b58a7346..85cb5c401 100644 --- a/nuttx/configs/z8f64200100kit/ostest/Make.defs +++ b/nuttx/configs/z8f64200100kit/ostest/Make.defs @@ -45,66 +45,66 @@ include $(TOPDIR)/tools/Config.mk # # Your PC may be configured differently. -ZDSVERSION := 5.0.0 +ZDSVERSION = 5.0.0 ifeq ($(CONFIG_WINDOWS_NATIVE),y) - ZDSINSTALLDIR := C:/PROGRA~2/ZiLOG/ZDSII_Z8Encore!_$(ZDSVERSION) + ZDSINSTALLDIR = C:/PROGRA~2/ZiLOG/ZDSII_Z8Encore!_$(ZDSVERSION) INSTALLDIR = ${shell echo $(ZDSINSTALLDIR)| sed -e "s/\//\\/g"} - ZDSBINDIR := $(INSTALLDIR)\bin - ZDSSTDINCDIR := $(INSTALLDIR)\include\std - ZDSZILOGINCDIR := $(INSTALLDIR)\include\zilog + ZDSBINDIR = $(INSTALLDIR)\bin + ZDSSTDINCDIR = $(INSTALLDIR)\include\std + ZDSZILOGINCDIR = $(INSTALLDIR)\include\zilog ifeq ($(CONFIG_ARCH_CHIP_Z8F642X),y) - ZDSDEVINCDIR := $(INSTALLDIR)\Z8Encore_F642X + ZDSDEVINCDIR = $(INSTALLDIR)\Z8Encore_F642X endif ifeq ($(CONFIG_ARCH_CHIP_Z8F640X),y) - ZDSDEVINCDIR := $(INSTALLDIR)\Z8Encore_F640X + ZDSDEVINCDIR = $(INSTALLDIR)\Z8Encore_F640X endif - ZDSSTDLIBDIR := $(INSTALLDIR)\lib\std - ZDSZILOGLIBDIR := $(INSTALLDIR)\lib\zilog + ZDSSTDLIBDIR = $(INSTALLDIR)\lib\std + ZDSZILOGLIBDIR = $(INSTALLDIR)\lib\zilog # CFLAGs ARCHASMINCLUDES = -include:$(TOPDIR)\include;$(ZDSSTDINCDIR);$(ZDSZILOGINCDIR) EARCHASMINCLUDES = -include:$(TOPDIR)\include;$(ZDSSTDINCDIR);$(ZDSZILOGINCDIR) - ARCHSTDINCLUDES = -stdinc:$(TOPDIR)\include;$(ZDSSTDINCDIR);$(ZDSZILOGINCDIR) + ARCHSTDINCLUDES = -stdinc:$(TOPDIR)\include;$(ZDSSTDINCDIR);$(ZDSZILOGINCDIR);$(ZDSDEVINCDIR) ARCHUSRINCLUDES = -usrinc:. else - WINTOOL := y - ZDSINSTALLDIR := C:/PROGRA~2/ZiLOG/ZDSII_Z8Encore!_$(ZDSVERSION) + WINTOOL = y + ZDSINSTALLDIR = C:/PROGRA~2/ZiLOG/ZDSII_Z8Encore!_$(ZDSVERSION) INSTALLDIR = ${shell cygpath -u "$(ZDSINSTALLDIR)"} - ZDSBINDIR := $(INSTALLDIR)/bin - ZDSSTDINCDIR := $(INSTALLDIR)/include/std - ZDSZILOGINCDIR := $(INSTALLDIR)/include/zilog + ZDSBINDIR = $(INSTALLDIR)/bin + ZDSSTDINCDIR = $(INSTALLDIR)/include/std + ZDSZILOGINCDIR = $(INSTALLDIR)/include/zilog ifeq ($(CONFIG_ARCH_CHIP_Z8F642X),y) - ZDSDEVINCDIR := $(ZDSZILOGINCDIR)/Z8Encore_F642X + ZDSDEVINCDIR = $(ZDSZILOGINCDIR)/Z8Encore_F642X endif ifeq ($(CONFIG_ARCH_CHIP_Z8F640X),y) - ZDSDEVINCDIR := $(ZDSZILOGINCDIR)/Z8Encore_F640X + ZDSDEVINCDIR = $(ZDSZILOGINCDIR)/Z8Encore_F640X endif - ZDSSTDLIBDIR := $(INSTALLDIR)/lib/std - ZDSZILOGLIBDIR := $(INSTALLDIR)/lib/zilog + ZDSSTDLIBDIR = $(INSTALLDIR)/lib/std + ZDSZILOGLIBDIR = $(INSTALLDIR)/lib/zilog # These are the same directories but with the directory separator # character swapped as needed by the ZDS-II compiler - WTOPDIR := ${shell cygpath -w "$(TOPDIR)"} - WZDSSTDINCDIR := ${shell cygpath -w "$(ZDSSTDINCDIR)"} - WZDSZILOGINCDIR := ${shell cygpath -w "$(ZDSZILOGINCDIR)"} - WZDSDEVINCDIR := ${shell cygpath -w "$(ZDSDEVINCDIR)"} - WZDSSTDLIBDIR := ${shell cygpath -w "$(ZDSSTDLIBDIR)"} - WZDSZILOGLIBDIR := ${shell cygpath -w "$(ZDSZILOGLIBDIR)"} + WTOPDIR = ${shell cygpath -w "$(TOPDIR)"} + WZDSSTDINCDIR = ${shell cygpath -w "$(ZDSSTDINCDIR)"} + WZDSZILOGINCDIR = ${shell cygpath -w "$(ZDSZILOGINCDIR)"} + WZDSDEVINCDIR = ${shell cygpath -w "$(ZDSDEVINCDIR)"} + WZDSSTDLIBDIR = ${shell cygpath -w "$(ZDSSTDLIBDIR)"} + WZDSZILOGLIBDIR = ${shell cygpath -w "$(ZDSZILOGLIBDIR)"} # Escaped versions - ETOPDIR := ${shell echo "$(WTOPDIR)" | sed -e "s/ /%20/g"} - EZDSSTDINCDIR := ${shell echo "$(WZDSSTDINCDIR)" | sed -e "s/ /%20/g"} - EZDSZILOGINCDIR := ${shell echo "$(WZDSZILOGINCDIR)" | sed -e "s/ /%20/g"} + ETOPDIR = ${shell echo "$(WTOPDIR)" | sed -e "s/ /%20/g"} + EZDSSTDINCDIR = ${shell echo "$(WZDSSTDINCDIR)" | sed -e "s/ /%20/g"} + EZDSZILOGINCDIR = ${shell echo "$(WZDSZILOGINCDIR)" | sed -e "s/ /%20/g"} # CFLAGs ARCHASMINCLUDES = -include:'$(WTOPDIR)\include;$(WZDSSTDINCDIR);$(WZDSZILOGINCDIR)' EARCHASMINCLUDES = -include:'$(ETOPDIR)\include;$(EZDSSTDINCDIR);$(EZDSZILOGINCDIR)' - ARCHSTDINCLUDES = -stdinc:'$(WTOPDIR)\include;$(WZDSSTDINCDIR);$(WZDSZILOGINCDIR)' + ARCHSTDINCLUDES = -stdinc:'$(WTOPDIR)\include;$(WZDSSTDINCDIR);$(WZDSZILOGINCDIR);$(WZDSDEVINCDIR)' ARCHUSRINCLUDES = -usrinc:'.' endif @@ -156,7 +156,6 @@ ARCHLIST = -keeplst -NOlist -NOlistinc -keepasm ARCHPICFLAGS = ARCHWARNINGS = -warn ARCHDEFINES = -define:$(ARCHFAMILYDEF) -define:$(ARCHCPUDEF) -define:$(ARCHSERIESDEF) -ARCHSTDINCLUDES = -stdinc:'$(WTOPDIR)\include;$(WZDSSTDINCDIR);$(WZDSZILOGINCDIR);$(WZDSDEVINCDIR)' ARCHINCLUDES = $(ARCHSTDINCLUDES) $(ARCHUSRINCLUDES) CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHLIST) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) diff --git a/nuttx/configs/z8f64200100kit/src/Makefile b/nuttx/configs/z8f64200100kit/src/Makefile index c9b7a6dc2..21087e6b8 100644 --- a/nuttx/configs/z8f64200100kit/src/Makefile +++ b/nuttx/configs/z8f64200100kit/src/Makefile @@ -39,7 +39,7 @@ SCHEDSRCDIR = $(TOPDIR)$(DELIM)sched ARCHSRCDIR = $(TOPDIR)$(DELIM)arch$(DELIM)$(CONFIG_ARCH)$(DELIM)src ifeq ($(CONFIG_WINDOWS_NATIVE),y) - USRINCLUDES = -usrinc:'.;$(SCHEDSRCDIR);$(ARCHSRCDIR);$(ARCHSRCDIR)\common' + USRINCLUDES = -usrinc:".;$(SCHEDSRCDIR);$(ARCHSRCDIR);$(ARCHSRCDIR)\common" else WSCHEDSRCDIR = ${shell cygpath -w $(SCHEDSRCDIR)} WARCHSRCDIR = ${shell cygpath -w $(ARCHSRCDIR)} -- cgit v1.2.3 From c9230359ef3da96b4aa2517475eb910e25ea1620 Mon Sep 17 00:00:00 2001 From: patacongo Date: Thu, 29 Nov 2012 18:44:02 +0000 Subject: All ZNEO configurations converted to use the mconf/Kconfig tool git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5401 42af7a65-404d-4744-a932-0658087f49c3 --- apps/ChangeLog.txt | 2 + apps/examples/pashello/Makefile | 30 +- apps/examples/pashello/pashello.c | 4 +- apps/interpreters/Kconfig | 4 +- apps/interpreters/Make.defs | 4 +- apps/interpreters/ficl/Kconfig | 4 +- misc/pascal/nuttx/Makefile | 30 +- nuttx/ChangeLog | 4 + nuttx/arch/Kconfig | 4 + nuttx/arch/arm/Kconfig | 11 +- nuttx/arch/mips/Kconfig | 10 +- nuttx/arch/z16/Kconfig | 11 +- nuttx/arch/z16/src/z16f/Kconfig | 12 + nuttx/configs/Kconfig | 2 +- nuttx/configs/cloudctrl/nsh/defconfig | 4 +- nuttx/configs/ez80f910200kitg/README.txt | 4 +- nuttx/configs/ez80f910200kitg/ostest/defconfig | 4 +- nuttx/configs/ez80f910200zco/README.txt | 4 +- nuttx/configs/ez80f910200zco/ostest/defconfig | 4 +- nuttx/configs/fire-stm32v2/nsh/defconfig | 4 +- nuttx/configs/shenzhou/nsh/defconfig | 4 +- nuttx/configs/shenzhou/nxwm/defconfig | 4 +- nuttx/configs/shenzhou/thttpd/defconfig | 4 +- nuttx/configs/sim/cxxtest/defconfig | 4 +- nuttx/configs/sim/ostest/defconfig | 4 +- nuttx/configs/stm3240g-eval/discover/defconfig | 4 +- nuttx/configs/stm3240g-eval/xmlrpc/defconfig | 4 +- nuttx/configs/stm32f100rc_generic/nsh/defconfig | 4 +- nuttx/configs/stm32f100rc_generic/ostest/defconfig | 4 +- nuttx/configs/stm32f4discovery/cxxtest/defconfig | 4 +- nuttx/configs/stm32f4discovery/elf/defconfig | 4 +- nuttx/configs/stm32f4discovery/nxlines/defconfig | 4 +- nuttx/configs/stm32f4discovery/ostest/defconfig | 4 +- nuttx/configs/stm32f4discovery/winbuild/defconfig | 4 +- nuttx/configs/z16f2800100zcog/README.txt | 66 ++- nuttx/configs/z16f2800100zcog/ostest/appconfig | 39 -- nuttx/configs/z16f2800100zcog/ostest/defconfig | 609 +++++++++++++++------ nuttx/configs/z16f2800100zcog/pashello/defconfig | 601 ++++++++++++++------ nuttx/configs/z8encore000zco/README.txt | 4 +- nuttx/configs/z8encore000zco/ostest/defconfig | 4 +- nuttx/configs/z8f64200100kit/README.txt | 4 +- nuttx/configs/z8f64200100kit/ostest/defconfig | 4 +- nuttx/tools/incdir.sh | 2 +- 43 files changed, 1062 insertions(+), 483 deletions(-) delete mode 100644 nuttx/configs/z16f2800100zcog/ostest/appconfig (limited to 'apps') diff --git a/apps/ChangeLog.txt b/apps/ChangeLog.txt index 29a54461a..673838067 100644 --- a/apps/ChangeLog.txt +++ b/apps/ChangeLog.txt @@ -426,3 +426,5 @@ various DHCPC improvements(Darcy Gong). * apps/nshlib/nsh_apps.c: Fix compilation errors whenCONFIG_NSH_DISABLEBG=y. From Freddie Chopin. + * Rename CONFIG_PCODE and CONFIG_FICL as CONFIG_INTERPRETERS_PCODE and + CONFIG_INTERPRETERS_FICL for consistency with other configuration naming. diff --git a/apps/examples/pashello/Makefile b/apps/examples/pashello/Makefile index 5876b9d2a..bb525c925 100644 --- a/apps/examples/pashello/Makefile +++ b/apps/examples/pashello/Makefile @@ -39,30 +39,38 @@ include $(APPDIR)/Make.defs # Pascal Add-On Example -ASRCS = -CSRCS = pashello.c device.c +ifeq ($(WINTOOL),y) +INCDIROPT = -w +endif +CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" \ + "." \ + "$(APPDIR)$(DELIM)interpreters$(DELIM)pcode$(DELIM)include" \ + "$(APPDIR)$(DELIM)interpreters$(DELIM)pcode$(DELIM)insn$(DELIM)include"} + +ASRCS = +CSRCS = pashello.c device.c -AOBJS = $(ASRCS:.S=$(OBJEXT)) -COBJS = $(CSRCS:.c=$(OBJEXT)) +AOBJS = $(ASRCS:.S=$(OBJEXT)) +COBJS = $(CSRCS:.c=$(OBJEXT)) -SRCS = $(ASRCS) $(CSRCS) -OBJS = $(AOBJS) $(COBJS) +SRCS = $(ASRCS) $(CSRCS) +OBJS = $(AOBJS) $(COBJS) ifeq ($(CONFIG_WINDOWS_NATIVE),y) - BIN = ..\..\libapps$(LIBEXT) + BIN = ..\..\libapps$(LIBEXT) else ifeq ($(WINTOOL),y) - BIN = ..\\..\\libapps$(LIBEXT) + BIN = ..\\..\\libapps$(LIBEXT) else - BIN = ../../libapps$(LIBEXT) + BIN = ../../libapps$(LIBEXT) endif endif -ROOTDEPPATH = --dep-path . +ROOTDEPPATH = --dep-path . # Common build -VPATH = +VPATH = all: .built .PHONY: clean depend distclean diff --git a/apps/examples/pashello/pashello.c b/apps/examples/pashello/pashello.c index b8c19b6a4..8f9fc8b22 100644 --- a/apps/examples/pashello/pashello.c +++ b/apps/examples/pashello/pashello.c @@ -43,8 +43,8 @@ #include #include -#include "apps/pcode/insn/pexec.h" -#include "apps/pcode/pedefs.h" +#include "pexec.h" +#include "pedefs.h" #include "pashello.h" /**************************************************************************** diff --git a/apps/interpreters/Kconfig b/apps/interpreters/Kconfig index 34cbf2eee..6e7d1ac4f 100644 --- a/apps/interpreters/Kconfig +++ b/apps/interpreters/Kconfig @@ -7,7 +7,7 @@ comment "Interpreters" source "$APPSDIR/interpreters/ficl/Kconfig" -config PCODE +config INTERPRETERS_PCODE bool "Pascal p-code interpreter" default n ---help--- @@ -16,6 +16,6 @@ config PCODE configuration implies that you have performed the required installation of the Pascal run-time code. -if PCODE +if INTERPRETERS_PCODE endif diff --git a/apps/interpreters/Make.defs b/apps/interpreters/Make.defs index 2fc4b26d4..5d808d5d6 100644 --- a/apps/interpreters/Make.defs +++ b/apps/interpreters/Make.defs @@ -34,10 +34,10 @@ # ############################################################################ -ifeq ($(CONFIG_PCODE),y) +ifeq ($(CONFIG_INTERPRETERS_PCODE),y) CONFIGURED_APPS += interpreters/pcode endif -ifeq ($(CONFIG_FICL),y) +ifeq ($(CONFIG_INTERPRETERS_FICL),y) CONFIGURED_APPS += interpreters/ficl endif diff --git a/apps/interpreters/ficl/Kconfig b/apps/interpreters/ficl/Kconfig index 1860a1591..ba6a7bc35 100644 --- a/apps/interpreters/ficl/Kconfig +++ b/apps/interpreters/ficl/Kconfig @@ -3,7 +3,7 @@ # see misc/tools/kconfig-language.txt. # -config FICL +config INTERPRETERS_FICL bool "Ficl Forth interpreter" default n ---help--- @@ -11,6 +11,6 @@ config FICL apps/interpreters/ficl directory. Use of this configuration assumes that you have performed the required installation of the Ficl run-time code. -if FICL +if INTERPRETERS_FICL endif diff --git a/misc/pascal/nuttx/Makefile b/misc/pascal/nuttx/Makefile index 396fae834..aa041eb23 100644 --- a/misc/pascal/nuttx/Makefile +++ b/misc/pascal/nuttx/Makefile @@ -41,21 +41,21 @@ include $(APPDIR)$(DELIM)Make.defs # Default tools ifeq ($(DIRLINK),) -DIRLINK = $(TOPDIR)$(DELIM)tools$(DELIM)link.sh -DIRUNLINK = $(TOPDIR)$(DELIM)tools$(DELIM)unlink.sh + DIRLINK = $(TOPDIR)$(DELIM)tools$(DELIM)link.sh + DIRUNLINK = $(TOPDIR)$(DELIM)tools$(DELIM)unlink.sh endif ifeq ($(WINTOOL),y) -INCDIROPT = -w + INCDIROPT = -w endif USRINCLUDES = ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(PCODEDIR)$(DELIM)include $(PCODEDIR)$(DELIM)insn$(DELIM)include} COMPILER = ${shell basename $(CC)} ifeq ($(COMPILER),zneocc.exe) -INCLUDES = $(ARCHSTDINCLUDES) $(USRINCLUDES) + INCLUDES = $(ARCHSTDINCLUDES) $(USRINCLUDES) else -INCLUDES = $(ARCHINCLUDES) $(USRINCLUDES) + INCLUDES = $(ARCHINCLUDES) $(USRINCLUDES) endif CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(INCLUDES) $(ARCHDEFINES) @@ -73,14 +73,18 @@ COBJS = $(CSRCS:.c=$(OBJEXT)) SRCS = $(ASRCS) $(CSRCS) OBJS = $(AOBJS) $(COBJS) +ifeq ($(CONFIG_WINDOWS_NATIVE),y) + BIN = ..\..\libapps$(LIBEXT) +else ifeq ($(WINTOOL),y) - BIN = "${shell cygpath -w $(APPDIR)$(DELIM)libapps$(LIBEXT)}" + BIN = ..\\..\\libapps$(LIBEXT) else - BIN = "$(APPDIR)$(DELIM)libapps$(LIBEXT)" + BIN = ../../libapps$(LIBEXT) +endif endif -ROOTDEPPATH = --dep-path . -PRUNDEPPATH = --dep-path insn$(DELIM)prun +ROOTDEPPATH = --dep-path . +PRUNDEPPATH = --dep-path insn$(DELIM)prun POFFDEPPATH = --dep-path libpoff PASDEPPATH = --dep-path libpas @@ -90,18 +94,10 @@ all: .built .PHONY: context depend clean distclean $(AOBJS): %$(OBJEXT): %.S -ifeq ($(COMPILER),zneocc.exe) - $(call ASSEMBLE, `cygpath -w $<`, $@) -else $(call ASSEMBLE, $<, $@) -endif $(COBJS): %$(OBJEXT): %.c -ifeq ($(COMPILER),zneocc.exe) - $(call COMPILE, `cygpath -w $<`, $@) -else $(call COMPILE, $<, $@) -endif $(APPDIR)$(DELIM)include$(DELIM)pcode: include @$(DIRLINK) $(PCODEDIR)$(DELIM)include $(APPDIR)$(DELIM)include$(DELIM)pcode diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog index e0ca6c8dc..f986619a3 100644 --- a/nuttx/ChangeLog +++ b/nuttx/ChangeLog @@ -3712,3 +3712,7 @@ From Freddie Chopin. * z8encore000zco/ostest and z8f64200100kit/ostest: Can now be modified to support the Windows native builds (see corresponding README.txt files). + * configures/z16f2800100zcog - All configurations updated to use the ZDS-II + 5.0.1 toolchain. + * configures/z16f2800100zcog - All configurations updated to use Kconfig/mconf + configuration tools. diff --git a/nuttx/arch/Kconfig b/nuttx/arch/Kconfig index 5cee40628..6e55a5744 100644 --- a/nuttx/arch/Kconfig +++ b/nuttx/arch/Kconfig @@ -111,6 +111,10 @@ config ARCH_DMA bool default n +config ARCH_IRQPRIO + bool + default n + config ARCH_STACKDUMP bool "Dump stack on assertions" default n diff --git a/nuttx/arch/arm/Kconfig b/nuttx/arch/arm/Kconfig index 3233918ca..9fa73782d 100644 --- a/nuttx/arch/arm/Kconfig +++ b/nuttx/arch/arm/Kconfig @@ -46,6 +46,7 @@ config ARCH_CHIP_KINETIS bool "Freescale Kinetis" select ARCH_CORTEXM4 select ARCH_HAVE_MPU + select ARCH_IRQPRIO ---help--- Freescale Kinetis Architectures (ARM Cortex-M4) @@ -53,6 +54,7 @@ config ARCH_CHIP_LM3S bool "TI Stellaris" select ARCH_CORTEXM3 select ARCH_HAVE_MPU + select ARCH_IRQPRIO ---help--- TI Stellaris LMS3 architecutres (ARM Cortex-M3) @@ -60,6 +62,7 @@ config ARCH_CHIP_LPC17XX bool "NXP LPC17xx" select ARCH_CORTEXM3 select ARCH_HAVE_MPU + select ARCH_IRQPRIO ---help--- NXP LPC17xx architectures (ARM Cortex-M3) @@ -91,6 +94,7 @@ config ARCH_CHIP_LPC43XX select ARCH_HAVE_CMNVECTOR select ARMV7M_CMNVECTOR select ARCH_HAVE_MPU + select ARCH_IRQPRIO ---help--- NPX LPC43XX architectures (ARM Cortex-M4). @@ -98,6 +102,7 @@ config ARCH_CHIP_SAM3U bool "Atmel AT91SAM3U" select ARCH_CORTEXM3 select ARCH_HAVE_MPU + select ARCH_IRQPRIO ---help--- Atmel AT91SAM3U architectures (ARM Cortex-M3) @@ -222,12 +227,6 @@ config PAGING If set =y in your configation file, this setting will enable the on-demand paging feature as described in http://www.nuttx.org/NuttXDemandPaging.html. -config ARCH_IRQPRIO - bool "Interrupt priority" - default y if ARCH_CORTEXM3 || ARCH_CORTEXM4 - ---help--- - Select if your board supports interrupt prioritization. - config BOARD_LOOPSPERMSEC int "Delay loops per millisecond" default 5000 diff --git a/nuttx/arch/mips/Kconfig b/nuttx/arch/mips/Kconfig index c642f7152..772b6f663 100644 --- a/nuttx/arch/mips/Kconfig +++ b/nuttx/arch/mips/Kconfig @@ -10,6 +10,8 @@ choice config ARCH_CHIP_PIC32MX bool "PIC32MX" + select ARCH_MIPS32 + select ARCH_IRQPRIO ---help--- Microchip PIC32MX320F032H (MIPS32) @@ -17,7 +19,7 @@ endchoice config ARCH_MIPS32 bool - default y if ARCH_CHIP_PIC32MX + default n config ARCH_FAMILY string @@ -27,12 +29,6 @@ config ARCH_CHIP string default "pic32mx" if ARCH_CHIP_PIC32MX -config ARCH_IRQPRIO - bool "Interrupt priority" - default y if ARCH_CHIP_PIC32MX - ---help--- - Select if your board supports interrupt prioritization. - config BOARD_LOOPSPERMSEC int "Delay loops per millisecond" default 5000 diff --git a/nuttx/arch/z16/Kconfig b/nuttx/arch/z16/Kconfig index a806e6ed1..52ea95c29 100644 --- a/nuttx/arch/z16/Kconfig +++ b/nuttx/arch/z16/Kconfig @@ -12,21 +12,29 @@ choice config ARCH_CHIP_Z16F2810 bool "Z16F2810" + select ARCH_CHIP_Z16F + select ARCH_IRQPRIO ---help--- ZiLOG Z16F2810 config ARCH_CHIP_Z16F2811 bool "Z16F2811" + select ARCH_CHIP_Z16F + select ARCH_IRQPRIO ---help--- ZiLOG Z16F2811 config ARCH_CHIP_Z16F3211 - bool "Z16F321" + bool "Z16F3211" + select ARCH_CHIP_Z16F + select ARCH_IRQPRIO ---help--- ZiLOG Z16F321 config ARCH_CHIP_Z16F6411 bool "Z16F6411" + select ARCH_CHIP_Z16F + select ARCH_IRQPRIO ---help--- ZiLOG Z16F6411 @@ -34,7 +42,6 @@ endchoice config ARCH_CHIP_Z16F bool - default y if ARCH_CHIP_Z16F2810 || ARCH_CHIP_Z16F2811 || ARCH_CHIP_Z16F3211 || ARCH_CHIP_Z16F6411 config ARCH_CHIP string diff --git a/nuttx/arch/z16/src/z16f/Kconfig b/nuttx/arch/z16/src/z16f/Kconfig index 826720ee7..5efc061a5 100644 --- a/nuttx/arch/z16/src/z16f/Kconfig +++ b/nuttx/arch/z16/src/z16f/Kconfig @@ -6,4 +6,16 @@ if ARCH_CHIP_Z16F comment "Z16F Configuration Options" +# UART0/1 always enabled + +config Z16F_UART0 + bool + default y + select ARCH_HAVE_UART0 + +config Z16F_UART1 + bool + default y + select ARCH_HAVE_UART1 + endif diff --git a/nuttx/configs/Kconfig b/nuttx/configs/Kconfig index a89e7cdea..bc3759722 100644 --- a/nuttx/configs/Kconfig +++ b/nuttx/configs/Kconfig @@ -555,7 +555,7 @@ config ARCH_BOARD_XTRS config ARCH_BOARD_Z16F2800100ZCOG bool "Zilog Z16F2800100ZCOG Development Kit" - depends on ARCH_CHIP_Z16F281 + depends on ARCH_CHIP_Z16F2811 select ARCH_HAVE_LEDS ---help--- z16f Microcontroller. This port use the ZiLIG z16f2800100zcog diff --git a/nuttx/configs/cloudctrl/nsh/defconfig b/nuttx/configs/cloudctrl/nsh/defconfig index 5547333d8..440cb3e0b 100644 --- a/nuttx/configs/cloudctrl/nsh/defconfig +++ b/nuttx/configs/cloudctrl/nsh/defconfig @@ -569,8 +569,8 @@ CONFIG_EXAMPLES_NSH=y # # Interpreters # -# CONFIG_FICL is not set -# CONFIG_PCODE is not set +# CONFIG_INTERPRETERS_FICL is not set +# CONFIG_INTERPRETERS_PCODE is not set # # Network Utilities diff --git a/nuttx/configs/ez80f910200kitg/README.txt b/nuttx/configs/ez80f910200kitg/README.txt index 004f607d4..e314b0fe1 100644 --- a/nuttx/configs/ez80f910200kitg/README.txt +++ b/nuttx/configs/ez80f910200kitg/README.txt @@ -116,8 +116,8 @@ available: b. You can't use setenv.sh in the native Windows environment. Try scripts/setenv.bat instead. c. At present, the native Windows build fails at the final link stages. - The failure is due to problems in arch/z80/src/nuttx/linkcmd that - is autogenerated by arch/z80/src/Makefile.zdsii. The basic program + The failure is due to problems in arch/z80/src/nuttx.linkcmd that + is autogenerated by arch/z80/src/Makefile.zdsii. The basic problem is the spurious spaces and and carrirage returns are generated at the end of the lines after a line continuation (\ ^M). If these trailing bad characters are manually eliminated, then the build diff --git a/nuttx/configs/ez80f910200kitg/ostest/defconfig b/nuttx/configs/ez80f910200kitg/ostest/defconfig index 757916281..0e399cfc7 100644 --- a/nuttx/configs/ez80f910200kitg/ostest/defconfig +++ b/nuttx/configs/ez80f910200kitg/ostest/defconfig @@ -402,8 +402,8 @@ CONFIG_EXAMPLES_OSTEST_RR_RUNS=10 # # Interpreters # -# CONFIG_FICL is not set -# CONFIG_PCODE is not set +# CONFIG_INTERPRETERS_FICL is not set +# CONFIG_INTERPRETERS_PCODE is not set # # Network Utilities diff --git a/nuttx/configs/ez80f910200zco/README.txt b/nuttx/configs/ez80f910200zco/README.txt index bc4e11e27..1bc9e56b8 100644 --- a/nuttx/configs/ez80f910200zco/README.txt +++ b/nuttx/configs/ez80f910200zco/README.txt @@ -130,8 +130,8 @@ ostest b. You can't use setenv.sh in the native Windows environment. Try scripts/setenv.bat instead. c. At present, the native Windows build fails at the final link stages. - The failure is due to problems in arch/z80/src/nuttx/linkcmd that - is autogenerated by arch/z80/src/Makefile.zdsii. The basic program + The failure is due to problems in arch/z80/src/nuttx.linkcmd that + is autogenerated by arch/z80/src/Makefile.zdsii. The basic problem is the spurious spaces and and carrirage returns are generated at the end of the lines after a line continuation (\ ^M). If these trailing bad characters are manually eliminated, then the build diff --git a/nuttx/configs/ez80f910200zco/ostest/defconfig b/nuttx/configs/ez80f910200zco/ostest/defconfig index c82a60e3a..7597bcfd6 100644 --- a/nuttx/configs/ez80f910200zco/ostest/defconfig +++ b/nuttx/configs/ez80f910200zco/ostest/defconfig @@ -410,8 +410,8 @@ CONFIG_EXAMPLES_OSTEST_RR_RUNS=10 # # Interpreters # -# CONFIG_FICL is not set -# CONFIG_PCODE is not set +# CONFIG_INTERPRETERS_FICL is not set +# CONFIG_INTERPRETERS_PCODE is not set # # Network Utilities diff --git a/nuttx/configs/fire-stm32v2/nsh/defconfig b/nuttx/configs/fire-stm32v2/nsh/defconfig index f126c51fd..8e371686b 100644 --- a/nuttx/configs/fire-stm32v2/nsh/defconfig +++ b/nuttx/configs/fire-stm32v2/nsh/defconfig @@ -812,8 +812,8 @@ CONFIG_EXAMPLES_USBMSC_DEVPATH3="/dev/mmcsd2" # # Interpreters # -# CONFIG_FICL is not set -# CONFIG_PCODE is not set +# CONFIG_INTERPRETERS_FICL is not set +# CONFIG_INTERPRETERS_PCODE is not set # # Network Utilities diff --git a/nuttx/configs/shenzhou/nsh/defconfig b/nuttx/configs/shenzhou/nsh/defconfig index c1e1818a5..4c73b7a6c 100644 --- a/nuttx/configs/shenzhou/nsh/defconfig +++ b/nuttx/configs/shenzhou/nsh/defconfig @@ -569,8 +569,8 @@ CONFIG_EXAMPLES_NSH=y # # Interpreters # -# CONFIG_FICL is not set -# CONFIG_PCODE is not set +# CONFIG_INTERPRETERS_FICL is not set +# CONFIG_INTERPRETERS_PCODE is not set # # Network Utilities diff --git a/nuttx/configs/shenzhou/nxwm/defconfig b/nuttx/configs/shenzhou/nxwm/defconfig index a5ccc8bfb..ccc411a4d 100644 --- a/nuttx/configs/shenzhou/nxwm/defconfig +++ b/nuttx/configs/shenzhou/nxwm/defconfig @@ -841,8 +841,8 @@ CONFIG_NAMEDAPP=y # # Interpreters # -# CONFIG_FICL is not set -# CONFIG_PCODE is not set +# CONFIG_INTERPRETERS_FICL is not set +# CONFIG_INTERPRETERS_PCODE is not set # # Network Utilities diff --git a/nuttx/configs/shenzhou/thttpd/defconfig b/nuttx/configs/shenzhou/thttpd/defconfig index 82884f4c3..e8f189282 100644 --- a/nuttx/configs/shenzhou/thttpd/defconfig +++ b/nuttx/configs/shenzhou/thttpd/defconfig @@ -741,8 +741,8 @@ CONFIG_EXAMPLES_NSH=y # # Interpreters # -# CONFIG_FICL is not set -# CONFIG_PCODE is not set +# CONFIG_INTERPRETERS_FICL is not set +# CONFIG_INTERPRETERS_PCODE is not set # # Network Utilities diff --git a/nuttx/configs/sim/cxxtest/defconfig b/nuttx/configs/sim/cxxtest/defconfig index 1f99a6333..9c1da5494 100644 --- a/nuttx/configs/sim/cxxtest/defconfig +++ b/nuttx/configs/sim/cxxtest/defconfig @@ -361,8 +361,8 @@ CONFIG_EXAMPLES_CXXTEST=y # # Interpreters # -# CONFIG_FICL is not set -# CONFIG_PCODE is not set +# CONFIG_INTERPRETERS_FICL is not set +# CONFIG_INTERPRETERS_PCODE is not set # # Network Utilities diff --git a/nuttx/configs/sim/ostest/defconfig b/nuttx/configs/sim/ostest/defconfig index 708c82a79..26d132cd0 100644 --- a/nuttx/configs/sim/ostest/defconfig +++ b/nuttx/configs/sim/ostest/defconfig @@ -351,8 +351,8 @@ CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=8 # # Interpreters # -# CONFIG_FICL is not set -# CONFIG_PCODE is not set +# CONFIG_INTERPRETERS_FICL is not set +# CONFIG_INTERPRETERS_PCODE is not set # # Network Utilities diff --git a/nuttx/configs/stm3240g-eval/discover/defconfig b/nuttx/configs/stm3240g-eval/discover/defconfig index d7165573c..aefa05326 100644 --- a/nuttx/configs/stm3240g-eval/discover/defconfig +++ b/nuttx/configs/stm3240g-eval/discover/defconfig @@ -765,8 +765,8 @@ CONFIG_EXAMPLES_DISCOVER_NETMASK=0xffffff00 # # Interpreters # -# CONFIG_FICL is not set -# CONFIG_PCODE is not set +# CONFIG_INTERPRETERS_FICL is not set +# CONFIG_INTERPRETERS_PCODE is not set # # Network Utilities diff --git a/nuttx/configs/stm3240g-eval/xmlrpc/defconfig b/nuttx/configs/stm3240g-eval/xmlrpc/defconfig index 308203e27..dd72d6ab3 100644 --- a/nuttx/configs/stm3240g-eval/xmlrpc/defconfig +++ b/nuttx/configs/stm3240g-eval/xmlrpc/defconfig @@ -760,8 +760,8 @@ CONFIG_EXAMPLES_XMLRPC_NETMASK=0xffffff00 # # Interpreters # -# CONFIG_FICL is not set -# CONFIG_PCODE is not set +# CONFIG_INTERPRETERS_FICL is not set +# CONFIG_INTERPRETERS_PCODE is not set # # Network Utilities diff --git a/nuttx/configs/stm32f100rc_generic/nsh/defconfig b/nuttx/configs/stm32f100rc_generic/nsh/defconfig index b5698ad18..41bb86592 100644 --- a/nuttx/configs/stm32f100rc_generic/nsh/defconfig +++ b/nuttx/configs/stm32f100rc_generic/nsh/defconfig @@ -490,8 +490,8 @@ CONFIG_EXAMPLES_NSH=y # # Interpreters # -# CONFIG_FICL is not set -# CONFIG_PCODE is not set +# CONFIG_INTERPRETERS_FICL is not set +# CONFIG_INTERPRETERS_PCODE is not set # # Network Utilities diff --git a/nuttx/configs/stm32f100rc_generic/ostest/defconfig b/nuttx/configs/stm32f100rc_generic/ostest/defconfig index 92faa7f03..c56503e1f 100644 --- a/nuttx/configs/stm32f100rc_generic/ostest/defconfig +++ b/nuttx/configs/stm32f100rc_generic/ostest/defconfig @@ -478,8 +478,8 @@ CONFIG_EXAMPLES_OSTEST_RR_RUNS=10 # # Interpreters # -# CONFIG_FICL is not set -# CONFIG_PCODE is not set +# CONFIG_INTERPRETERS_FICL is not set +# CONFIG_INTERPRETERS_PCODE is not set # # Network Utilities diff --git a/nuttx/configs/stm32f4discovery/cxxtest/defconfig b/nuttx/configs/stm32f4discovery/cxxtest/defconfig index 6648d3b13..1b3df6d32 100644 --- a/nuttx/configs/stm32f4discovery/cxxtest/defconfig +++ b/nuttx/configs/stm32f4discovery/cxxtest/defconfig @@ -489,8 +489,8 @@ CONFIG_EXAMPLES_CXXTEST=y # # Interpreters # -# CONFIG_FICL is not set -# CONFIG_PCODE is not set +# CONFIG_INTERPRETERS_FICL is not set +# CONFIG_INTERPRETERS_PCODE is not set # # Network Utilities diff --git a/nuttx/configs/stm32f4discovery/elf/defconfig b/nuttx/configs/stm32f4discovery/elf/defconfig index e4702507c..8d98fe696 100644 --- a/nuttx/configs/stm32f4discovery/elf/defconfig +++ b/nuttx/configs/stm32f4discovery/elf/defconfig @@ -485,8 +485,8 @@ CONFIG_EXAMPLES_ELF_DEVPATH="/dev/ram0" # # Interpreters # -# CONFIG_FICL is not set -# CONFIG_PCODE is not set +# CONFIG_INTERPRETERS_FICL is not set +# CONFIG_INTERPRETERS_PCODE is not set # # Network Utilities diff --git a/nuttx/configs/stm32f4discovery/nxlines/defconfig b/nuttx/configs/stm32f4discovery/nxlines/defconfig index 286dd55ed..4de3a0922 100644 --- a/nuttx/configs/stm32f4discovery/nxlines/defconfig +++ b/nuttx/configs/stm32f4discovery/nxlines/defconfig @@ -591,8 +591,8 @@ CONFIG_EXAMPLES_NXLINES_BPP=16 # # Interpreters # -# CONFIG_FICL is not set -# CONFIG_PCODE is not set +# CONFIG_INTERPRETERS_FICL is not set +# CONFIG_INTERPRETERS_PCODE is not set # # Network Utilities diff --git a/nuttx/configs/stm32f4discovery/ostest/defconfig b/nuttx/configs/stm32f4discovery/ostest/defconfig index da7c8d200..d260a87cb 100644 --- a/nuttx/configs/stm32f4discovery/ostest/defconfig +++ b/nuttx/configs/stm32f4discovery/ostest/defconfig @@ -498,8 +498,8 @@ CONFIG_EXAMPLES_OSTEST_RR_RUNS=10 # # Interpreters # -# CONFIG_FICL is not set -# CONFIG_PCODE is not set +# CONFIG_INTERPRETERS_FICL is not set +# CONFIG_INTERPRETERS_PCODE is not set # # Network Utilities diff --git a/nuttx/configs/stm32f4discovery/winbuild/defconfig b/nuttx/configs/stm32f4discovery/winbuild/defconfig index e52719f25..311dd075d 100644 --- a/nuttx/configs/stm32f4discovery/winbuild/defconfig +++ b/nuttx/configs/stm32f4discovery/winbuild/defconfig @@ -498,8 +498,8 @@ CONFIG_EXAMPLES_OSTEST_RR_RUNS=10 # # Interpreters # -# CONFIG_FICL is not set -# CONFIG_PCODE is not set +# CONFIG_INTERPRETERS_FICL is not set +# CONFIG_INTERPRETERS_PCODE is not set # # Network Utilities diff --git a/nuttx/configs/z16f2800100zcog/README.txt b/nuttx/configs/z16f2800100zcog/README.txt index 55ed22b10..0c69c75bc 100644 --- a/nuttx/configs/z16f2800100zcog/README.txt +++ b/nuttx/configs/z16f2800100zcog/README.txt @@ -94,13 +94,75 @@ Where is the specific board configuration that you wish to build. The following board-specific configurations are available: -- ostest +ostest +------ + This builds the examples/ostest application for execution from FLASH. See examples/README.txt for information about ostest. -- pashello + NOTES: + + 1. This configuration uses the mconf-based configuration tool. To + change this configuration using that tool, you should: + + a. Build and install the mconf tool. See nuttx/README.txt and + misc/tools/ + + b. Execute 'make menuconfig' in nuttx/ in order to start the + reconfiguration process. + + 2. By default, this configuration assumes that you are using the + Cygwin environment on Windows. An option is to use the native + CMD.exe window build as described in the top-level README.txt + file. To set up that configuration: + + -CONFIG_WINDOWS_CYGWIN=y + +CONFIG_WINDOWS_NATIVE=y + + And after configuring, make sure that CONFIG_APPS_DIR uses + the back slash character. For example: + + CONFIG_APPS_DIR="..\apps" + + NOTES: + + a. If you need to change the toolchain path used in Make.defs, you + will need to use the short 8.3 filenames to avoid spaces. On my + PC, C:\PROGRA~1\ is is C:\Program Files\ and C:\PROGRA~2\ is + C:\Program Files (x86)\ + b. You can't use setenv.sh in the native Windows environment. Try + scripts/setenv.bat instead. + c. At present, the native Windows build fails at the final link stages. + The failure is due to problems in arch/z16/src/nuttx.linkcmd that + is autogenerated by arch/z16/src/Makefile. The basic problem + is the spurious spaces and and carrirage returns are generated at + the end of the lines after a line continuation (\ ^M). If these + trailing bad characters are manually eliminated, then the build + will succeed on the next try. + +pashello +-------- Configures to use examples/pashello for execution from FLASH See examples/README.txt for information about pashello. + NOTES: + + 1. This configuration uses the mconf-based configuration tool. To + change this configuration using that tool, you should: + + a. Build and install the mconf tool. See nuttx/README.txt and + misc/tools/ + + b. Execute 'make menuconfig' in nuttx/ in order to start the + reconfiguration process. + + 2. The last time I tried building this configuration, there were + a few undefined symbols from the PCODE logic. It might require + a little TLC to get this all working again. + + 3. The native windows build has not been tried with this configuration + but should, in principle, work (see notes for the ostest configuration + above). + Check out any README.txt files in these s. diff --git a/nuttx/configs/z16f2800100zcog/ostest/appconfig b/nuttx/configs/z16f2800100zcog/ostest/appconfig deleted file mode 100644 index a0f5d2462..000000000 --- a/nuttx/configs/z16f2800100zcog/ostest/appconfig +++ /dev/null @@ -1,39 +0,0 @@ -############################################################################ -# configs/z16f2800100zcog/ostest/appconfig -# -# Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# 3. Neither the name NuttX nor the names of its contributors may be -# used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# -############################################################################ - -# Path to example in apps/examples containing the user_start entry point - -CONFIGURED_APPS += examples/ostest - diff --git a/nuttx/configs/z16f2800100zcog/ostest/defconfig b/nuttx/configs/z16f2800100zcog/ostest/defconfig index 16f017778..027d6d73c 100644 --- a/nuttx/configs/z16f2800100zcog/ostest/defconfig +++ b/nuttx/configs/z16f2800100zcog/ostest/defconfig @@ -1,150 +1,174 @@ -############################################################################ -# configs/z16f2800100zcog/ostest/defconfig -# -# Copyright (C) 2008-2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# 3. Neither the name NuttX nor the names of its contributors may be -# used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# -############################################################################ -# -# Architecture selection # -CONFIG_ARCH="z16" +# Automatically generated file; DO NOT EDIT. +# Nuttx/ Configuration +# +CONFIG_NUTTX_NEWCONFIG=y + +# +# Build Setup +# +# CONFIG_EXPERIMENTAL is not set +CONFIG_HOST_LINUX=y +# CONFIG_HOST_OSX is not set +# CONFIG_HOST_WINDOWS is not set +# CONFIG_HOST_OTHER is not set + +# +# Build Configuration +# +# CONFIG_APPS_DIR="../apps" +# CONFIG_BUILD_2PASS is not set + +# +# Binary Output Formats +# +# CONFIG_RRLOAD_BINARY is not set +# CONFIG_INTELHEX_BINARY is not set +# CONFIG_MOTOROLA_SREC is not set +# CONFIG_RAW_BINARY is not set + +# +# Customize Header Files +# +# CONFIG_ARCH_STDBOOL_H is not set +# CONFIG_ARCH_MATH_H is not set +# CONFIG_ARCH_FLOAT_H is not set +# CONFIG_ARCH_STDARG_H is not set + +# +# Debug Options +# +CONFIG_DEBUG=y +# CONFIG_DEBUG_VERBOSE is not set +# CONFIG_DEBUG_ENABLE is not set + +# +# Subsystem Debug Options +# +# CONFIG_DEBUG_MM is not set +# CONFIG_DEBUG_SCHED is not set +# CONFIG_DEBUG_FS is not set +# CONFIG_DEBUG_LIB is not set +# CONFIG_DEBUG_BINFMT is not set +# CONFIG_DEBUG_GRAPHICS is not set + +# +# Driver Debug Options +# +# CONFIG_DEBUG_ANALOG is not set +# CONFIG_DEBUG_DMA is not set +# CONFIG_DEBUG_SYMBOLS is not set + +# +# System Type +# +# CONFIG_ARCH_8051 is not set +# CONFIG_ARCH_ARM is not set +# CONFIG_ARCH_AVR is not set +# CONFIG_ARCH_HC is not set +# CONFIG_ARCH_MIPS is not set +# CONFIG_ARCH_RGMP is not set +# CONFIG_ARCH_SH is not set +# CONFIG_ARCH_SIM is not set +# CONFIG_ARCH_X86 is not set CONFIG_ARCH_Z16=y +# CONFIG_ARCH_Z80 is not set +CONFIG_ARCH="z16" CONFIG_ARCH_CHIP="z16f" -CONFIG_ARCH_CHIP_Z16F=y -CONFIG_ARCH_CHIP_Z16F2810=n -CONFIG_ARCH_CHIP_Z16F2811=y -CONFIG_ARCH_CHIP_Z16F3211=n -CONFIG_ARCH_CHIP_Z16F6411=n -CONFIG_ARCH_BOARD="z16f2800100zcog" -CONFIG_ARCH_BOARD_Z16F2800100ZCOG=y -CONFIG_ARCH_NOINTC=n -CONFIG_ARCH_IRQPRIO=y CONFIG_BOARD_LOOPSPERMSEC=1250 -CONFIG_ENDIAN_BIG=y -CONFIG_DRAM_SIZE=65536 -CONFIG_ARCH_LEDS=y + # -# Z16F specific device driver settings +# Z16 Configuration Options # -CONFIG_UART0_SERIAL_CONSOLE=y -CONFIG_UART1_SERIAL_CONSOLE=n -CONFIG_UART0_TXBUFSIZE=256 -CONFIG_UART1_TXBUFSIZE=256 -CONFIG_UART0_RXBUFSIZE=256 -CONFIG_UART1_RXBUFSIZE=256 -CONFIG_UART0_BAUD=57600 -CONFIG_UART1_BAUD=57600 -CONFIG_UART0_PARITY=0 -CONFIG_UART1_PARITY=0 -CONFIG_UART0_2STOP=0 -CONFIG_UART1_2STOP=0 +# CONFIG_ARCH_CHIP_Z16F2810 is not set +CONFIG_ARCH_CHIP_Z16F2811=y +# CONFIG_ARCH_CHIP_Z16F3211 is not set +# CONFIG_ARCH_CHIP_Z16F6411 is not set +CONFIG_ARCH_CHIP_Z16F=y # -# General build options +# Common Configuration Options # -CONFIG_RRLOAD_BINARY=n -CONFIG_INTELHEX_BINARY=n -CONFIG_RAW_BINARY=n # -# General OS setup +# Z16F Configuration Options # -CONFIG_USER_ENTRYPOINT="ostest_main" -CONFIG_DEBUG=y -CONFIG_DEBUG_VERBOSE=n -CONFIG_DEBUG_SYMBOLS=n -CONFIG_MM_REGIONS=1 -CONFIG_ARCH_LOWPUTC=y -CONFIG_RR_INTERVAL=200 -CONFIG_SCHED_INSTRUMENTATION=n -CONFIG_TASK_NAME_SIZE=0 -CONFIG_START_YEAR=2008 -CONFIG_START_MONTH=1 -CONFIG_START_DAY=28 -CONFIG_JULIAN_TIME=n -CONFIG_DEV_CONSOLE=y -CONFIG_DEV_LOWCONSOLE=y -CONFIG_MUTEX_TYPES=n -CONFIG_PRIORITY_INHERITANCE=n -CONFIG_SEM_PREALLOCHOLDERS=0 -CONFIG_SEM_NNESTPRIO=0 -CONFIG_FDCLONE_DISABLE=n -CONFIG_FDCLONE_STDIO=n -CONFIG_SDCLONE_DISABLE=y +CONFIG_Z16F_UART0=y +CONFIG_Z16F_UART1=y # -# The following can be used to disable categories of -# APIs supported by the OS. If the compiler supports -# weak functions, then it should not be necessary to -# disable functions unless you want to restrict usage -# of those APIs. +# Architecture Options # -# There are certain dependency relationships in these -# features. +# CONFIG_ARCH_NOINTC is not set +# CONFIG_ARCH_DMA is not set +CONFIG_ARCH_IRQPRIO=y +# CONFIG_ARCH_STACKDUMP is not set +CONFIG_ENDIAN_BIG=y + # -# o mq_notify logic depends on signals to awaken tasks -# waiting for queues to become full or empty. -# o pthread_condtimedwait() depends on signals to wake -# up waiting tasks. +# Board Settings # -CONFIG_DISABLE_CLOCK=n -CONFIG_DISABLE_POSIX_TIMERS=n -CONFIG_DISABLE_PTHREAD=n -CONFIG_DISABLE_SIGNALS=n -CONFIG_DISABLE_MQUEUE=n -CONFIG_DISABLE_MOUNTPOINT=n -CONFIG_DISABLE_ENVIRON=n -CONFIG_DISABLE_POLL=y +CONFIG_DRAM_START= +CONFIG_DRAM_SIZE=65536 # -# Misc libc settings +# Boot options # -CONFIG_NOPRINTF_FIELDWIDTH=y +# CONFIG_BOOT_RUNFROMEXTSRAM is not set +CONFIG_BOOT_RUNFROMFLASH=y +# CONFIG_BOOT_RUNFROMISRAM is not set +# CONFIG_BOOT_RUNFROMSDRAM is not set +# CONFIG_BOOT_COPYTORAM is not set + +# +# Board Selection +# +CONFIG_ARCH_BOARD_Z16F2800100ZCOG=y +# CONFIG_ARCH_BOARD_CUSTOM is not set +CONFIG_ARCH_BOARD="z16f2800100zcog" # -# Allow for architecture optimized implementations +# Common Board Options # -# The architecture can provide optimized versions of the -# following to improve sysem performance +CONFIG_ARCH_HAVE_LEDS=y +CONFIG_ARCH_LEDS=y + +# +# Board-Specific Options # -CONFIG_ARCH_MEMCPY=n -CONFIG_ARCH_MEMCMP=n -CONFIG_ARCH_MEMMOVE=n -CONFIG_ARCH_MEMSET=n -CONFIG_ARCH_STRCMP=n -CONFIG_ARCH_STRCPY=n -CONFIG_ARCH_STRNCPY=n -CONFIG_ARCH_STRLEN=n -CONFIG_ARCH_STRNLEN=n -CONFIG_ARCH_BZERO=n + +# +# RTOS Features +# +CONFIG_MSEC_PER_TICK=10 +CONFIG_RR_INTERVAL=200 +# CONFIG_SCHED_INSTRUMENTATION is not set +CONFIG_TASK_NAME_SIZE=0 +# CONFIG_JULIAN_TIME is not set +CONFIG_START_YEAR=2012 +CONFIG_START_MONTH=11 +CONFIG_START_DAY=29 +CONFIG_DEV_CONSOLE=y +CONFIG_DEV_LOWCONSOLE=y +# CONFIG_MUTEX_TYPES is not set +# CONFIG_PRIORITY_INHERITANCE is not set +# CONFIG_FDCLONE_DISABLE is not set +# CONFIG_FDCLONE_STDIO is not set +CONFIG_SDCLONE_DISABLE=y +# CONFIG_SCHED_WORKQUEUE is not set +# CONFIG_SCHED_WAITPID is not set +# CONFIG_SCHED_ATEXIT is not set +# CONFIG_SCHED_ONEXIT is not set +CONFIG_USER_ENTRYPOINT="ostest_main" +CONFIG_DISABLE_OS_API=y +# CONFIG_DISABLE_CLOCK is not set +# CONFIG_DISABLE_POSIX_TIMERS is not set +# CONFIG_DISABLE_PTHREAD is not set +# CONFIG_DISABLE_SIGNALS is not set +# CONFIG_DISABLE_MQUEUE is not set +# CONFIG_DISABLE_MOUNTPOINT is not set +# CONFIG_DISABLE_ENVIRON is not set +CONFIG_DISABLE_POLL=y # # Sizes of configurable things (0 disables) @@ -155,8 +179,6 @@ CONFIG_NPTHREAD_KEYS=4 CONFIG_NFILE_DESCRIPTORS=8 CONFIG_NFILE_STREAMS=8 CONFIG_NAME_MAX=32 -CONFIG_STDIO_BUFFER_SIZE=256 -CONFIG_NUNGET_CHARS=2 CONFIG_PREALLOC_MQ_MSGS=4 CONFIG_MQ_MAXMSGSIZE=32 CONFIG_MAX_WDOGPARMS=2 @@ -164,62 +186,307 @@ CONFIG_PREALLOC_WDOGS=4 CONFIG_PREALLOC_TIMERS=4 # -# TCP/IP and UDP support via uIP +# Stack and heap information +# +# CONFIG_CUSTOM_STACK is not set +CONFIG_IDLETHREAD_STACKSIZE=4096 +CONFIG_USERMAIN_STACKSIZE=4096 +CONFIG_PTHREAD_STACK_MIN=256 +CONFIG_PTHREAD_STACK_DEFAULT=4096 + # -CONFIG_NET=n -CONFIG_NET_IPv6=n -CONFIG_NSOCKET_DESCRIPTORS=0 -CONFIG_NET_SOCKOPTS=y -CONFIG_NET_BUFSIZE=420 -CONFIG_NET_TCP=n -CONFIG_NET_TCP_CONNS=40 -CONFIG_NET_MAX_LISTENPORTS=40 -CONFIG_NET_UDP=n -CONFIG_NET_UDP_CHECKSUMS=y -#CONFIG_NET_UDP_CONNS=10 -CONFIG_NET_ICMP=n -CONFIG_NET_ICMP_PING=n -#CONFIG_NET_PINGADDRCONF=0 -CONFIG_NET_STATISTICS=y -#CONFIG_NET_RECEIVE_WINDOW= -#CONFIG_NET_ARPTAB_SIZE=8 -CONFIG_NET_BROADCAST=n +# Device Drivers +# +CONFIG_DEV_NULL=y +# CONFIG_DEV_ZERO is not set +# CONFIG_LOOP is not set +# CONFIG_RAMDISK is not set +# CONFIG_CAN is not set +# CONFIG_PWM is not set +# CONFIG_I2C is not set +# CONFIG_SPI is not set +# CONFIG_RTC is not set +# CONFIG_WATCHDOG is not set +# CONFIG_ANALOG is not set +# CONFIG_BCH is not set +# CONFIG_INPUT is not set +# CONFIG_LCD is not set +# CONFIG_MMCSD is not set +# CONFIG_MTD is not set +# CONFIG_PIPES is not set +# CONFIG_PM is not set +# CONFIG_POWER is not set +# CONFIG_SENSORS is not set +# CONFIG_SERCOMM_CONSOLE is not set +CONFIG_SERIAL=y +# CONFIG_LOWLEVEL_CONSOLE is not set +# CONFIG_16550_UART is not set +CONFIG_ARCH_HAVE_UART0=y +CONFIG_ARCH_HAVE_UART1=y +CONFIG_MCU_SERIAL=y +CONFIG_STANDARD_SERIAL=y +CONFIG_UART0_SERIAL_CONSOLE=y +# CONFIG_UART1_SERIAL_CONSOLE is not set +# CONFIG_NO_SERIAL_CONSOLE is not set # -# UIP Network Utilities +# UART0 Configuration # -CONFIG_NET_DHCP_LIGHT=n -CONFIG_NET_RESOLV_ENTRIES=4 +CONFIG_UART0_RXBUFSIZE=256 +CONFIG_UART0_TXBUFSIZE=256 +CONFIG_UART0_BAUD=57600 +CONFIG_UART0_BITS=8 +CONFIG_UART0_PARITY=0 +CONFIG_UART0_2STOP=0 # -# Settings for examples/nsh -CONFIG_NSH_CONSOLE=y -CONFIG_NSH_TELNET=n -CONFIG_NSH_IOBUFFER_SIZE=512 -CONFIG_NSH_CMD_SIZE=40 -CONFIG_NSH_DHCPC=n -CONFIG_NSH_NOMAC=n -CONFIG_NSH_IPADDR=0x0a000002 -CONFIG_NSH_DRIPADDR=0x0a000001 -CONFIG_NSH_NETMASK=0xffffff00 +# UART1 Configuration +# +CONFIG_UART1_RXBUFSIZE=256 +CONFIG_UART1_TXBUFSIZE=256 +CONFIG_UART1_BAUD=57600 +CONFIG_UART1_BITS=8 +CONFIG_UART1_PARITY=0 +CONFIG_UART1_2STOP=0 +# CONFIG_USBDEV is not set +# CONFIG_USBHOST is not set +# CONFIG_WIRELESS is not set # -# Stack and heap information +# System Logging Device Options # -CONFIG_BOOT_RUNFROMFLASH=n -CONFIG_BOOT_COPYTORAM=n -CONFIG_CUSTOM_STACK=n -CONFIG_IDLETHREAD_STACKSIZE=4096 -CONFIG_USERMAIN_STACKSIZE=4096 -CONFIG_PTHREAD_STACK_MIN=256 -CONFIG_PTHREAD_STACK_DEFAULT=4096 -CONFIG_HEAP_SIZE= -CONFIG_HEAP_BASE= # -# Maintain legacy build behavior (revisit) +# System Logging +# +# CONFIG_RAMLOG is not set + +# +# Networking Support +# +# CONFIG_NET is not set + +# +# File Systems +# + +# +# File system configuration +# +# CONFIG_FS_FAT is not set +# CONFIG_FS_RAMMAP is not set +# CONFIG_FS_NXFFS is not set +# CONFIG_FS_ROMFS is not set + +# +# System Logging +# +# CONFIG_SYSLOG is not set + +# +# Graphics Support +# +# CONFIG_NX is not set + +# +# Memory Management +# +# CONFIG_MM_SMALL is not set +CONFIG_MM_REGIONS=1 +CONFIG_ARCH_HAVE_HEAP2=y +CONFIG_HEAP2_BASE=0x00000000 +CONFIG_HEAP2_SIZE=0 +# CONFIG_GRAN is not set + +# +# Binary Formats +# +# CONFIG_BINFMT_DISABLE is not set +# CONFIG_NXFLAT is not set +# CONFIG_ELF is not set +# CONFIG_SYMTAB_ORDEREDBYNAME is not set + +# +# Library Routines +# +CONFIG_STDIO_BUFFER_SIZE=256 +CONFIG_STDIO_LINEBUFFER=y +CONFIG_NUNGET_CHARS=2 +CONFIG_LIB_HOMEDIR="/" +# CONFIG_LIBM is not set +CONFIG_NOPRINTF_FIELDWIDTH=y +# CONFIG_LIBC_FLOATINGPOINT is not set +# CONFIG_EOL_IS_CR is not set +# CONFIG_EOL_IS_LF is not set +# CONFIG_EOL_IS_BOTH_CRLF is not set +CONFIG_EOL_IS_EITHER_CRLF=y +# CONFIG_LIBC_STRERROR is not set +# CONFIG_LIBC_PERROR_STDOUT is not set +CONFIG_ARCH_LOWPUTC=y +CONFIG_LIB_SENDFILE_BUFSIZE=512 +# CONFIG_ARCH_ROMGETC is not set +# CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set + +# +# Basic CXX Support +# +# CONFIG_HAVE_CXX is not set + +# +# Application Configuration +# + +# +# Named Applications +# +# CONFIG_NAMEDAPP is not set + +# +# Examples +# +# CONFIG_EXAMPLES_BUTTONS is not set +# CONFIG_EXAMPLES_CAN is not set +# CONFIG_EXAMPLES_CDCACM is not set +# CONFIG_EXAMPLES_COMPOSITE is not set +# CONFIG_EXAMPLES_DHCPD is not set +# CONFIG_EXAMPLES_ELF is not set +# CONFIG_EXAMPLES_FTPC is not set +# CONFIG_EXAMPLES_FTPD is not set +# CONFIG_EXAMPLES_HELLO is not set +# CONFIG_EXAMPLES_HELLOXX is not set +# CONFIG_EXAMPLES_JSON is not set +# CONFIG_EXAMPLES_HIDKBD is not set +# CONFIG_EXAMPLES_IGMP is not set +# CONFIG_EXAMPLES_LCDRW is not set +# CONFIG_EXAMPLES_MM is not set +# CONFIG_EXAMPLES_MOUNT is not set +# CONFIG_EXAMPLES_MODBUS is not set +# CONFIG_EXAMPLES_NETTEST is not set +# CONFIG_EXAMPLES_NSH is not set +# CONFIG_EXAMPLES_NULL is not set +# CONFIG_EXAMPLES_NX is not set +# CONFIG_EXAMPLES_NXCONSOLE is not set +# CONFIG_EXAMPLES_NXFFS is not set +# CONFIG_EXAMPLES_NXFLAT is not set +# CONFIG_EXAMPLES_NXHELLO is not set +# CONFIG_EXAMPLES_NXIMAGE is not set +# CONFIG_EXAMPLES_NXLINES is not set +# CONFIG_EXAMPLES_NXTEXT is not set +CONFIG_EXAMPLES_OSTEST=y +# CONFIG_EXAMPLES_OSTEST_BUILTIN is not set +CONFIG_EXAMPLES_OSTEST_LOOPS=1 +CONFIG_EXAMPLES_OSTEST_STACKSIZE=8192 +CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=8 +CONFIG_EXAMPLES_OSTEST_RR_RANGE=10000 +CONFIG_EXAMPLES_OSTEST_RR_RUNS=10 +# CONFIG_EXAMPLES_PASHELLO is not set +# CONFIG_EXAMPLES_PIPE is not set +# CONFIG_EXAMPLES_POLL is not set +# CONFIG_EXAMPLES_QENCODER is not set +# CONFIG_EXAMPLES_RGMP is not set +# CONFIG_EXAMPLES_ROMFS is not set +# CONFIG_EXAMPLES_SENDMAIL is not set +# CONFIG_EXAMPLES_SERLOOP is not set +# CONFIG_EXAMPLES_TELNETD is not set +# CONFIG_EXAMPLES_THTTPD is not set +# CONFIG_EXAMPLES_TIFF is not set +# CONFIG_EXAMPLES_TOUCHSCREEN is not set +# CONFIG_EXAMPLES_UDP is not set +# CONFIG_EXAMPLES_UIP is not set +# CONFIG_EXAMPLES_USBSERIAL is not set +# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_EXAMPLES_USBTERM is not set +# CONFIG_EXAMPLES_WATCHDOG is not set +# CONFIG_EXAMPLES_WLAN is not set + +# +# Interpreters # -CONFIG_MMCSD=y -CONFIG_MMCSD_SPI=y -CONFIG_MMCSD_SDIO=y +# +# Interpreters +# +# CONFIG_INTERPRETERS_FICL is not set +# CONFIG_INTERPRETERS_PCODE is not set + +# +# Network Utilities +# + +# +# Networking Utilities +# +# CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_DHCPC is not set +# CONFIG_NETUTILS_DHCPD is not set +# CONFIG_NETUTILS_FTPC is not set +# CONFIG_NETUTILS_FTPD is not set +# CONFIG_NETUTILS_JSON is not set +# CONFIG_NETUTILS_RESOLV is not set +# CONFIG_NETUTILS_SMTP is not set +# CONFIG_NETUTILS_TELNETD is not set +# CONFIG_NETUTILS_TFTPC is not set +# CONFIG_NETUTILS_THTTPD is not set +# CONFIG_NETUTILS_UIPLIB is not set +# CONFIG_NETUTILS_WEBCLIENT is not set + +# +# ModBus +# + +# +# FreeModbus +# +# CONFIG_MODBUS is not set + +# +# NSH Library +# +# CONFIG_NSH_LIBRARY is not set + +# +# NxWidgets/NxWM +# + +# +# System NSH Add-Ons +# + +# +# Custom Free Memory Command +# +# CONFIG_SYSTEM_FREE is not set + +# +# I2C tool +# + +# +# FLASH Program Installation +# +# CONFIG_SYSTEM_INSTALL is not set + +# +# readline() +# +# CONFIG_SYSTEM_READLINE is not set + +# +# Power Off +# +# CONFIG_SYSTEM_POWEROFF is not set + +# +# RAMTRON +# +# CONFIG_SYSTEM_RAMTRON is not set + +# +# SD Card +# +# CONFIG_SYSTEM_SDCARD is not set + +# +# Sysinfo +# +# CONFIG_SYSTEM_SYSINFO is not set diff --git a/nuttx/configs/z16f2800100zcog/pashello/defconfig b/nuttx/configs/z16f2800100zcog/pashello/defconfig index eec7b1575..c9f0d9673 100644 --- a/nuttx/configs/z16f2800100zcog/pashello/defconfig +++ b/nuttx/configs/z16f2800100zcog/pashello/defconfig @@ -1,225 +1,486 @@ -############################################################################ -# configs/z16f2800100zcog/pashello/defconfig -# -# Copyright (C) 2008-2010 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# 3. Neither the name NuttX nor the names of its contributors may be -# used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# -############################################################################ -# -# Architecture selection # -CONFIG_ARCH="z16" +# Automatically generated file; DO NOT EDIT. +# Nuttx/ Configuration +# +CONFIG_NUTTX_NEWCONFIG=y + +# +# Build Setup +# +# CONFIG_EXPERIMENTAL is not set +CONFIG_HOST_LINUX=y +# CONFIG_HOST_OSX is not set +# CONFIG_HOST_WINDOWS is not set +# CONFIG_HOST_OTHER is not set + +# +# Build Configuration +# +# CONFIG_APPS_DIR="../apps" +# CONFIG_BUILD_2PASS is not set + +# +# Binary Output Formats +# +# CONFIG_RRLOAD_BINARY is not set +# CONFIG_INTELHEX_BINARY is not set +# CONFIG_MOTOROLA_SREC is not set +# CONFIG_RAW_BINARY is not set + +# +# Customize Header Files +# +# CONFIG_ARCH_STDBOOL_H is not set +# CONFIG_ARCH_MATH_H is not set +# CONFIG_ARCH_FLOAT_H is not set +# CONFIG_ARCH_STDARG_H is not set + +# +# Debug Options +# +CONFIG_DEBUG=y +# CONFIG_DEBUG_VERBOSE is not set +# CONFIG_DEBUG_ENABLE is not set + +# +# Subsystem Debug Options +# +# CONFIG_DEBUG_MM is not set +# CONFIG_DEBUG_SCHED is not set +# CONFIG_DEBUG_FS is not set +# CONFIG_DEBUG_LIB is not set +# CONFIG_DEBUG_BINFMT is not set +# CONFIG_DEBUG_GRAPHICS is not set + +# +# Driver Debug Options +# +# CONFIG_DEBUG_ANALOG is not set +# CONFIG_DEBUG_DMA is not set +# CONFIG_DEBUG_SYMBOLS is not set + +# +# System Type +# +# CONFIG_ARCH_8051 is not set +# CONFIG_ARCH_ARM is not set +# CONFIG_ARCH_AVR is not set +# CONFIG_ARCH_HC is not set +# CONFIG_ARCH_MIPS is not set +# CONFIG_ARCH_RGMP is not set +# CONFIG_ARCH_SH is not set +# CONFIG_ARCH_SIM is not set +# CONFIG_ARCH_X86 is not set CONFIG_ARCH_Z16=y +# CONFIG_ARCH_Z80 is not set +CONFIG_ARCH="z16" CONFIG_ARCH_CHIP="z16f" -CONFIG_ARCH_CHIP_Z16F=y -CONFIG_ARCH_CHIP_Z16F2810=n +CONFIG_BOARD_LOOPSPERMSEC=1250 + +# +# Z16 Configuration Options +# +# CONFIG_ARCH_CHIP_Z16F2810 is not set CONFIG_ARCH_CHIP_Z16F2811=y -CONFIG_ARCH_CHIP_Z16F3211=n -CONFIG_ARCH_CHIP_Z16F6411=n -CONFIG_ARCH_BOARD="z16f2800100zcog" -CONFIG_ARCH_BOARD_Z16F2800100ZCOG=y -CONFIG_ARCH_NOINTC=n +# CONFIG_ARCH_CHIP_Z16F3211 is not set +# CONFIG_ARCH_CHIP_Z16F6411 is not set +CONFIG_ARCH_CHIP_Z16F=y + +# +# Common Configuration Options +# + +# +# Z16F Configuration Options +# +CONFIG_Z16F_UART0=y +CONFIG_Z16F_UART1=y + +# +# Architecture Options +# +# CONFIG_ARCH_NOINTC is not set +# CONFIG_ARCH_DMA is not set CONFIG_ARCH_IRQPRIO=y -CONFIG_BOARD_LOOPSPERMSEC=1250 +# CONFIG_ARCH_STACKDUMP is not set CONFIG_ENDIAN_BIG=y + +# +# Board Settings +# +CONFIG_DRAM_START= CONFIG_DRAM_SIZE=65536 -CONFIG_ARCH_LEDS=y + # -# Z16F specific device driver settings +# Boot options # -CONFIG_UART0_SERIAL_CONSOLE=y -CONFIG_UART1_SERIAL_CONSOLE=n -CONFIG_UART0_TXBUFSIZE=256 -CONFIG_UART1_TXBUFSIZE=256 -CONFIG_UART0_RXBUFSIZE=256 -CONFIG_UART1_RXBUFSIZE=256 -CONFIG_UART0_BAUD=57600 -CONFIG_UART1_BAUD=57600 -CONFIG_UART0_PARITY=0 -CONFIG_UART1_PARITY=0 -CONFIG_UART0_2STOP=0 -CONFIG_UART1_2STOP=0 +# CONFIG_BOOT_RUNFROMEXTSRAM is not set +CONFIG_BOOT_RUNFROMFLASH=y +# CONFIG_BOOT_RUNFROMISRAM is not set +# CONFIG_BOOT_RUNFROMSDRAM is not set +# CONFIG_BOOT_COPYTORAM is not set # -# General build options +# Board Selection # -CONFIG_RRLOAD_BINARY=n -CONFIG_INTELHEX_BINARY=n -CONFIG_RAW_BINARY=n +CONFIG_ARCH_BOARD_Z16F2800100ZCOG=y +# CONFIG_ARCH_BOARD_CUSTOM is not set +CONFIG_ARCH_BOARD="z16f2800100zcog" # -# General OS setup +# Common Board Options # -CONFIG_USER_ENTRYPOINT="pashello_main" -CONFIG_DEBUG=y -CONFIG_DEBUG_VERBOSE=n -CONFIG_DEBUG_SYMBOLS=n -CONFIG_MM_REGIONS=1 -CONFIG_ARCH_LOWPUTC=y +CONFIG_ARCH_HAVE_LEDS=y +CONFIG_ARCH_LEDS=y + +# +# Board-Specific Options +# + +# +# RTOS Features +# +CONFIG_MSEC_PER_TICK=10 CONFIG_RR_INTERVAL=200 -CONFIG_SCHED_INSTRUMENTATION=n +# CONFIG_SCHED_INSTRUMENTATION is not set CONFIG_TASK_NAME_SIZE=0 +# CONFIG_JULIAN_TIME is not set CONFIG_START_YEAR=2008 CONFIG_START_MONTH=1 CONFIG_START_DAY=28 -CONFIG_JULIAN_TIME=n CONFIG_DEV_CONSOLE=y CONFIG_DEV_LOWCONSOLE=y -CONFIG_MUTEX_TYPES=n -CONFIG_PRIORITY_INHERITANCE=n -CONFIG_SEM_PREALLOCHOLDERS=0 -CONFIG_SEM_NNESTPRIO=0 -CONFIG_FDCLONE_DISABLE=n -CONFIG_FDCLONE_STDIO=n +# CONFIG_MUTEX_TYPES is not set +# CONFIG_PRIORITY_INHERITANCE is not set +# CONFIG_FDCLONE_DISABLE is not set +# CONFIG_FDCLONE_STDIO is not set CONFIG_SDCLONE_DISABLE=y +# CONFIG_SCHED_WORKQUEUE is not set +# CONFIG_SCHED_WAITPID is not set +# CONFIG_SCHED_ATEXIT is not set +# CONFIG_SCHED_ONEXIT is not set +CONFIG_USER_ENTRYPOINT="pashello_main" +CONFIG_DISABLE_OS_API=y +# CONFIG_DISABLE_CLOCK is not set +# CONFIG_DISABLE_POSIX_TIMERS is not set +# CONFIG_DISABLE_PTHREAD is not set +# CONFIG_DISABLE_SIGNALS is not set +# CONFIG_DISABLE_MQUEUE is not set +# CONFIG_DISABLE_MOUNTPOINT is not set +# CONFIG_DISABLE_ENVIRON is not set +CONFIG_DISABLE_POLL=y # -# The following can be used to disable categories of -# APIs supported by the OS. If the compiler supports -# weak functions, then it should not be necessary to -# disable functions unless you want to restrict usage -# of those APIs. +# Sizes of configurable things (0 disables) # -# There are certain dependency relationships in these -# features. +CONFIG_MAX_TASKS=16 +CONFIG_MAX_TASK_ARGS=4 +CONFIG_NPTHREAD_KEYS=4 +CONFIG_NFILE_DESCRIPTORS=8 +CONFIG_NFILE_STREAMS=8 +CONFIG_NAME_MAX=32 +CONFIG_PREALLOC_MQ_MSGS=4 +CONFIG_MQ_MAXMSGSIZE=32 +CONFIG_MAX_WDOGPARMS=2 +CONFIG_PREALLOC_WDOGS=4 +CONFIG_PREALLOC_TIMERS=4 + # -# o mq_notify logic depends on signals to awaken tasks -# waiting for queues to become full or empty. -# o pthread_condtimedwait() depends on signals to wake -# up waiting tasks. +# Stack and heap information # -CONFIG_DISABLE_CLOCK=n -CONFIG_DISABLE_POSIX_TIMERS=n -CONFIG_DISABLE_PTHREAD=n -CONFIG_DISABLE_SIGNALS=n -CONFIG_DISABLE_MQUEUE=n -CONFIG_DISABLE_MOUNTPOINT=n -CONFIG_DISABLE_ENVIRON=n -CONFIG_DISABLE_POLL=y +# CONFIG_CUSTOM_STACK is not set +CONFIG_IDLETHREAD_STACKSIZE=4096 +CONFIG_USERMAIN_STACKSIZE=4096 +CONFIG_PTHREAD_STACK_MIN=256 +CONFIG_PTHREAD_STACK_DEFAULT=4096 # -# Misc libc settings +# Device Drivers +# +CONFIG_DEV_NULL=y +# CONFIG_DEV_ZERO is not set +# CONFIG_LOOP is not set +# CONFIG_RAMDISK is not set +# CONFIG_CAN is not set +# CONFIG_PWM is not set +# CONFIG_I2C is not set +# CONFIG_SPI is not set +# CONFIG_RTC is not set +# CONFIG_WATCHDOG is not set +# CONFIG_ANALOG is not set +# CONFIG_BCH is not set +# CONFIG_INPUT is not set +# CONFIG_LCD is not set +# CONFIG_MMCSD is not set +# CONFIG_MTD is not set +# CONFIG_PIPES is not set +# CONFIG_PM is not set +# CONFIG_POWER is not set +# CONFIG_SENSORS is not set +# CONFIG_SERCOMM_CONSOLE is not set +CONFIG_SERIAL=y +# CONFIG_LOWLEVEL_CONSOLE is not set +# CONFIG_16550_UART is not set +CONFIG_ARCH_HAVE_UART0=y +CONFIG_ARCH_HAVE_UART1=y +CONFIG_MCU_SERIAL=y +CONFIG_STANDARD_SERIAL=y +CONFIG_UART0_SERIAL_CONSOLE=y +# CONFIG_UART1_SERIAL_CONSOLE is not set +# CONFIG_NO_SERIAL_CONSOLE is not set + # -CONFIG_NOPRINTF_FIELDWIDTH=y +# UART0 Configuration +# +CONFIG_UART0_RXBUFSIZE=256 +CONFIG_UART0_TXBUFSIZE=256 +CONFIG_UART0_BAUD=57600 +CONFIG_UART0_BITS=8 +CONFIG_UART0_PARITY=0 +CONFIG_UART0_2STOP=0 # -# Allow for architecture optimized implementations +# UART1 Configuration # -# The architecture can provide optimized versions of the -# following to improve sysem performance +CONFIG_UART1_RXBUFSIZE=256 +CONFIG_UART1_TXBUFSIZE=256 +CONFIG_UART1_BAUD=57600 +CONFIG_UART1_BITS=8 +CONFIG_UART1_PARITY=0 +CONFIG_UART1_2STOP=0 +# CONFIG_USBDEV is not set +# CONFIG_USBHOST is not set +# CONFIG_WIRELESS is not set + +# +# System Logging Device Options # -CONFIG_ARCH_MEMCPY=n -CONFIG_ARCH_MEMCMP=n -CONFIG_ARCH_MEMMOVE=n -CONFIG_ARCH_MEMSET=n -CONFIG_ARCH_STRCMP=n -CONFIG_ARCH_STRCPY=n -CONFIG_ARCH_STRNCPY=n -CONFIG_ARCH_STRLEN=n -CONFIG_ARCH_STRNLEN=n -CONFIG_ARCH_BZERO=n # -# Sizes of configurable things (0 disables) +# System Logging +# +# CONFIG_RAMLOG is not set + +# +# Networking Support +# +# CONFIG_NET is not set + +# +# File Systems +# + +# +# File system configuration +# +# CONFIG_FS_FAT is not set +# CONFIG_FS_RAMMAP is not set +# CONFIG_FS_NXFFS is not set +# CONFIG_FS_ROMFS is not set + +# +# System Logging +# +# CONFIG_SYSLOG is not set + +# +# Graphics Support +# +# CONFIG_NX is not set + +# +# Memory Management +# +# CONFIG_MM_SMALL is not set +CONFIG_MM_REGIONS=1 +CONFIG_ARCH_HAVE_HEAP2=y +CONFIG_HEAP2_BASE=0x00000000 +CONFIG_HEAP2_SIZE=0 +# CONFIG_GRAN is not set + +# +# Binary Formats +# +# CONFIG_BINFMT_DISABLE is not set +# CONFIG_NXFLAT is not set +# CONFIG_ELF is not set +# CONFIG_SYMTAB_ORDEREDBYNAME is not set + +# +# Library Routines # -CONFIG_MAX_TASKS=16 -CONFIG_MAX_TASK_ARGS=4 -CONFIG_NPTHREAD_KEYS=4 -CONFIG_NFILE_DESCRIPTORS=8 -CONFIG_NFILE_STREAMS=8 -CONFIG_NAME_MAX=32 CONFIG_STDIO_BUFFER_SIZE=256 +CONFIG_STDIO_LINEBUFFER=y CONFIG_NUNGET_CHARS=2 -CONFIG_PREALLOC_MQ_MSGS=4 -CONFIG_MQ_MAXMSGSIZE=32 -CONFIG_MAX_WDOGPARMS=2 -CONFIG_PREALLOC_WDOGS=4 -CONFIG_PREALLOC_TIMERS=4 +CONFIG_LIB_HOMEDIR="/" +# CONFIG_LIBM is not set +CONFIG_NOPRINTF_FIELDWIDTH=y +# CONFIG_LIBC_FLOATINGPOINT is not set +# CONFIG_EOL_IS_CR is not set +# CONFIG_EOL_IS_LF is not set +# CONFIG_EOL_IS_BOTH_CRLF is not set +CONFIG_EOL_IS_EITHER_CRLF=y +# CONFIG_LIBC_STRERROR is not set +# CONFIG_LIBC_PERROR_STDOUT is not set +CONFIG_ARCH_LOWPUTC=y +CONFIG_LIB_SENDFILE_BUFSIZE=512 +# CONFIG_ARCH_ROMGETC is not set +# CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set + +# +# Basic CXX Support +# +# CONFIG_HAVE_CXX is not set # -# TCP/IP and UDP support via uIP +# Application Configuration # -CONFIG_NET=n -CONFIG_NET_IPv6=n -CONFIG_NSOCKET_DESCRIPTORS=0 -CONFIG_NET_SOCKOPTS=y -CONFIG_NET_BUFSIZE=420 -CONFIG_NET_TCP=n -CONFIG_NET_TCP_CONNS=40 -CONFIG_NET_MAX_LISTENPORTS=40 -CONFIG_NET_UDP=n -CONFIG_NET_UDP_CHECKSUMS=y -#CONFIG_NET_UDP_CONNS=10 -CONFIG_NET_ICMP=n -CONFIG_NET_ICMP_PING=n -#CONFIG_NET_PINGADDRCONF=0 -CONFIG_NET_STATISTICS=y -#CONFIG_NET_RECEIVE_WINDOW= -#CONFIG_NET_ARPTAB_SIZE=8 -CONFIG_NET_BROADCAST=n # -# UIP Network Utilities +# Named Applications # -CONFIG_NET_DHCP_LIGHT=n -CONFIG_NET_RESOLV_ENTRIES=4 +# CONFIG_NAMEDAPP is not set # -# Settings for examples/nsh -CONFIG_NSH_CONSOLE=y -CONFIG_NSH_TELNET=n -CONFIG_NSH_IOBUFFER_SIZE=512 -CONFIG_NSH_CMD_SIZE=40 -CONFIG_NSH_DHCPC=n -CONFIG_NSH_NOMAC=n -CONFIG_NSH_IPADDR=0x0a000002 -CONFIG_NSH_DRIPADDR=0x0a000001 -CONFIG_NSH_NETMASK=0xffffff00 +# Examples +# +# CONFIG_EXAMPLES_BUTTONS is not set +# CONFIG_EXAMPLES_CAN is not set +# CONFIG_EXAMPLES_CDCACM is not set +# CONFIG_EXAMPLES_COMPOSITE is not set +# CONFIG_EXAMPLES_DHCPD is not set +# CONFIG_EXAMPLES_ELF is not set +# CONFIG_EXAMPLES_FTPC is not set +# CONFIG_EXAMPLES_FTPD is not set +# CONFIG_EXAMPLES_HELLO is not set +# CONFIG_EXAMPLES_HELLOXX is not set +# CONFIG_EXAMPLES_JSON is not set +# CONFIG_EXAMPLES_HIDKBD is not set +# CONFIG_EXAMPLES_IGMP is not set +# CONFIG_EXAMPLES_LCDRW is not set +# CONFIG_EXAMPLES_MM is not set +# CONFIG_EXAMPLES_MOUNT is not set +# CONFIG_EXAMPLES_MODBUS is not set +# CONFIG_EXAMPLES_NETTEST is not set +# CONFIG_EXAMPLES_NSH is not set +# CONFIG_EXAMPLES_NULL is not set +# CONFIG_EXAMPLES_NX is not set +# CONFIG_EXAMPLES_NXCONSOLE is not set +# CONFIG_EXAMPLES_NXFFS is not set +# CONFIG_EXAMPLES_NXFLAT is not set +# CONFIG_EXAMPLES_NXHELLO is not set +# CONFIG_EXAMPLES_NXIMAGE is not set +# CONFIG_EXAMPLES_NXLINES is not set +# CONFIG_EXAMPLES_NXTEXT is not set +# CONFIG_EXAMPLES_OSTEST is not set +CONFIG_EXAMPLES_PASHELLO=y +# CONFIG_EXAMPLES_PIPE is not set +# CONFIG_EXAMPLES_POLL is not set +# CONFIG_EXAMPLES_QENCODER is not set +# CONFIG_EXAMPLES_RGMP is not set +# CONFIG_EXAMPLES_ROMFS is not set +# CONFIG_EXAMPLES_SENDMAIL is not set +# CONFIG_EXAMPLES_SERLOOP is not set +# CONFIG_EXAMPLES_TELNETD is not set +# CONFIG_EXAMPLES_THTTPD is not set +# CONFIG_EXAMPLES_TIFF is not set +# CONFIG_EXAMPLES_TOUCHSCREEN is not set +# CONFIG_EXAMPLES_UDP is not set +# CONFIG_EXAMPLES_UIP is not set +# CONFIG_EXAMPLES_USBSERIAL is not set +# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_EXAMPLES_USBTERM is not set +# CONFIG_EXAMPLES_WATCHDOG is not set +# CONFIG_EXAMPLES_WLAN is not set # -# Stack and heap information +# Interpreters +# + +# +# Interpreters +# +# CONFIG_INTERPRETERS_FICL is not set +CONFIG_INTERPRETERS_PCODE=y + +# +# Network Utilities +# + +# +# Networking Utilities +# +# CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_DHCPC is not set +# CONFIG_NETUTILS_DHCPD is not set +# CONFIG_NETUTILS_FTPC is not set +# CONFIG_NETUTILS_FTPD is not set +# CONFIG_NETUTILS_JSON is not set +# CONFIG_NETUTILS_RESOLV is not set +# CONFIG_NETUTILS_SMTP is not set +# CONFIG_NETUTILS_TELNETD is not set +# CONFIG_NETUTILS_TFTPC is not set +# CONFIG_NETUTILS_THTTPD is not set +# CONFIG_NETUTILS_UIPLIB is not set +# CONFIG_NETUTILS_WEBCLIENT is not set + +# +# ModBus +# + +# +# FreeModbus +# +# CONFIG_MODBUS is not set + +# +# NSH Library +# +# CONFIG_NSH_LIBRARY is not set + +# +# NxWidgets/NxWM # -CONFIG_BOOT_RUNFROMFLASH=n -CONFIG_BOOT_COPYTORAM=n -CONFIG_CUSTOM_STACK=n -CONFIG_IDLETHREAD_STACKSIZE=4096 -CONFIG_USERMAIN_STACKSIZE=4096 -CONFIG_PTHREAD_STACK_MIN=256 -CONFIG_PTHREAD_STACK_DEFAULT=4096 -CONFIG_HEAP_SIZE= -CONFIG_HEAP_BASE= # -# Maintain legacy build behavior (revisit) +# System NSH Add-Ons # -CONFIG_MMCSD=y -CONFIG_MMCSD_SPI=y -CONFIG_MMCSD_SDIO=y +# +# Custom Free Memory Command +# +# CONFIG_SYSTEM_FREE is not set + +# +# I2C tool +# + +# +# FLASH Program Installation +# +# CONFIG_SYSTEM_INSTALL is not set + +# +# readline() +# +# CONFIG_SYSTEM_READLINE is not set + +# +# Power Off +# +# CONFIG_SYSTEM_POWEROFF is not set + +# +# RAMTRON +# +# CONFIG_SYSTEM_RAMTRON is not set + +# +# SD Card +# +# CONFIG_SYSTEM_SDCARD is not set + +# +# Sysinfo +# +# CONFIG_SYSTEM_SYSINFO is not set diff --git a/nuttx/configs/z8encore000zco/README.txt b/nuttx/configs/z8encore000zco/README.txt index 9ec1b80af..7ca50db8c 100644 --- a/nuttx/configs/z8encore000zco/README.txt +++ b/nuttx/configs/z8encore000zco/README.txt @@ -101,8 +101,8 @@ available: b. You can't use setenv.sh in the native Windows environment. Try scripts/setenv.bat instead. c. At present, the native Windows build fails at the final link stages. - The failure is due to problems in arch/z80/src/nuttx/linkcmd that - is autogenerated by arch/z80/src/Makefile.zdsii. The basic program + The failure is due to problems in arch/z80/src/nuttx.linkcmd that + is autogenerated by arch/z80/src/Makefile.zdsii. The basic problem is the spurious spaces and and carrirage returns are generated at the end of the lines after a line continuation (\ ^M). If these trailing bad characters are manually eliminated, then the build diff --git a/nuttx/configs/z8encore000zco/ostest/defconfig b/nuttx/configs/z8encore000zco/ostest/defconfig index a79355b71..7ff44faae 100644 --- a/nuttx/configs/z8encore000zco/ostest/defconfig +++ b/nuttx/configs/z8encore000zco/ostest/defconfig @@ -397,8 +397,8 @@ CONFIG_EXAMPLES_OSTEST_RR_RUNS=10 # # Interpreters # -# CONFIG_FICL is not set -# CONFIG_PCODE is not set +# CONFIG_INTERPRETERS_FICL is not set +# CONFIG_INTERPRETERS_PCODE is not set # # Network Utilities diff --git a/nuttx/configs/z8f64200100kit/README.txt b/nuttx/configs/z8f64200100kit/README.txt index 7356c8e87..b0f224ad8 100644 --- a/nuttx/configs/z8f64200100kit/README.txt +++ b/nuttx/configs/z8f64200100kit/README.txt @@ -101,8 +101,8 @@ available: b. You can't use setenv.sh in the native Windows environment. Try scripts/setenv.bat instead. c. At present, the native Windows build fails at the final link stages. - The failure is due to problems in arch/z80/src/nuttx/linkcmd that - is autogenerated by arch/z80/src/Makefile.zdsii. The basic program + The failure is due to problems in arch/z80/src/nuttx.linkcmd that + is autogenerated by arch/z80/src/Makefile.zdsii. The basic problem is the spurious spaces and and carrirage returns are generated at the end of the lines after a line continuation (\ ^M). If these trailing bad characters are manually eliminated, then the build diff --git a/nuttx/configs/z8f64200100kit/ostest/defconfig b/nuttx/configs/z8f64200100kit/ostest/defconfig index 2389a0d34..1650600cd 100644 --- a/nuttx/configs/z8f64200100kit/ostest/defconfig +++ b/nuttx/configs/z8f64200100kit/ostest/defconfig @@ -397,8 +397,8 @@ CONFIG_EXAMPLES_OSTEST_RR_RUNS=10 # # Interpreters # -# CONFIG_FICL is not set -# CONFIG_PCODE is not set +# CONFIG_INTERPRETERS_FICL is not set +# CONFIG_INTERPRETERS_PCODE is not set # # Network Utilities diff --git a/nuttx/tools/incdir.sh b/nuttx/tools/incdir.sh index af83f8517..145bfe9bb 100755 --- a/nuttx/tools/incdir.sh +++ b/nuttx/tools/incdir.sh @@ -215,7 +215,7 @@ for dir in $dirlist; do if [ -z "$response" ]; then response="${cmdarg}'"${path} else - response=${response}":${path}" + response=${response}";${path}" fi else # Treat the first directory differently -- cgit v1.2.3 From 7f7356cdc914dacae1cec0de2671e026f4f8dd01 Mon Sep 17 00:00:00 2001 From: patacongo Date: Sat, 1 Dec 2012 15:43:51 +0000 Subject: standard keypad inteface and apps/examples/keypadtest from Denis Carikli git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5403 42af7a65-404d-4744-a932-0658087f49c3 --- apps/ChangeLog.txt | 2 + apps/examples/Kconfig | 1 + apps/examples/Make.defs | 4 + apps/examples/Makefile | 4 +- apps/examples/README.txt | 13 +++ apps/examples/keypadtest/Kconfig | 21 ++++ apps/examples/keypadtest/Makefile | 108 +++++++++++++++++++ apps/examples/keypadtest/keypadtest_main.c | 138 +++++++++++++++++++++++++ nuttx/ChangeLog | 3 + nuttx/arch/arm/src/calypso/calypso_keypad.c | 8 ++ nuttx/configs/compal_e99/nsh_highram/appconfig | 3 +- nuttx/configs/compal_e99/nsh_highram/defconfig | 1 + nuttx/graphics/nxglib/nxglib_splitline.c | 3 +- nuttx/include/nuttx/input/keypad.h | 54 ++++++++++ 14 files changed, 358 insertions(+), 5 deletions(-) create mode 100644 apps/examples/keypadtest/Kconfig create mode 100644 apps/examples/keypadtest/Makefile create mode 100644 apps/examples/keypadtest/keypadtest_main.c create mode 100644 nuttx/include/nuttx/input/keypad.h (limited to 'apps') diff --git a/apps/ChangeLog.txt b/apps/ChangeLog.txt index 673838067..d6e5de3c1 100644 --- a/apps/ChangeLog.txt +++ b/apps/ChangeLog.txt @@ -428,3 +428,5 @@ From Freddie Chopin. * Rename CONFIG_PCODE and CONFIG_FICL as CONFIG_INTERPRETERS_PCODE and CONFIG_INTERPRETERS_FICL for consistency with other configuration naming. + * apps/examples/keypadtest: A keypad test example contributed by Denis + Carikli \ No newline at end of file diff --git a/apps/examples/Kconfig b/apps/examples/Kconfig index c0d126ad4..ae5f0a61a 100644 --- a/apps/examples/Kconfig +++ b/apps/examples/Kconfig @@ -17,6 +17,7 @@ source "$APPSDIR/examples/hello/Kconfig" source "$APPSDIR/examples/helloxx/Kconfig" source "$APPSDIR/examples/json/Kconfig" source "$APPSDIR/examples/hidkbd/Kconfig" +source "$APPSDIR/examples/keypadtest/Kconfig" source "$APPSDIR/examples/igmp/Kconfig" source "$APPSDIR/examples/lcdrw/Kconfig" source "$APPSDIR/examples/mm/Kconfig" diff --git a/apps/examples/Make.defs b/apps/examples/Make.defs index 3d95ccb16..91f1331df 100644 --- a/apps/examples/Make.defs +++ b/apps/examples/Make.defs @@ -98,6 +98,10 @@ ifeq ($(CONFIG_EXAMPLES_JSON),y) CONFIGURED_APPS += examples/json endif +ifeq ($(CONFIG_EXAMPLES_KEYPADTEST),y) +CONFIGURED_APPS += examples/keypadtest +endif + ifeq ($(CONFIG_EXAMPLES_LCDRW),y) CONFIGURED_APPS += examples/lcdrw endif diff --git a/apps/examples/Makefile b/apps/examples/Makefile index 9d20e9312..bdbfd4de8 100644 --- a/apps/examples/Makefile +++ b/apps/examples/Makefile @@ -38,7 +38,7 @@ # Sub-directories SUBDIRS = adc buttons can cdcacm composite cxxtest dhcpd discover elf ftpc -SUBDIRS += ftpd hello helloxx hidkbd igmp json lcdrw mm modbus mount +SUBDIRS += ftpd hello helloxx hidkbd igmp json keypadtest lcdrw mm modbus mount SUBDIRS += nettest nsh null nx nxconsole nxffs nxflat nxhello nximage SUBDIRS += nxlines nxtext ostest pashello pipe poll pwm qencoder relays SUBDIRS += rgmp romfs serloop telnetd thttpd tiff touchscreen udp uip @@ -57,7 +57,7 @@ SUBDIRS += usbserial sendmail usbstorage usbterm watchdog wget wgetjson wlan CNTXTDIRS = pwm ifeq ($(CONFIG_NSH_BUILTIN_APPS),y) -CNTXTDIRS += adc can cdcacm composite cxxtestdhcpd discover ftpd json +CNTXTDIRS += adc can cdcacm composite cxxtest dhcpd discover ftpd json keypadtest CNTXTDIRS += modbus nettest nxlines relays qencoder telnetd watchdog wgetjson endif diff --git a/apps/examples/README.txt b/apps/examples/README.txt index 1463b0253..e40a63be9 100644 --- a/apps/examples/README.txt +++ b/apps/examples/README.txt @@ -580,6 +580,19 @@ examples/json on 2011-10-10 so I presume that the code is stable and there is no risk of maintaining duplicate logic in the NuttX repository. +examples/keypadtest +^^^^^^^^^^^^^^^^^^^ + + This is a generic keypad test example. It is similar to the USB hidkbd + example, but makes no assumptions about the underlying keyboard interface. + It uses the interfaces of include/nuttx/input/keypad.h. + + CONFIG_EXAMPLES_KEYPADTEST - Selects the keypadtest example (only need + if the mconf/Kconfig tool is used. + + CONFIG_EXAMPLES_KEYPAD_DEVNAME - The name of the keypad device that will + be opened in order to perform the keypad test. Default: "/dev/keypad" + examples/lcdrw ^^^^^^^^^^^^^^ diff --git a/apps/examples/keypadtest/Kconfig b/apps/examples/keypadtest/Kconfig new file mode 100644 index 000000000..9dee80633 --- /dev/null +++ b/apps/examples/keypadtest/Kconfig @@ -0,0 +1,21 @@ +# +# For a description of the syntax of this configuration file, +# see misc/tools/kconfig-language.txt. +# + +config EXAMPLES_KEYPADTEST + bool "Keypad test example program" + default n + ---help--- + Enable the Keypad test example programe + +if EXAMPLES_KEYPADTEST + + config EXAMPLES_KEYPAD_DEVNAME + string "Keypad Device Name" + default "/dev/keypad" + ---help--- + The name of the keypad device that will be opened in order to perform + the keypad test. Default: "/dev/keypad" + +endif diff --git a/apps/examples/keypadtest/Makefile b/apps/examples/keypadtest/Makefile new file mode 100644 index 000000000..3de0556a2 --- /dev/null +++ b/apps/examples/keypadtest/Makefile @@ -0,0 +1,108 @@ +############################################################################ +# apps/examples/keypadtest/Makefile +# +# Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. +# Author: Gregory Nutt +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# 3. Neither the name NuttX nor the names of its contributors may be +# used to endorse or promote products derived from this software +# without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. +# +############################################################################ + +-include $(TOPDIR)/.config +-include $(TOPDIR)/Make.defs +include $(APPDIR)/Make.defs + +# Keypad Test Example + +ASRCS = +CSRCS = keypadtest_main.c + +AOBJS = $(ASRCS:.S=$(OBJEXT)) +COBJS = $(CSRCS:.c=$(OBJEXT)) + +SRCS = $(ASRCS) $(CSRCS) +OBJS = $(AOBJS) $(COBJS) + +ifeq ($(CONFIG_WINDOWS_NATIVE),y) + BIN = ..\..\libapps$(LIBEXT) +else +ifeq ($(WINTOOL),y) + BIN = ..\\..\\libapps$(LIBEXT) +else + BIN = ../../libapps$(LIBEXT) +endif +endif + +# helloxx built-in application info + +APPNAME = keypadtest +PRIORITY = SCHED_PRIORITY_DEFAULT +STACKSIZE = 2048 + +ROOTDEPPATH = --dep-path . + +# Common build + +VPATH = + +all: .built +.PHONY: clean depend distclean + +$(AOBJS): %$(OBJEXT): %.S + $(call ASSEMBLE, $<, $@) + +$(COBJS): %$(OBJEXT): %.c + $(call COMPILE, $<, $@) + +.built: $(OBJS) + $(call ARCHIVE, $(BIN), $(OBJS)) + @touch .built + +.context: +ifeq ($(CONFIG_NSH_BUILTIN_APPS),y) + $(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main) + @touch $@ +endif + +context: .context + +.depend: Makefile $(SRCS) + @$(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep + @touch $@ + +depend: .depend + +clean: + $(call DELFILE, .built) + $(call CLEAN) + +distclean: clean + $(call DELFILE, Make.dep) + $(call DELFILE, .depend) + +-include Make.dep diff --git a/apps/examples/keypadtest/keypadtest_main.c b/apps/examples/keypadtest/keypadtest_main.c new file mode 100644 index 000000000..afdc3e08a --- /dev/null +++ b/apps/examples/keypadtest/keypadtest_main.c @@ -0,0 +1,138 @@ +/**************************************************************************** + * examples/keypadtest/keypadtest_main.c + * + * Copyright (C) 2011 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name Gregory Nutt nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include +#include + +#include +#include +#include +#include +#include + +#include + +/**************************************************************************** + * Definitions + ****************************************************************************/ +/* Configuration ************************************************************/ + +/* Sanity checking */ + +/* Provide some default values for other configuration settings */ + +#ifndef CONFIG_EXAMPLES_KEYPAD_DEVNAME +# define CONFIG_EXAMPLES_KEYPAD_DEVNAME "/dev/keypad" +#endif + +/**************************************************************************** + * Private Types + ****************************************************************************/ + +/**************************************************************************** + * Private Data + ****************************************************************************/ + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: keypadtest_main + ****************************************************************************/ + +int keypadtest_main(int argc, char *argv[]) +{ + char buffer[256]; + ssize_t nbytes; + int fd; + int ret; + + /* First, register the keyboard device(s) */ + + printf("keypadtest_main: Register keyboard device\n"); + ret = keypad_kbdinit(); + if (ret != OK) + { + printf("keypadtest_main: Failed to register the KBD class\n"); + fflush(stdout); + return 1; + } + + /* Open the configured keyboard device. */ + + printf("keypadtest_main: Opening device %s\n", CONFIG_EXAMPLES_KEYPAD_DEVNAME); + fd = open(CONFIG_EXAMPLES_KEYPAD_DEVNAME, O_RDONLY); + if (fd < 0) + { + printf("keypadtest_main: open() failed: %d\n", errno); + fflush(stdout); + return 1; + } + + printf("keypadtest_main: Device %s opened\n", CONFIG_EXAMPLES_KEYPAD_DEVNAME); + fflush(stdout); + + /* Loop until there is a read failure */ + + do + { + /* Read a buffer of data */ + + nbytes = read(fd, buffer, 256); + if (nbytes > 0) + { + /* On success, echo the buffer to stdout */ + + (void)write(1, buffer, nbytes); + } + } + while (nbytes >= 0); + + printf("keypadtest_main: Closing device %s: %d\n", CONFIG_EXAMPLES_KEYPAD_DEVNAME, (int)nbytes); + fflush(stdout); + close(fd); + return 0; +} diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog index 73c873f01..61a5a26d6 100644 --- a/nuttx/ChangeLog +++ b/nuttx/ChangeLog @@ -3719,3 +3719,6 @@ * configs/z16f2800100zcog/ostest - Now supports a native Windows build (other ZNEO configs may also support the native build, but this has not been verfiied). + * include/nuttx/input/keypad.h, arch/arm/src/calypso/calypso_keypad.c, and + configs/compal_e99/nsh_highram: First cut at a standard keypad interface + definition. Contributed by Denis Carikli. diff --git a/nuttx/arch/arm/src/calypso/calypso_keypad.c b/nuttx/arch/arm/src/calypso/calypso_keypad.c index d7f8ec780..cdc22b286 100644 --- a/nuttx/arch/arm/src/calypso/calypso_keypad.c +++ b/nuttx/arch/arm/src/calypso/calypso_keypad.c @@ -369,3 +369,11 @@ void up_keypad(void) (void)register_driver("/dev/keypad", &keypad_ops, 0444, NULL); } + +int keypad_kbdinit(void) +{ + calypso_armio(); + up_keypad(); + + return OK; +} diff --git a/nuttx/configs/compal_e99/nsh_highram/appconfig b/nuttx/configs/compal_e99/nsh_highram/appconfig index db5e61236..dfe0be587 100644 --- a/nuttx/configs/compal_e99/nsh_highram/appconfig +++ b/nuttx/configs/compal_e99/nsh_highram/appconfig @@ -40,9 +40,8 @@ CONFIGURED_APPS += nshlib # Path to example in apps/examples -#CONFIGURED_APPS += examples/hello #fails not finding hello_main despite of good config CONFIGURED_APPS += system/poweroff -CONFIGURED_APPS += examples/ostest +CONFIGURED_APPS += examples/keypadtest CONFIGURED_APPS += examples/nxtext CONFIGURED_APPS += examples/nxhello CONFIGURED_APPS += examples/nxlines diff --git a/nuttx/configs/compal_e99/nsh_highram/defconfig b/nuttx/configs/compal_e99/nsh_highram/defconfig index 1f4d54a1c..1d405874e 100644 --- a/nuttx/configs/compal_e99/nsh_highram/defconfig +++ b/nuttx/configs/compal_e99/nsh_highram/defconfig @@ -245,6 +245,7 @@ CONFIG_EXAMPLES_NETTEST_CLIENTIP=0x0a000001 # Settings for examples/nsh CONFIG_NSH_CONSOLE=y CONFIG_NSH_TELNET=n +CONFIG_NSH_DISABLE_HEXDUMP=n CONFIG_NSH_IOBUFFER_SIZE=512 CONFIG_NSH_CMD_SIZE=40 CONFIG_NSH_STACKSIZE=4096 diff --git a/nuttx/graphics/nxglib/nxglib_splitline.c b/nuttx/graphics/nxglib/nxglib_splitline.c index cbf2d5ff3..11658e149 100644 --- a/nuttx/graphics/nxglib/nxglib_splitline.c +++ b/nuttx/graphics/nxglib/nxglib_splitline.c @@ -197,7 +197,8 @@ int nxgl_splitline(FAR struct nxgl_vector_s *vector, abs(line.pt2.x - line.pt1.x) < (line.pt2.y - line.pt1.y)) { /* A close to vertical line of width 1 is basically - * a single parallelogram of width 1 */ + * a single parallelogram of width 1. + */ traps[1].top.x1 = itob16(line.pt1.x); traps[1].top.x2 = traps[1].top.x1; diff --git a/nuttx/include/nuttx/input/keypad.h b/nuttx/include/nuttx/input/keypad.h new file mode 100644 index 000000000..574b421c1 --- /dev/null +++ b/nuttx/include/nuttx/input/keypad.h @@ -0,0 +1,54 @@ +/************************************************************************************ + * include/nuttx/input/keypad.h + * + * Copyright (C) 2012 Denis Carikli. + * Author: Denis Carikli + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ************************************************************************************/ + +#ifndef __INCLUDE_NUTTX_INPUT_KEYPAD_H +#define __INCLUDE_NUTTX_INPUT_KEYPAD_H + +/**************************************************************************** + * Public Function Prototypes + ****************************************************************************/ + +#ifdef __cplusplus +extern "C" { +#endif + +int keypad_kbdinit(void); + +#ifdef __cplusplus +} +#endif + +#endif /* __INCLUDE_NUTTX_INPUT_KEYPAD_H */ + -- cgit v1.2.3 From 200ce6d7ff301e68d6b90ac40a22866190b4c80b Mon Sep 17 00:00:00 2001 From: patacongo Date: Sun, 9 Dec 2012 17:34:53 +0000 Subject: configs/xtrs/nsh and pashello now use kconfig-frontends and build Windows native git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5422 42af7a65-404d-4744-a932-0658087f49c3 --- apps/nshlib/nsh_consolemain.c | 8 +- apps/nshlib/nsh_dbgcmds.c | 3 +- nuttx/ChangeLog | 7 +- nuttx/configs/cloudctrl/nsh/defconfig | 3 +- nuttx/configs/ez80f910200kitg/ostest/defconfig | 3 +- nuttx/configs/ez80f910200zco/ostest/defconfig | 3 +- nuttx/configs/fire-stm32v2/nsh/defconfig | 3 +- nuttx/configs/shenzhou/nsh/defconfig | 3 +- nuttx/configs/shenzhou/nxwm/defconfig | 3 +- nuttx/configs/shenzhou/thttpd/defconfig | 3 +- nuttx/configs/sim/cxxtest/defconfig | 3 +- nuttx/configs/sim/ostest/defconfig | 3 +- nuttx/configs/stm3240g-eval/discover/defconfig | 3 +- nuttx/configs/stm3240g-eval/xmlrpc/defconfig | 3 +- nuttx/configs/stm32f100rc_generic/nsh/defconfig | 3 +- nuttx/configs/stm32f100rc_generic/ostest/defconfig | 3 +- nuttx/configs/stm32f4discovery/cxxtest/defconfig | 3 +- nuttx/configs/stm32f4discovery/elf/defconfig | 3 +- nuttx/configs/stm32f4discovery/nxlines/defconfig | 3 +- nuttx/configs/stm32f4discovery/ostest/defconfig | 3 +- nuttx/configs/stm32f4discovery/winbuild/defconfig | 3 +- nuttx/configs/xtrs/README.txt | 56 +- nuttx/configs/xtrs/nsh/appconfig | 44 -- nuttx/configs/xtrs/nsh/defconfig | 611 +++++++++++++++------ nuttx/configs/xtrs/nsh/setenv.bat | 54 ++ nuttx/configs/xtrs/nsh/setenv.sh | 45 -- nuttx/configs/xtrs/ostest/defconfig | 6 +- nuttx/configs/xtrs/pashello/appconfig | 43 -- nuttx/configs/xtrs/pashello/defconfig | 551 +++++++++++++------ nuttx/configs/xtrs/pashello/setenv.bat | 54 ++ nuttx/configs/xtrs/pashello/setenv.sh | 45 -- nuttx/configs/xtrs/src/xtr_serial.c | 3 +- nuttx/configs/z16f2800100zcog/ostest/defconfig | 3 +- nuttx/configs/z16f2800100zcog/pashello/defconfig | 3 +- nuttx/configs/z80sim/README.txt | 4 +- nuttx/configs/z80sim/nsh/defconfig | 11 +- nuttx/configs/z80sim/ostest/defconfig | 12 +- nuttx/configs/z80sim/pashello/defconfig | 17 +- nuttx/configs/z8encore000zco/ostest/defconfig | 3 +- nuttx/configs/z8f64200100kit/ostest/defconfig | 3 +- nuttx/drivers/loop.c | 2 +- nuttx/drivers/serial/Kconfig | 6 +- nuttx/drivers/serial/serial.c | 4 +- nuttx/libc/string/lib_strcasestr.c | 4 +- nuttx/libc/string/lib_strstr.c | 4 +- nuttx/sched/Kconfig | 6 - nuttx/sched/prctl.c | 6 + 47 files changed, 1079 insertions(+), 593 deletions(-) delete mode 100644 nuttx/configs/xtrs/nsh/appconfig create mode 100644 nuttx/configs/xtrs/nsh/setenv.bat delete mode 100755 nuttx/configs/xtrs/nsh/setenv.sh delete mode 100644 nuttx/configs/xtrs/pashello/appconfig create mode 100644 nuttx/configs/xtrs/pashello/setenv.bat delete mode 100755 nuttx/configs/xtrs/pashello/setenv.sh (limited to 'apps') diff --git a/apps/nshlib/nsh_consolemain.c b/apps/nshlib/nsh_consolemain.c index 6b51be470..f05447a64 100644 --- a/apps/nshlib/nsh_consolemain.c +++ b/apps/nshlib/nsh_consolemain.c @@ -160,11 +160,11 @@ int nsh_consolemain(int argc, char *argv[]) } } - /* Clean up */ + /* Clean up. We do not get here, but this is necessary to keep some + * compilers happy. But others will complain that this code is not + * reachable. + */ nsh_exit(&pstate->cn_vtbl, 0); - - /* We do not get here, but this is necessary to keep some compilers happy */ - return OK; } diff --git a/apps/nshlib/nsh_dbgcmds.c b/apps/nshlib/nsh_dbgcmds.c index 5463e0f5a..85a4ccb9c 100644 --- a/apps/nshlib/nsh_dbgcmds.c +++ b/apps/nshlib/nsh_dbgcmds.c @@ -103,7 +103,7 @@ int mem_parse(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv, pcvalue++; lvalue = (unsigned long)strtol(pcvalue, NULL, 16); - if (lvalue > 0xffffffff) + if (lvalue > 0xffffffffL) { return -EINVAL; } @@ -131,6 +131,7 @@ int mem_parse(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv, { mem->dm_count = 1; } + return OK; } diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog index e77c70e8f..ffa2e719f 100644 --- a/nuttx/ChangeLog +++ b/nuttx/ChangeLog @@ -3768,6 +3768,9 @@ * tools/link.bat, unlink.bat, and copydir.bat: Add Windows counterparts to the link.sh, unlink.sh, and copydir.sh Bash scripts. * configs/z80sim/pashello: Now builds correctly. - * configs/xtrs/ostest: Converted to (1) used the kconfig-frontends - configuration tool, and (2) to build natively under Windows. + * configs/xtrs/ostest, nsh, and pashello: Converted to (1) used the kconfig- + frontends configuration tool, and (2) to build natively under Windows. + * drivers/serial/Kconfig and sched/Kconfig: Two names for same configuration: + CONFIG_LOWLEVEL_CONSOLE is bogus and CONFIG_DEV_LOWCONSOLE is in the wrong + Kconfig file. Moved to drivers/serial/Kconfig replacing CONFIG_LOWLEVEL_CONSOLE. diff --git a/nuttx/configs/cloudctrl/nsh/defconfig b/nuttx/configs/cloudctrl/nsh/defconfig index 440cb3e0b..fbb5e8c13 100644 --- a/nuttx/configs/cloudctrl/nsh/defconfig +++ b/nuttx/configs/cloudctrl/nsh/defconfig @@ -264,7 +264,6 @@ CONFIG_START_YEAR=2012 CONFIG_START_MONTH=9 CONFIG_START_DAY=8 CONFIG_DEV_CONSOLE=y -# CONFIG_DEV_LOWCONSOLE is not set # CONFIG_MUTEX_TYPES is not set # CONFIG_PRIORITY_INHERITANCE is not set # CONFIG_FDCLONE_DISABLE is not set @@ -356,7 +355,7 @@ CONFIG_MMCSD_SPICLOCK=12500000 # CONFIG_SENSORS is not set # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y -# CONFIG_LOWLEVEL_CONSOLE is not set +# CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set CONFIG_ARCH_HAVE_USART2=y CONFIG_MCU_SERIAL=y diff --git a/nuttx/configs/ez80f910200kitg/ostest/defconfig b/nuttx/configs/ez80f910200kitg/ostest/defconfig index 0e399cfc7..d8be31a97 100644 --- a/nuttx/configs/ez80f910200kitg/ostest/defconfig +++ b/nuttx/configs/ez80f910200kitg/ostest/defconfig @@ -153,7 +153,6 @@ CONFIG_START_YEAR=2009 CONFIG_START_MONTH=2 CONFIG_START_DAY=25 CONFIG_DEV_CONSOLE=y -CONFIG_DEV_LOWCONSOLE=y # CONFIG_MUTEX_TYPES is not set # CONFIG_PRIORITY_INHERITANCE is not set # CONFIG_FDCLONE_DISABLE is not set @@ -232,7 +231,7 @@ CONFIG_MMCSD_SDIO=y # CONFIG_SENSORS is not set # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y -CONFIG_LOWLEVEL_CONSOLE=y +CONFIG_DEV_LOWCONSOLE=y # CONFIG_16550_UART is not set CONFIG_ARCH_HAVE_UART0=y CONFIG_MCU_SERIAL=y diff --git a/nuttx/configs/ez80f910200zco/ostest/defconfig b/nuttx/configs/ez80f910200zco/ostest/defconfig index 7597bcfd6..977dda1dc 100644 --- a/nuttx/configs/ez80f910200zco/ostest/defconfig +++ b/nuttx/configs/ez80f910200zco/ostest/defconfig @@ -156,7 +156,6 @@ CONFIG_START_YEAR=2012 CONFIG_START_MONTH=11 CONFIG_START_DAY=26 CONFIG_DEV_CONSOLE=y -CONFIG_DEV_LOWCONSOLE=y # CONFIG_MUTEX_TYPES is not set # CONFIG_PRIORITY_INHERITANCE is not set # CONFIG_FDCLONE_DISABLE is not set @@ -235,7 +234,7 @@ CONFIG_MMCSD_SDIO=y # CONFIG_SENSORS is not set # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y -# CONFIG_LOWLEVEL_CONSOLE is not set +CONFIG_DEV_LOWCONSOLE=y # CONFIG_16550_UART is not set CONFIG_ARCH_HAVE_UART0=y CONFIG_MCU_SERIAL=y diff --git a/nuttx/configs/fire-stm32v2/nsh/defconfig b/nuttx/configs/fire-stm32v2/nsh/defconfig index 8e371686b..2fb623a0d 100644 --- a/nuttx/configs/fire-stm32v2/nsh/defconfig +++ b/nuttx/configs/fire-stm32v2/nsh/defconfig @@ -257,7 +257,6 @@ CONFIG_START_YEAR=2011 CONFIG_START_MONTH=7 CONFIG_START_DAY=5 CONFIG_DEV_CONSOLE=y -# CONFIG_DEV_LOWCONSOLE is not set # CONFIG_MUTEX_TYPES is not set # CONFIG_PRIORITY_INHERITANCE is not set # CONFIG_FDCLONE_DISABLE is not set @@ -366,7 +365,7 @@ CONFIG_ENC28J60_FREQUENCY=20000000 # CONFIG_SENSORS is not set # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y -# CONFIG_LOWLEVEL_CONSOLE is not set +# CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set CONFIG_ARCH_HAVE_USART1=y CONFIG_ARCH_HAVE_USART2=y diff --git a/nuttx/configs/shenzhou/nsh/defconfig b/nuttx/configs/shenzhou/nsh/defconfig index 4c73b7a6c..36f8e40fc 100644 --- a/nuttx/configs/shenzhou/nsh/defconfig +++ b/nuttx/configs/shenzhou/nsh/defconfig @@ -264,7 +264,6 @@ CONFIG_START_YEAR=2012 CONFIG_START_MONTH=9 CONFIG_START_DAY=8 CONFIG_DEV_CONSOLE=y -# CONFIG_DEV_LOWCONSOLE is not set # CONFIG_MUTEX_TYPES is not set # CONFIG_PRIORITY_INHERITANCE is not set # CONFIG_FDCLONE_DISABLE is not set @@ -356,7 +355,7 @@ CONFIG_MMCSD_SPICLOCK=12500000 # CONFIG_SENSORS is not set # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y -# CONFIG_LOWLEVEL_CONSOLE is not set +# CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set CONFIG_ARCH_HAVE_USART2=y CONFIG_MCU_SERIAL=y diff --git a/nuttx/configs/shenzhou/nxwm/defconfig b/nuttx/configs/shenzhou/nxwm/defconfig index ccc411a4d..86d17c3ee 100644 --- a/nuttx/configs/shenzhou/nxwm/defconfig +++ b/nuttx/configs/shenzhou/nxwm/defconfig @@ -265,7 +265,6 @@ CONFIG_START_YEAR=2012 CONFIG_START_MONTH=9 CONFIG_START_DAY=26 CONFIG_DEV_CONSOLE=y -# CONFIG_DEV_LOWCONSOLE is not set # CONFIG_MUTEX_TYPES is not set # CONFIG_PRIORITY_INHERITANCE is not set # CONFIG_FDCLONE_DISABLE is not set @@ -370,7 +369,7 @@ CONFIG_LCD_LANDSCAPE=y # CONFIG_SENSORS is not set # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y -# CONFIG_LOWLEVEL_CONSOLE is not set +# CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set CONFIG_ARCH_HAVE_USART2=y CONFIG_MCU_SERIAL=y diff --git a/nuttx/configs/shenzhou/thttpd/defconfig b/nuttx/configs/shenzhou/thttpd/defconfig index e8f189282..ccbcf9ab2 100644 --- a/nuttx/configs/shenzhou/thttpd/defconfig +++ b/nuttx/configs/shenzhou/thttpd/defconfig @@ -251,7 +251,6 @@ CONFIG_START_YEAR=2012 CONFIG_START_MONTH=9 CONFIG_START_DAY=8 CONFIG_DEV_CONSOLE=y -# CONFIG_DEV_LOWCONSOLE is not set # CONFIG_MUTEX_TYPES is not set # CONFIG_PRIORITY_INHERITANCE is not set # CONFIG_FDCLONE_DISABLE is not set @@ -343,7 +342,7 @@ CONFIG_MMCSD_SPICLOCK=12500000 # CONFIG_SENSORS is not set # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y -# CONFIG_LOWLEVEL_CONSOLE is not set +# CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set CONFIG_ARCH_HAVE_USART2=y CONFIG_MCU_SERIAL=y diff --git a/nuttx/configs/sim/cxxtest/defconfig b/nuttx/configs/sim/cxxtest/defconfig index 9c1da5494..648a92851 100644 --- a/nuttx/configs/sim/cxxtest/defconfig +++ b/nuttx/configs/sim/cxxtest/defconfig @@ -127,7 +127,6 @@ CONFIG_START_YEAR=2007 CONFIG_START_MONTH=2 CONFIG_START_DAY=27 CONFIG_DEV_CONSOLE=y -# CONFIG_DEV_LOWCONSOLE is not set CONFIG_MUTEX_TYPES=y # CONFIG_PRIORITY_INHERITANCE is not set # CONFIG_FDCLONE_DISABLE is not set @@ -198,7 +197,7 @@ CONFIG_DEV_NULL=y # CONFIG_SENSORS is not set # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y -# CONFIG_LOWLEVEL_CONSOLE is not set +# CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set # CONFIG_STANDARD_SERIAL is not set # CONFIG_USBDEV is not set diff --git a/nuttx/configs/sim/ostest/defconfig b/nuttx/configs/sim/ostest/defconfig index 26d132cd0..aece17569 100644 --- a/nuttx/configs/sim/ostest/defconfig +++ b/nuttx/configs/sim/ostest/defconfig @@ -127,7 +127,6 @@ CONFIG_START_YEAR=2007 CONFIG_START_MONTH=2 CONFIG_START_DAY=27 CONFIG_DEV_CONSOLE=y -# CONFIG_DEV_LOWCONSOLE is not set CONFIG_MUTEX_TYPES=y # CONFIG_PRIORITY_INHERITANCE is not set # CONFIG_FDCLONE_DISABLE is not set @@ -197,7 +196,7 @@ CONFIG_DEV_NULL=y # CONFIG_SENSORS is not set # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y -# CONFIG_LOWLEVEL_CONSOLE is not set +# CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set # CONFIG_STANDARD_SERIAL is not set # CONFIG_USBDEV is not set diff --git a/nuttx/configs/stm3240g-eval/discover/defconfig b/nuttx/configs/stm3240g-eval/discover/defconfig index aefa05326..152486d1b 100644 --- a/nuttx/configs/stm3240g-eval/discover/defconfig +++ b/nuttx/configs/stm3240g-eval/discover/defconfig @@ -284,7 +284,6 @@ CONFIG_START_YEAR=2011 CONFIG_START_MONTH=12 CONFIG_START_DAY=6 CONFIG_DEV_CONSOLE=y -# CONFIG_DEV_LOWCONSOLE is not set # CONFIG_MUTEX_TYPES is not set # CONFIG_PRIORITY_INHERITANCE is not set # CONFIG_FDCLONE_DISABLE is not set @@ -363,7 +362,7 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_SENSORS is not set # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y -# CONFIG_LOWLEVEL_CONSOLE is not set +# CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set CONFIG_ARCH_HAVE_USART3=y CONFIG_MCU_SERIAL=y diff --git a/nuttx/configs/stm3240g-eval/xmlrpc/defconfig b/nuttx/configs/stm3240g-eval/xmlrpc/defconfig index dd72d6ab3..6b4c9af70 100644 --- a/nuttx/configs/stm3240g-eval/xmlrpc/defconfig +++ b/nuttx/configs/stm3240g-eval/xmlrpc/defconfig @@ -284,7 +284,6 @@ CONFIG_START_YEAR=2011 CONFIG_START_MONTH=12 CONFIG_START_DAY=6 CONFIG_DEV_CONSOLE=y -# CONFIG_DEV_LOWCONSOLE is not set # CONFIG_MUTEX_TYPES is not set # CONFIG_PRIORITY_INHERITANCE is not set # CONFIG_FDCLONE_DISABLE is not set @@ -355,7 +354,7 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_SENSORS is not set # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y -# CONFIG_LOWLEVEL_CONSOLE is not set +# CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set CONFIG_ARCH_HAVE_USART3=y CONFIG_MCU_SERIAL=y diff --git a/nuttx/configs/stm32f100rc_generic/nsh/defconfig b/nuttx/configs/stm32f100rc_generic/nsh/defconfig index 41bb86592..a0228a3de 100644 --- a/nuttx/configs/stm32f100rc_generic/nsh/defconfig +++ b/nuttx/configs/stm32f100rc_generic/nsh/defconfig @@ -240,7 +240,6 @@ CONFIG_START_YEAR=2012 CONFIG_START_MONTH=11 CONFIG_START_DAY=1 CONFIG_DEV_CONSOLE=y -# CONFIG_DEV_LOWCONSOLE is not set # CONFIG_MUTEX_TYPES is not set # CONFIG_PRIORITY_INHERITANCE is not set # CONFIG_FDCLONE_DISABLE is not set @@ -319,7 +318,7 @@ CONFIG_RTC=y # CONFIG_SENSORS is not set # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y -# CONFIG_LOWLEVEL_CONSOLE is not set +# CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set CONFIG_ARCH_HAVE_USART2=y CONFIG_MCU_SERIAL=y diff --git a/nuttx/configs/stm32f100rc_generic/ostest/defconfig b/nuttx/configs/stm32f100rc_generic/ostest/defconfig index c56503e1f..0041feb50 100644 --- a/nuttx/configs/stm32f100rc_generic/ostest/defconfig +++ b/nuttx/configs/stm32f100rc_generic/ostest/defconfig @@ -239,7 +239,6 @@ CONFIG_START_YEAR=2012 CONFIG_START_MONTH=11 CONFIG_START_DAY=1 CONFIG_DEV_CONSOLE=y -CONFIG_DEV_LOWCONSOLE=y # CONFIG_MUTEX_TYPES is not set # CONFIG_PRIORITY_INHERITANCE is not set # CONFIG_FDCLONE_DISABLE is not set @@ -310,7 +309,7 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_SENSORS is not set # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y -# CONFIG_LOWLEVEL_CONSOLE is not set +CONFIG_DEV_LOWCONSOLE=y # CONFIG_16550_UART is not set CONFIG_ARCH_HAVE_USART2=y CONFIG_MCU_SERIAL=y diff --git a/nuttx/configs/stm32f4discovery/cxxtest/defconfig b/nuttx/configs/stm32f4discovery/cxxtest/defconfig index 1b3df6d32..6487742cf 100644 --- a/nuttx/configs/stm32f4discovery/cxxtest/defconfig +++ b/nuttx/configs/stm32f4discovery/cxxtest/defconfig @@ -244,7 +244,6 @@ CONFIG_START_YEAR=2012 CONFIG_START_MONTH=11 CONFIG_START_DAY=2 CONFIG_DEV_CONSOLE=y -# CONFIG_DEV_LOWCONSOLE is not set # CONFIG_MUTEX_TYPES is not set # CONFIG_PRIORITY_INHERITANCE is not set # CONFIG_FDCLONE_DISABLE is not set @@ -316,7 +315,7 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_SENSORS is not set # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y -# CONFIG_LOWLEVEL_CONSOLE is not set +# CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set CONFIG_ARCH_HAVE_USART2=y CONFIG_MCU_SERIAL=y diff --git a/nuttx/configs/stm32f4discovery/elf/defconfig b/nuttx/configs/stm32f4discovery/elf/defconfig index 8d98fe696..b6c3ac593 100644 --- a/nuttx/configs/stm32f4discovery/elf/defconfig +++ b/nuttx/configs/stm32f4discovery/elf/defconfig @@ -242,7 +242,6 @@ CONFIG_START_YEAR=2012 CONFIG_START_MONTH=10 CONFIG_START_DAY=26 CONFIG_DEV_CONSOLE=y -CONFIG_DEV_LOWCONSOLE=y # CONFIG_MUTEX_TYPES is not set # CONFIG_PRIORITY_INHERITANCE is not set # CONFIG_FDCLONE_DISABLE is not set @@ -313,7 +312,7 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_SENSORS is not set # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y -# CONFIG_LOWLEVEL_CONSOLE is not set +CONFIG_DEV_LOWCONSOLE=y # CONFIG_16550_UART is not set CONFIG_ARCH_HAVE_USART2=y CONFIG_MCU_SERIAL=y diff --git a/nuttx/configs/stm32f4discovery/nxlines/defconfig b/nuttx/configs/stm32f4discovery/nxlines/defconfig index 4de3a0922..8609993ea 100644 --- a/nuttx/configs/stm32f4discovery/nxlines/defconfig +++ b/nuttx/configs/stm32f4discovery/nxlines/defconfig @@ -260,7 +260,6 @@ CONFIG_START_YEAR=2011 CONFIG_START_MONTH=12 CONFIG_START_DAY=6 CONFIG_DEV_CONSOLE=y -# CONFIG_DEV_LOWCONSOLE is not set # CONFIG_MUTEX_TYPES is not set # CONFIG_PRIORITY_INHERITANCE is not set # CONFIG_FDCLONE_DISABLE is not set @@ -349,7 +348,7 @@ CONFIG_LCD_LANDSCAPE=y # CONFIG_SENSORS is not set # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y -# CONFIG_LOWLEVEL_CONSOLE is not set +# CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set CONFIG_ARCH_HAVE_USART2=y CONFIG_MCU_SERIAL=y diff --git a/nuttx/configs/stm32f4discovery/ostest/defconfig b/nuttx/configs/stm32f4discovery/ostest/defconfig index d260a87cb..b29622c8e 100644 --- a/nuttx/configs/stm32f4discovery/ostest/defconfig +++ b/nuttx/configs/stm32f4discovery/ostest/defconfig @@ -259,7 +259,6 @@ CONFIG_START_YEAR=2009 CONFIG_START_MONTH=9 CONFIG_START_DAY=21 CONFIG_DEV_CONSOLE=y -CONFIG_DEV_LOWCONSOLE=y # CONFIG_MUTEX_TYPES is not set # CONFIG_PRIORITY_INHERITANCE is not set # CONFIG_FDCLONE_DISABLE is not set @@ -330,7 +329,7 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_SENSORS is not set # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y -# CONFIG_LOWLEVEL_CONSOLE is not set +CONFIG_DEV_LOWCONSOLE=y # CONFIG_16550_UART is not set CONFIG_ARCH_HAVE_USART2=y CONFIG_MCU_SERIAL=y diff --git a/nuttx/configs/stm32f4discovery/winbuild/defconfig b/nuttx/configs/stm32f4discovery/winbuild/defconfig index 311dd075d..ac8a18c9b 100644 --- a/nuttx/configs/stm32f4discovery/winbuild/defconfig +++ b/nuttx/configs/stm32f4discovery/winbuild/defconfig @@ -259,7 +259,6 @@ CONFIG_START_YEAR=2009 CONFIG_START_MONTH=9 CONFIG_START_DAY=21 CONFIG_DEV_CONSOLE=y -CONFIG_DEV_LOWCONSOLE=y # CONFIG_MUTEX_TYPES is not set # CONFIG_PRIORITY_INHERITANCE is not set # CONFIG_FDCLONE_DISABLE is not set @@ -330,7 +329,7 @@ CONFIG_ARCH_HAVE_I2CRESET=y # CONFIG_SENSORS is not set # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y -# CONFIG_LOWLEVEL_CONSOLE is not set +CONFIG_DEV_LOWCONSOLE=y # CONFIG_16550_UART is not set CONFIG_ARCH_HAVE_USART2=y CONFIG_MCU_SERIAL=y diff --git a/nuttx/configs/xtrs/README.txt b/nuttx/configs/xtrs/README.txt index 9f94ed9ad..1a63d3a90 100644 --- a/nuttx/configs/xtrs/README.txt +++ b/nuttx/configs/xtrs/README.txt @@ -54,9 +54,10 @@ Configuring NuttX 1) From a POSIX window: cd tools - ./configure.sh z80sim/pashello + ./configure.sh xtrs/ostest 2) From a CMD.exe window setenv.bat + make The setenv.bat will need to be updated to include the PATH to the XTRS hex2cmd program. @@ -72,9 +73,7 @@ Configuring NuttX which will give you the steps you would need to do to convert this configuration to build in other, Unix-like environments. - 3. This configuration was last verified sucessfully prior to the - the configure to Kconfig/mconf tool using SDCC 2.6.0 built to run - natively under Cygwin. The current build requires ca. 3.2.1 SDCC. + 3. The current build requires ca. 3.2.1 SDCC. nsh @@ -84,10 +83,33 @@ Configuring NuttX This configuration can be selected by: + 1) From a POSIX window: cd tools ./configure.sh xtrs/nsh - cd - - . ./setenv.sh + 2) From a CMD.exe window + setenv.bat + make + + The setenv.bat will need to be updated to include the PATH to the XTRS + hex2cmd program. + + NOTES: + + 1. This configuration uses the mconf-based configuration tool. See the + "Reconfiguring" section below for information about changing this + configuration. + + 2. The default setup for this configuration uses a windows native build. + See the section entitled "Reconfiguring for Linux, OSX, or Cygwin" + which will give you the steps you would need to do to convert this + configuration to build in other, Unix-like environments. + + 3. The current build requires ca. 3.2.1 SDCC. + + 4. This configuration depends on configs/xtrs/src/xtrs_serial.c which + is incomplete. At compile time, the following symbols are undefined: + + ctrl, baud, rs232_xmtisr, rs232_recvisr, ch pashello @@ -99,10 +121,28 @@ Configuring NuttX This configuration can be selected by: + 1) From a POSIX window: cd tools ./configure.sh xtrs/pashello - cd - - . ./setenv.sh + 2) From a CMD.exe window + setenv.bat + make + + The setenv.bat will need to be updated to include the PATH to the XTRS + hex2cmd program. + + NOTES: + + 1. This configuration uses the mconf-based configuration tool. See the + "Reconfiguring" section below for information about changing this + configuration. + + 2. The default setup for this configuration uses a windows native build. + See the section entitled "Reconfiguring for Linux, OSX, or Cygwin" + which will give you the steps you would need to do to convert this + configuration to build in other, Unix-like environments. + + 3. The current build requires ca. 3.2.1 SDCC. Reconfiguring NuttX ^^^^^^^^^^^^^^^^^^^ diff --git a/nuttx/configs/xtrs/nsh/appconfig b/nuttx/configs/xtrs/nsh/appconfig deleted file mode 100644 index ef9401691..000000000 --- a/nuttx/configs/xtrs/nsh/appconfig +++ /dev/null @@ -1,44 +0,0 @@ -############################################################################ -# configs/xtrs/nsh/appconfig -# -# Copyright (C) 2011-2012 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# 3. Neither the name NuttX nor the names of its contributors may be -# used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# -############################################################################ - -# Path to example in apps/examples containing the user_start entry point - -CONFIGURED_APPS += examples/nsh - -# The NSH Library - -CONFIGURED_APPS += system/readline -CONFIGURED_APPS += nshlib - diff --git a/nuttx/configs/xtrs/nsh/defconfig b/nuttx/configs/xtrs/nsh/defconfig index dc4e59556..cc3d4da2f 100644 --- a/nuttx/configs/xtrs/nsh/defconfig +++ b/nuttx/configs/xtrs/nsh/defconfig @@ -1,137 +1,153 @@ -############################################################################ -# configs/xtrs/nsh/defconfig -# -# Copyright (C) 2007-2010, 2012 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# 3. Neither the name NuttX nor the names of its contributors may be -# used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# -############################################################################ -# -# Architecture selection # -CONFIG_ARCH="z80" -CONFIG_ARCH_Z80=y -CONFIG_ARCH_CHIP="z80" -CONFIG_ARCH_CHIP_Z80=y -CONFIG_ARCH_BOARD="xtrs" -CONFIG_ARCH_BOARD_XTRS=y -CONFIG_DRAM_SIZE=65536 +# Automatically generated file; DO NOT EDIT. +# Nuttx/ Configuration +# +CONFIG_NUTTX_NEWCONFIG=y + +# +# Build Setup +# +# CONFIG_EXPERIMENTAL is not set +# CONFIG_HOST_LINUX is not set +# CONFIG_HOST_OSX is not set +CONFIG_HOST_WINDOWS=y +# CONFIG_HOST_OTHER is not set +CONFIG_WINDOWS_NATIVE=y +# CONFIG_WINDOWS_CYGWIN is not set +# CONFIG_WINDOWS_MSYS is not set +# CONFIG_WINDOWS_OTHER is not set +# CONFIG_WINDOWS_MKLINK is not set # -# Z80sim specific device driver settings +# Build Configuration # -CONFIG_UART_RXBUFSIZE=256 -CONFIG_UART_TXBUFSIZE=256 +# CONFIG_APPS_DIR="..\apps" +# CONFIG_BUILD_2PASS is not set # -# General build options +# Binary Output Formats # -CONFIG_RRLOAD_BINARY=n -CONFIG_INTELHEX_BINARY=n -CONFIG_RAW_BINARY=n +# CONFIG_RRLOAD_BINARY is not set +# CONFIG_INTELHEX_BINARY is not set +# CONFIG_MOTOROLA_SREC is not set +# CONFIG_RAW_BINARY is not set -CONFIG_LINKER_START_AREA=0x5200 +# +# Customize Header Files +# +# CONFIG_ARCH_STDBOOL_H is not set +# CONFIG_ARCH_MATH_H is not set +# CONFIG_ARCH_FLOAT_H is not set +# CONFIG_ARCH_STDARG_H is not set + +# +# Debug Options +# +# CONFIG_DEBUG is not set +# CONFIG_DEBUG_SYMBOLS is not set + +# +# System Type +# +# CONFIG_ARCH_8051 is not set +# CONFIG_ARCH_ARM is not set +# CONFIG_ARCH_AVR is not set +# CONFIG_ARCH_HC is not set +# CONFIG_ARCH_MIPS is not set +# CONFIG_ARCH_RGMP is not set +# CONFIG_ARCH_SH is not set +# CONFIG_ARCH_SIM is not set +# CONFIG_ARCH_X86 is not set +# CONFIG_ARCH_Z16 is not set +CONFIG_ARCH_Z80=y +CONFIG_ARCH="z80" +CONFIG_ARCH_CHIP="z80" +CONFIG_BOARD_LOOPSPERMSEC=100 +CONFIG_ARCH_CHIP_Z80=y +# CONFIG_ARCH_CHIP_Z8F6403 is not set +# CONFIG_ARCH_CHIP_Z8F6423 is not set +# CONFIG_ARCH_CHIP_EZ80F91 is not set +# CONFIG_ARCH_CHIP_EZ80F92 is not set +# CONFIG_ARCH_CHIP_EZ80F93 is not set +CONFIG_Z80_TOOLCHAIN_SDCCW=y +CONFIG_LINKER_HOME_AREA=0x5200 CONFIG_LINKER_CODE_AREA=0x5300 +CONFIG_LINKER_DATA_AREA=0x8000 CONFIG_LINKER_ROM_AT_0000=y +# CONFIG_ARCH_HAVEHEAD is not set # -# General OS setup +# Architecture Options # -CONFIG_USER_ENTRYPOINT="nsh_main" -CONFIG_DEBUG=n -CONFIG_DEBUG_VERBOSE=n -CONFIG_DEBUG_SYMBOLS=n -CONFIG_MM_REGIONS=1 -CONFIG_ARCH_LOWPUTC=y -CONFIG_RR_INTERVAL=0 -CONFIG_SCHED_INSTRUMENTATION=n -CONFIG_TASK_NAME_SIZE=0 -CONFIG_START_YEAR=2007 -CONFIG_START_MONTH=2 -CONFIG_START_DAY=21 -CONFIG_JULIAN_TIME=n -CONFIG_HAVE_LOWUARTINIT=n -CONFIG_DEV_CONSOLE=n -CONFIG_DEV_LOWCONSOLE=n -CONFIG_MUTEX_TYPES=n -CONFIG_PRIORITY_INHERITANCE=n -CONFIG_SEM_PREALLOCHOLDERS=0 -CONFIG_SEM_NNESTPRIO=0 -CONFIG_FDCLONE_DISABLE=n -CONFIG_FDCLONE_STDIO=n -CONFIG_SDCLONE_DISABLE=y +# CONFIG_ARCH_NOINTC is not set +# CONFIG_ARCH_DMA is not set +# CONFIG_ARCH_IRQPRIO is not set +# CONFIG_ARCH_STACKDUMP is not set +# CONFIG_ENDIAN_BIG is not set # -# The following can be used to disable categories of -# APIs supported by the OS. If the compiler supports -# weak functions, then it should not be necessary to -# disable functions unless you want to restrict usage -# of those APIs. +# Board Settings # -# There are certain dependency relationships in these -# features. +CONFIG_DRAM_START=0x0000 +CONFIG_DRAM_SIZE=65536 + # -# o mq_notify logic depends on signals to awaken tasks -# waiting for queues to become full or empty. -# o pthread_condtimedwait() depends on signals to wake -# up waiting tasks. +# Boot options # -CONFIG_DISABLE_CLOCK=n -CONFIG_DISABLE_POSIX_TIMERS=y -CONFIG_DISABLE_PTHREAD=y -CONFIG_DISABLE_SIGNALS=n -CONFIG_DISABLE_MQUEUE=y -CONFIG_DISABLE_MOUNTPOINT=y -CONFIG_DISABLE_ENVIRON=y -CONFIG_DISABLE_POLL=y +# CONFIG_BOOT_RUNFROMEXTSRAM is not set +CONFIG_BOOT_RUNFROMFLASH=y +# CONFIG_BOOT_RUNFROMISRAM is not set +# CONFIG_BOOT_RUNFROMSDRAM is not set +# CONFIG_BOOT_COPYTORAM is not set # -# Misc libc settings +# Board Selection # -CONFIG_NOPRINTF_FIELDWIDTH=y +CONFIG_ARCH_BOARD_XTRS=y +# CONFIG_ARCH_BOARD_Z80SIM is not set +# CONFIG_ARCH_BOARD_CUSTOM is not set +CONFIG_ARCH_BOARD="xtrs" # -# Allow for architecture optimized implementations +# Common Board Options # -# The architecture can provide optimized versions of the -# following to improve sysem performance +CONFIG_NSH_MMCSDMINOR=0 + +# +# Board-Specific Options # -CONFIG_ARCH_MEMCPY=n -CONFIG_ARCH_MEMCMP=n -CONFIG_ARCH_MEMMOVE=n -CONFIG_ARCH_MEMSET=n -CONFIG_ARCH_STRCMP=n -CONFIG_ARCH_STRCPY=n -CONFIG_ARCH_STRNCPY=n -CONFIG_ARCH_STRLEN=n -CONFIG_ARCH_STRNLEN=n -CONFIG_ARCH_BZERO=n + +# +# RTOS Features +# +CONFIG_MSEC_PER_TICK=10 +CONFIG_RR_INTERVAL=0 +# CONFIG_SCHED_INSTRUMENTATION is not set +CONFIG_TASK_NAME_SIZE=0 +# CONFIG_JULIAN_TIME is not set +CONFIG_START_YEAR=2012 +CONFIG_START_MONTH=12 +CONFIG_START_DAY=9 +CONFIG_DEV_CONSOLE=y +# CONFIG_MUTEX_TYPES is not set +# CONFIG_PRIORITY_INHERITANCE is not set +# CONFIG_FDCLONE_DISABLE is not set +# CONFIG_FDCLONE_STDIO is not set +CONFIG_SDCLONE_DISABLE=y +# CONFIG_SCHED_WORKQUEUE is not set +# CONFIG_SCHED_WAITPID is not set +# CONFIG_SCHED_ATEXIT is not set +# CONFIG_SCHED_ONEXIT is not set +CONFIG_USER_ENTRYPOINT="nsh_main" +CONFIG_DISABLE_OS_API=y +# CONFIG_DISABLE_CLOCK is not set +CONFIG_DISABLE_POSIX_TIMERS=y +CONFIG_DISABLE_PTHREAD=y +# CONFIG_DISABLE_SIGNALS is not set +CONFIG_DISABLE_MQUEUE=y +CONFIG_DISABLE_MOUNTPOINT=y +CONFIG_DISABLE_ENVIRON=y +CONFIG_DISABLE_POLL=y # # Sizes of configurable things (0 disables) @@ -142,8 +158,6 @@ CONFIG_NPTHREAD_KEYS=0 CONFIG_NFILE_DESCRIPTORS=6 CONFIG_NFILE_STREAMS=6 CONFIG_NAME_MAX=32 -CONFIG_STDIO_BUFFER_SIZE=0 -CONFIG_NUNGET_CHARS=0 CONFIG_PREALLOC_MQ_MSGS=0 CONFIG_MQ_MAXMSGSIZE=0 CONFIG_MAX_WDOGPARMS=2 @@ -151,77 +165,340 @@ CONFIG_PREALLOC_WDOGS=4 CONFIG_PREALLOC_TIMERS=0 # -# TCP/IP and UDP support via uIP +# Stack and heap information +# +# CONFIG_CUSTOM_STACK is not set +CONFIG_IDLETHREAD_STACKSIZE=1024 +CONFIG_USERMAIN_STACKSIZE=1024 +CONFIG_PTHREAD_STACK_MIN=256 +CONFIG_PTHREAD_STACK_DEFAULT=1024 + +# +# Device Drivers +# +CONFIG_DEV_NULL=y +# CONFIG_DEV_ZERO is not set +# CONFIG_LOOP is not set +# CONFIG_RAMDISK is not set +# CONFIG_CAN is not set +# CONFIG_PWM is not set +# CONFIG_I2C is not set +# CONFIG_SPI is not set +# CONFIG_RTC is not set +# CONFIG_WATCHDOG is not set +# CONFIG_ANALOG is not set +# CONFIG_BCH is not set +# CONFIG_INPUT is not set +# CONFIG_LCD is not set +# CONFIG_MMCSD is not set +# CONFIG_MTD is not set +# CONFIG_PIPES is not set +# CONFIG_PM is not set +# CONFIG_POWER is not set +# CONFIG_SENSORS is not set +# CONFIG_SERCOMM_CONSOLE is not set +CONFIG_SERIAL=y +# CONFIG_DEV_LOWCONSOLE is not set +# CONFIG_16550_UART is not set +CONFIG_ARCH_HAVE_UART=y +CONFIG_MCU_SERIAL=y +CONFIG_STANDARD_SERIAL=y +# CONFIG_UART_SERIAL_CONSOLE is not set +CONFIG_NO_SERIAL_CONSOLE=y + +# +# UART Configuration +# +CONFIG_UART_RXBUFSIZE=64 +CONFIG_UART_TXBUFSIZE=64 +CONFIG_UART_BAUD=115200 +CONFIG_UART_BITS=8 +CONFIG_UART_PARITY=0 +CONFIG_UART_2STOP=0 +# CONFIG_USBDEV is not set +# CONFIG_USBHOST is not set +# CONFIG_WIRELESS is not set + +# +# System Logging Device Options +# + +# +# System Logging +# +# CONFIG_RAMLOG is not set + +# +# Networking Support +# +# CONFIG_NET is not set + +# +# File Systems +# + +# +# File system configuration +# +# CONFIG_FS_RAMMAP is not set + +# +# System Logging +# +# CONFIG_SYSLOG is not set + +# +# Graphics Support +# +# CONFIG_NX is not set + +# +# Memory Management +# +# CONFIG_MM_SMALL is not set +CONFIG_MM_REGIONS=1 +CONFIG_ARCH_HAVE_HEAP2=y +CONFIG_HEAP2_BASE=0x00000000 +CONFIG_HEAP2_SIZE=0 +# CONFIG_GRAN is not set + +# +# Binary Formats # -CONFIG_NET=n -CONFIG_NET_IPv6=n -CONFIG_NSOCKET_DESCRIPTORS=0 -CONFIG_NET_SOCKOPTS=y -CONFIG_NET_BUFSIZE=420 -CONFIG_NET_TCP=n -CONFIG_NET_TCP_CONNS=40 -CONFIG_NET_MAX_LISTENPORTS=40 -CONFIG_NET_UDP=n -CONFIG_NET_UDP_CHECKSUMS=y -#CONFIG_NET_UDP_CONNS=10 -CONFIG_NET_ICMP=n -CONFIG_NET_ICMP_PING=n -#CONFIG_NET_PINGADDRCONF=0 -CONFIG_NET_STATISTICS=y -#CONFIG_NET_RECEIVE_WINDOW= -#CONFIG_NET_ARPTAB_SIZE=8 -CONFIG_NET_BROADCAST=n +# CONFIG_BINFMT_DISABLE is not set +# CONFIG_NXFLAT is not set +# CONFIG_ELF is not set +# CONFIG_SYMTAB_ORDEREDBYNAME is not set # -# UIP Network Utilities +# Library Routines # -CONFIG_NET_DHCP_LIGHT=n -CONFIG_NET_RESOLV_ENTRIES=4 +CONFIG_STDIO_BUFFER_SIZE=0 +CONFIG_STDIO_LINEBUFFER=y +CONFIG_NUNGET_CHARS=0 +# CONFIG_LIBM is not set +CONFIG_NOPRINTF_FIELDWIDTH=y +# CONFIG_LIBC_FLOATINGPOINT is not set +# CONFIG_EOL_IS_CR is not set +# CONFIG_EOL_IS_LF is not set +# CONFIG_EOL_IS_BOTH_CRLF is not set +CONFIG_EOL_IS_EITHER_CRLF=y +# CONFIG_LIBC_STRERROR is not set +# CONFIG_LIBC_PERROR_STDOUT is not set +CONFIG_ARCH_LOWPUTC=y +CONFIG_LIB_SENDFILE_BUFSIZE=512 +# CONFIG_ARCH_ROMGETC is not set +# CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set # -# Settings for examples/nsh +# Basic CXX Support # +# CONFIG_C99_BOOL8 is not set +# CONFIG_HAVE_CXX is not set + +# +# Application Configuration +# + +# +# Named Applications +# +# CONFIG_NAMEDAPP is not set + +# +# Examples +# +# CONFIG_EXAMPLES_BUTTONS is not set +# CONFIG_EXAMPLES_CAN is not set +# CONFIG_EXAMPLES_CDCACM is not set +# CONFIG_EXAMPLES_COMPOSITE is not set +# CONFIG_EXAMPLES_DHCPD is not set +# CONFIG_EXAMPLES_ELF is not set +# CONFIG_EXAMPLES_FTPC is not set +# CONFIG_EXAMPLES_FTPD is not set +# CONFIG_EXAMPLES_HELLO is not set +# CONFIG_EXAMPLES_HELLOXX is not set +# CONFIG_EXAMPLES_JSON is not set +# CONFIG_EXAMPLES_HIDKBD is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set +# CONFIG_EXAMPLES_IGMP is not set +# CONFIG_EXAMPLES_LCDRW is not set +# CONFIG_EXAMPLES_MM is not set +# CONFIG_EXAMPLES_MOUNT is not set +# CONFIG_EXAMPLES_MODBUS is not set +# CONFIG_EXAMPLES_NETTEST is not set +CONFIG_EXAMPLES_NSH=y +# CONFIG_EXAMPLES_NULL is not set +# CONFIG_EXAMPLES_NX is not set +# CONFIG_EXAMPLES_NXCONSOLE is not set +# CONFIG_EXAMPLES_NXFFS is not set +# CONFIG_EXAMPLES_NXFLAT is not set +# CONFIG_EXAMPLES_NXHELLO is not set +# CONFIG_EXAMPLES_NXIMAGE is not set +# CONFIG_EXAMPLES_NXLINES is not set +# CONFIG_EXAMPLES_NXTEXT is not set +# CONFIG_EXAMPLES_OSTEST is not set +# CONFIG_EXAMPLES_PASHELLO is not set +# CONFIG_EXAMPLES_PIPE is not set +# CONFIG_EXAMPLES_POLL is not set +# CONFIG_EXAMPLES_QENCODER is not set +# CONFIG_EXAMPLES_RGMP is not set +# CONFIG_EXAMPLES_ROMFS is not set +# CONFIG_EXAMPLES_SENDMAIL is not set +# CONFIG_EXAMPLES_SERLOOP is not set +# CONFIG_EXAMPLES_TELNETD is not set +# CONFIG_EXAMPLES_THTTPD is not set +# CONFIG_EXAMPLES_TIFF is not set +# CONFIG_EXAMPLES_TOUCHSCREEN is not set +# CONFIG_EXAMPLES_UDP is not set +# CONFIG_EXAMPLES_UIP is not set +# CONFIG_EXAMPLES_USBSERIAL is not set +# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_EXAMPLES_USBTERM is not set +# CONFIG_EXAMPLES_WATCHDOG is not set +# CONFIG_EXAMPLES_WLAN is not set + +# +# Interpreters +# + +# +# Interpreters +# +# CONFIG_INTERPRETERS_FICL is not set +# CONFIG_INTERPRETERS_PCODE is not set + +# +# Network Utilities +# + +# +# Networking Utilities +# +# CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_DHCPC is not set +# CONFIG_NETUTILS_DHCPD is not set +# CONFIG_NETUTILS_FTPC is not set +# CONFIG_NETUTILS_FTPD is not set +# CONFIG_NETUTILS_JSON is not set +# CONFIG_NETUTILS_RESOLV is not set +# CONFIG_NETUTILS_SMTP is not set +# CONFIG_NETUTILS_TELNETD is not set +# CONFIG_NETUTILS_TFTPC is not set +# CONFIG_NETUTILS_THTTPD is not set +# CONFIG_NETUTILS_UIPLIB is not set +# CONFIG_NETUTILS_WEBCLIENT is not set + +# +# ModBus +# + +# +# FreeModbus +# +# CONFIG_MODBUS is not set + +# +# NSH Library +# +CONFIG_NSH_LIBRARY=y + +# +# Disable Individual commands +# +# CONFIG_NSH_DISABLE_CAT is not set +# CONFIG_NSH_DISABLE_CD is not set +# CONFIG_NSH_DISABLE_CP is not set +# CONFIG_NSH_DISABLE_DD is not set +# CONFIG_NSH_DISABLE_ECHO is not set +# CONFIG_NSH_DISABLE_EXEC is not set +# CONFIG_NSH_DISABLE_EXIT is not set +# CONFIG_NSH_DISABLE_FREE is not set +# CONFIG_NSH_DISABLE_GET is not set +# CONFIG_NSH_DISABLE_HELP is not set +# CONFIG_NSH_DISABLE_HEXDUMP is not set +# CONFIG_NSH_DISABLE_IFCONFIG is not set +# CONFIG_NSH_DISABLE_KILL is not set +# CONFIG_NSH_DISABLE_LOSETUP is not set +# CONFIG_NSH_DISABLE_LS is not set +# CONFIG_NSH_DISABLE_MB is not set +# CONFIG_NSH_DISABLE_MKDIR is not set +# CONFIG_NSH_DISABLE_MKFATFS is not set +# CONFIG_NSH_DISABLE_MKFIFO is not set +# CONFIG_NSH_DISABLE_MKRD is not set +# CONFIG_NSH_DISABLE_MH is not set +# CONFIG_NSH_DISABLE_MOUNT is not set +# CONFIG_NSH_DISABLE_MW is not set +# CONFIG_NSH_DISABLE_NSFMOUNT is not set +# CONFIG_NSH_DISABLE_PS is not set +# CONFIG_NSH_DISABLE_PING is not set +# CONFIG_NSH_DISABLE_PUT is not set +# CONFIG_NSH_DISABLE_PWD is not set +# CONFIG_NSH_DISABLE_RM is not set +# CONFIG_NSH_DISABLE_RMDIR is not set +# CONFIG_NSH_DISABLE_SET is not set +# CONFIG_NSH_DISABLE_SH is not set +# CONFIG_NSH_DISABLE_SLEEP is not set +# CONFIG_NSH_DISABLE_TEST is not set +# CONFIG_NSH_DISABLE_UMOUNT is not set +# CONFIG_NSH_DISABLE_UNSET is not set +# CONFIG_NSH_DISABLE_USLEEP is not set +# CONFIG_NSH_DISABLE_WGET is not set +# CONFIG_NSH_DISABLE_XD is not set +CONFIG_NSH_CODECS_BUFSIZE=128 CONFIG_NSH_FILEIOSIZE=1024 -CONFIG_NSH_STRERROR=n CONFIG_NSH_LINELEN=40 CONFIG_NSH_NESTDEPTH=3 -CONFIG_NSH_DISABLESCRIPT=n -CONFIG_NSH_DISABLEBG=n -CONFIG_NSH_ROMFSETC=n +# CONFIG_NSH_DISABLESCRIPT is not set +# CONFIG_NSH_DISABLEBG is not set CONFIG_NSH_CONSOLE=y -CONFIG_NSH_TELNET=n -CONFIG_NSH_IOBUFFER_SIZE=512 -CONFIG_NSH_DHCPC=n -CONFIG_NSH_NOMAC=n -CONFIG_NSH_IPADDR=0x0a000002 -CONFIG_NSH_DRIPADDR=0x0a000001 -CONFIG_NSH_NETMASK=0xffffff00 -CONFIG_NSH_ROMFSMOUNTPT="/etc" -CONFIG_NSH_INITSCRIPT="init.d/rcS" -CONFIG_NSH_ROMFSDEVNO=0 -CONFIG_NSH_ROMFSSECTSIZE=64 -CONFIG_NSH_FATDEVNO=1 -CONFIG_NSH_FATSECTSIZE=512 -CONFIG_NSH_FATNSECTORS=1024 -CONFIG_NSH_FATMOUNTPT="/tmp" +# CONFIG_NSH_CONDEV is not set +# CONFIG_NSH_ARCHINIT is not set # -# Stack and heap information +# NxWidgets/NxWM +# + +# +# System NSH Add-Ons +# + +# +# Custom Free Memory Command +# +# CONFIG_SYSTEM_FREE is not set + +# +# I2C tool # -CONFIG_BOOT_RUNFROMFLASH=n -CONFIG_BOOT_COPYTORAM=n -CONFIG_CUSTOM_STACK=n -CONFIG_IDLETHREAD_STACKSIZE=1024 -CONFIG_USERMAIN_STACKSIZE=1024 -CONFIG_PTHREAD_STACK_MIN=256 -CONFIG_PTHREAD_STACK_DEFAULT=1024 -CONFIG_HEAP_SIZE= -CONFIG_HEAP_BASE= # -# Maintain legacy build behavior (revisit) +# FLASH Program Installation # +# CONFIG_SYSTEM_INSTALL is not set -CONFIG_MMCSD=y -CONFIG_MMCSD_SPI=y -CONFIG_MMCSD_SDIO=y +# +# readline() +# +CONFIG_SYSTEM_READLINE=y +CONFIG_READLINE_ECHO=y + +# +# Power Off +# +# CONFIG_SYSTEM_POWEROFF is not set + +# +# RAMTRON +# +# CONFIG_SYSTEM_RAMTRON is not set + +# +# SD Card +# +# CONFIG_SYSTEM_SDCARD is not set + +# +# Sysinfo +# +# CONFIG_SYSTEM_SYSINFO is not set diff --git a/nuttx/configs/xtrs/nsh/setenv.bat b/nuttx/configs/xtrs/nsh/setenv.bat new file mode 100644 index 000000000..0df2ba4b6 --- /dev/null +++ b/nuttx/configs/xtrs/nsh/setenv.bat @@ -0,0 +1,54 @@ +@echo off + +rem configs/xtrs/nsh/setenv.bat +rem +rem Copyright (C) 2012 Gregory Nutt. All rights reserved. +rem Author: Gregory Nutt +rem +rem Redistribution and use in source and binary forms, with or without +rem modification, are permitted provided that the following conditions +rem are met: +rem +rem 1. Redistributions of source code must retain the above copyright +rem notice, this list of conditions and the following disclaimer. +rem 2. Redistributions in binary form must reproduce the above copyright +rem notice, this list of conditions and the following disclaimer in +rem the documentation and/or other materials provided with the +rem distribution. +rem 3. Neither the name NuttX nor the names of its contributors may be +rem used to endorse or promote products derived from this software +rem without specific prior written permission. +rem +rem THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +rem "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +rem LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +rem FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +rem COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +rem INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +rem BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +rem OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +rem AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +rem LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +rem ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +rem POSSIBILITY OF SUCH DAMAGE. + +rem This is the location where I installed in the MinGW compiler. With +rem this configuration, it is recommended that you do NOT install the +rem MSYS tools; they conflict with the GNUWin32 tools. See +rem http://www.mingw.org/ for further info. + +set PATH=C:\MinGW\bin;%PATH% + +rem This is the location where I installed the SDCC toolchain for windows. + +set PATH=C:\Program Files (x86)\SDCC/bin;%PATH% + +rem This is the location where I installed the GNUWin32 tools. See +rem http://gnuwin32.sourceforge.net/. + +set PATH=C:\gnuwin32\bin;%PATH% + +rem This is the location where the XTRS hex2cmd program is available +rem set PATH=????:%PATH% + +echo %PATH% diff --git a/nuttx/configs/xtrs/nsh/setenv.sh b/nuttx/configs/xtrs/nsh/setenv.sh deleted file mode 100755 index 99d45f97a..000000000 --- a/nuttx/configs/xtrs/nsh/setenv.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/bash -# configs/xtrs/nsh/setenv.sh -# -# Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# 3. Neither the name NuttX nor the names of its contributors may be -# used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# - -if [ "$(basename $0)" = "setenv.sh" ] ; then - echo "You must source this script, not run it!" 1>&2 - exit 1 -fi - -if [ -z ${PATH_ORIG} ]; then export PATH_ORIG=${PATH}; fi - -export SDCC_BIN=/usr/local/bin -export PATH=${SDCC_BIN}:/sbin:/usr/sbin:${PATH_ORIG} - -echo "PATH : ${PATH}" diff --git a/nuttx/configs/xtrs/ostest/defconfig b/nuttx/configs/xtrs/ostest/defconfig index 32a7711fc..cf87886a2 100644 --- a/nuttx/configs/xtrs/ostest/defconfig +++ b/nuttx/configs/xtrs/ostest/defconfig @@ -69,7 +69,6 @@ CONFIG_ARCH_CHIP_Z80=y # CONFIG_ARCH_CHIP_EZ80F91 is not set # CONFIG_ARCH_CHIP_EZ80F92 is not set # CONFIG_ARCH_CHIP_EZ80F93 is not set -# CONFIG_Z80_TOOLCHAIN_SDCCL is not set CONFIG_Z80_TOOLCHAIN_SDCCW=y CONFIG_LINKER_HOME_AREA=0x5200 CONFIG_LINKER_CODE_AREA=0x5300 @@ -89,7 +88,7 @@ CONFIG_LINKER_ROM_AT_0000=y # # Board Settings # -CONFIG_DRAM_START= +CONFIG_DRAM_START=0x0000 CONFIG_DRAM_SIZE=65536 # @@ -129,7 +128,6 @@ CONFIG_START_YEAR=2008 CONFIG_START_MONTH=2 CONFIG_START_DAY=21 # CONFIG_DEV_CONSOLE is not set -# CONFIG_DEV_LOWCONSOLE is not set # CONFIG_MUTEX_TYPES is not set # CONFIG_PRIORITY_INHERITANCE is not set # CONFIG_FDCLONE_DISABLE is not set @@ -199,7 +197,7 @@ CONFIG_DEV_NULL=y # CONFIG_SENSORS is not set # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y -# CONFIG_LOWLEVEL_CONSOLE is not set +CONFIG_DEV_LOWCONSOLE=y # CONFIG_16550_UART is not set CONFIG_ARCH_HAVE_UART=y CONFIG_MCU_SERIAL=y diff --git a/nuttx/configs/xtrs/pashello/appconfig b/nuttx/configs/xtrs/pashello/appconfig deleted file mode 100644 index 7cb5a7cf2..000000000 --- a/nuttx/configs/xtrs/pashello/appconfig +++ /dev/null @@ -1,43 +0,0 @@ -############################################################################ -# configs/xtrs/pashello/appconfig -# -# Copyright (C) 2011 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# 3. Neither the name NuttX nor the names of its contributors may be -# used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# -############################################################################ - -# Path to example in apps/examples containing the user_start entry point - -CONFIGURED_APPS += examples/pashello - -# Path to the Pascal p-code runtime interpreter module - -CONFIGURED_APPS += interpreters/pcode - diff --git a/nuttx/configs/xtrs/pashello/defconfig b/nuttx/configs/xtrs/pashello/defconfig index 52d4e6b83..d0b5d8245 100644 --- a/nuttx/configs/xtrs/pashello/defconfig +++ b/nuttx/configs/xtrs/pashello/defconfig @@ -1,138 +1,154 @@ -############################################################################ -# configs/xtrs/pashello/defconfig -# -# Copyright (C) 2008-2010, 2012 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# 3. Neither the name NuttX nor the names of its contributors may be -# used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# -############################################################################ -# -# Architecture selection # -CONFIG_ARCH="z80" +# Automatically generated file; DO NOT EDIT. +# Nuttx/ Configuration +# +CONFIG_NUTTX_NEWCONFIG=y + +# +# Build Setup +# +# CONFIG_EXPERIMENTAL is not set +# CONFIG_HOST_LINUX is not set +# CONFIG_HOST_OSX is not set +CONFIG_HOST_WINDOWS=y +# CONFIG_HOST_OTHER is not set +CONFIG_WINDOWS_NATIVE=y +# CONFIG_WINDOWS_CYGWIN is not set +# CONFIG_WINDOWS_MSYS is not set +# CONFIG_WINDOWS_OTHER is not set +# CONFIG_WINDOWS_MKLINK is not set + +# +# Build Configuration +# +# CONFIG_APPS_DIR="..\apps" +# CONFIG_BUILD_2PASS is not set + +# +# Binary Output Formats +# +# CONFIG_RRLOAD_BINARY is not set +# CONFIG_INTELHEX_BINARY is not set +# CONFIG_MOTOROLA_SREC is not set +# CONFIG_RAW_BINARY is not set + +# +# Customize Header Files +# +# CONFIG_ARCH_STDBOOL_H is not set +# CONFIG_ARCH_MATH_H is not set +# CONFIG_ARCH_FLOAT_H is not set +# CONFIG_ARCH_STDARG_H is not set + +# +# Debug Options +# +# CONFIG_DEBUG is not set +# CONFIG_DEBUG_SYMBOLS is not set + +# +# System Type +# +# CONFIG_ARCH_8051 is not set +# CONFIG_ARCH_ARM is not set +# CONFIG_ARCH_AVR is not set +# CONFIG_ARCH_HC is not set +# CONFIG_ARCH_MIPS is not set +# CONFIG_ARCH_RGMP is not set +# CONFIG_ARCH_SH is not set +# CONFIG_ARCH_SIM is not set +# CONFIG_ARCH_X86 is not set +# CONFIG_ARCH_Z16 is not set CONFIG_ARCH_Z80=y +CONFIG_ARCH="z80" CONFIG_ARCH_CHIP="z80" +CONFIG_BOARD_LOOPSPERMSEC=100 CONFIG_ARCH_CHIP_Z80=y -CONFIG_ARCH_BOARD="xtrs" -CONFIG_ARCH_BOARD_XTRS=y -CONFIG_DRAM_SIZE=65536 +# CONFIG_ARCH_CHIP_Z8F6403 is not set +# CONFIG_ARCH_CHIP_Z8F6423 is not set +# CONFIG_ARCH_CHIP_EZ80F91 is not set +# CONFIG_ARCH_CHIP_EZ80F92 is not set +# CONFIG_ARCH_CHIP_EZ80F93 is not set +# CONFIG_Z80_TOOLCHAIN_SDCCL is not set +CONFIG_Z80_TOOLCHAIN_SDCCW=y +CONFIG_LINKER_HOME_AREA=0x5200 +CONFIG_LINKER_CODE_AREA=0x5300 +CONFIG_LINKER_DATA_AREA=0x8000 +CONFIG_LINKER_ROM_AT_0000=y +# CONFIG_ARCH_HAVEHEAD is not set # -# xtrs specific device driver settings +# Architecture Options # -CONFIG_UART_RXBUFSIZE=256 -CONFIG_UART_TXBUFSIZE=256 +# CONFIG_ARCH_NOINTC is not set +# CONFIG_ARCH_DMA is not set +# CONFIG_ARCH_IRQPRIO is not set +# CONFIG_ARCH_STACKDUMP is not set +# CONFIG_ENDIAN_BIG is not set # -# General build options +# Board Settings # -CONFIG_RRLOAD_BINARY=n -CONFIG_INTELHEX_BINARY=n -CONFIG_RAW_BINARY=n +CONFIG_DRAM_START=0x0000 +CONFIG_DRAM_SIZE=65536 -CONFIG_LINKER_START_AREA=0x5200 -CONFIG_LINKER_CODE_AREA=0x5300 -CONFIG_LINKER_ROM_AT_0000=y +# +# Boot options +# +# CONFIG_BOOT_RUNFROMEXTSRAM is not set +CONFIG_BOOT_RUNFROMFLASH=y +# CONFIG_BOOT_RUNFROMISRAM is not set +# CONFIG_BOOT_RUNFROMSDRAM is not set +# CONFIG_BOOT_COPYTORAM is not set # -# General OS setup +# Board Selection # -CONFIG_USER_ENTRYPOINT="pashello_main" -CONFIG_DEBUG=n -CONFIG_DEBUG_VERBOSE=n -CONFIG_DEBUG_SYMBOLS=n -CONFIG_MM_REGIONS=1 -CONFIG_ARCH_LOWPUTC=y -CONFIG_RR_INTERVAL=0 -CONFIG_SCHED_INSTRUMENTATION=n -CONFIG_TASK_NAME_SIZE=0 -CONFIG_START_YEAR=2008 -CONFIG_START_MONTH=2 -CONFIG_START_DAY=21 -CONFIG_JULIAN_TIME=n -CONFIG_HAVE_LOWUARTINIT=n -CONFIG_DEV_CONSOLE=n -CONFIG_DEV_LOWCONSOLE=n -CONFIG_MUTEX_TYPES=n -CONFIG_PRIORITY_INHERITANCE=n -CONFIG_SEM_PREALLOCHOLDERS=0 -CONFIG_SEM_NNESTPRIO=0 -CONFIG_FDCLONE_DISABLE=n -CONFIG_FDCLONE_STDIO=n -CONFIG_SDCLONE_DISABLE=y +CONFIG_ARCH_BOARD_XTRS=y +# CONFIG_ARCH_BOARD_Z80SIM is not set +# CONFIG_ARCH_BOARD_CUSTOM is not set +CONFIG_ARCH_BOARD="xtrs" # -# The following can be used to disable categories of -# APIs supported by the OS. If the compiler supports -# weak functions, then it should not be necessary to -# disable functions unless you want to restrict usage -# of those APIs. +# Common Board Options # -# There are certain dependency relationships in these -# features. + # -# o mq_notify logic depends on signals to awaken tasks -# waiting for queues to become full or empty. -# o pthread_condtimedwait() depends on signals to wake -# up waiting tasks. +# Board-Specific Options # + +# +# RTOS Features +# +CONFIG_MSEC_PER_TICK=10 +CONFIG_RR_INTERVAL=0 +# CONFIG_SCHED_INSTRUMENTATION is not set +CONFIG_TASK_NAME_SIZE=0 +# CONFIG_JULIAN_TIME is not set +CONFIG_START_YEAR=2012 +CONFIG_START_MONTH=12 +CONFIG_START_DAY=9 +CONFIG_DEV_CONSOLE=y +# CONFIG_MUTEX_TYPES is not set +# CONFIG_PRIORITY_INHERITANCE is not set +# CONFIG_FDCLONE_DISABLE is not set +# CONFIG_FDCLONE_STDIO is not set +CONFIG_SDCLONE_DISABLE=y +# CONFIG_SCHED_WORKQUEUE is not set +# CONFIG_SCHED_WAITPID is not set +# CONFIG_SCHED_ATEXIT is not set +# CONFIG_SCHED_ONEXIT is not set +CONFIG_USER_ENTRYPOINT="pashello_main" +CONFIG_DISABLE_OS_API=y CONFIG_DISABLE_CLOCK=y CONFIG_DISABLE_POSIX_TIMERS=y CONFIG_DISABLE_PTHREAD=y CONFIG_DISABLE_SIGNALS=y CONFIG_DISABLE_MQUEUE=y CONFIG_DISABLE_MOUNTPOINT=y -CONFIG_DISABLE_ENVIRON=y +# CONFIG_DISABLE_ENVIRON is not set CONFIG_DISABLE_POLL=y -# -# Misc libc settings -# -CONFIG_NOPRINTF_FIELDWIDTH=y - -# -# Allow for architecture optimized implementations -# -# The architecture can provide optimized versions of the -# following to improve sysem performance -# -CONFIG_ARCH_MEMCPY=n -CONFIG_ARCH_MEMCMP=n -CONFIG_ARCH_MEMMOVE=n -CONFIG_ARCH_MEMSET=n -CONFIG_ARCH_STRCMP=n -CONFIG_ARCH_STRCPY=n -CONFIG_ARCH_STRNCPY=n -CONFIG_ARCH_STRLEN=n -CONFIG_ARCH_STRNLEN=n -CONFIG_ARCH_BZERO=n - # # Sizes of configurable things (0 disables) # @@ -142,8 +158,6 @@ CONFIG_NPTHREAD_KEYS=0 CONFIG_NFILE_DESCRIPTORS=4 CONFIG_NFILE_STREAMS=4 CONFIG_NAME_MAX=32 -CONFIG_STDIO_BUFFER_SIZE=0 -CONFIG_NUNGET_CHARS=0 CONFIG_PREALLOC_MQ_MSGS=0 CONFIG_MQ_MAXMSGSIZE=0 CONFIG_MAX_WDOGPARMS=2 @@ -151,62 +165,287 @@ CONFIG_PREALLOC_WDOGS=4 CONFIG_PREALLOC_TIMERS=0 # -# TCP/IP and UDP support via uIP +# Stack and heap information +# +# CONFIG_CUSTOM_STACK is not set +CONFIG_IDLETHREAD_STACKSIZE=1024 +CONFIG_USERMAIN_STACKSIZE=1024 +CONFIG_PTHREAD_STACK_MIN=256 +CONFIG_PTHREAD_STACK_DEFAULT=1024 + +# +# Device Drivers +# +CONFIG_DEV_NULL=y +# CONFIG_DEV_ZERO is not set +# CONFIG_LOOP is not set +# CONFIG_RAMDISK is not set +# CONFIG_CAN is not set +# CONFIG_PWM is not set +# CONFIG_I2C is not set +# CONFIG_SPI is not set +# CONFIG_RTC is not set +# CONFIG_WATCHDOG is not set +# CONFIG_ANALOG is not set +# CONFIG_BCH is not set +# CONFIG_INPUT is not set +# CONFIG_LCD is not set +# CONFIG_MMCSD is not set +# CONFIG_MTD is not set +# CONFIG_PIPES is not set +# CONFIG_PM is not set +# CONFIG_POWER is not set +# CONFIG_SENSORS is not set +# CONFIG_SERCOMM_CONSOLE is not set +CONFIG_SERIAL=y +CONFIG_DEV_LOWCONSOLE=y +# CONFIG_16550_UART is not set +CONFIG_ARCH_HAVE_UART=y +CONFIG_MCU_SERIAL=y +CONFIG_UART_SERIAL_CONSOLE=y +# CONFIG_NO_SERIAL_CONSOLE is not set + # -CONFIG_NET=n -CONFIG_NET_IPv6=n -CONFIG_NSOCKET_DESCRIPTORS=0 -CONFIG_NET_SOCKOPTS=y -CONFIG_NET_BUFSIZE=420 -CONFIG_NET_TCP=n -CONFIG_NET_TCP_CONNS=40 -CONFIG_NET_MAX_LISTENPORTS=40 -CONFIG_NET_UDP=n -CONFIG_NET_UDP_CHECKSUMS=y -#CONFIG_NET_UDP_CONNS=10 -CONFIG_NET_ICMP=n -CONFIG_NET_ICMP_PING=n -#CONFIG_NET_PINGADDRCONF=0 -CONFIG_NET_STATISTICS=y -#CONFIG_NET_RECEIVE_WINDOW= -#CONFIG_NET_ARPTAB_SIZE=8 -CONFIG_NET_BROADCAST=n +# UART Configuration +# +CONFIG_UART_RXBUFSIZE=64 +CONFIG_UART_TXBUFSIZE=64 +CONFIG_UART_BAUD=115200 +CONFIG_UART_BITS=8 +CONFIG_UART_PARITY=0 +CONFIG_UART_2STOP=0 +# CONFIG_USBDEV is not set +# CONFIG_USBHOST is not set +# CONFIG_WIRELESS is not set # -# UIP Network Utilities +# System Logging Device Options # -CONFIG_NET_DHCP_LIGHT=n -CONFIG_NET_RESOLV_ENTRIES=4 # -# Settings for examples/nsh -CONFIG_NSH_CONSOLE=y -CONFIG_NSH_TELNET=n -CONFIG_NSH_IOBUFFER_SIZE=512 -CONFIG_NSH_CMD_SIZE=40 -CONFIG_NSH_DHCPC=n -CONFIG_NSH_NOMAC=n -CONFIG_NSH_IPADDR=0x0a000002 -CONFIG_NSH_DRIPADDR=0x0a000001 -CONFIG_NSH_NETMASK=0xffffff00 +# System Logging +# +# CONFIG_RAMLOG is not set # -# Stack and heap information +# Networking Support +# +# CONFIG_NET is not set + +# +# File Systems # -CONFIG_BOOT_RUNFROMFLASH=n -CONFIG_BOOT_COPYTORAM=n -CONFIG_CUSTOM_STACK=n -CONFIG_IDLETHREAD_STACKSIZE=1024 -CONFIG_USERMAIN_STACKSIZE=1024 -CONFIG_PTHREAD_STACK_MIN=256 -CONFIG_PTHREAD_STACK_DEFAULT=1024 -CONFIG_HEAP_SIZE= -CONFIG_HEAP_BASE= # -# Maintain legacy build behavior (revisit) +# File system configuration # +# CONFIG_FS_RAMMAP is not set -CONFIG_MMCSD=y -CONFIG_MMCSD_SPI=y -CONFIG_MMCSD_SDIO=y +# +# System Logging +# +# CONFIG_SYSLOG is not set + +# +# Graphics Support +# +# CONFIG_NX is not set + +# +# Memory Management +# +# CONFIG_MM_SMALL is not set +CONFIG_MM_REGIONS=1 +CONFIG_ARCH_HAVE_HEAP2=y +CONFIG_HEAP2_BASE=0x00000000 +CONFIG_HEAP2_SIZE=0 +# CONFIG_GRAN is not set + +# +# Binary Formats +# +# CONFIG_BINFMT_DISABLE is not set +# CONFIG_NXFLAT is not set +# CONFIG_ELF is not set +# CONFIG_SYMTAB_ORDEREDBYNAME is not set + +# +# Library Routines +# +CONFIG_STDIO_BUFFER_SIZE=0 +CONFIG_STDIO_LINEBUFFER=y +CONFIG_NUNGET_CHARS=0 +CONFIG_LIB_HOMEDIR="/" +# CONFIG_LIBM is not set +CONFIG_NOPRINTF_FIELDWIDTH=y +# CONFIG_LIBC_FLOATINGPOINT is not set +# CONFIG_EOL_IS_CR is not set +# CONFIG_EOL_IS_LF is not set +# CONFIG_EOL_IS_BOTH_CRLF is not set +CONFIG_EOL_IS_EITHER_CRLF=y +# CONFIG_LIBC_STRERROR is not set +# CONFIG_LIBC_PERROR_STDOUT is not set +CONFIG_ARCH_LOWPUTC=y +CONFIG_LIB_SENDFILE_BUFSIZE=512 +# CONFIG_ARCH_ROMGETC is not set +# CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set + +# +# Basic CXX Support +# +# CONFIG_C99_BOOL8 is not set +# CONFIG_HAVE_CXX is not set + +# +# Application Configuration +# + +# +# Named Applications +# +# CONFIG_NAMEDAPP is not set + +# +# Examples +# +# CONFIG_EXAMPLES_BUTTONS is not set +# CONFIG_EXAMPLES_CAN is not set +# CONFIG_EXAMPLES_CDCACM is not set +# CONFIG_EXAMPLES_COMPOSITE is not set +# CONFIG_EXAMPLES_DHCPD is not set +# CONFIG_EXAMPLES_ELF is not set +# CONFIG_EXAMPLES_FTPC is not set +# CONFIG_EXAMPLES_FTPD is not set +# CONFIG_EXAMPLES_HELLO is not set +# CONFIG_EXAMPLES_HELLOXX is not set +# CONFIG_EXAMPLES_JSON is not set +# CONFIG_EXAMPLES_HIDKBD is not set +# CONFIG_EXAMPLES_KEYPADTEST is not set +# CONFIG_EXAMPLES_IGMP is not set +# CONFIG_EXAMPLES_LCDRW is not set +# CONFIG_EXAMPLES_MM is not set +# CONFIG_EXAMPLES_MOUNT is not set +# CONFIG_EXAMPLES_MODBUS is not set +# CONFIG_EXAMPLES_NETTEST is not set +# CONFIG_EXAMPLES_NSH is not set +# CONFIG_EXAMPLES_NULL is not set +# CONFIG_EXAMPLES_NX is not set +# CONFIG_EXAMPLES_NXCONSOLE is not set +# CONFIG_EXAMPLES_NXFFS is not set +# CONFIG_EXAMPLES_NXFLAT is not set +# CONFIG_EXAMPLES_NXHELLO is not set +# CONFIG_EXAMPLES_NXIMAGE is not set +# CONFIG_EXAMPLES_NXLINES is not set +# CONFIG_EXAMPLES_NXTEXT is not set +# CONFIG_EXAMPLES_OSTEST is not set +CONFIG_EXAMPLES_PASHELLO=y +# CONFIG_EXAMPLES_PIPE is not set +# CONFIG_EXAMPLES_POLL is not set +# CONFIG_EXAMPLES_QENCODER is not set +# CONFIG_EXAMPLES_RGMP is not set +# CONFIG_EXAMPLES_ROMFS is not set +# CONFIG_EXAMPLES_SENDMAIL is not set +# CONFIG_EXAMPLES_SERLOOP is not set +# CONFIG_EXAMPLES_TELNETD is not set +# CONFIG_EXAMPLES_THTTPD is not set +# CONFIG_EXAMPLES_TIFF is not set +# CONFIG_EXAMPLES_TOUCHSCREEN is not set +# CONFIG_EXAMPLES_UDP is not set +# CONFIG_EXAMPLES_UIP is not set +# CONFIG_EXAMPLES_USBSERIAL is not set +# CONFIG_EXAMPLES_USBMSC is not set +# CONFIG_EXAMPLES_USBTERM is not set +# CONFIG_EXAMPLES_WATCHDOG is not set +# CONFIG_EXAMPLES_WLAN is not set + +# +# Interpreters +# + +# +# Interpreters +# +# CONFIG_INTERPRETERS_FICL is not set +CONFIG_INTERPRETERS_PCODE=y + +# +# Network Utilities +# + +# +# Networking Utilities +# +# CONFIG_NETUTILS_CODECS is not set +# CONFIG_NETUTILS_DHCPC is not set +# CONFIG_NETUTILS_DHCPD is not set +# CONFIG_NETUTILS_FTPC is not set +# CONFIG_NETUTILS_FTPD is not set +# CONFIG_NETUTILS_JSON is not set +# CONFIG_NETUTILS_RESOLV is not set +# CONFIG_NETUTILS_SMTP is not set +# CONFIG_NETUTILS_TELNETD is not set +# CONFIG_NETUTILS_TFTPC is not set +# CONFIG_NETUTILS_THTTPD is not set +# CONFIG_NETUTILS_UIPLIB is not set +# CONFIG_NETUTILS_WEBCLIENT is not set + +# +# ModBus +# + +# +# FreeModbus +# +# CONFIG_MODBUS is not set + +# +# NSH Library +# +# CONFIG_NSH_LIBRARY is not set + +# +# NxWidgets/NxWM +# + +# +# System NSH Add-Ons +# + +# +# Custom Free Memory Command +# +# CONFIG_SYSTEM_FREE is not set + +# +# I2C tool +# + +# +# FLASH Program Installation +# +# CONFIG_SYSTEM_INSTALL is not set + +# +# readline() +# +# CONFIG_SYSTEM_READLINE is not set + +# +# Power Off +# +# CONFIG_SYSTEM_POWEROFF is not set + +# +# RAMTRON +# +# CONFIG_SYSTEM_RAMTRON is not set + +# +# SD Card +# +# CONFIG_SYSTEM_SDCARD is not set + +# +# Sysinfo +# +# CONFIG_SYSTEM_SYSINFO is not set diff --git a/nuttx/configs/xtrs/pashello/setenv.bat b/nuttx/configs/xtrs/pashello/setenv.bat new file mode 100644 index 000000000..fbedd244a --- /dev/null +++ b/nuttx/configs/xtrs/pashello/setenv.bat @@ -0,0 +1,54 @@ +@echo off + +rem configs/xtrs/pashello/setenv.bat +rem +rem Copyright (C) 2012 Gregory Nutt. All rights reserved. +rem Author: Gregory Nutt +rem +rem Redistribution and use in source and binary forms, with or without +rem modification, are permitted provided that the following conditions +rem are met: +rem +rem 1. Redistributions of source code must retain the above copyright +rem notice, this list of conditions and the following disclaimer. +rem 2. Redistributions in binary form must reproduce the above copyright +rem notice, this list of conditions and the following disclaimer in +rem the documentation and/or other materials provided with the +rem distribution. +rem 3. Neither the name NuttX nor the names of its contributors may be +rem used to endorse or promote products derived from this software +rem without specific prior written permission. +rem +rem THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +rem "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +rem LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +rem FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE +rem COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +rem INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +rem BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +rem OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +rem AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +rem LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +rem ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +rem POSSIBILITY OF SUCH DAMAGE. + +rem This is the location where I installed in the MinGW compiler. With +rem this configuration, it is recommended that you do NOT install the +rem MSYS tools; they conflict with the GNUWin32 tools. See +rem http://www.mingw.org/ for further info. + +set PATH=C:\MinGW\bin;%PATH% + +rem This is the location where I installed the SDCC toolchain for windows. + +set PATH=C:\Program Files (x86)\SDCC/bin;%PATH% + +rem This is the location where I installed the GNUWin32 tools. See +rem http://gnuwin32.sourceforge.net/. + +set PATH=C:\gnuwin32\bin;%PATH% + +rem This is the location where the XTRS hex2cmd program is available +rem set PATH=????:%PATH% + +echo %PATH% diff --git a/nuttx/configs/xtrs/pashello/setenv.sh b/nuttx/configs/xtrs/pashello/setenv.sh deleted file mode 100755 index 4e2e98e31..000000000 --- a/nuttx/configs/xtrs/pashello/setenv.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/bash -# configs/xtrs/pashello/setenv.sh -# -# Copyright (C) 2008 Gregory Nutt. All rights reserved. -# Author: Gregory Nutt -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in -# the documentation and/or other materials provided with the -# distribution. -# 3. Neither the name NuttX nor the names of its contributors may be -# used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS -# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE -# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, -# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS -# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED -# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN -# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -# POSSIBILITY OF SUCH DAMAGE. -# - -if [ "$(basename $0)" = "setenv.sh" ] ; then - echo "You must source this script, not run it!" 1>&2 - exit 1 -fi - -if [ -z ${PATH_ORIG} ]; then export PATH_ORIG=${PATH}; fi - -export SDCC_BIN=/usr/local/bin -export PATH=${SDCC_BIN}:/sbin:/usr/sbin:${PATH_ORIG} - -echo "PATH : ${PATH}" diff --git a/nuttx/configs/xtrs/src/xtr_serial.c b/nuttx/configs/xtrs/src/xtr_serial.c index 1a84abee5..eb6846179 100644 --- a/nuttx/configs/xtrs/src/xtr_serial.c +++ b/nuttx/configs/xtrs/src/xtr_serial.c @@ -55,12 +55,13 @@ #include #include #include +#include #include "up_arch.h" #include "os_internal.h" #include "up_internal.h" -#ifdef USE_SERIAL_DRIVER +#ifdef USE_SERIALDRIVER /**************************************************************************** * Definitions diff --git a/nuttx/configs/z16f2800100zcog/ostest/defconfig b/nuttx/configs/z16f2800100zcog/ostest/defconfig index f9ed65727..defd3d5ef 100644 --- a/nuttx/configs/z16f2800100zcog/ostest/defconfig +++ b/nuttx/configs/z16f2800100zcog/ostest/defconfig @@ -153,7 +153,6 @@ CONFIG_START_YEAR=2012 CONFIG_START_MONTH=11 CONFIG_START_DAY=29 CONFIG_DEV_CONSOLE=y -CONFIG_DEV_LOWCONSOLE=y # CONFIG_MUTEX_TYPES is not set # CONFIG_PRIORITY_INHERITANCE is not set # CONFIG_FDCLONE_DISABLE is not set @@ -223,7 +222,7 @@ CONFIG_DEV_NULL=y # CONFIG_SENSORS is not set # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y -# CONFIG_LOWLEVEL_CONSOLE is not set +CONFIG_DEV_LOWCONSOLE=y # CONFIG_16550_UART is not set CONFIG_ARCH_HAVE_UART0=y CONFIG_ARCH_HAVE_UART1=y diff --git a/nuttx/configs/z16f2800100zcog/pashello/defconfig b/nuttx/configs/z16f2800100zcog/pashello/defconfig index aa0fb0b1a..f3067a9e7 100644 --- a/nuttx/configs/z16f2800100zcog/pashello/defconfig +++ b/nuttx/configs/z16f2800100zcog/pashello/defconfig @@ -153,7 +153,6 @@ CONFIG_START_YEAR=2008 CONFIG_START_MONTH=1 CONFIG_START_DAY=28 CONFIG_DEV_CONSOLE=y -CONFIG_DEV_LOWCONSOLE=y # CONFIG_MUTEX_TYPES is not set # CONFIG_PRIORITY_INHERITANCE is not set # CONFIG_FDCLONE_DISABLE is not set @@ -223,7 +222,7 @@ CONFIG_DEV_NULL=y # CONFIG_SENSORS is not set # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y -# CONFIG_LOWLEVEL_CONSOLE is not set +CONFIG_DEV_LOWCONSOLE=y # CONFIG_16550_UART is not set CONFIG_ARCH_HAVE_UART0=y CONFIG_ARCH_HAVE_UART1=y diff --git a/nuttx/configs/z80sim/README.txt b/nuttx/configs/z80sim/README.txt index 50e2c7028..595a17783 100644 --- a/nuttx/configs/z80sim/README.txt +++ b/nuttx/configs/z80sim/README.txt @@ -27,7 +27,7 @@ Configuring NuttX 1) From a POSIX window: cd tools - ./configure.sh z80sim/pashello + ./configure.sh z80sim/ostest 2) From a CMD.exe window setenv.bat @@ -56,7 +56,7 @@ Configuring NuttX 1) From a POSIX window: cd tools - ./configure.sh z80sim/pashello + ./configure.sh z80sim/nsh 2) From a CMD.exe window setenv.bat diff --git a/nuttx/configs/z80sim/nsh/defconfig b/nuttx/configs/z80sim/nsh/defconfig index 5b21b97bf..1f8edacb1 100644 --- a/nuttx/configs/z80sim/nsh/defconfig +++ b/nuttx/configs/z80sim/nsh/defconfig @@ -69,8 +69,12 @@ CONFIG_ARCH_CHIP_Z80=y # CONFIG_ARCH_CHIP_EZ80F91 is not set # CONFIG_ARCH_CHIP_EZ80F92 is not set # CONFIG_ARCH_CHIP_EZ80F93 is not set -# CONFIG_Z80_TOOLCHAIN_SDCCL is not set CONFIG_Z80_TOOLCHAIN_SDCCW=y +CONFIG_LINKER_HOME_AREA=0x0000 +CONFIG_LINKER_CODE_AREA=0x0200 +CONFIG_LINKER_DATA_AREA=0x8000 +# CONFIG_LINKER_ROM_AT_0000 is not set +# CONFIG_ARCH_HAVEHEAD is not set # # Architecture Options @@ -84,7 +88,7 @@ CONFIG_Z80_TOOLCHAIN_SDCCW=y # # Board Settings # -CONFIG_DRAM_START= +CONFIG_DRAM_START=0x0000 CONFIG_DRAM_SIZE=65536 # @@ -125,7 +129,6 @@ CONFIG_START_YEAR=2012 CONFIG_START_MONTH=12 CONFIG_START_DAY=7 CONFIG_DEV_CONSOLE=y -# CONFIG_DEV_LOWCONSOLE is not set # CONFIG_MUTEX_TYPES is not set # CONFIG_PRIORITY_INHERITANCE is not set # CONFIG_FDCLONE_DISABLE is not set @@ -195,7 +198,7 @@ CONFIG_DEV_NULL=y # CONFIG_SENSORS is not set # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y -# CONFIG_LOWLEVEL_CONSOLE is not set +# CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set CONFIG_ARCH_HAVE_UART=y CONFIG_MCU_SERIAL=y diff --git a/nuttx/configs/z80sim/ostest/defconfig b/nuttx/configs/z80sim/ostest/defconfig index 656f71fd1..a961d550d 100644 --- a/nuttx/configs/z80sim/ostest/defconfig +++ b/nuttx/configs/z80sim/ostest/defconfig @@ -69,8 +69,12 @@ CONFIG_ARCH_CHIP_Z80=y # CONFIG_ARCH_CHIP_EZ80F91 is not set # CONFIG_ARCH_CHIP_EZ80F92 is not set # CONFIG_ARCH_CHIP_EZ80F93 is not set -# CONFIG_Z80_TOOLCHAIN_SDCCL is not set CONFIG_Z80_TOOLCHAIN_SDCCW=y +CONFIG_LINKER_HOME_AREA=0x0000 +CONFIG_LINKER_CODE_AREA=0x0200 +CONFIG_LINKER_DATA_AREA=0x8000 +# CONFIG_LINKER_ROM_AT_0000 is not set +# CONFIG_ARCH_HAVEHEAD is not set # # Architecture Options @@ -84,7 +88,7 @@ CONFIG_Z80_TOOLCHAIN_SDCCW=y # # Board Settings # -CONFIG_DRAM_START= +CONFIG_DRAM_START=0x0000 CONFIG_DRAM_SIZE=65536 # @@ -124,7 +128,6 @@ CONFIG_START_YEAR=2007 CONFIG_START_MONTH=2 CONFIG_START_DAY=21 # CONFIG_DEV_CONSOLE is not set -# CONFIG_DEV_LOWCONSOLE is not set # CONFIG_MUTEX_TYPES is not set # CONFIG_PRIORITY_INHERITANCE is not set # CONFIG_FDCLONE_DISABLE is not set @@ -194,7 +197,7 @@ CONFIG_DEV_NULL=y # CONFIG_SENSORS is not set # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y -# CONFIG_LOWLEVEL_CONSOLE is not set +CONFIG_DEV_LOWCONSOLE=y # CONFIG_16550_UART is not set CONFIG_ARCH_HAVE_UART=y CONFIG_MCU_SERIAL=y @@ -289,6 +292,7 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512 # # Basic CXX Support # +# CONFIG_C99_BOOL8 is not set # CONFIG_HAVE_CXX is not set # diff --git a/nuttx/configs/z80sim/pashello/defconfig b/nuttx/configs/z80sim/pashello/defconfig index 16124f39b..a8d565ce2 100644 --- a/nuttx/configs/z80sim/pashello/defconfig +++ b/nuttx/configs/z80sim/pashello/defconfig @@ -69,8 +69,12 @@ CONFIG_ARCH_CHIP_Z80=y # CONFIG_ARCH_CHIP_EZ80F91 is not set # CONFIG_ARCH_CHIP_EZ80F92 is not set # CONFIG_ARCH_CHIP_EZ80F93 is not set -# CONFIG_Z80_TOOLCHAIN_SDCCL is not set CONFIG_Z80_TOOLCHAIN_SDCCW=y +CONFIG_LINKER_HOME_AREA=0x0000 +CONFIG_LINKER_CODE_AREA=0x0200 +CONFIG_LINKER_DATA_AREA=0x8000 +# CONFIG_LINKER_ROM_AT_0000 is not set +# CONFIG_ARCH_HAVEHEAD is not set # # Architecture Options @@ -84,7 +88,7 @@ CONFIG_Z80_TOOLCHAIN_SDCCW=y # # Board Settings # -CONFIG_DRAM_START= +CONFIG_DRAM_START=0x0000 CONFIG_DRAM_SIZE=65536 # @@ -124,7 +128,6 @@ CONFIG_START_YEAR=2012 CONFIG_START_MONTH=12 CONFIG_START_DAY=7 CONFIG_DEV_CONSOLE=y -# CONFIG_DEV_LOWCONSOLE is not set # CONFIG_MUTEX_TYPES is not set # CONFIG_PRIORITY_INHERITANCE is not set # CONFIG_FDCLONE_DISABLE is not set @@ -194,13 +197,12 @@ CONFIG_DEV_NULL=y # CONFIG_SENSORS is not set # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y -# CONFIG_LOWLEVEL_CONSOLE is not set +CONFIG_DEV_LOWCONSOLE=y # CONFIG_16550_UART is not set CONFIG_ARCH_HAVE_UART=y CONFIG_MCU_SERIAL=y -CONFIG_STANDARD_SERIAL=y -# CONFIG_UART_SERIAL_CONSOLE is not set -CONFIG_NO_SERIAL_CONSOLE=y +CONFIG_UART_SERIAL_CONSOLE=y +# CONFIG_NO_SERIAL_CONSOLE is not set # # UART Configuration @@ -272,6 +274,7 @@ CONFIG_HEAP2_SIZE=0 CONFIG_STDIO_BUFFER_SIZE=0 CONFIG_STDIO_LINEBUFFER=y CONFIG_NUNGET_CHARS=0 +CONFIG_LIB_HOMEDIR="/" # CONFIG_LIBM is not set CONFIG_NOPRINTF_FIELDWIDTH=y # CONFIG_LIBC_FLOATINGPOINT is not set diff --git a/nuttx/configs/z8encore000zco/ostest/defconfig b/nuttx/configs/z8encore000zco/ostest/defconfig index 7ff44faae..b098c682b 100644 --- a/nuttx/configs/z8encore000zco/ostest/defconfig +++ b/nuttx/configs/z8encore000zco/ostest/defconfig @@ -144,7 +144,6 @@ CONFIG_START_YEAR=2012 CONFIG_START_MONTH=11 CONFIG_START_DAY=28 # CONFIG_DEV_CONSOLE is not set -CONFIG_DEV_LOWCONSOLE=y # CONFIG_MUTEX_TYPES is not set # CONFIG_PRIORITY_INHERITANCE is not set # CONFIG_FDCLONE_DISABLE is not set @@ -214,7 +213,7 @@ CONFIG_DEV_NULL=y # CONFIG_SENSORS is not set # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y -# CONFIG_LOWLEVEL_CONSOLE is not set +CONFIG_DEV_LOWCONSOLE=y # CONFIG_16550_UART is not set CONFIG_ARCH_HAVE_UART0=y CONFIG_ARCH_HAVE_UART1=y diff --git a/nuttx/configs/z8f64200100kit/ostest/defconfig b/nuttx/configs/z8f64200100kit/ostest/defconfig index 1650600cd..caa685419 100644 --- a/nuttx/configs/z8f64200100kit/ostest/defconfig +++ b/nuttx/configs/z8f64200100kit/ostest/defconfig @@ -144,7 +144,6 @@ CONFIG_START_YEAR=2008 CONFIG_START_MONTH=2 CONFIG_START_DAY=17 # CONFIG_DEV_CONSOLE is not set -# CONFIG_DEV_LOWCONSOLE is not set # CONFIG_MUTEX_TYPES is not set # CONFIG_PRIORITY_INHERITANCE is not set # CONFIG_FDCLONE_DISABLE is not set @@ -214,7 +213,7 @@ CONFIG_DEV_NULL=y # CONFIG_SENSORS is not set # CONFIG_SERCOMM_CONSOLE is not set CONFIG_SERIAL=y -# CONFIG_LOWLEVEL_CONSOLE is not set +# CONFIG_DEV_LOWCONSOLE is not set # CONFIG_16550_UART is not set CONFIG_ARCH_HAVE_UART0=y CONFIG_ARCH_HAVE_UART1=y diff --git a/nuttx/drivers/loop.c b/nuttx/drivers/loop.c index df96da59f..b5b5d82d8 100644 --- a/nuttx/drivers/loop.c +++ b/nuttx/drivers/loop.c @@ -215,7 +215,7 @@ static ssize_t loop_read(FAR struct inode *inode, unsigned char *buffer, size_t start_sector, unsigned int nsectors) { FAR struct loop_struct_s *dev; - size_t nbytesread; + ssize_t nbytesread; off_t offset; int ret; diff --git a/nuttx/drivers/serial/Kconfig b/nuttx/drivers/serial/Kconfig index 3dfd23dd1..a1e0dff49 100644 --- a/nuttx/drivers/serial/Kconfig +++ b/nuttx/drivers/serial/Kconfig @@ -3,10 +3,12 @@ # see misc/tools/kconfig-language.txt. # -config LOWLEVEL_CONSOLE +config DEV_LOWCONSOLE bool "Low-level console support" default n depends on ARCH_LOWPUTC + ---help--- + Use the simple, low-level, write-only serial console driver (minimal support) config 16550_UART bool "16550 UART Chip support" @@ -317,7 +319,7 @@ config STANDARD_SERIAL bool "Enable standard \"upper-half\" serial driver" default y if MCU_SERIAL default n if !MCU_SERIAL - depends on !LOWLEVEL_CONSOLE + depends on !DEV_LOWCONSOLE ---help--- Enable the standard, upper-half serial driver used by most MCU serial peripherals. diff --git a/nuttx/drivers/serial/serial.c b/nuttx/drivers/serial/serial.c index 9ffcd75dc..9708eb5bc 100644 --- a/nuttx/drivers/serial/serial.c +++ b/nuttx/drivers/serial/serial.c @@ -232,7 +232,9 @@ static int uart_putxmitchar(FAR uart_dev_t *dev, int ch) } } - /* We won't get here */ + /* We won't get here. Some compilers may complain that this code is + * unreachable. + */ return OK; } diff --git a/nuttx/libc/string/lib_strcasestr.c b/nuttx/libc/string/lib_strcasestr.c index 5a8d53bee..7f17a686d 100644 --- a/nuttx/libc/string/lib_strcasestr.c +++ b/nuttx/libc/string/lib_strcasestr.c @@ -127,7 +127,9 @@ FAR char *strcasestr(FAR const char *str, FAR const char *substr) candidate++; } - /* Won't get here, but some compilers might complain */ + /* Won't get here, but some compilers might complain. Others might complain + * about this code being unreachable too. + */ return NULL; } diff --git a/nuttx/libc/string/lib_strstr.c b/nuttx/libc/string/lib_strstr.c index 02f4809d2..7a60a680d 100644 --- a/nuttx/libc/string/lib_strstr.c +++ b/nuttx/libc/string/lib_strstr.c @@ -97,7 +97,9 @@ char *strstr(const char *str, const char *substr) candidate++; } - /* Won't get here, but some compilers might complain */ + /* Won't get here, but some compilers might complain. Other compilers + * might complain about this code being unreachable too. + */ return NULL; } diff --git a/nuttx/sched/Kconfig b/nuttx/sched/Kconfig index 4a3e87745..ab0de5b47 100644 --- a/nuttx/sched/Kconfig +++ b/nuttx/sched/Kconfig @@ -57,12 +57,6 @@ config DEV_CONSOLE Set if architecture-specific logic provides /dev/console. Enables stdout, stderr, stdin. -config DEV_LOWCONSOLE - bool "enable low-level serial console" - default n - ---help--- - Use the simple, low-level, write-only serial console driver (minimul support) - config MUTEX_TYPES: bool "Enable mutex types" default n diff --git a/nuttx/sched/prctl.c b/nuttx/sched/prctl.c index d71a0e174..3db83d3d7 100644 --- a/nuttx/sched/prctl.c +++ b/nuttx/sched/prctl.c @@ -157,8 +157,14 @@ int prctl(int option, ...) goto errout; } + /* Not reachable unless CONFIG_TASK_NAME_SIZE is > 0. NOTE: This might + * change if additional commands are supported. + */ + +#if CONFIG_TASK_NAME_SIZE > 0 va_end(ap); return OK; +#endif errout: va_end(ap); -- cgit v1.2.3 From 56a650461894d8ab541277010e93fd5ca75f9f0d Mon Sep 17 00:00:00 2001 From: patacongo Date: Wed, 19 Dec 2012 17:54:26 +0000 Subject: Incorporate address environment interfaces in binfmt/ logic git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5443 42af7a65-404d-4744-a932-0658087f49c3 --- apps/examples/nxflat/Makefile | 2 +- nuttx/ChangeLog | 7 + nuttx/Documentation/NuttxPortingGuide.html | 8 +- nuttx/arch/arm/src/lm3s/lm3s_ssi.c | 5 + nuttx/binfmt/binfmt_dumpmodule.c | 3 + nuttx/binfmt/binfmt_execmodule.c | 45 +++++- nuttx/binfmt/binfmt_unloadmodule.c | 39 ++++- nuttx/binfmt/elf.c | 23 ++- nuttx/binfmt/libelf/Make.defs | 6 +- nuttx/binfmt/libelf/libelf.h | 85 ++++++++++- nuttx/binfmt/libelf/libelf_addrenv.c | 176 ++++++++++++++++++++++ nuttx/binfmt/libelf/libelf_bind.c | 36 ++++- nuttx/binfmt/libelf/libelf_load.c | 35 ++++- nuttx/binfmt/libelf/libelf_read.c | 6 +- nuttx/binfmt/libelf/libelf_unload.c | 13 +- nuttx/binfmt/libnxflat/Make.defs | 6 +- nuttx/binfmt/libnxflat/libnxflat.h | 136 +++++++++++++++++ nuttx/binfmt/libnxflat/libnxflat_addrenv.c | 234 +++++++++++++++++++++++++++++ nuttx/binfmt/libnxflat/libnxflat_bind.c | 128 +++++++++++++++- nuttx/binfmt/libnxflat/libnxflat_load.c | 56 +++++-- nuttx/binfmt/libnxflat/libnxflat_unload.c | 19 +-- nuttx/binfmt/nxflat.c | 23 ++- nuttx/configs/eagle100/httpd/setenv.sh | 26 +++- nuttx/configs/eagle100/nettest/setenv.sh | 26 +++- nuttx/configs/eagle100/nsh/setenv.sh | 26 +++- nuttx/configs/eagle100/nxflat/setenv.sh | 26 +++- nuttx/include/nuttx/binfmt/binfmt.h | 17 +++ nuttx/include/nuttx/binfmt/elf.h | 46 +++++- nuttx/include/nuttx/binfmt/nxflat.h | 39 ++++- nuttx/include/nuttx/sched.h | 32 +++- 30 files changed, 1225 insertions(+), 104 deletions(-) create mode 100644 nuttx/binfmt/libelf/libelf_addrenv.c create mode 100644 nuttx/binfmt/libnxflat/libnxflat.h create mode 100644 nuttx/binfmt/libnxflat/libnxflat_addrenv.c (limited to 'apps') diff --git a/apps/examples/nxflat/Makefile b/apps/examples/nxflat/Makefile index 344ee9c6d..94092bd39 100644 --- a/apps/examples/nxflat/Makefile +++ b/apps/examples/nxflat/Makefile @@ -76,7 +76,7 @@ $(COBJS): %$(OBJEXT): %.c headers: @$(MAKE) -C tests TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)" CROSSDEV=$(CROSSDEV) -.built: $(OBJS) +.built: headers $(OBJS) $(call ARCHIVE, $(BIN), $(OBJS)) @touch .built diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog index c932a1f2d..1296076b6 100644 --- a/nuttx/ChangeLog +++ b/nuttx/ChangeLog @@ -3792,3 +3792,10 @@ logic on initial check-in * binfmt/binfmt_loadmodule.c: load_module() will now traverse the PATH variable to locate files from their relative path. + * include/nuttx/arch.h and arch/z80/src/z180/z180_mmu.c: Restructure the + address environment interfaces so that they will better integrate with + binfmt/. + * binfmt/libelf/*, binfmt/libnxflat/* and other files: Integrate the + address environment interfaces. If CONFIG_ADDRENV=y, then binfmt/ + will now create an address environment for new tasks (instead of + just malloc'ing the task memory). diff --git a/nuttx/Documentation/NuttxPortingGuide.html b/nuttx/Documentation/NuttxPortingGuide.html index 526892d3e..0408f82ac 100644 --- a/nuttx/Documentation/NuttxPortingGuide.html +++ b/nuttx/Documentation/NuttxPortingGuide.html @@ -2130,7 +2130,7 @@ else

Binary Loader Support. These are low-level interfaces used in binfmt/ to instantiate tasks with address environments. - These interfaces all operate on type task_addrenv_t which is an abstract representation of a asks's address environment and must be defined in arch/arch.h if CONFIG_ADDRENVM is defined. + These interfaces all operate on type task_addrenv_t which is an abstract representation of a asks's address environment and must be defined in arch/arch.h if CONFIG_ADDRENV is defined. These low-level interfaces include:

    @@ -2174,7 +2174,7 @@ else
  • 4.1.21.8 up_addrenv_release(): - ARelease the TCBs reference to an address environment when a task/thread exits. + Release the TCB's reference to an address environment when a task/thread exits.
@@ -3930,7 +3930,9 @@ void (*notify)(FAR struct pm_callback_s *cb, enum pm_state_e pmstate); up_prioritize_irq() API.
  • CONFIG_ADDRENV: The CPU supports an MMU and CPU port supports provision of address - environments for tasks (making the, perhaps, processes).
  • + environments for tasks (making the, perhaps, processes). + In this case, the CPU-specific logic must provide a set of address environment interfaces as defined in the Address Environments paragraph. +

    diff --git a/nuttx/arch/arm/src/lm3s/lm3s_ssi.c b/nuttx/arch/arm/src/lm3s/lm3s_ssi.c index c756e2b6a..8d1987992 100644 --- a/nuttx/arch/arm/src/lm3s/lm3s_ssi.c +++ b/nuttx/arch/arm/src/lm3s/lm3s_ssi.c @@ -209,8 +209,11 @@ static inline void ssi_putreg(struct lm3s_ssidev_s *priv, unsigned int offset, static uint32_t ssi_disable(struct lm3s_ssidev_s *priv); static void ssi_enable(struct lm3s_ssidev_s *priv, uint32_t enable); + +#ifndef CONFIG_SSI_POLLWAIT static void ssi_semtake(sem_t *sem); #define ssi_semgive(s) sem_post(s); +#endif /* SSI data transfer */ @@ -446,6 +449,7 @@ static void ssi_enable(struct lm3s_ssidev_s *priv, uint32_t enable) * ****************************************************************************/ +#ifndef CONFIG_SSI_POLLWAIT static void ssi_semtake(sem_t *sem) { int ret; @@ -456,6 +460,7 @@ static void ssi_semtake(sem_t *sem) while (ret < 0 && errno == EINTR); DEBUGASSERT(ret == 0); } +#endif /**************************************************************************** * Name: ssi_txnull, ssi_txuint16, and ssi_txuint8 diff --git a/nuttx/binfmt/binfmt_dumpmodule.c b/nuttx/binfmt/binfmt_dumpmodule.c index cd52136b0..d320bc830 100644 --- a/nuttx/binfmt/binfmt_dumpmodule.c +++ b/nuttx/binfmt/binfmt_dumpmodule.c @@ -95,6 +95,9 @@ int dump_module(FAR const struct binary_s *bin) #ifdef CONFIG_BINFMT_CONSTRUCTORS bdbg(" ctors: %p nctors=%d\n", bin->ctors, bin->nctors); bdbg(" dtors: %p ndtors=%d\n", bin->dtors, bin->ndtors); +#endif +#ifdef CONFIG_ADDRENV + bdbg(" addrenv: %p\n", bin->addrenv); #endif bdbg(" stacksize: %d\n", bin->stacksize); } diff --git a/nuttx/binfmt/binfmt_execmodule.c b/nuttx/binfmt/binfmt_execmodule.c index 37f445966..400451c40 100644 --- a/nuttx/binfmt/binfmt_execmodule.c +++ b/nuttx/binfmt/binfmt_execmodule.c @@ -86,11 +86,26 @@ ****************************************************************************/ #ifdef CONFIG_BINFMT_CONSTRUCTORS -static inline void exec_ctors(FAR const struct binary_s *binp) +static inline int exec_ctors(FAR const struct binary_s *binp) { binfmt_ctor_t *ctor = binp->ctors; +#ifdef CONFIG_ADDRENV + hw_addrenv_t oldenv; + int ret; +#endif int i; + /* Instantiate the address enviroment containing the constructors */ + +#ifdef CONFIG_ADDRENV + ret = up_addrenv_select(binp->addrenv, &oldenv); + if (ret < 0) + { + bdbg("up_addrenv_select() failed: %d\n", ret); + return ret; + } +#endif + /* Execute each constructor */ for (i = 0; i < binp->nctors; i++) @@ -100,6 +115,14 @@ static inline void exec_ctors(FAR const struct binary_s *binp) (*ctor)(); ctor++; } + + /* Restore the address enviroment */ + +#ifdef CONFIG_ADDRENV + return up_addrenv_restore(oldenv); +#else + return OK; +#endif } #endif @@ -190,6 +213,18 @@ int exec_module(FAR const struct binary_s *binp, int priority) up_initial_state(tcb); #endif + /* Assign the address environment to the task */ + +#ifdef CONFIG_ADDRENV + ret = up_addrenv_assign(binp->addrenv, tcb); + if (ret < 0) + { + err = -ret; + bdbg("up_addrenv_assign() failed: %d\n", ret); + goto errout_with_stack; + } +#endif + /* Get the assigned pid before we start the task */ pid = tcb->pid; @@ -197,7 +232,13 @@ int exec_module(FAR const struct binary_s *binp, int priority) /* Execute all of the C++ static constructors */ #ifdef CONFIG_BINFMT_CONSTRUCTORS - exec_ctors(binp); + ret = exec_ctors(binp); + if (ret < 0) + { + err = -ret; + bdbg("exec_ctors() failed: %d\n", ret); + goto errout_with_stack; + } #endif /* Then activate the task at the provided priority */ diff --git a/nuttx/binfmt/binfmt_unloadmodule.c b/nuttx/binfmt/binfmt_unloadmodule.c index 52243fcf7..a0050481c 100644 --- a/nuttx/binfmt/binfmt_unloadmodule.c +++ b/nuttx/binfmt/binfmt_unloadmodule.c @@ -86,8 +86,23 @@ static inline void exec_dtors(FAR const struct binary_s *binp) { binfmt_dtor_t *dtor = binp->dtors; +#ifdef CONFIG_ADDRENV + hw_addrenv_t oldenv; + int ret; +#endif int i; + /* Instantiate the address enviroment containing the destructors */ + +#ifdef CONFIG_ADDRENV + ret = up_addrenv_select(binp->addrenv, &oldenv); + if (ret < 0) + { + bdbg("up_addrenv_select() failed: %d\n", ret); + return ret; + } +#endif + /* Execute each destructor */ for (i = 0; i < binp->ndtors; i++) @@ -97,6 +112,14 @@ static inline void exec_dtors(FAR const struct binary_s *binp) (*dtor)(); dtor++; } + + /* Restore the address enviroment */ + +#ifdef CONFIG_ADDRENV + return up_addrenv_restore(oldenv); +#else + return OK; +#endif } #endif @@ -125,15 +148,23 @@ static inline void exec_dtors(FAR const struct binary_s *binp) int unload_module(FAR const struct binary_s *binp) { +#ifdef CONFIG_BINFMT_CONSTRUCTORS + int ret; +#endif int i; if (binp) { - /* Execute C++ desctructors */ #ifdef CONFIG_BINFMT_CONSTRUCTORS - exec_dtors(binp); + ret = exec_dtors(binp); + if (ret < 0) + { + bdbg("exec_ctors() failed: %d\n", ret); + set_errno(-ret); + return ERROR; + } #endif /* Unmap mapped address spaces */ @@ -155,6 +186,10 @@ int unload_module(FAR const struct binary_s *binp) free(binp->alloc[i]); } } + + /* Notice that the address environment is not destroyed. This should + * happen automatically when the task exits. + */ } return OK; diff --git a/nuttx/binfmt/elf.c b/nuttx/binfmt/elf.c index ea1e7b0ca..bcebf13ca 100644 --- a/nuttx/binfmt/elf.c +++ b/nuttx/binfmt/elf.c @@ -215,9 +215,22 @@ static int elf_loadbinary(struct binary_s *binp) /* Return the load information */ binp->entrypt = (main_t)(loadinfo.elfalloc + loadinfo.ehdr.e_entry); - binp->alloc[0] = (FAR void *)loadinfo.elfalloc; binp->stacksize = CONFIG_ELF_STACKSIZE; + /* Add the ELF allocation to the alloc[] only if there is no address + * enironment. If there is an address environment, it will automatically + * be freed when the function exits + * + * REVISIT: If the module is loaded then unloaded, wouldn't this cause + * a memory leak? + */ + +#ifdef CONFIG_ADDRENV +# warning "REVISIT" +#else + binp->alloc[0] = (FAR void *)loadinfo.elfalloc; +#endif + #ifdef CONFIG_BINFMT_CONSTRUCTORS /* Save information about constructors. NOTE: desctructors are not * yet supported. @@ -232,6 +245,14 @@ static int elf_loadbinary(struct binary_s *binp) binp->ndtors = loadinfo.ndtors; #endif +#ifdef CONFIG_ADDRENV + /* Save the address environment. This will be needed when the module is + * executed for the up_addrenv_assign() call. + */ + + binp->addrenv = loadinfo.addrenv; +#endif + elf_dumpbuffer("Entry code", (FAR const uint8_t*)binp->entrypt, MIN(loadinfo.allocsize - loadinfo.ehdr.e_entry, 512)); diff --git a/nuttx/binfmt/libelf/Make.defs b/nuttx/binfmt/libelf/Make.defs index c8857c3f7..93d95a23c 100644 --- a/nuttx/binfmt/libelf/Make.defs +++ b/nuttx/binfmt/libelf/Make.defs @@ -41,9 +41,9 @@ BINFMT_CSRCS += elf.c # ELF library -BINFMT_CSRCS += libelf_bind.c libelf_init.c libelf_iobuffer.c libelf_load.c \ - libelf_read.c libelf_sections.c libelf_symbols.c libelf_uninit.c \ - libelf_unload.c libelf_verify.c +BINFMT_CSRCS += libelf_bind.c libelf_init.c libelf_addrenv.c libelf_iobuffer.c +BINFMT_CSRCS += libelf_load.c libelf_read.c libelf_sections.c libelf_symbols.c +BINFMT_CSRCS += libelf_uninit.c libelf_unload.c libelf_verify.c ifeq ($(CONFIG_BINFMT_CONSTRUCTORS),y) BINFMT_CSRCS += libelf_ctors.c libelf_dtors.c diff --git a/nuttx/binfmt/libelf/libelf.h b/nuttx/binfmt/libelf/libelf.h index 5b0be9ab0..04c9144f6 100644 --- a/nuttx/binfmt/libelf/libelf.h +++ b/nuttx/binfmt/libelf/libelf.h @@ -45,6 +45,7 @@ #include #include +#include #include /**************************************************************************** @@ -74,7 +75,11 @@ int elf_verifyheader(FAR const Elf32_Ehdr *header); * Name: elf_read * * Description: - * Read 'readsize' bytes from the object file at 'offset' + * Read 'readsize' bytes from the object file at 'offset'. The data is + * read into 'buffer.' If 'buffer' is part of the ELF address environment, + * then the caller is responsibile for assuring that that address + * environment is in place before calling this function (i.e., that + * elf_addrenv_select() has been called if CONFIG_ADDRENV=y). * * Returned Value: * 0 (OK) is returned on success and a negated errno is returned on @@ -255,4 +260,82 @@ int elf_loadctors(FAR struct elf_loadinfo_s *loadinfo); int elf_loaddtors(FAR struct elf_loadinfo_s *loadinfo); #endif +/**************************************************************************** + * Name: elf_addrenv_alloc + * + * Description: + * Allocate memory for the ELF image (elfalloc). If CONFIG_ADDRENV=n, + * elfalloc will be allocated using kzalloc(). If CONFIG_ADDRENV-y, then + * elfalloc will be allocated using up_addrenv_create(). In either case, + * there will be a unique instance of elfalloc (and stack) for each + * instance of a process. + * + * Input Parameters: + * loadinfo - Load state information + * envsize - The size (in bytes) of the address environment needed for the + * ELF image. + * + * Returned Value: + * Zero (OK) on success; a negated errno value on failure. + * + ****************************************************************************/ + +int elf_addrenv_alloc(FAR struct elf_loadinfo_s *loadinfo, size_t envsize); + +/**************************************************************************** + * Name: elf_addrenv_select + * + * Description: + * Temporarity select the task's address environemnt. + * + * Input Parameters: + * loadinfo - Load state information + * + * Returned Value: + * Zero (OK) on success; a negated errno value on failure. + * + ****************************************************************************/ + +#ifdef CONFIG_ADDRENV +# define elf_addrenv_select(l) up_addrenv_select((l)->addrenv, &(l)->oldenv) +#endif + +/**************************************************************************** + * Name: elf_addrenv_restore + * + * Description: + * Restore the address environment before elf_addrenv_select() was called.. + * + * Input Parameters: + * loadinfo - Load state information + * + * Returned Value: + * Zero (OK) on success; a negated errno value on failure. + * + ****************************************************************************/ + +#ifdef CONFIG_ADDRENV +# define elf_addrenv_restore(l) up_addrenv_restore((l)->oldenv) +#endif + +/**************************************************************************** + * Name: elf_addrenv_free + * + * Description: + * Release the address environment previously created by + * elf_addrenv_alloc(). This function is called only under certain error + * conditions after the the module has been loaded but not yet started. + * After the module has been started, the address environment will + * automatically be freed when the module exits. + * + * Input Parameters: + * loadinfo - Load state information + * + * Returned Value: + * None. + * + ****************************************************************************/ + +void elf_addrenv_free(FAR struct elf_loadinfo_s *loadinfo); + #endif /* __BINFMT_LIBELF_LIBELF_H */ diff --git a/nuttx/binfmt/libelf/libelf_addrenv.c b/nuttx/binfmt/libelf/libelf_addrenv.c new file mode 100644 index 000000000..28cc0e108 --- /dev/null +++ b/nuttx/binfmt/libelf/libelf_addrenv.c @@ -0,0 +1,176 @@ +/**************************************************************************** + * binfmt/libelf/libelf_addrenv.c + * + * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include +#include + +#include +#include + +#include "libelf.h" + +/**************************************************************************** + * Pre-Processor Definitions + ****************************************************************************/ + +/**************************************************************************** + * Private Constant Data + ****************************************************************************/ + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: elf_addrenv_create + * + * Description: + * Allocate memory for the ELF image (elfalloc). If CONFIG_ADDRENV=n, + * elfalloc will be allocated using kzalloc(). If CONFIG_ADDRENV-y, then + * elfalloc will be allocated using up_addrenv_create(). In either case, + * there will be a unique instance of elfalloc (and stack) for each + * instance of a process. + * + * Input Parameters: + * loadinfo - Load state information + * envsize - The size (in bytes) of the address environment needed for the + * ELF image. + * + * Returned Value: + * Zero (OK) on success; a negated errno value on failure. + * + ****************************************************************************/ + +int elf_addrenv_create(FAR struct elf_loadinfo_s *loadinfo, size_t envsize) +{ +#ifdef CONFIG_ADDRENV + FAR void *vaddr; + int ret; + + /* Create an address environment for the new ELF task */ + + ret = up_addrenv_create(envsize, &loadinfo->addrenv); + if (ret < 0) + { + bdbg("ERROR: up_addrenv_create failed: %d\n", ret); + return ret; + } + + /* Get the virtual address associated with the start of the address + * environment. This is the base address that we will need to use to + * access the ELF image (but only if the address environment has been + * selected. + */ + + ret = up_addrenv_vaddr(loadinfo->addrenv, &vaddr); + if (ret < 0) + { + bdbg("ERROR: up_addrenv_vaddr failed: %d\n", ret); + return ret; + } + + loadinfo->elfalloc = (uintptr_t)vaddr; + return OK; +#else + /* Allocate memory to hold the ELF image */ + + loadinfo->elfalloc = (uintptr_t)kzalloc(envsize); + if (!loadinfo->elfalloc) + { + return -ENOMEM; + } + + return OK; +#endif +} + +/**************************************************************************** + * Name: elf_addrenv_free + * + * Description: + * Release the address environment previously created by + * elf_addrenv_create(). This function is called only under certain error + * conditions after the the module has been loaded but not yet started. + * After the module has been started, the address environment will + * automatically be freed when the module exits. + * + * Input Parameters: + * loadinfo - Load state information + * + * Returned Value: + * None. + * + ****************************************************************************/ + +void elf_addrenv_free(FAR struct elf_loadinfo_s *loadinfo) +{ +#ifdef CONFIG_ADDRENV + int ret; + + /* Free the address environemnt */ + + ret = up_addrenv_destroy(loadinfo->addrenv); + if (ret < 0) + { + bdbg("ERROR: up_addrenv_destroy failed: %d\n", ret); + } + + /* Clear out all indications of the allocated address environment */ + + loadinfo->elfalloc = 0; + loadinfo->elfsize = 0; + loadinfo->addrenv = 0; +#else + /* If there is an allocation for the ELF image, free it */ + + if (loadinfo->elfalloc != 0) + { + kfree((FAR void *)loadinfo->elfalloc); + loadinfo->elfalloc = 0; + } + + loadinfo->elfsize = 0; +#endif +} diff --git a/nuttx/binfmt/libelf/libelf_bind.c b/nuttx/binfmt/libelf/libelf_bind.c index e35087b1d..ccdb5108e 100644 --- a/nuttx/binfmt/libelf/libelf_bind.c +++ b/nuttx/binfmt/libelf/libelf_bind.c @@ -86,10 +86,10 @@ ****************************************************************************/ /**************************************************************************** - * Name: elf_readsym + * Name: elf_readrel * * Description: - * Read the ELFT symbol structure at the specfied index into memory. + * Read the ELF32_Rel structure into memory. * ****************************************************************************/ @@ -184,7 +184,7 @@ static int elf_relocate(FAR struct elf_loadinfo_s *loadinfo, int relidx, return ret; } - /* Calculate the relocation address */ + /* Calculate the relocation address. */ if (rel.r_offset < 0 || rel.r_offset > dstsec->sh_size - sizeof(uint32_t)) { @@ -195,14 +195,42 @@ static int elf_relocate(FAR struct elf_loadinfo_s *loadinfo, int relidx, addr = dstsec->sh_addr + rel.r_offset; + /* If CONFIG_ADDRENV=y, then 'addr' lies in a virtual address space that + * may not be in place now. elf_addrenv_select() will temporarily + * instantiate that address space. + */ + +#ifdef CONFIG_ADDRENV + ret = elf_addrenv_select(loadinfo); + if (ret < 0) + { + bdbg("ERROR: elf_addrenv_select() failed: %d\n", ret); + return ret; + } +#endif + /* Now perform the architecture-specific relocation */ ret = arch_relocate(&rel, &sym, addr); if (ret < 0) { - bdbg("Section %d reloc %d: Relocation failed: %d\n", ret); +#ifdef CONFIG_ADDRENV + (void)elf_addrenv_restore(loadinfo); +#endif + bdbg("ERROR: Section %d reloc %d: Relocation failed: %d\n", ret); + return ret; + } + + /* Restore the original address environment */ + +#ifdef CONFIG_ADDRENV + ret = elf_addrenv_restore(loadinfo); + if (ret < 0) + { + bdbg("ERROR: elf_addrenv_restore() failed: %d\n", ret); return ret; } +#endif } return OK; diff --git a/nuttx/binfmt/libelf/libelf_load.c b/nuttx/binfmt/libelf/libelf_load.c index b1ac44e21..0e4ad9798 100644 --- a/nuttx/binfmt/libelf/libelf_load.c +++ b/nuttx/binfmt/libelf/libelf_load.c @@ -49,7 +49,6 @@ #include #include -#include #include #include "libelf.h" @@ -135,11 +134,12 @@ static inline int elf_loadfile(FAR struct elf_loadinfo_s *loadinfo) int i; /* Allocate (and zero) memory for the ELF file. */ - - loadinfo->elfalloc = (uintptr_t)kzalloc(loadinfo->elfsize); - if (!loadinfo->elfalloc) + + ret = elf_addrenv_alloc(loadinfo, loadinfo->elfsize); + if (ret < 0) { - return -ENOMEM; + bdbg("ERROR: elf_addrenv_alloc() failed: %d\n", ret); + return ret; } /* Read each section into memory that is marked SHF_ALLOC + SHT_NOBITS */ @@ -165,6 +165,20 @@ static inline int elf_loadfile(FAR struct elf_loadinfo_s *loadinfo) if (shdr->sh_type != SHT_NOBITS) { + /* If CONFIG_ADDRENV=y, then 'dest' lies in a virtual address space + * that may not be in place now. elf_addrenv_select() will + * temporarily instantiate that address space. + */ + +#ifdef CONFIG_ADDRENV + ret = elf_addrenv_select(loadinfo); + if (ret < 0) + { + bdbg("ERROR: elf_addrenv_select() failed: %d\n", ret); + return ret; + } +#endif + /* Read the section data from sh_offset to dest */ ret = elf_read(loadinfo, dest, shdr->sh_size, shdr->sh_offset); @@ -173,6 +187,17 @@ static inline int elf_loadfile(FAR struct elf_loadinfo_s *loadinfo) bdbg("Failed to read section %d: %d\n", i, ret); return ret; } + + /* Restore the original address environment */ + +#ifdef CONFIG_ADDRENV + ret = elf_addrenv_restore(loadinfo); + if (ret < 0) + { + bdbg("ERROR: elf_addrenv_restore() failed: %d\n", ret); + return ret; + } +#endif } /* Update sh_addr to point to copy in memory */ diff --git a/nuttx/binfmt/libelf/libelf_read.c b/nuttx/binfmt/libelf/libelf_read.c index da41212f2..f4b725183 100644 --- a/nuttx/binfmt/libelf/libelf_read.c +++ b/nuttx/binfmt/libelf/libelf_read.c @@ -98,7 +98,11 @@ static inline void elf_dumpreaddata(char *buffer, int buflen) * Name: elf_read * * Description: - * Read 'readsize' bytes from the object file at 'offset' + * Read 'readsize' bytes from the object file at 'offset'. The data is + * read into 'buffer.' If 'buffer' is part of the ELF address environment, + * then the caller is responsibile for assuring that that address + * environment is in place before calling this function (i.e., that + * elf_addrenv_select() has been called if CONFIG_ADDRENV=y). * * Returned Value: * 0 (OK) is returned on success and a negated errno is returned on diff --git a/nuttx/binfmt/libelf/libelf_unload.c b/nuttx/binfmt/libelf/libelf_unload.c index 532fc606f..539e5faf7 100644 --- a/nuttx/binfmt/libelf/libelf_unload.c +++ b/nuttx/binfmt/libelf/libelf_unload.c @@ -67,8 +67,9 @@ * Name: elf_unload * * Description: - * This function unloads the object from memory. This essentially - * undoes the actions of elf_load. + * This function unloads the object from memory. This essentially undoes + * the actions of elf_load. It is called only under certain error + * conditions after the the module has been loaded but not yet started. * * Returned Value: * 0 (OK) is returned on success and a negated errno is returned on @@ -84,13 +85,7 @@ int elf_unload(struct elf_loadinfo_s *loadinfo) /* Release memory holding the relocated ELF image */ - if (loadinfo->elfalloc != 0) - { - kfree((FAR void *)loadinfo->elfalloc); - loadinfo->elfalloc = 0; - } - - loadinfo->elfsize = 0; + elf_addrenv_free(loadinfo); /* Release memory used to hold static constructors and destructors */ diff --git a/nuttx/binfmt/libnxflat/Make.defs b/nuttx/binfmt/libnxflat/Make.defs index 4f522e52b..6a0bf1873 100644 --- a/nuttx/binfmt/libnxflat/Make.defs +++ b/nuttx/binfmt/libnxflat/Make.defs @@ -41,9 +41,9 @@ BINFMT_CSRCS += nxflat.c # NXFLAT library -BINFMT_CSRCS += libnxflat_init.c libnxflat_uninit.c libnxflat_load.c \ - libnxflat_unload.c libnxflat_verify.c libnxflat_read.c \ - libnxflat_bind.c +BINFMT_CSRCS += libnxflat_init.c libnxflat_uninit.c libnxflat_addrenv.c +BINFMT_CSRCS += libnxflat_load.c libnxflat_unload.c libnxflat_verify.c +BINFMT_CSRCS += libnxflat_read.c libnxflat_bind.c # Hook the libnxflat subdirectory into the build diff --git a/nuttx/binfmt/libnxflat/libnxflat.h b/nuttx/binfmt/libnxflat/libnxflat.h new file mode 100644 index 000000000..cb1cb7057 --- /dev/null +++ b/nuttx/binfmt/libnxflat/libnxflat.h @@ -0,0 +1,136 @@ +/**************************************************************************** + * binfmt/libnxflat/libnxflat.h + * + * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +#ifndef __BINFMT_LIBNXFLAT_LIBNXFLAT_H +#define __BINFMT_LIBNXFLAT_LIBNXFLAT_H + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include + +#include +#include + +/**************************************************************************** + * Pre-processor Definitions + ****************************************************************************/ + +/**************************************************************************** + * Public Types + ****************************************************************************/ + +/**************************************************************************** + * Name: nxflat_addrenv_alloc + * + * Description: + * Allocate memory for the ELF image (elfalloc). If CONFIG_ADDRENV=n, + * elfalloc will be allocated using kzalloc(). If CONFIG_ADDRENV-y, then + * elfalloc will be allocated using up_addrenv_create(). In either case, + * there will be a unique instance of elfalloc (and stack) for each + * instance of a process. + * + * Input Parameters: + * loadinfo - Load state information + * envsize - The size (in bytes) of the address environment needed for the + * ELF image. + * + * Returned Value: + * Zero (OK) on success; a negated errno value on failure. + * + ****************************************************************************/ + +int nxflat_addrenv_alloc(FAR struct nxflat_loadinfo_s *loadinfo, size_t envsize); + +/**************************************************************************** + * Name: nxflat_addrenv_select + * + * Description: + * Temporarity select the task's address environemnt. + * + * Input Parameters: + * loadinfo - Load state information + * + * Returned Value: + * Zero (OK) on success; a negated errno value on failure. + * + ****************************************************************************/ + +#ifdef CONFIG_ADDRENV +# define nxflat_addrenv_select(l) up_addrenv_select((l)->addrenv, &(l)->oldenv) +#endif + +/**************************************************************************** + * Name: nxflat_addrenv_restore + * + * Description: + * Restore the address environment before nxflat_addrenv_select() was called.. + * + * Input Parameters: + * loadinfo - Load state information + * + * Returned Value: + * Zero (OK) on success; a negated errno value on failure. + * + ****************************************************************************/ + +#ifdef CONFIG_ADDRENV +# define nxflat_addrenv_restore(l) up_addrenv_restore((l)->oldenv) +#endif + +/**************************************************************************** + * Name: nxflat_addrenv_free + * + * Description: + * Release the address environment previously created by + * nxflat_addrenv_create(). This function is called only under certain + * error conditions after the the module has been loaded but not yet + * started. After the module has been started, the address environment + * will automatically be freed when the module exits. + * + * Input Parameters: + * loadinfo - Load state information + * + * Returned Value: + * None. + * + ****************************************************************************/ + +void nxflat_addrenv_free(FAR struct nxflat_loadinfo_s *loadinfo); + +#endif /* __BINFMT_LIBNXFLAT_LIBNXFLAT_H */ diff --git a/nuttx/binfmt/libnxflat/libnxflat_addrenv.c b/nuttx/binfmt/libnxflat/libnxflat_addrenv.c new file mode 100644 index 000000000..c6b3fce34 --- /dev/null +++ b/nuttx/binfmt/libnxflat/libnxflat_addrenv.c @@ -0,0 +1,234 @@ +/**************************************************************************** + * binfmt/libnxflat/libnxflat_addrenv.c + * + * Copyright (C) 2012 Gregory Nutt. All rights reserved. + * Author: Gregory Nutt + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * 3. Neither the name NuttX nor the names of its contributors may be + * used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS + * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED + * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN + * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************/ + +/**************************************************************************** + * Included Files + ****************************************************************************/ + +#include + +#include +#include + +#include +#include + +#include "libnxflat.h" + +/**************************************************************************** + * Pre-Processor Definitions + ****************************************************************************/ + +/**************************************************************************** + * Private Constant Data + ****************************************************************************/ + +/**************************************************************************** + * Private Functions + ****************************************************************************/ + +/**************************************************************************** + * Public Functions + ****************************************************************************/ + +/**************************************************************************** + * Name: nxflat_addrenv_create + * + * Description: + * Allocate memory for the ELF image (elfalloc). If CONFIG_ADDRENV=n, + * elfalloc will be allocated using kzalloc(). If CONFIG_ADDRENV-y, then + * elfalloc will be allocated using up_addrenv_create(). In either case, + * there will be a unique instance of elfalloc (and stack) for each + * instance of a process. + * + * Input Parameters: + * loadinfo - Load state information + * envsize - The size (in bytes) of the address environment needed for the + * ELF image. + * + * Returned Value: + * Zero (OK) on success; a negated errno value on failure. + * + ****************************************************************************/ + +int nxflat_addrenv_create(FAR struct nxflat_loadinfo_s *loadinfo, size_t envsize) +{ + FAR struct dspace_s *dspace; +#ifdef CONFIG_ADDRENV + FAR void *vaddr; + hw_addrenv_t oldenv; + int ret; +#endif + + DEBUGASSERT(!loadinfo->dspace); + + /* Allocate the struct dspace_s container for the D-Space allocation */ + + dspace = (FAR struct dspace_s *)kmalloc(sizeof(struct dspace_s)); + if (dspace == 0) + { + bdbg("ERROR: Failed to allocate DSpace\n"); + return -ENOMEM; + } + +#ifdef CONFIG_ADDRENV + /* Create a D-Space address environment for the new NXFLAT task */ + + ret = up_addrenv_create(envsize, &loadinfo->addrenv); + if (ret < 0) + { + bdbg("ERROR: up_addrenv_create failed: %d\n", ret); + goto errout_with_dspace; + } + + /* Get the virtual address associated with the start of the address + * environment. This is the base address that we will need to use to + * access the D-Space region (but only if the address environment has been + * selected. + */ + + ret = up_addrenv_vaddr(loadinfo->addrenv, &vaddr); + if (ret < 0) + { + bdbg("ERROR: up_addrenv_vaddr failed: %d\n", ret); + goto errout_with_addrenv; + } + + /* Clear all of the allocated D-Space memory. We have to temporarily + * selected the D-Space address environment to do this. + */ + + ret = up_addrenv_select(loadinfo->addrenv, &oldenv); + if (ret < 0) + { + bdbg("ERROR: up_addrenv_select failed: %d\n", ret); + goto errout_with_addrenv; + } + + memset(vaddr, 0, envsize); + + ret = up_addrenv_restore(oldenv); + if (ret < 0) + { + bdbg("ERROR: up_addrenv_restore failed: %d\n", ret); + goto errout_with_addrenv; + } + + /* Success... save the fruits of our labor */ + + loadinfo->dspace = dspace; + dspace->crefs = 1; + dspace->region = (FAR uint8_t *)vaddr; + return OK; + +errout_with_addrenv: + (void)up_addrenv_destroy(loadinfo->addrenv); + loadinfo->addrenv = 0; + +errout_with_dspace: + kfree(dspace); + return ret; +#else + /* Allocate (and zero) memory to hold the ELF image */ + + dspace->region = (FAR uint8_t *)kzalloc(envsize); + if (!dspace->region) + { + kfree(dspace); + return -ENOMEM; + } + + loadinfo->dspace = dspace; + dspace->crefs = 1; + return OK; +#endif +} + +/**************************************************************************** + * Name: nxflat_addrenv_free + * + * Description: + * Release the address environment previously created by + * nxflat_addrenv_create(). This function is called only under certain + * error conditions after the the module has been loaded but not yet + * started. After the module has been started, the address environment + * will automatically be freed when the module exits. + * + * Input Parameters: + * loadinfo - Load state information + * + * Returned Value: + * None. + * + ****************************************************************************/ + +void nxflat_addrenv_free(FAR struct nxflat_loadinfo_s *loadinfo) +{ + FAR struct dspace_s *dspace; +#ifdef CONFIG_ADDRENV + int ret; +#endif + + DEBUGASSERT(loadinfo); + dspace = loadinfo->dspace; + + if (dspace) + { +#ifdef CONFIG_ADDRENV + /* Destroy the address environment */ + + ret = up_addrenv_destroy(loadinfo->addrenv); + if (ret < 0) + { + bdbg("ERROR: up_addrenv_destroy failed: %d\n", ret); + } + + loadinfo->addrenv = 0; +#else + /* Free the allocated D-Space region */ + + if (dspace->region) + { + kfree(dspace->region); + } +#endif + + /* Now destroy the D-Space container */ + + DEBUGASSERT(dspace->crefs == 1); + kfree(dspace); + loadinfo->dspace = NULL; + } +} diff --git a/nuttx/binfmt/libnxflat/libnxflat_bind.c b/nuttx/binfmt/libnxflat/libnxflat_bind.c index 2b9f64715..3a86d5355 100644 --- a/nuttx/binfmt/libnxflat/libnxflat_bind.c +++ b/nuttx/binfmt/libnxflat/libnxflat_bind.c @@ -47,9 +47,12 @@ #include #include + #include #include +#include "libnxflat.h" + /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ @@ -229,8 +232,6 @@ static inline int nxflat_gotrelocs(FAR struct nxflat_loadinfo_s *loadinfo) hdr = (FAR struct nxflat_hdr_s*)loadinfo->ispace; - /* From this, we can get the list of relocation entries. */ - /* From this, we can get the offset to the list of relocation entries */ offset = ntohl(hdr->h_relocstart); @@ -252,6 +253,22 @@ static inline int nxflat_gotrelocs(FAR struct nxflat_loadinfo_s *loadinfo) bvdbg("isize: %08lx dpsace: %p relocs: %p\n", (long)loadinfo->isize, loadinfo->dspace->region, relocs); + /* All relocations are performed within the D-Space allocation. If + * CONFIG_ADDRENV=y, then that D-Space allocation lies in an address + * environment that may not be in place. So, in that case, we must call + * nxflat_addrenv_select to temporarily instantiate that address space + * before the relocations can be performed. + */ + +#ifdef CONFIG_ADDRENV + ret = nxflat_addrenv_select(loadinfo); + if (ret < 0) + { + bdbg("ERROR: nxflat_addrenv_select() failed: %d\n", ret); + return ret; + } +#endif + /* Now, traverse the relocation list of and bind each GOT relocation. */ ret = OK; /* Assume success */ @@ -329,6 +346,16 @@ static inline int nxflat_gotrelocs(FAR struct nxflat_loadinfo_s *loadinfo) } #endif + /* Restore the original address environment */ + +#ifdef CONFIG_ADDRENV + ret = nxflat_addrenv_restore(loadinfo); + if (ret < 0) + { + bdbg("ERROR: nxflat_addrenv_restore() failed: %d\n", ret); + } +#endif + return ret; } @@ -346,16 +373,19 @@ static inline int nxflat_gotrelocs(FAR struct nxflat_loadinfo_s *loadinfo) ****************************************************************************/ static inline int nxflat_bindimports(FAR struct nxflat_loadinfo_s *loadinfo, - FAR const struct symtab_s *exports, - int nexports) + FAR const struct symtab_s *exports, + int nexports) { FAR struct nxflat_import_s *imports; FAR struct nxflat_hdr_s *hdr; - FAR const struct symtab_s *symbol; + FAR const struct symtab_s *symbol; char *symname; uint32_t offset; uint16_t nimports; +#ifdef CONFIG_ADDRENV + int ret; +#endif int i; /* The NXFLAT header is the first thing at the beginning of the ISpace. */ @@ -370,6 +400,22 @@ static inline int nxflat_bindimports(FAR struct nxflat_loadinfo_s *loadinfo, nimports = ntohs(hdr->h_importcount); bvdbg("Imports offset: %08x nimports: %d\n", offset, nimports); + /* The import[] table resides within the D-Space allocation. If + * CONFIG_ADDRENV=y, then that D-Space allocation lies in an address + * environment that may not be in place. So, in that case, we must call + * nxflat_addrenv_select to temporarily instantiate that address space + * before the import[] table can be modified. + */ + +#ifdef CONFIG_ADDRENV + ret = nxflat_addrenv_select(loadinfo); + if (ret < 0) + { + bdbg("ERROR: nxflat_addrenv_select() failed: %d\n", ret); + return ret; + } +#endif + /* Verify that this module requires imported symbols */ if (offset != 0 && nimports > 0) @@ -421,6 +467,9 @@ static inline int nxflat_bindimports(FAR struct nxflat_loadinfo_s *loadinfo, if (!symbol) { bdbg("Exported symbol \"%s\" not found\n", symname); +#ifdef CONFIG_ADDRENV + (void)nxflat_addrenv_restore(loadinfo); +#endif return -ENOENT; } @@ -442,7 +491,73 @@ static inline int nxflat_bindimports(FAR struct nxflat_loadinfo_s *loadinfo, } #endif + /* Restore the original address environment */ + +#ifdef CONFIG_ADDRENV + ret = nxflat_addrenv_restore(loadinfo); + if (ret < 0) + { + bdbg("ERROR: nxflat_addrenv_restore() failed: %d\n", ret); + } + + return ret; +#else return OK; +#endif +} + +/**************************************************************************** + * Name: nxflat_clearbss + * + * Description: + * Clear uninitialized .bss memory + * + * Returned Value: + * 0 (OK) is returned on success and a negated errno is returned on + * failure. + * + ****************************************************************************/ + +static inline int nxflat_clearbss(FAR struct nxflat_loadinfo_s *loadinfo) +{ +#ifdef CONFIG_ADDRENV + int ret; +#endif + + /* .bss resides within the D-Space allocation. If CONFIG_ADDRENV=y, then + * that D-Space allocation lies in an address environment that may not be + * in place. So, in that case, we must call nxflat_addrenv_select to + * temporarily instantiate that address space before the .bss can be + * accessed. + */ + +#ifdef CONFIG_ADDRENV + ret = nxflat_addrenv_select(loadinfo); + if (ret < 0) + { + bdbg("ERROR: nxflat_addrenv_select() failed: %d\n", ret); + return ret; + } +#endif + + /* Zero the BSS area */ + + memset((void*)(loadinfo->dspace->region + loadinfo->datasize), 0, + loadinfo->bsssize); + + /* Restore the original address environment */ + +#ifdef CONFIG_ADDRENV + ret = nxflat_addrenv_restore(loadinfo); + if (ret < 0) + { + bdbg("ERROR: nxflat_addrenv_restore() failed: %d\n", ret); + } + + return ret; +#else + return OK; +#endif } /**************************************************************************** @@ -484,8 +599,7 @@ int nxflat_bind(FAR struct nxflat_loadinfo_s *loadinfo, * space in the loaded file. */ - memset((void*)(loadinfo->dspace->region + loadinfo->datasize), - 0, loadinfo->bsssize); + ret = nxflat_clearbss(loadinfo); } } diff --git a/nuttx/binfmt/libnxflat/libnxflat_load.c b/nuttx/binfmt/libnxflat/libnxflat_load.c index b6693ea36..5f13b577a 100644 --- a/nuttx/binfmt/libnxflat/libnxflat_load.c +++ b/nuttx/binfmt/libnxflat/libnxflat_load.c @@ -41,6 +41,7 @@ #include #include + #include #include #include @@ -48,8 +49,11 @@ #include #include + #include +#include "libnxflat.h" + /**************************************************************************** * Pre-Processor Definitions ****************************************************************************/ @@ -143,7 +147,7 @@ int nxflat_load(struct nxflat_loadinfo_s *loadinfo) */ loadinfo->ispace = (uint32_t)mmap(NULL, loadinfo->isize, PROT_READ, - MAP_SHARED|MAP_FILE, loadinfo->filfd, 0); + MAP_SHARED|MAP_FILE, loadinfo->filfd, 0); if (loadinfo->ispace == (uint32_t)MAP_FAILED) { bdbg("Failed to map NXFLAT ISpace: %d\n", errno); @@ -152,23 +156,37 @@ int nxflat_load(struct nxflat_loadinfo_s *loadinfo) bvdbg("Mapped ISpace (%d bytes) at %08x\n", loadinfo->isize, loadinfo->ispace); - /* The following call will give a pointer to the allocated but - * uninitialized ISpace memory. + /* The following call allocate D-Space memory and will provide a pointer + * to the allocated (but still uninitialized) D-Space memory. */ - loadinfo->dspace = (struct dspace_s *)malloc(SIZEOF_DSPACE_S(loadinfo->dsize)); - if (loadinfo->dspace == 0) + ret = nxflat_addrenv_alloc(loadinfo, loadinfo->dsize); + if (ret < 0) { - bdbg("Failed to allocate DSpace\n"); - ret = -ENOMEM; - goto errout; + bdbg("ERROR: nxflat_addrenv_alloc() failed: %d\n", ret); + return ret; } - loadinfo->dspace->crefs = 1; - bvdbg("Allocated DSpace (%d bytes) at %p\n", loadinfo->dsize, loadinfo->dspace->region); + bvdbg("Allocated DSpace (%d bytes) at %p\n", + loadinfo->dsize, loadinfo->dspace->region); - /* Now, read the data into allocated DSpace at doffset into the - * allocated DSpace memory. + /* If CONFIG_ADDRENV=y, then the D-Space allocation lies in an address + * environment that may not be in place. So, in that case, we must call + * nxflat_addrenv_select to temporarily instantiate that address space + * it can be initialized. + */ + +#ifdef CONFIG_ADDRENV + ret = nxflat_addrenv_select(loadinfo); + if (ret < 0) + { + bdbg("ERROR: nxflat_addrenv_select() failed: %d\n", ret); + return ret; + } +#endif + + /* Now, read the data into allocated DSpace at doffset into the allocated + * DSpace memory. */ ret = nxflat_read(loadinfo, (char*)loadinfo->dspace->region, dreadsize, doffset); @@ -181,9 +199,23 @@ int nxflat_load(struct nxflat_loadinfo_s *loadinfo) bvdbg("TEXT: %08x Entry point offset: %08x Data offset: %08x\n", loadinfo->ispace, loadinfo->entryoffs, doffset); + /* Restore the original address environment */ + +#ifdef CONFIG_ADDRENV + ret = nxflat_addrenv_restore(loadinfo); + if (ret < 0) + { + bdbg("ERROR: nxflat_addrenv_restore() failed: %d\n", ret); + return ret; + } +#endif + return OK; errout: +#ifdef CONFIG_ADDRENV + (void)nxflat_addrenv_restore(loadinfo); +#endif (void)nxflat_unload(loadinfo); return ret; } diff --git a/nuttx/binfmt/libnxflat/libnxflat_unload.c b/nuttx/binfmt/libnxflat/libnxflat_unload.c index 47c30bd55..71d0c8499 100644 --- a/nuttx/binfmt/libnxflat/libnxflat_unload.c +++ b/nuttx/binfmt/libnxflat/libnxflat_unload.c @@ -40,11 +40,15 @@ #include #include + #include #include +#include #include +#include "libnxflat.h" + /**************************************************************************** * Pre-Processor Definitions ****************************************************************************/ @@ -65,8 +69,9 @@ * Name: nxflat_unload * * Description: - * This function unloads the object from memory. This essentially - * undoes the actions of nxflat_load. + * This function unloads the object from memory. This essentially undoes + * the actions of nxflat_load. It is called only under certain error + * conditions after the the module has been loaded but not yet started. * * Returned Value: * 0 (OK) is returned on success and a negated errno is returned on @@ -76,9 +81,8 @@ int nxflat_unload(struct nxflat_loadinfo_s *loadinfo) { - /* Reset the contents of the info structure. */ - /* Release the memory segments */ + /* Release the I-Space mmap'ed file */ if (loadinfo->ispace) { @@ -86,12 +90,9 @@ int nxflat_unload(struct nxflat_loadinfo_s *loadinfo) loadinfo->ispace = 0; } - if (loadinfo->dspace) - { - free((void*)loadinfo->dspace); - loadinfo->dspace = 0; - } + /* Release the D-Space address environment */ + nxflat_addrenv_free(loadinfo); return OK; } diff --git a/nuttx/binfmt/nxflat.c b/nuttx/binfmt/nxflat.c index 5973a96a9..db29941ca 100644 --- a/nuttx/binfmt/nxflat.c +++ b/nuttx/binfmt/nxflat.c @@ -187,10 +187,31 @@ static int nxflat_loadbinary(struct binary_s *binp) binp->entrypt = (main_t)(loadinfo.ispace + loadinfo.entryoffs); binp->mapped = (void*)loadinfo.ispace; - binp->alloc[0] = (void*)loadinfo.dspace; binp->mapsize = loadinfo.isize; binp->stacksize = loadinfo.stacksize; + /* Add the ELF allocation to the alloc[] only if there is no address + * enironment. If there is an address environment, it will automatically + * be freed when the function exits + * + * REVISIT: If the module is loaded then unloaded, wouldn't this cause + * a memory leak? + */ + +#ifdef CONFIG_ADDRENV +# warning "REVISIT" +#else + binp->alloc[0] = (void*)loadinfo.dspace; +#endif + +#ifdef CONFIG_ADDRENV + /* Save the address environment. This will be needed when the module is + * executed for the up_addrenv_assign() call. + */ + + binp->addrenv = loadinfo.addrenv; +#endif + nxflat_dumpbuffer("Entry code", (FAR const uint8_t*)binp->entrypt, MIN(loadinfo.isize - loadinfo.entryoffs, 512)); diff --git a/nuttx/configs/eagle100/httpd/setenv.sh b/nuttx/configs/eagle100/httpd/setenv.sh index 9022695a4..d22bf6f91 100755 --- a/nuttx/configs/eagle100/httpd/setenv.sh +++ b/nuttx/configs/eagle100/httpd/setenv.sh @@ -32,15 +32,31 @@ # POSSIBILITY OF SUCH DAMAGE. # -if [ "$(basename $0)" = "setenv.sh" ] ; then +if [ "$_" = "$0" ] ; then echo "You must source this script, not run it!" 1>&2 exit 1 fi -if [ -z "${PATH_ORIG}" ]; then export PATH_ORIG="${PATH}"; fi - WD=`pwd` -export BUILDROOT_BIN="${WD}/../misc/buildroot/build_arm_nofpu/staging_dir/bin" -export PATH="${BUILDROOT_BIN}:/sbin:/usr/sbin:${PATH_ORIG}" +if [ ! -x "setenv.sh" ]; then + echo "This script must be executed from the top-level NuttX build directory" + exit 1 +fi + +if [ -z "${PATH_ORIG}" ]; then + export PATH_ORIG="${PATH}" +fi + +# This is the Cygwin path to the location where I installed the CodeSourcery +# toolchain under windows. You will also have to edit this if you install +# the CodeSourcery toolchain in any other location +export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/CodeSourcery/Sourcery G++ Lite/bin" + +# This is the Cygwin path to the location where I build the buildroot +# toolchain. +#export TOOLCHAIN_BIN="${WD}/../misc/buildroot/build_arm_nofpu/staging_dir/bin" + +# Add the path to the toolchain to the PATH varialble +export PATH="${TOOLCHAIN_BIN}:/sbin:/usr/sbin:${PATH_ORIG}" echo "PATH : ${PATH}" diff --git a/nuttx/configs/eagle100/nettest/setenv.sh b/nuttx/configs/eagle100/nettest/setenv.sh index f03beff85..37cc7735c 100755 --- a/nuttx/configs/eagle100/nettest/setenv.sh +++ b/nuttx/configs/eagle100/nettest/setenv.sh @@ -32,15 +32,31 @@ # POSSIBILITY OF SUCH DAMAGE. # -if [ "$(basename $0)" = "setenv.sh" ] ; then +if [ "$_" = "$0" ] ; then echo "You must source this script, not run it!" 1>&2 exit 1 fi -if [ -z "${PATH_ORIG}" ]; then export PATH_ORIG="${PATH}"; fi - WD=`pwd` -export BUILDROOT_BIN="${WD}/../misc/buildroot/build_arm_nofpu/staging_dir/bin" -export PATH="${BUILDROOT_BIN}:/sbin:/usr/sbin:${PATH_ORIG}" +if [ ! -x "setenv.sh" ]; then + echo "This script must be executed from the top-level NuttX build directory" + exit 1 +fi + +if [ -z "${PATH_ORIG}" ]; then + export PATH_ORIG="${PATH}" +fi + +# This is the Cygwin path to the location where I installed the CodeSourcery +# toolchain under windows. You will also have to edit this if you install +# the CodeSourcery toolchain in any other location +export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/CodeSourcery/Sourcery G++ Lite/bin" + +# This is the Cygwin path to the location where I build the buildroot +# toolchain. +#export TOOLCHAIN_BIN="${WD}/../misc/buildroot/build_arm_nofpu/staging_dir/bin" + +# Add the path to the toolchain to the PATH varialble +export PATH="${TOOLCHAIN_BIN}:/sbin:/usr/sbin:${PATH_ORIG}" echo "PATH : ${PATH}" diff --git a/nuttx/configs/eagle100/nsh/setenv.sh b/nuttx/configs/eagle100/nsh/setenv.sh index c64bfed54..cd8710503 100755 --- a/nuttx/configs/eagle100/nsh/setenv.sh +++ b/nuttx/configs/eagle100/nsh/setenv.sh @@ -32,15 +32,31 @@ # POSSIBILITY OF SUCH DAMAGE. # -if [ "$(basename $0)" = "setenv.sh" ] ; then +if [ "$_" = "$0" ] ; then echo "You must source this script, not run it!" 1>&2 exit 1 fi -if [ -z "${PATH_ORIG}" ]; then export PATH_ORIG="${PATH}"; fi - WD=`pwd` -export BUILDROOT_BIN="${WD}/../misc/buildroot/build_arm_nofpu/staging_dir/bin" -export PATH="${BUILDROOT_BIN}:/sbin:/usr/sbin:${PATH_ORIG}" +if [ ! -x "setenv.sh" ]; then + echo "This script must be executed from the top-level NuttX build directory" + exit 1 +fi + +if [ -z "${PATH_ORIG}" ]; then + export PATH_ORIG="${PATH}" +fi + +# This is the Cygwin path to the location where I installed the CodeSourcery +# toolchain under windows. You will also have to edit this if you install +# the CodeSourcery toolchain in any other location +export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/CodeSourcery/Sourcery G++ Lite/bin" + +# This is the Cygwin path to the location where I build the buildroot +# toolchain. +#export TOOLCHAIN_BIN="${WD}/../misc/buildroot/build_arm_nofpu/staging_dir/bin" + +# Add the path to the toolchain to the PATH varialble +export PATH="${TOOLCHAIN_BIN}:/sbin:/usr/sbin:${PATH_ORIG}" echo "PATH : ${PATH}" diff --git a/nuttx/configs/eagle100/nxflat/setenv.sh b/nuttx/configs/eagle100/nxflat/setenv.sh index 2335de190..771be4ec6 100755 --- a/nuttx/configs/eagle100/nxflat/setenv.sh +++ b/nuttx/configs/eagle100/nxflat/setenv.sh @@ -32,15 +32,31 @@ # POSSIBILITY OF SUCH DAMAGE. # -if [ "$(basename $0)" = "setenv.sh" ] ; then +if [ "$_" = "$0" ] ; then echo "You must source this script, not run it!" 1>&2 exit 1 fi -if [ -z "${PATH_ORIG}" ]; then export PATH_ORIG="${PATH}"; fi - WD=`pwd` -export BUILDROOT_BIN="${WD}/../misc/buildroot/build_arm_nofpu/staging_dir/bin" -export PATH="${BUILDROOT_BIN}:/sbin:/usr/sbin:${PATH_ORIG}" +if [ ! -x "setenv.sh" ]; then + echo "This script must be executed from the top-level NuttX build directory" + exit 1 +fi + +if [ -z "${PATH_ORIG}" ]; then + export PATH_ORIG="${PATH}" +fi + +# This is the Cygwin path to the location where I installed the CodeSourcery +# toolchain under windows. You will also have to edit this if you install +# the CodeSourcery toolchain in any other location +export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/CodeSourcery/Sourcery G++ Lite/bin" + +# This is the Cygwin path to the location where I build the buildroot +# toolchain. +#export TOOLCHAIN_BIN="${WD}/../misc/buildroot/build_arm_nofpu/staging_dir/bin" + +# Add the path to the toolchain to the PATH varialble +export PATH="${TOOLCHAIN_BIN}:/sbin:/usr/sbin:${PATH_ORIG}" echo "PATH : ${PATH}" diff --git a/nuttx/include/nuttx/binfmt/binfmt.h b/nuttx/include/nuttx/binfmt/binfmt.h index 2e2c6dda8..6df5190d2 100644 --- a/nuttx/include/nuttx/binfmt/binfmt.h +++ b/nuttx/include/nuttx/binfmt/binfmt.h @@ -41,8 +41,11 @@ ****************************************************************************/ #include + #include #include + +#include #include /**************************************************************************** @@ -93,12 +96,26 @@ struct binary_s main_t entrypt; /* Entry point into a program module */ FAR void *mapped; /* Memory-mapped, address space */ FAR void *alloc[BINFMT_NALLOC]; /* Allocated address spaces */ + + /* Constructors/destructors */ + #ifdef CONFIG_BINFMT_CONSTRUCTORS FAR binfmt_ctor_t *ctors; /* Pointer to a list of constructors */ FAR binfmt_dtor_t *dtors; /* Pointer to a list of destructors */ uint16_t nctors; /* Number of constructors in the list */ uint16_t ndtors; /* Number of destructors in the list */ #endif + + /* Address environment. + * + * addrenv - This is the handle created by up_addrenv_create() that can be + * used to manage the tasks address space. + */ + +#ifdef CONFIG_ADDRENV + task_addrenv_t addrenv; /* Task address environment */ +#endif + size_t mapsize; /* Size of the mapped address region (needed for munmap) */ size_t stacksize; /* Size of the stack in bytes (unallocated) */ }; diff --git a/nuttx/include/nuttx/binfmt/elf.h b/nuttx/include/nuttx/binfmt/elf.h index 432e57f0f..6b6851934 100644 --- a/nuttx/include/nuttx/binfmt/elf.h +++ b/nuttx/include/nuttx/binfmt/elf.h @@ -59,6 +59,18 @@ # define CONFIG_ELF_ALIGN_LOG2 2 #endif +#ifndef CONFIG_ELF_STACKSIZE +# define CONFIG_ELF_STACKSIZE 2048 +#endif + +#ifndef CONFIG_ELF_BUFFERSIZE +# define CONFIG_ELF_BUFFERSIZE 128 +#endif + +#ifndef CONFIG_ELF_BUFFERINCR +# define CONFIG_ELF_BUFFERINCR 32 +#endif + /* Allocation array size and indices */ #define LIBELF_ELF_ALLOC 0 @@ -80,8 +92,16 @@ struct elf_loadinfo_s { - /* The alloc[] array holds memory that persists after the ELF module has - * been loaded. + /* elfalloc is the base address of the memory that is allocated to hold the + * ELF program image. + * + * If CONFIG_ADDRENV=n, elfalloc will be allocated using kmalloc() (or + * kzalloc()). If CONFIG_ADDRENV-y, then elfalloc will be allocated using + * up_addrenv_create(). In either case, there will be a unique instance + * of elfalloc (and stack) for each instance of a process. + * + * The alloc[] array in struct binary_s will hold memory that persists after + * the ELF module has been loaded. */ uintptr_t elfalloc; /* Memory allocated when ELF file was loaded */ @@ -90,6 +110,9 @@ struct elf_loadinfo_s Elf32_Ehdr ehdr; /* Buffered ELF file header */ FAR Elf32_Shdr *shdr; /* Buffered ELF section headers */ uint8_t *iobuffer; /* File I/O buffer */ + + /* Constructors and destructors */ + #ifdef CONFIG_BINFMT_CONSTRUCTORS FAR void *ctoralloc; /* Memory allocated for ctors */ FAR void *dtoralloc; /* Memory allocated dtors */ @@ -98,6 +121,20 @@ struct elf_loadinfo_s uint16_t nctors; /* Number of constructors */ uint16_t ndtors; /* Number of destructors */ #endif + + /* Address environment. + * + * addrenv - This is the handle created by up_addrenv_create() that can be + * used to manage the tasks address space. + * oldenv - This is a value returned by up_addrenv_select() that must be + * used to restore the current hardware address environment. + */ + +#ifdef CONFIG_ADDRENV + task_addrenv_t addrenv; /* Task address environment */ + hw_addrenv_t oldenv; /* Saved hardware address environment */ +#endif + uint16_t symtabidx; /* Symbol table section index */ uint16_t strtabidx; /* String table section index */ uint16_t buflen; /* size of iobuffer[] */ @@ -187,8 +224,9 @@ EXTERN int elf_bind(FAR struct elf_loadinfo_s *loadinfo, * Name: elf_unload * * Description: - * This function unloads the object from memory. This essentially - * undoes the actions of elf_load. + * This function unloads the object from memory. This essentially undoes + * the actions of elf_load. It is called only under certain error + * conditions after the the module has been loaded but not yet started. * * Returned Value: * 0 (OK) is returned on success and a negated errno is returned on diff --git a/nuttx/include/nuttx/binfmt/nxflat.h b/nuttx/include/nuttx/binfmt/nxflat.h index 89e28fbcc..db396771b 100644 --- a/nuttx/include/nuttx/binfmt/nxflat.h +++ b/nuttx/include/nuttx/binfmt/nxflat.h @@ -44,7 +44,9 @@ #include #include + #include +#include /**************************************************************************** * Pre-processor Definitions @@ -61,17 +63,24 @@ struct nxflat_loadinfo_s { /* Instruction Space (ISpace): This region contains the nxflat file header - * plus everything from the text section. Ideally, will have only one mmap'ed - * text section instance in the system for each module. + * plus everything from the text section. + * + * The ISpace region is allocated using mmap() and, thus, can be shared by + * multiple tasks. Ideally, will have only one mmap'ed text section + * instance in the system for each module. */ - uint32_t ispace; /* Address where hdr/text is loaded */ + uintptr_t ispace; /* Address where hdr/text is loaded */ uint32_t entryoffs; /* Offset from ispace to entry point */ uint32_t isize; /* Size of ispace. */ - /* Data Space (DSpace): This region contains all information that in referenced - * as data (other than the stack which is separately allocated). There will be - * a unique instance of DSpace (and stack) for each instance of a process. + /* Data Space (DSpace): This region contains all information that is + * referenced as data (other than the stack which is separately allocated). + * + * If CONFIG_ADDRENV=n, DSpace will be allocated using kmalloc() (or + * kzalloc()). If CONFIG_ADDRENV-y, then DSpace will be allocated using + * up_addrenv_create(). In either case, there will be a unique instance + * of DSpace (and stack) for each instance of a process. */ struct dspace_s *dspace; /* Allocated D-Space (data/bss/etc) */ @@ -85,6 +94,19 @@ struct nxflat_loadinfo_s uint32_t relocstart; /* Start of array of struct flat_reloc */ uint16_t reloccount; /* Number of elements in reloc array */ + /* Address environment. + * + * addrenv - This is the handle created by up_addrenv_create() that can be + * used to manage the tasks address space. + * oldenv - This is a value returned by up_addrenv_select() that must be + * used to restore the current hardware address environment. + */ + +#ifdef CONFIG_ADDRENV + task_addrenv_t addrenv; /* Task address environment */ + hw_addrenv_t oldenv; /* Saved hardware address environment */ +#endif + /* File descriptors */ int filfd; /* Descriptor for the file being loaded */ @@ -212,8 +234,9 @@ EXTERN int nxflat_bind(FAR struct nxflat_loadinfo_s *loadinfo, * Name: nxflat_unload * * Description: - * This function unloads the object from memory. This essentially - * undoes the actions of nxflat_load. + * This function unloads the object from memory. This essentially undoes + * the actions of nxflat_load. It is called only under certain error + * conditions after the the module has been loaded but not yet started. * * Returned Value: * 0 (OK) is returned on success and a negated errno is returned on diff --git a/nuttx/include/nuttx/sched.h b/nuttx/include/nuttx/sched.h index 172f46901..6eaba6e9c 100644 --- a/nuttx/include/nuttx/sched.h +++ b/nuttx/include/nuttx/sched.h @@ -163,24 +163,40 @@ typedef struct environ_s environ_t; # define SIZEOF_ENVIRON_T(alloc) (sizeof(environ_t) + alloc - 1) #endif -/* This structure describes a reference counted D-Space region */ +/* This structure describes a reference counted D-Space region. This must be a + * separately allocated "break-away" structure that can be owned by a task and + * any pthreads created by the task. + */ +#ifdef CONFIG_PIC struct dspace_s { - uint32_t crefs; /* This is the number of pthreads that shared the - * the same D-Space */ - uint8_t region[1]; /* Beginning of the allocated region */ -}; + /* The life of the structure allocation is determined by this reference + * count. This count is number of threads that shared the the same D-Space. + * This includes the parent task as well as any pthreads created by the + * parent task or any of its child threads. + */ + + uint16_t crefs; -#define SIZEOF_DSPACE_S(n) (sizeof(struct dspace_s) - 1 + (n)) + /* This is the allocated D-Space memory region. This may be a physical + * address allocated with kmalloc(), or it may be virtual address associated + * with an address environment (if CONFIG_ADDRENV=y). + */ -/* This is the task control block (TCB) */ + FAR uint8_t *region; +}; +#endif + +/* This is the task control block (TCB). Each task or thread is represented by + * a TCB. The TCB is the heart of the NuttX task-control logic. + */ struct _TCB { /* Fields used to support list management *************************************/ - FAR struct _TCB *flink; /* link in DQ of TCBs */ + FAR struct _TCB *flink; /* Doubly linked list */ FAR struct _TCB *blink; /* Task Management Fields *****************************************************/ -- cgit v1.2.3 From 272fc3b5233e6d3c9e4d9c32a67511868f2c1a9a Mon Sep 17 00:00:00 2001 From: patacongo Date: Wed, 19 Dec 2012 21:16:03 +0000 Subject: Some minor fixes for CONFIG_ADDRENV=y git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5444 42af7a65-404d-4744-a932-0658087f49c3 --- apps/ChangeLog.txt | 5 +++- apps/examples/elf/elf_main.c | 41 +++++++++++++++++++++++++++--- apps/examples/nxflat/nxflat_main.c | 41 +++++++++++++++++++++++++++--- nuttx/binfmt/binfmt_unloadmodule.c | 2 +- nuttx/binfmt/libnxflat/libnxflat_addrenv.c | 1 + nuttx/binfmt/libnxflat/libnxflat_bind.c | 9 ++++++- nuttx/binfmt/libnxflat/libnxflat_unload.c | 1 - 7 files changed, 90 insertions(+), 10 deletions(-) (limited to 'apps') diff --git a/apps/ChangeLog.txt b/apps/ChangeLog.txt index d6e5de3c1..e9eaf0a83 100644 --- a/apps/ChangeLog.txt +++ b/apps/ChangeLog.txt @@ -429,4 +429,7 @@ * Rename CONFIG_PCODE and CONFIG_FICL as CONFIG_INTERPRETERS_PCODE and CONFIG_INTERPRETERS_FICL for consistency with other configuration naming. * apps/examples/keypadtest: A keypad test example contributed by Denis - Carikli \ No newline at end of file + Carikli. + * apps/examples/elf and nxflat: If CONFIG_BINFMT_EXEPATH is defined, these + tests will now use a relative path to the program and expect the binfmt/ + logic to find the absolute path to the program using the PATH variable. diff --git a/apps/examples/elf/elf_main.c b/apps/examples/elf/elf_main.c index 669de430d..66a47592c 100644 --- a/apps/examples/elf/elf_main.c +++ b/apps/examples/elf/elf_main.c @@ -70,6 +70,10 @@ # error "You must provide file descriptors via CONFIG_NFILE_DESCRIPTORS in your configuration file" #endif +#ifdef CONFIG_BINFMT_DISABLE +# error "The binary loader is disabled (CONFIG_BINFMT_DISABLE)!" +#endif + #ifndef CONFIG_ELF # error "You must select CONFIG_ELF in your configuration file" #endif @@ -136,7 +140,9 @@ static unsigned int g_mmstep; /* Memory Usage at beginning of test step */ static const char delimiter[] = "****************************************************************************"; -static char path[128]; +#ifndef CONFIG_BINFMT_EXEPATH +static char fullpath[128]; +#endif /**************************************************************************** * Symbols from Auto-Generated Code @@ -264,19 +270,46 @@ int elf_main(int argc, char *argv[]) mm_update(&g_mmstep, "after mount"); + /* Does the system support the PATH variable? Has the PATH variable + * already been set? If YES and NO, then set the PATH variable to + * the ROMFS mountpoint. + */ + +#if defined(CONFIG_BINFMT_EXEPATH) && !defined(CONFIG_PATH_INITIAL) + (void)setenv("PATH", MOUNTPT, 1); +#endif + /* Now excercise every program in the ROMFS file system */ for (i = 0; dirlist[i]; i++) { + /* Output a seperated so that we can clearly discrinmate the output of + * this program from the others. + */ + testheader(dirlist[i]); + /* Initialize the binary_s structure */ + memset(&bin, 0, sizeof(struct binary_s)); - snprintf(path, 128, "%s/%s", MOUNTPT, dirlist[i]); - bin.filename = path; + /* If the binary loader does not support the PATH variable, then + * create the full path to the executable program. Otherwise, + * use the relative path so that the binary loader will have to + * search the PATH variable to find the executable. + */ + +#ifdef CONFIG_BINFMT_EXEPATH + bin.filename = dirlist[i]; +#else + snprintf(fullpath, 128, "%s/%s", MOUNTPT, dirlist[i]); + bin.filename = fullpath; +#endif bin.exports = exports; bin.nexports = nexports; + /* Load the ELF module */ + ret = load_module(&bin); if (ret < 0) { @@ -286,6 +319,8 @@ int elf_main(int argc, char *argv[]) mm_update(&g_mmstep, "after load_module"); + /* Execute the ELF module */ + ret = exec_module(&bin, 50); mm_update(&g_mmstep, "after exec_module"); diff --git a/apps/examples/nxflat/nxflat_main.c b/apps/examples/nxflat/nxflat_main.c index 638e960a0..536bc1dd8 100644 --- a/apps/examples/nxflat/nxflat_main.c +++ b/apps/examples/nxflat/nxflat_main.c @@ -69,6 +69,10 @@ # error "You must provide file descriptors via CONFIG_NFILE_DESCRIPTORS in your configuration file" #endif +#ifdef CONFIG_BINFMT_DISABLE +# error "The binary loader is disabled (CONFIG_BINFMT_DISABLE)!" +#endif + #ifndef CONFIG_NXFLAT # error "You must select CONFIG_NXFLAT in your configuration file" #endif @@ -125,7 +129,9 @@ static const char delimiter[] = "****************************************************************************"; -static char path[128]; +#ifndef CONFIG_BINFMT_EXEPATH +static char fullpath[128]; +#endif /**************************************************************************** * Private Functions @@ -188,19 +194,46 @@ int nxflat_main(int argc, char *argv[]) nxflat_uninitialize(); } + /* Does the system support the PATH variable? Has the PATH variable + * already been set? If YES and NO, then set the PATH variable to + * the ROMFS mountpoint. + */ + +#if defined(CONFIG_BINFMT_EXEPATH) && !defined(CONFIG_PATH_INITIAL) + (void)setenv("PATH", MOUNTPT, 1); +#endif + /* Now excercise every progrm in the ROMFS file system */ for (i = 0; dirlist[i]; i++) { + /* Output a seperated so that we can clearly discrinmate the output of + * this program from the others. + */ + testheader(dirlist[i]); + /* Initialize the binary_s structure */ + memset(&bin, 0, sizeof(struct binary_s)); - snprintf(path, 128, "%s/%s", MOUNTPT, dirlist[i]); - bin.filename = path; + /* If the binary loader does not support the PATH variable, then + * create the full path to the executable program. Otherwise, + * use the relative path so that the binary loader will have to + * search the PATH variable to find the executable. + */ + +#ifdef CONFIG_BINFMT_EXEPATH + bin.filename = dirlist[i]; +#else + snprintf(fullpath, 128, "%s/%s", MOUNTPT, dirlist[i]); + bin.filename = fullpath; +#endif bin.exports = exports; bin.nexports = NEXPORTS; + /* Load the NXFLAT module */ + ret = load_module(&bin); if (ret < 0) { @@ -208,6 +241,8 @@ int nxflat_main(int argc, char *argv[]) exit(1); } + /* Execute the ELF module */ + ret = exec_module(&bin, 50); if (ret < 0) { diff --git a/nuttx/binfmt/binfmt_unloadmodule.c b/nuttx/binfmt/binfmt_unloadmodule.c index a0050481c..a03b98d6c 100644 --- a/nuttx/binfmt/binfmt_unloadmodule.c +++ b/nuttx/binfmt/binfmt_unloadmodule.c @@ -183,7 +183,7 @@ int unload_module(FAR const struct binary_s *binp) if (binp->alloc[i]) { bvdbg("Freeing alloc[%d]: %p\n", i, binp->alloc[i]); - free(binp->alloc[i]); + free((FAR void *)binp->alloc[i]); } } diff --git a/nuttx/binfmt/libnxflat/libnxflat_addrenv.c b/nuttx/binfmt/libnxflat/libnxflat_addrenv.c index c6b3fce34..233713ccd 100644 --- a/nuttx/binfmt/libnxflat/libnxflat_addrenv.c +++ b/nuttx/binfmt/libnxflat/libnxflat_addrenv.c @@ -39,6 +39,7 @@ #include +#include #include #include diff --git a/nuttx/binfmt/libnxflat/libnxflat_bind.c b/nuttx/binfmt/libnxflat/libnxflat_bind.c index 3a86d5355..816810a46 100644 --- a/nuttx/binfmt/libnxflat/libnxflat_bind.c +++ b/nuttx/binfmt/libnxflat/libnxflat_bind.c @@ -38,6 +38,7 @@ ****************************************************************************/ #include +#include #include #include @@ -248,7 +249,7 @@ static inline int nxflat_gotrelocs(FAR struct nxflat_loadinfo_s *loadinfo) DEBUGASSERT(offset + nrelocs * sizeof(struct nxflat_reloc_s) <= (loadinfo->isize + loadinfo->dsize)); - relocs = (FAR struct nxflat_reloc_s*) + relocs = (FAR struct nxflat_reloc_s *) (offset - loadinfo->isize + loadinfo->dspace->region); bvdbg("isize: %08lx dpsace: %p relocs: %p\n", (long)loadinfo->isize, loadinfo->dspace->region, relocs); @@ -276,7 +277,13 @@ static inline int nxflat_gotrelocs(FAR struct nxflat_loadinfo_s *loadinfo) { /* Handle the relocation by the relocation type */ +#ifdef CONFIG_CAN_PASS_STRUCTS reloc = *relocs++; +#else + memcpy(&reloc, relocs, sizeof(struct nxflat_reloc_s)); + relocs++; +#endif + result = OK; switch (NXFLAT_RELOC_TYPE(reloc.r_info)) { diff --git a/nuttx/binfmt/libnxflat/libnxflat_unload.c b/nuttx/binfmt/libnxflat/libnxflat_unload.c index 71d0c8499..eb1aa0343 100644 --- a/nuttx/binfmt/libnxflat/libnxflat_unload.c +++ b/nuttx/binfmt/libnxflat/libnxflat_unload.c @@ -95,4 +95,3 @@ int nxflat_unload(struct nxflat_loadinfo_s *loadinfo) nxflat_addrenv_free(loadinfo); return OK; } - -- cgit v1.2.3 From 0f2decb70f505b108999fcdb80e89d7aae6760ce Mon Sep 17 00:00:00 2001 From: patacongo Date: Thu, 20 Dec 2012 20:22:21 +0000 Subject: Prep for release 6.24 git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5447 42af7a65-404d-4744-a932-0658087f49c3 --- NxWidgets/ChangeLog.txt | 6 +- NxWidgets/ReleaseNotes.txt | 38 +- apps/ChangeLog.txt | 6 +- nuttx/ChangeLog | 42 +-- nuttx/Documentation/NuttX.html | 809 ++++++++++++++++++++++++++++------------- nuttx/ReleaseNotes | 195 +++++++++- 6 files changed, 812 insertions(+), 284 deletions(-) (limited to 'apps') diff --git a/NxWidgets/ChangeLog.txt b/NxWidgets/ChangeLog.txt index 7f7b21247..df9fb2d41 100644 --- a/NxWidgets/ChangeLog.txt +++ b/NxWidgets/ChangeLog.txt @@ -171,7 +171,7 @@ * Kconfig: Add option to turn on the memory monitor feature of the NxWidgets/NxWM unit tests. -1.4 2012-xx-xx Gregory Nutt +1.4 2012-12-20 Gregory Nutt * libnxwidgets/Makefile, NxWidgets/nxwm/Makefile, and NxWidgets/UnitTests/nxwm/Makefile: Makefile improvements from @@ -206,7 +206,7 @@ Contributed by Petteri, Aimonen. * NxWM::CStartWindow: Fix mq_receive error handling with signal is recieved. From Petteri Aimonen. -* NxWidgets:CNxTimer: Replace the original (apparently non-functional) signal- +* NxWidgets::CNxTimer: Replace the original (apparently non-functional) signal- based solution with a work queue-based solution. This raises some isses about using the internal work queues from user space. I have decided to implemented user-space work queues (someday) in order to accomplish that functionaliy. @@ -218,3 +218,5 @@ Contributed by Petteri Aimonen. * NxWidgets::CNxWidgets and NxWM::CStartWindow: Small changes to make sub- classing easier (from Petteri Aimonen). + +1.5 2013-xx-xx Gregory Nutt diff --git a/NxWidgets/ReleaseNotes.txt b/NxWidgets/ReleaseNotes.txt index 7d3fb7aaa..4b155c50e 100644 --- a/NxWidgets/ReleaseNotes.txt +++ b/NxWidgets/ReleaseNotes.txt @@ -9,7 +9,7 @@ features have been fully verified). NxWidgets-1.1 ============= -The 2nd release of the NxWidgets package as made on May 19, 2012. The +The 2nd release of the NxWidgets package was made on May 19, 2012. The headline new feature in this release is: * NxWM, the tiny window manager based on NX and NxWidgets. NxWM is true @@ -69,7 +69,7 @@ Bug fixes include changes to the following (see the ChangeLog for details): NxWidgets-1.2 ============= -The 3rd release of the NxWidgets package as made on June 15, 2012. This +The 3rd release of the NxWidgets package was made on June 15, 2012. This release depends on NuttX-6.19 or above and should not be used with older NuttX releases. @@ -100,7 +100,7 @@ As well as other, less critical bugs (see the ChangeLog for details) NxWidgets-1.3 ============= -The 4th release of the NxWidgets package as made on September 29, 2012. This +The 4th release of the NxWidgets package was made on September 29, 2012. This release depends on NuttX-6.22 or above and should not be used with older NuttX releases. @@ -112,3 +112,35 @@ of NuttX. These comptibility changes include: * Build system changes * Changes needed for the NuttX configuration tool +NxWidgets-1.4 +============= + +The 5th release of the NxWidgets package was made on December 20, 2012. This +release depends on NuttX-6.22 or above and should not be used with older +NuttX releases. This release corresponds to SVN revision r5447. + +Note: Nearly all changes between 1.3 and 1.4 were the result of the efforts +of Petteri Aimonen. + +Additional new features and extended functionality in Version 1.4: + +* NxWdigets::CNxServer: Reduce start-up delay +* NxWM::CApplicationWindow: Option to eliminate minimize button. +* NxWM::CTaskbar: Option to eliminte the background image; highlight current + icon in the task bar. +* NxWidgets::CNumericEdit: New widget. Basically a CLabel with +/- buttons. +* NxWidgets::CNxTimer: Replace the original signal-based solution with a + work queue-based solution. This raises some isses about using the + internal work queues from user space. +* Build System: Misc improvements. +* Tools: bitmap_converter.py will convert images to NxWidgets RLE-encoded format. + +Bugfixes (see the change log for details). Some of these are very important +(marked *critical*): + +* NxWidgets::CCallback: Misplaced #endif +* NxWM::CCalculator and NxWM::CStartWindow: Add forward declaration for icon images. +* glych_cycle: Correct width, destructor needs to be public. +* NxWidgets:CText and NxWidgets:CNumericEdite: Fix some memory freeing bugs +* NxWidgets::CScrollingPanel: It is borderless for now because there was no + easy way to redraw only the required part of the border. diff --git a/apps/ChangeLog.txt b/apps/ChangeLog.txt index e9eaf0a83..0695747f8 100644 --- a/apps/ChangeLog.txt +++ b/apps/ChangeLog.txt @@ -406,7 +406,7 @@ supports setting IP addresses, network masks, name server addresses, and hardware address (from Darcy Gong). -6.24 2012-xx-xx Gregory Nutt +6.24 2012-12-20 Gregory Nutt * apps/examples/ostest/roundrobin.c: Replace large tables with algorithmic prime number generation. This allows the roundrobin @@ -424,7 +424,7 @@ * apps/examples/relays/Makefile: Reduced stack requirement (Darcy Gong). * apps/nshlib and apps/netutils/dhcpc: Extend the NSH ifconfig command plus various DHCPC improvements(Darcy Gong). - * apps/nshlib/nsh_apps.c: Fix compilation errors whenCONFIG_NSH_DISABLEBG=y. + * apps/nshlib/nsh_apps.c: Fix compilation errors when CONFIG_NSH_DISABLEBG=y. From Freddie Chopin. * Rename CONFIG_PCODE and CONFIG_FICL as CONFIG_INTERPRETERS_PCODE and CONFIG_INTERPRETERS_FICL for consistency with other configuration naming. @@ -433,3 +433,5 @@ * apps/examples/elf and nxflat: If CONFIG_BINFMT_EXEPATH is defined, these tests will now use a relative path to the program and expect the binfmt/ logic to find the absolute path to the program using the PATH variable. + +6.25 2013-xx-xx Gregory Nutt diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog index cda6eb947..ed1cf39dc 100644 --- a/nuttx/ChangeLog +++ b/nuttx/ChangeLog @@ -3538,7 +3538,7 @@ * binfmt/libelf: The ELF loader is working correctly with C++ static constructors and destructors and all. * Documentation/NuttXBinfmt.html: Add documentation of the binary loader. - * configs/sim/ostest: Converted to use the mconfig configuration tool. + * configs/sim/ostest: Converted to use the mconf configuration tool. * configs/sim/cxxtest: New test that will be used to verify the uClibc++ port (eventually). * include/nuttx/fs/fs.h, lib/stdio/lib_libfread.c, lib_ferror.c, @@ -3570,7 +3570,7 @@ apps/examples/cxxtest works -- meaning the the uClibc++ is complete and verified for the STM32 platform. -6.24 2012-xx-xx Gregory Nutt +6.24 2012-12-20 Gregory Nutt * arch/arm/src/stm32: Support for STM32F100 high density chips added by Freddie Chopin. @@ -3604,19 +3604,19 @@ * arch/*/src/Makefile: Now uses only the libraries in lib/ Replace bash fragments that test for board/Makefile. * Makefile.win: The beginnings of a Windows-native build. This is just - the begining and not yet ready for prime time use. + the beginning and not yet ready for prime time use. * configs/stm32f4discovery/winbuild: This is a version of the standard NuttX OS test, but configured to build natively on Windows. Its only real purpose is to very the native Windows build logic. * tools/mkdeps.bat and tools/mkdeps.c: mkdeps.bat is a failed attempt to leverage mkdeps.sh to CMD.exe. It fails because the are certain critical CFLAG values that cannot be passed on the CMD.exe command line - (line '='). mkdeps.c is a work in progress that will, hopefully, + (like '='). mkdeps.c is a work in progress that will, hopefully, replace both mkdeps.sh and mkdeps.bat. - * tools/Config.mk: Centralize the definition of the scrpt that will be + * tools/Config.mk: Centralize the definition of the script that will be used to generated header file include paths for the compiler. This needs to be centralized in order to support the Windows native build. - * tools/incdir.bat: A replaced for tools/incdir.sh for use with the + * tools/incdir.bat: A replacement for tools/incdir.sh for use with the the Windows native build. * Makefile.unix: The existing top-level Makefile has been renamed Makefile.unix. @@ -3626,8 +3626,8 @@ * arch/arm/src/stm32/stm32_qencoder.c: TIM3 bug fix from Ryan Sundberg. * tools/mkromfsimg.sh: Correct typo in an error message (Ryan Sundberg) * arch/*/src/Makefile: Remove tftboot install and creation of System.map - for Windows native build. The fist is necessary, the second just needs - re-implemented. + for Windows native build. The first is a necessary change, the second + just needs re-implemented. * configs/mirtoo: Update Mirtoo pin definitions for Release 2. Provided by Konstantin Dimitrov. * Fixed an uninitialized variable in the file system that can cause @@ -3637,9 +3637,9 @@ conditional logic elsewhere. * nuttx/graphics: One a mouse button is pressed, continue to report all mouse button events to the first window that received the the initial - button down event, even if the mouse attempts to dray outside the + button down event, even if the mouse attempts to drag outside the window. From Petteri Aimonen. - * nuttx/graphics/nxmu/nx_block.c: One more fixe to the NX block message + * nuttx/graphics/nxmu/nx_block.c: One more fix to the NX block message logic from Petteri Aimonen. * include/nuttx/wqueue.h: Some basic definitions to support a user- space work queue (someday in the future). @@ -3654,8 +3654,6 @@ * sched/pause.c: Implements the POSIX pause() function. * ez80: Lots of changes to ez80 configurations and build logic as I struggle to get a clean Windows build (still not working). - * tools/prebuild.py: A Python script for Darcy Gong that can automate - many build/configuration operations. * configs/cloudctrl: Darcy Gong's CloudController board. This is a small network relay development board. Based on the Shenzhou IV development board design. It is based on the STM32F107VC MCU. @@ -3684,12 +3682,12 @@ * sched/task_exithook.c: Missing right bracket with certain conditional compilation (thanks James Goppert). * arch/arm/srch/stm32/stm32_otgfshost.c: Replace timeout handling; use - system tick instead of frame counter. The frame counter gets rset to + system tick instead of frame counter. The frame counter gets reset to zero at 0x3fff making it error prone. * arch/arm/src/stm32/stm32f20xx_rcc.c and stm32f40xx_rcc.c: Added option CONFIG_STM32_FLASH_PREFETCH. FLASH prefetch will now only be enabled if this option is selected. - * confgs/ez80f910200zco/ostest: Now used Kconfig/mconfig configuration + * confgs/ez80f910200zco/ostest: Now uses Kconfig/mconf configuration tool. Updated to build in native Windows environment. Other ez80f910200zco build scripts also updated. * configs/z8f64200100kit/ostest: Update to same level as ez80 configurations. @@ -3701,11 +3699,11 @@ get chip ID. Contributed by Darcy Gong. These should not be board-dependent, but should be in arch/arm/src/stm32 where they can be used from any board. * sched/work_thread.c: Fix backward conditional compilation. This might - has caused a memory leadk. From Freddie Chopin. + has caused a memory leak. From Freddie Chopin. * configs//Make.defs: Fix typo -wstrict-prototypes should be - -Wstrict-prototypes (From Denis Cariki). + -Wstrict-prototypes (From Denis Carilki). * arch/arm/src/calapyso/calypso_keypad.c: Add Calypso keypad driver. From - Denis Cariki. + Denis Carilki. * z8encore000zco/ostest and z8f64200100kit/ostest: Converted to use Kconfig/ mconf configuration tool. * arch/arm/src/armv7-m/up_exception.S: missing curly braces for push/pop @@ -3725,7 +3723,7 @@ * libc/stdlib/lib_rand.c: Always add one to result congruential generators to avoid the value zero. Suggested by Freddie Chopin. * tools/b16.c: Fixed precision math conversion utility. - * graphics/nxglib/nxglib_splitlinex.c: Fix the "fat, flat line bug" + * graphics/nxglib/nxglib_splitline.c: Fix the "fat, flat line bug" * arch/z80/src/*/Toolchain.defs: Add dummy Toolchain.defs files for the z80 family. * configs/z80sim/ostest: Converted to build with the Kconfig/mconf tool. @@ -3761,14 +3759,14 @@ value zero can be returned. Requested by Freddie Chopin. * arch/z80/src/Makefile.sdcc*, z80/up_mem.h: Redesign Z80 build so that it no longer depends on Bash scripts. - * configs/z80sim/nsh and pashello: Converted to (1) used the kconfig-frontends + * configs/z80sim/nsh and pashello: Converted to (1) use the kconfig-frontends configuration tool, and (2) to build natively under Windows. The NSH configuration is verified; the pashello configuration needs a more TLC. * tools/copydir.sh: Rename tools/winlink.sh to tools/copydir.sh * tools/link.bat, unlink.bat, and copydir.bat: Add Windows counterparts to the link.sh, unlink.sh, and copydir.sh Bash scripts. * configs/z80sim/pashello: Now builds correctly. - * configs/xtrs/ostest, nsh, and pashello: Converted to (1) used the kconfig- + * configs/xtrs/ostest, nsh, and pashello: Converted to (1) use the kconfig- frontends configuration tool, and (2) to build natively under Windows. * drivers/serial/Kconfig and sched/Kconfig: Two names for same configuration: CONFIG_LOWLEVEL_CONSOLE is bogus and CONFIG_DEV_LOWCONSOLE is in the wrong @@ -3786,7 +3784,7 @@ environment of the task started by os_bringup() will have the PATH environment variable defined to be that string. * binfmt/binfmt_exepath.c: If CONFIG_BINFMT_EXEPATH is defined, then this - file will be built. In contains logic to search for regular files at + file will be built. It contains logic to search for regular files at the absolutes paths found in the current PATH environment variable setting. This is untested and not yet hooked into the binfmt exec() logic on initial check-in @@ -3801,3 +3799,5 @@ just malloc'ing the task memory). * configs/stm32f4discovery/elf: Enable support/test of the PATH to find executables using a relative path. + +6.25 2013-xx-xx Gregory Nutt diff --git a/nuttx/Documentation/NuttX.html b/nuttx/Documentation/NuttX.html index d8d393a7c..5d9d3af3b 100644 --- a/nuttx/Documentation/NuttX.html +++ b/nuttx/Documentation/NuttX.html @@ -8,7 +8,7 @@

    NuttX RTOS

    -

    Last Updated: December 15, 2012

    +

    Last Updated: December 20, 2012

    @@ -339,6 +339,14 @@

    + +
    + +

    +

  • Optional tasks with address environments (Processes).
  • +

    + +
    @@ -464,6 +472,13 @@

    + +
    + +

    +

  • PATH variable support.
  • +

    +
    @@ -1039,30 +1054,31 @@ -

    NuttX-6.23 Release Notes

    +

    NuttX-6.24 Release Notes

    - The 90th release of NuttX, Version 6.23, was made on November 5, 2012, and is available for download from the + The 91st release of NuttX, Version 6.24, was made on December 20, 2012, and is available for download from the SourceForge website. - Note that the release consists of two tarballs: nuttx-6.23.tar.gz and apps-6.23.tar.gz. + Note that the release consists of two tarballs: nuttx-6.24.tar.gz and apps-6.24.tar.gz. Both may be needed (see the top-level nuttx/README.txt file for build information) The change log associated with the release is available here. Unreleased changes after this release are available in SVN. These unreleased changes are also listed here.

    - This release corresponds with SVN release number: r5313, + This release corresponds with SVN release number: r5447, Note that all SVN information has been stripped from the tarballs. If you need the SVN configuration, you should check out directly from SVN. - Revision r5313 should equivalent to release 6.23 of NuttX: + Revision r5447 should equivalent to release 6.24 of NuttX:

      -svn checkout -r5313 svn://svn.code.sf.net/p/nuttx/code/trunk nuttx-code
      +svn checkout -r5447 svn://svn.code.sf.net/p/nuttx/code/trunk nuttx-code
       
    -

    Or

    +

    Or (HTTP):

      -svn checkout -r5313 http://svn.code.sf.net/p/nuttx/code/trunk nuttx-code
      +svn checkout -r5447 http://svn.code.sf.net/p/nuttx/code/trunk nuttx-code
       
    +

    Additional new features and extended functionality

    @@ -1071,114 +1087,277 @@ svn checkout -r5313 http://svn.code.sf.net/p/nuttx/code/trunk nuttx-code
  • RTOS: - If both atexit() and on_exit() are enabled, use on_exit() to implement atexit(). - Updates for RGMP 4.0.

    +
      +
    • + Implemented the POSIX pause() function (still has some compiance issues). +
    • +
    • + Tasking logic is extended to support the notion of address environments. + An address environment is the key notion underlying "process" vs. tasks. + If tasks are created with address environments (by binfmt), the OS will propogate that environment to child threads and will destroy the address environment when all threads in the "process" exists. +
    • +
    • + If support for the PATH variable is enabled, the OS start up logic will create an initial environment containing the default PATH setting (CONFIG_PATH_INITIAL). + This initial PATH will then be inherited by all tasks. +
    • +
  • - Binfmt: - Add support for loading and executing ELF binary modules from a file system. + Binfmt:

    +
      +
    • + The NuttX binary loaders have been updated to support the PATH environment variable. + Now, if the PATH is properly defined, programs can be executed from mass storage using only the file name. + This feature is added to support more standard behavior (eventually, NSH will support execution of programs in file systems by just entering the file name, perhaps in 6.25?). +
    • +
    • + The NXFLAT and ELF binary loaders have been extended to create address environments for any new tasks executed from the file system. + This feature requires that the architecture support a memory management unit (MMU) and the address environment interfaces declared in include/nuttx/arch.h (currently, this is only supported by the z180). +
    • +
  • Drivers: - Maxim MAX11802 touchscreen controller (Petteri Aimonen) -

    + LCD driver for the Univision UG-2864AMBAG01 OLED
  • - STM32 Driver: - Implementation of /dev/random using the STM32 Random Number Generator (RNG). -

    + STM32: + Support for STM32F100 high density chips contributed by Freddie Chopin.
  • - STM32 Boards: - ADC support for the Shenzhou IV board. - Relay support for the Shenzhou IV board (both by Darcy Gong). -

    + STM32 Drivers: + Added optional RS-485 direction bit control (from Freddie Chopin).
  • - C++ Standard Library: - Support is now included for the add-on uClibc++ C++ standard library support. - This includes support for iostreams, strings, STL, RTTI, exceptions -- the complete C++ environment. - uClibc++ is provided as a separate add-on package due to licensing issues. - Contributed by Qiang Yu and David of the RGMP team. + STM32 Boards:

    +
      +
    • + Support for generic STM32F100RC board contributed by Freddie Chopin. +
    • +
    • + stm32f4discovery/nxlines: STM32F4Discovery support for the UG-2864AMBAG01 OLED. +
    • +
    • + stm32f4discovery/winbuild: A version of the NuttX OS test configured to build natively on Windows. +
    • +
    • + stm32f4discovery/elf: Now uses the PATH variable to find ELF executables. +
    • +
    • + configs/cloudctrl: Added for Darcy Gong's CloudController board +
    • +
    +
  • +
  • - Add support for __cxa_atexit(). -

    + PIC32 Boards: + Update the Mirtoo configuration for Release 2 of the Mirtoo module.
  • - C Standard Library: + Calypso: + Add Calypso keypad driver (from Denis Carilki). +

  • +
  • - Optimized generic and ARM-specific memcpy() function. - Optimized memset() function. + ZiLOG:

    +
      +
    • + Add support for the z180 chip family and, specifically, for the P112 retro hardware (see http://p112.feedle.net/). +
    • +
    • + All ZiLOG configurations updated to use the current ZDS-II and/or SDCC toolchains. +
    • +
    +
  • +
  • - Add support for ferror()), feof()), and clearerror()). + Graphics:

    +
      +
    • + Add a semaphore handshake so that operations on buffers from the NXMU client will be blocked until the NX server operates on the buffer data (from Petteri Aimonen). +
    • +
    • + nxtk_subwindowmove() and nxtk_getwindow(): Improvements to clipping logic from Petteri Aimonen. +
    • +
  • - Standard Math Library: + C Library: + lib/ sub-directory renamed libc/ (there is a new lib/ sub-directory that is used to hold all archives). +

  • +
  • - Port of the math library from Rhombus OS by Nick Johnson (Darcy Gong). -

    + C++: + Exception stubs from Petteri Aimonen.
  • Applications: - New NSH commands: ifup, ifdown, urlencode, urldecode, base64enc, bas64dec, and md5 (Darcy Gong). - Extensions to the ifconfig command (Darcy Gong), - Add support for NSH telnet login (Darcy Gong). - Enancements to NSH ping command to support pinging hosts with very long round-trip times.

    -

    - Many extensions to the webclient/wget and DNS resolver logic from Darcy Gong. - SON, Base64, URL encoding, and MD5 libraries contributed by Darcy Gong. +

      +
    • + Add NSH hexdump command to dump the contents of a file (or character device) to the console (contributed by Petteri Aimonen). +
    • +
    • + Extend the NSH ifconfig command plus various DHCPC improvements (from Darcy Gong). +
    • +
    +
  • +
  • +

    + apps/examples:

    -

    - New examples: ELF loader, JSON, wgetjson, cxxtest, relays. +

      +
    • + ostest: Replace large tables with algorithmic prime number generation. + This allows the roundrobin test to run on platforms with minimal SRAM (Freddie Chopin). +
    • +
    • + keypadtest: A new keypad test example contributed by Denis Carikli. +
    • +
    • + elf and nxflat: If CONFIG_BINFMT_EXEPATH is defined, these examples will now use a relative path to the program and expect the binfmt/ logic to find the absolute path to the program using the PATH variable. +
    • +
    +
  • +
  • +

    + Build system:

    +
      +
    • +

      + New top-level Makefiles: Makefile.unix and Makefile.win (along with numerous changes to other make-related files). + This adds basic support for building NuttX natively under Windows from a CMD.exe window (rather than in a POSIX-like environment). + This build: (1) Uses all Windows style paths, (2) Uses primarily Windows batch commands from CMD.exe, with (3) a few extensions from GNUWin32. +

      +

      + This capability should still be considered a work in progress because: (1) it has not been verfied on all targets and tools, and (2) still lacks some of the creature-comforts of the more mature environments (like a function configure.sh script and make menuconfig support). +

    • +
    • + Example Windows native builds for STM32F4Discovery, eZ80, z16f, z8, Z80, and Z180. +
    • +
    • + Several configurations have been converted to work the kconfig-frontends mconf configuration tool: stm32f4discovery/nxlines, and all eZ80, z16f, z8, Z80, and Z180 configurations. +
    • +
    • + Architectures now include a common Toolchain.defs file that can be used to manage toolchains in a more configurable way (most of this contributed by Mike Smith). +
    • +
    +
  • +
  • +

    + Build tools: +

    +
      +
    • + Renamed tools/winlink.sh to tools/copydir.sh. +
    • +
    • + Several new tools/scripts to support the Windows native build: tools/mkdeps.bat, tools/mkdeps.c, tools/link.bat, tools/unlink.bat, and tools/ copydir.bat. +
    • +
    • + tools/incdir.sh and tools/incdir.bat now support an -s option to generate system header file paths. +
    • +
    • + tools/b16.c: Fixed precision math conversion utility. +
    • +
  • - Bugfixes (see the change log for details) + Bugfixes (see the change log for details). Some of these are very important (marked critical):

      +
    • +

      + RTOS: + Fix some backward conditional compilation in the work queue logic (Freddie Chopin). +

    • +
    • +

      + File System: + Uninitialized variable caused assertions (from Lorenz Meier). +

    • Drivers: - W25 SPI FLASH -

      + Partial fix for STM32 OTG FS device drivers and fix for short, unaligned writes in the flash translation layer (drivers/mtd/ftl.c), both from Petteri Aimonen.
    • STM32 Drivers: - ADC reset

      +
        +
      • + Qencoder driver and TIM3 driver fixes from Ryan Sundberg. +
      • +
      • + Fix timeout delay calculation in the STM32 OTG FS host driver. +
      • +
    • - Fraphics: - Missing implementation of the blocked method (*critical*, Petteri Aimonen). + LPC17xx Drivers: + Resources not being properly released when I2C driver is un-initialized. +

    • +
    • +

      + Graphics:

      +
        +
      • + Fix logic when the mouse drags outside of the window; fix another "blocked message" handling case (both from Petteri Aimonen). +
      • +
      • + nxtk_filltrapwindow(): Correct an offset problem (also from Peterri Aimonen). +
      • +
      • + nxglib_splitline(): Correct the "fat flat line" bug. +
      • +
    • C Library: - Floating point numbers in printf and related formatting functions (Mike Smith), - cf[get|set]speed() (Mike Smith)

      +
        +
      • + nrand() changes to prevent coefficients from becoming zero which would "lock up" the random number generate. +
      • +
      • + Add rounding functions to the math library (contributed by Petteri Aimonen). +
      • +
      +
    • +
    • +

      + Build system: + Changes to MIN definitions in all limit.h header files to avoid integer overflows. + For example from (-128) to (-127 - 1) (from Petteri Aimonen). +

    • +
    • +

      + Applications: + Modbus fixes from Freddie Chopin.

    +

    As well as other, less critical bugs. See the ChangeLog for additional, detailed changes. @@ -1310,8 +1489,9 @@ svn checkout -r5313 http://svn.code.sf.net/p/nuttx/code/trunk nuttx-code

      STATUS: - This port was contributed by Denis Carilki and includes the work of Denis, Alan Carvalho de Assis, and Stefan Richter. - Calypso support first appeared in NuttX-6.17. + This port was contributed by Denis Carilki and includes the work of Denis Carikli, Alan Carvalho de Assis, and Stefan Richter. + Calypso support first appeared in NuttX-6.17 with LCD drivers. + Support for the Calypso keyboard was added in NuttX-6.24 by Denis Carilki.

    @@ -1340,8 +1520,8 @@ svn checkout -r5313 http://svn.code.sf.net/p/nuttx/code/trunk nuttx-code

    Development Environments: - 1) Linux with native Linux GNU toolchain, 2) Cygwin with Cygwin GNU toolchain, or 3) Cygwin - with Windows native toolchain (CodeSourcery or devkitARM). A DIY toolchain for Linux + 1) Linux with native Linux GNU toolchain, 2) Cygwin/MSYS with Cygwin GNU toolchain, 3) Cygwin/MSYS + with Windows native toolchain (CodeSourcery or devkitARM), or 4) Native Windows. A DIY toolchain for Linux or Cygwin is provided by the NuttX buildroot package. @@ -1405,8 +1585,8 @@ svn checkout -r5313 http://svn.code.sf.net/p/nuttx/code/trunk nuttx-code

    Development Environments: - 1) Linux with native Linux GNU toolchain, 2) Cygwin with Cygwin GNU toolchain, or 3) Cygwin - with Windows native toolchain (CodeSourcery or devkitARM). A DIY toolchain for Linux + 1) Linux with native Linux GNU toolchain, 2) Cygwin/MSYS with Cygwin GNU toolchain, 3) Cygwin/MSYS + with Windows native toolchain (CodeSourcery or devkitARM), or 4) Native Windows. A DIY toolchain for Linux or Cygwin is provided by the NuttX buildroot package. @@ -1558,8 +1738,8 @@ svn checkout -r5313 http://svn.code.sf.net/p/nuttx/code/trunk nuttx-code

    Development Environments: - 1) Linux with native Linux GNU toolchain, 2) Cygwin with Cygwin GNU toolchain, or 3) Cygwin - with Windows native toolchain (CodeSourcery or devkitARM). A DIY toolchain for Linux + 1) Linux with native Linux GNU toolchain, 2) Cygwin/MSYS with Cygwin GNU toolchain, 3) Cygwin/MSYS + with Windows native toolchain (CodeSourcery or devkitARM), or 4) Native Windows. A DIY toolchain for Linux or Cygwin is provided by the NuttX buildroot package. @@ -1672,7 +1852,9 @@ svn checkout -r5313 http://svn.code.sf.net/p/nuttx/code/trunk nuttx-code

    STMicro STM32F100x. Chip support for these STM32 "Value Line" family was contributed by Mike Smith and users have reported that they have successful brought up NuttX on there proprietary boards using this logic. + This logic was extended to support the high density STM32F100RC chips by Freddie Chopin However, there is no specific board support for this chip families in the NuttX source tree. + There is, however, generic support for STM32F100RC boards.

    @@ -1744,8 +1926,8 @@ svn checkout -r5313 http://svn.code.sf.net/p/nuttx/code/trunk nuttx-code

    Development Environments: - 1) Linux with native Linux GNU toolchain, 2) Cygwin with Cygwin GNU toolchain, or 3) Cygwin - with Windows native toolchain (RIDE7, CodeSourcery or devkitARM). A DIY toolchain for Linux + 1) Linux with native Linux GNU toolchain, 2) Cygwin/MSYS with Cygwin GNU toolchain, 3) Cygwin/MSYS + with Windows native toolchain (RIDE7, CodeSourcery or devkitARM), or 4) Native Windows. A DIY toolchain for Linux or Cygwin is provided by the NuttX buildroot package. @@ -1839,8 +2021,8 @@ svn checkout -r5313 http://svn.code.sf.net/p/nuttx/code/trunk nuttx-code

    Development Environments: - 1) Linux with native Linux GNU toolchain, 2) Cygwin with Cygwin GNU toolchain, or 3) Cygwin - with Windows native toolchain (CodeSourcery or devkitARM). A DIY toolchain for Linux + 1) Linux with native Linux GNU toolchain, 2) Cygwin/MSYS with Cygwin GNU toolchain, 3) Cygwin/MSYS + with Windows native toolchain (CodeSourcery or devkitARM), or 4) Native Windows. A DIY toolchain for Linux or Cygwin is provided by the NuttX buildroot package. @@ -1974,8 +2156,8 @@ svn checkout -r5313 http://svn.code.sf.net/p/nuttx/code/trunk nuttx-code

    Development Environments: - 1) Linux with native Linux GNU toolchain, 2) Cygwin with Cygwin GNU toolchain, or 3) Cygwin - with Windows native toolchain (CodeSourcery devkitARM or Code Red). A DIY toolchain for Linux + 1) Linux with native Linux GNU toolchain, 2) Cygwin/MSYS with Cygwin GNU toolchain, 3) Cygwin/MSYS + with Windows native toolchain (CodeSourcery devkitARM or Code Red), or 4) Native Windows. A DIY toolchain for Linux or Cygwin is provided by the NuttX buildroot package. @@ -2165,7 +2347,7 @@ svn checkout -r5313 http://svn.code.sf.net/p/nuttx/code/trunk nuttx-code

    Development Environments: - 1) Linux with native Linux GNU toolchain, 2) Cygwin with Cygwin GNU Cortex-M3 or 4toolchain, or 3) Cygwin with Windows native GNU Cortex-M3 or M4 toolchain (CodeSourcery or devkitARM). A DIY toolchain for Linux or Cygwin is provided by the NuttX + 1) Linux with native Linux GNU toolchain, 2) Cygwin/MSYS with Cygwin GNU Cortex-M3 or 4 toolchain, 3) Cygwin/MSYS with Windows native GNU Cortex-M3 or M4 toolchain (CodeSourcery or devkitARM), or 4) Native Windows. A DIY toolchain for Linux or Cygwin is provided by the NuttX buildroot package. I use FreeScale's CodeWarrior IDE only to work with the JTAG debugger built into the Kinetis boards. I use the Code Red IDE with the some of the NXP parts and the Atollic toolchain with some of the STMicroelectronics parts. @@ -2284,7 +2466,7 @@ svn checkout -r5313 http://svn.code.sf.net/p/nuttx/code/trunk nuttx-code

    Development Environments: - 1) Linux with native Linux GNU toolchain, 2) Cygwin with Cygwin GNU toolchain, or 3) Cygwin with Windows native toolchain. + 1) Linux with native Linux GNU toolchain, 2) Cygwin/MSYS with Cygwin GNU toolchain, 3) Cygwin/MSYS with Windows native toolchain, or 4) Native Windows. All testing, however, has been performed using the NuttX DIY toolchain for Linux or Cygwin is provided by the NuttX buildroot package. As a result, that toolchain is recommended. @@ -3252,192 +3434,311 @@ Other memory:

      -nuttx-6.23 2012-11-05 Gregory Nutt <gnutt@nuttx.org>
      -
      -    * arch/arm/src/stm32/stm32_rng.c, chip/stm32_rng.h, and other files:
      -      Implementation of /dev/random using the STM32 Random Number
      -      Generator (RNG).
      -    * board.h file for shenzhou, fire-stm32v2, and olimex-stm32-p107:
      -      Add frequencies for HSE, HSI, LSE, and LSI.  These are needed
      -      by the STM32 watchdog driver.
      -    * CONFIG_EXAMPLES_*: To make things consistent, changed all occurrences
      -      of CONFIG_EXAMPLE_* to CONFIG_EXAMPLES_*.
      -    * drivers/mtd/w25.c and configs/*/src/up_w25.c:  Several fixes for the
      -      W25 SPI FLASH.
      -    * configs/*/Make.defs:  All buildroot tools now use the extension
      -      xxx-nuttx-elf- vs. xxx-elf-
      -    * configs/shenzhou/*/Make.defs:  Now uses the new buildroot 4.6.3
      -      EABI toolchain.
      -    * lib/stdio/lib_libdtoa.c:  Another dtoa() fix from Mike Smith.
      -    * configs/shenzhou/src/up_adc.c:  Add ADC support for the Shenzhou
      -      board (Darcy Gong).
      -    * configs/shenzhou/thttpd:  Add a THTTPD configuration for the
      -      Shenzhou board (Darcy Gong).
      -    * include/termios.h and lib/termios/libcf*speed.c: The non-standard,
      -      "hidden" c_speed cannot be type const or else static instantiations
      -      of termios will be required to initialize it (Mike Smith).
      -    * drivers/input/max11802.c/h, and include/nuttx/input max11802.h:  Adds
      -      support for the Maxim MAX11802 touchscreen controller (contributed by
      -      Petteri Aimonen).
      -    * graphics/nxtk/nxtk_events.c:  Missing implementatin of the blocked
      -      method.  This is a critical bugfix for graphics support (contributed
      -      by Petteri Aimonen).
      -    * drivers/usbdev/pl2303.c, drivers/usbdev/usbmsc.h, and
      -      include/nuttx/usb/cdcacm.h: USB_CONFIG_ATTR_SELFPOWER vs.
      -      USB_CONFIG_ATT_SELFPOWER (contributed by Petteri Aimonen).
      -    * arch/arm/src/armv7-m/up_memcpy.S:  An optimized memcpy() function for
      -      the ARMv7-M family contributed by Mike Smith.
      -    * lib/strings/lib_vikmemcpy.c:  As an option, the larger but faster
      -      implemementation of memcpy from Daniel Vik is now available (this is
      -      from http://www.danielvik.com/2010/02/fast-memcpy-in-c.html).
      -    * lib/strings/lib_memset.c: CONFIG_MEMSET_OPTSPEED will select a
      -      version of memset() optimized for speed.  By default, memset() is
      -      optimized for size.
      -    * lib/strings/lib_memset.c: CONFIG_MEMSET_64BIT will perform 64-bit
      -      aligned memset() operations.
      -    * arch/arm/src/stm32/stm32_adc.c:  Need to put the ADC back into the
      -      initial reset in the open/setup logic.  Opening the ADC driver works
      -      the first time, but not the second because the device is left in a
      -      powered down state on the last close.
      -    * configs/olimex-lpc1766stck/scripts:  Replace all of the identical
      -      ld.script files with the common one in this directory.
      -    * configs/stm3220g-eval/scripts:  Replace all of the identical
      -      ld.script files with the common one in this directory.
      -    * configs/hymini-stm32v/scripts:  Replace all of the identical
      -      ld.script files with the common one in this directory.
      -    * configs/lpcxpresso-lpc1768/scripts:  Replace all of the identical
      -      ld.script files with the common one in this directory.
      -    * binfmt/elf.c, binfmt/libelf, include/elf.h, include/nuttx/elf.h: Add
      -      basic framework for loadable ELF module support.  The initial check-
      -      in is non-functional and is simply the framework for ELF support.
      -    * include/nuttx/binfmt.h, nxflat.h, elf.h, and symtab.h:  Moved to
      -      include/nuttx/binfmt/.
      -    * arch/sim/src/up_elf.c and arch/x86/src/common/up_elf.c:  Add
      -      for ELF modules.
      -    * arch/arm/include/elf.h:  Added ARM ELF header file.
      -    * include/elf32.h:  Renamed elf.h to elf32.h.
      -    * configs/stm32f4discovery/ostest:  Converted to use the new
      -      Kconfig-based configuration system.
      -    * configs/stm32f4discovery/elf and configs/stm32f4discovery/scripts/gnu-elf.ld
      -      Add a configuration for testing the ARM ELF loader.
      -    * binfmt/libelf:  Can't use fstat(). NuttX does not yet support it.  Damn!
      -    * binfmt/libelf:  The basic ELF module execution appears fully functional.
      -    * configs/shenzhou/src/up_relays.c:  Add support for relays from the
      -      Shenzhou board.  Contributed by Darcy Gong.
      -    * lib/fixedmath: Moved the old lib/math to lib/fixedmath to make room for
      -      the math library from the Rhombus OS
      -    * lib/math: Now contains the math library from the Rhombus OS by Nick Johnson
      -      (submitted by Darcy Gong).
      -    * include/float.h:  Add a first cut at the float.h header file.  This
      -      really should be an architecture/toolchain-specific header file.  It
      -      is only used if CONFIG_ARCH_FLOAT_H is defined.
      -    * lib/math: Files now conform to coding standards.  Separated float,
      -      double, and long double versions of code into separate files so that
      -      they don't draw in so much un-necessary code when doing a dumb link.
      -    * binfmt/libelf:  The ELF loader is working correctly with C++ static
      -      constructors and destructors and all.
      -    * Documentation/NuttXBinfmt.html:  Add documentionof the binary loader.
      -    * configs/sim/ostest:  Converted to use the mconfig configuration tool.
      -    * configs/sim/cxxtest:  New test that will be used to verify the uClibc++
      -      port (eventually).
      -    * include/nuttx/fs/fs.h, lib/stdio/lib_libfread.c, lib_ferror.c,
      -      lib_feof.c, and lib_clearerr.c:  Add support for ferror(), feof(),
      -      and clearerror().  ferror() support is bogus at the moment (it
      -      is equivalent to !feof()); the others should be good.
      -    * configs/stm32f4discovery/include/board.h:  Correct timer 2-7
      -      base frequency (provided by Freddie Chopin).
      -    * include/nuttx/sched.h, sched/atexit.c, and sched/task_deletehook.c:
      -      If both atexit() and on_exit() are enabled, then implement atexit()
      -      as just a special caseof on_exit().  This assumes that the ABI can
      -      handle receipt of more call parameters than the receiving function
      -      expects.  That is usually the case if parameters are passed in
      -      registers.
      -    * libxx/libxx_cxa_atexit():  Implements __cxa_atexit()
      -    * configs/stm32f4discovery/cxxtest:  New test that will be used to
      -      verify the uClibc++ port (eventually).  The sim platform turned not
      -      to be a good platform for testing uClibc++.  The sim example will not
      -      run because the simulator will attempt to execute the static
      -      constructors before main() starts. BUT... NuttX is not initialized
      -      and this results in a crash.  On the STM324Discovery, I will have
      -      better control over when the static constructors run.
      -    * RGMP 4.0 updated from Qiany Yu.
      -    * configs/*/Make.defs and configs/*/ld.script:  Massive clean-up
      -      and standardization of linker scripts from Freddie Chopin.
      -    * net/netdev_ioctl.c:  Add interface state flags and ioctl calls
      -      to bring network interfaces up and down (from Darcy Gong).
      -    * config/stm32f4discovery: Enable C++ exceptions.  Now the entire
      -      apps/examples/cxxtest works -- meaning the the uClibc++ is
      -      complete and verified for the STM32 platform.
      -
      -apps-6.23 2012-11-05 Gregory Nutt <gnutt@nuttx.org>
      -
      -    * vsn: Moved all NSH commands from vsn/ to system/.  Deleted the vsn/
      +nuttx-6.24 2012-12-20 Gregory Nutt <gnutt@nuttx.org>
      +
      +    * arch/arm/src/stm32:  Support for STM32F100 high density chips
      +      added by Freddie Chopin.
      +    * configs/stm32f100_generic:  Support for generic STM32F100RC board
      +      contributed by Freddie Chopin.
      +    * arch/arm/src/stm32_otgfsdev.c:  Partial fix from Petteri Aimonen.
      +    * drivers/lcd/ug-2864ambag01.c and include/nuttx/lcd/ug_2864ambag01.h:
      +      LCD driver for the Univision OLED of the same name (untested on
      +      initial check-in).
      +    * configs/stm32f4discovery/nxlines:  Configure to use mconf/Kconfig
      +      tool.
      +    * configs/stm32f4discovery/src/up_ug2864ambag01.c:  Board-specific
      +      initialization for UG-2864AMBAG01 OLED connecte to STM32F4Disovery.
      +    * libxx/libxx_stdthrow.cxx:  Exception stubs from Petteri Aimonen.
      +    * configs/stm32f4discovery/src/up_ug2864ambag01.c: Driver has been
      +      verified on the STM32F4Discovery platform.  Some tuning of the
      +      configuration could improve the presentation.  Lower resolution displays
      +      are also more subject to the "fat, flat line bug" that I need to fix
      +      someday.  See http://www.nuttx.org/doku.php?id=wiki:graphics:nxgraphics
      +      for a description of the fat, flat line bug.
      +    * libc:  Renamed nuttx/lib to nuttx/libc to make space for a true lib/
      +      directory that will be forthcoming.  Also rename libraries:  liblib.a -> libc.a,
      +      libulib.a -> libuc.a, libklib.a -> libkc.a, liblibxx.a ->libcxx.a.
      +      (I will probably, eventually rename libxx to libcxx for consistency)
      +    * Makefile, lib/: A new, empty directory that will hold generated libraries.
      +      This simplifies the library patch calculations and lets me get rid of some
      +      bash logic.  The change is functional, but only partially complete;
      +      additional logic is needed in the arch/*/src/Makefile's as well.  Right
      +      now that logic generate multiple library paths, all pointing to the lib/
             directory.
      -    * Makefile:  Change order of includes when CONFIG_NEWCONFIG=y.  In
      -      that case, namedapp must be included first so that the namedapp
      -      context is established first.  If the namedapp context is established
      -      later, it will overwrite any existing namedapp_list.h and nameapp_proto.h
      -      files.
      -    * CONFIG_EXAMPLES_*: To make things consistent, changed all occurrences
      -      of CONFIG_EXAMPLE_* to CONFIG_EXAMPLES_*.
      -    * Kconfig:  Fleshed out apps/examples/adc/Kconfig and apps/examples/wget/Kconfig.
      -      There are still a LOT of empty, stub Kconfig files.
      -    * Kconfig:  Fleshed out apps/examples/buttons/Kconfig. There are still a LOT
      -      of empty, stub Kconfig files.
      -    * apps/netutils/webserver/httpd.c:  Fix a bug that I introduced in
      -      recent check-ins (Darcy Gong).
      -    * apps/netutils/webclient/webclient.c:  Fix another but that I introduced
      -      when I was trying to add correct handling for loss of connection (Darcy Gong)
      -    * apps/nshlib/nsh_telnetd.c:  Add support for login to Telnet session via
      -      username and password (Darcy Gong).
      -    * apps/netutils/resolv/resolv.c (and files using the DNS resolver): Various
      -      DNS address resolution improvements from Darcy Gong.
      -    * apps/nshlib/nsh_netcmds.c:  The ping command now passes a maximum round
      -      trip time to uip_icmpping().  This allows pinging of hosts on complex
      -      networks where the ICMP ECHO round trip time may exceed the ping interval.
      -    * apps/examples/nxtext/nxtext_main.c:  Fix bad conditional compilation
      -      when CONFIG_NX_KBD is not defined.  Submitted by Petteri Aimonen.
      -    * apps/examples/nximage/nximage_main.c:  Add a 5 second delay after the
      -      NX logo is presented so that there is time for the image to be verified.
      -      Suggested by Petteri Aimonen.
      -    * apps/Makefile: Small change that reduces the number of shell invocations
      -      by one (Mike Smith).
      -    * apps/examples/elf:  Test example for the ELF loader.
      -    * apps/examples/elf:  The ELF module test example appears fully functional.
      -    * apps/netutils/json:  Add a snapshot of the cJSON project.  Contributed by
      -      Darcy Gong.
      -    * apps/examples/json:  Test example for cJSON from Darcy Gong
      -    * apps/nshlib/nsh_netinit.c: Fix static IP DNS problem (Darcy Gong)
      -    * apps/netutils/resolv/resolv.c: DNS fixes from Darcy Gong.
      -    * COPYING: Licensing information added.
      -    * apps/netutils/codec and include/netutils/urldecode.h, base64.h, and md5.h:
      -      A port of the BASE46, MD5 and URL CODEC library from Darcy Gong.
      -    * nsnlib/nsh_codeccmd.c:  NSH commands to use the CODEC library.
      -      Contributed by Darcy Gong.
      -    * apps/examples/wgetjson: Test example contributed by Darcy Gong
      -    * apps/examples/cxxtest:  A test for the uClibc++ library provided by
      -      Qiang Yu and the RGMP team.
      -    * apps/netutils/webclient, apps/netutils.codes, and apps/examples/wgetjson:
      -      Add support for wget POST interface.  Contributed by Darcy Gong.
      -    * apps/examples/relays:  A relay example contributed by Darcy Gong.
      -    * apps/nshlib/nsh_netcmds: Add ifup and ifdown commands (from Darcy
      -      Gong).
      -    * apps/nshlib/nsh_netcmds: Extend the ifconfig command so that it
      -      supports setting IP addresses, network masks, name server addresses,
      -      and hardware address (from Darcy Gong).
      -
      -NxWidgets-1.3 2012-09-29 Gregory Nutt <gnutt@nuttx.org>
      -
      -    * UnitTests/*/main.cxx:  Change entry point name to be consistent
      -      with with entry point naming conventions introduced in NuttX
      -      6.22.
      -    * Kconfig:  Added a mconfig configuration file.  Eventually, NxWidgets
      -      needs to get hooked into the NuttX mconf configuration.  Still not
      -      exactly sure how to do that.
      -    * libnxwidgets/Makefile and NxWidgets/nxwm/Makefile:  Need updates
      -      for consistency with recent changes to NuttX build system (>= 6.22)
      -    * Kconfig:  Add option to turn on the memory monitor feature of the
      -      NxWidgets/NxWM unit tests.
      +    * arch/*/src/Makefile:  Now uses only the libraries in lib/
      +      Replace bash fragments that test for board/Makefile.
      +    * Makefile.win:  The beginnings of a Windows-native build.  This is just
      +      the beginning and not yet ready for prime time use.
      +    * configs/stm32f4discovery/winbuild:  This is a version of the standard
      +      NuttX OS test, but configured to build natively on Windows.  Its only
      +      real purpose is to very the native Windows build logic.
      +    * tools/mkdeps.bat and tools/mkdeps.c:  mkdeps.bat is a failed attempt
      +      to leverage mkdeps.sh to CMD.exe.  It fails because the are certain
      +      critical CFLAG values that cannot be passed on the CMD.exe command line
      +      (like '=').  mkdeps.c is a work in progress that will, hopefully,
      +      replace both mkdeps.sh and mkdeps.bat.
      +    * tools/Config.mk:  Centralize the definition of the script that will be
      +      used to generated header file include paths for the compiler.  This
      +      needs to be centralized in order to support the Windows native build.
      +    * tools/incdir.bat:  A replacement for tools/incdir.sh for use with the
      +      the Windows native build.
      +    * Makefile.unix:  The existing top-level Makefile has been renamed
      +      Makefile.unix.
      +    * Makefile:  This is a new top-level Makefile that just includes
      +      either Makefile.unix or Makefile.win
      +    * configs/stm3240g-eval/src:  Qencoder fixes from Ryan Sundberg.
      +    * arch/arm/src/stm32/stm32_qencoder.c: TIM3 bug fix from Ryan Sundberg.
      +    * tools/mkromfsimg.sh: Correct typo in an error message (Ryan Sundberg)
      +    * arch/*/src/Makefile:  Remove tftboot install and creation of System.map
      +      for Windows native build.  The first is a necessary change, the second
      +      just needs re-implemented.
      +    * configs/mirtoo: Update Mirtoo pin definitions for Release 2.  Provided
      +      by Konstantin Dimitrov.
      +    * Fixed an uninitialized variable in the file system that can cause 
      +      assertions if DEBUG on (contributed by Lorenz Meier).
      +    * Config.mk:  Defined DELIM to be either / or \, depending upon
      +      CONFIG_WINDOWS_NATIVE.  This will allow me to eliminate a lot of
      +      conditional logic elsewhere.
      +    * nuttx/graphics: One a mouse button is pressed, continue to report all
      +      mouse button events to the first window that received the the initial
      +      button down event, even if the mouse attempts to drag outside the
      +      window. From Petteri Aimonen.
      +    * nuttx/graphics/nxmu/nx_block.c:  One more fix to the NX block message
      +      logic from Petteri Aimonen.
      +    * include/nuttx/wqueue.h: Some basic definitions to support a user-
      +      space work queue (someday in the future).
      +    * graphics/nxmu:  Add semaphores so buffers messages that send buffers
      +      will block until the buffer data has been acted upon.
      +    * graphics/nxmw:  Extended the blocked messages to cover mouse movement
      +      and redraw events.  These will also cause problems if sent to a window
      +      while it is closing.
      +    * arch/several:  Change UARTs are enabled for i.MX, LM3S, ez80, and M16C to
      +      match how they are enabled for other architectures.
      +    * configs/ez80f910200kitg:  Convert to use mconf configuration.
      +    * sched/pause.c:  Implements the POSIX pause() function.
      +    * ez80: Lots of changes to ez80 configurations and build logic as I
      +      struggle to get a clean Windows build (still not working).
      +    * configs/cloudctrl:   Darcy Gong's CloudController board.  This is a
      +      small network relay development board. Based on the Shenzhou IV development
      +      board design.  It is based on the STM32F107VC MCU.
      +    * arch/arm/src/stm32_serial.c and stm32_lowputc.c:  Added optional RS-485
      +      direction bit control. From Freddie Chopin.
      +    * Lots of build files:  ARMv7-M and MIPS32 Make.defs now include a common
      +      Toolchain.defs file that can be used to manage toolchains in a more
      +      configurable way.  Contributed by Mike Smith
      +    * configs/stm32f4discovery/winbuild and configs/cloudctrl:  Adapted to use
      +      Mike's Toolchain.defs.
      +    * tools/configure.sh:  Adapted to handle paths and setenv.bat files correctly
      +      for native Windows builds.
      +    * More of build files:  AVR and AVR32 Make.defs now include a common
      +      Toolchain.defs file that can be used to manage toolchains in a more
      +      configurable way.  Contributed by Mike Smith
      +    * tools/incdir.sh and incdir.bat: Add -s option to generate system header
      +      file paths.
      +    * nuttx/arch/arm/src/arm/Toolchain.defs: Add support for more ARM toolchains
      +      (from Mike Smith).
      +    * arch/arm/src/stm32/stm32f40xxx_rcc.c:  Enabled FLASH prefetch (from Petteri
      +      Aimonen).
      +    * graphics/nxtk/nxtk_filltrapwindow.c:  Correct an offset problem (from
      +      Peterri Aimonen).
      +    * graphics/nxglib/nxglib_splitline.c:  Fix error in drawing of near horizontal
      +      lines (from Peterri Aimonen).
      +    * sched/task_exithook.c:  Missing right bracket with certain conditional
      +      compilation (thanks James Goppert).
      +    * arch/arm/srch/stm32/stm32_otgfshost.c:  Replace timeout handling; use
      +      system tick instead of frame counter.  The frame counter gets reset to
      +      zero at 0x3fff making it error prone.
      +    * arch/arm/src/stm32/stm32f20xx_rcc.c and stm32f40xx_rcc.c: Added option
      +      CONFIG_STM32_FLASH_PREFETCH.  FLASH prefetch will now only be enabled
      +      if this option is selected.
      +    * confgs/ez80f910200zco/ostest:  Now uses Kconfig/mconf configuration
      +      tool. Updated to build in native Windows environment.  Other ez80f910200zco
      +      build scripts also updated.
      +    * configs/z8f64200100kit/ostest: Update to same level as ez80 configurations.
      +    * nuttx/configs/z8f64200100kit/scripts/setenv.bat: Add support for native
      +      Windows build.
      +    * nuttx/arch/arm/src/lpc17xx/lpc17_i2c.c: Resources not being released when
      +      I2C is uninitialized.
      +    * cloudctrl/src/up_chipid.c and shenzhou/src/up_chipid.c:  Add functions to
      +      get chip ID.  Contributed by Darcy Gong.  These should not be board-dependent,
      +      but should be in arch/arm/src/stm32 where they can be used from any board.
      +    * sched/work_thread.c: Fix backward conditional compilation.  This might
      +      has caused a memory leak.  From Freddie Chopin.
      +    * configs/<many>/Make.defs:  Fix typo -wstrict-prototypes should be
      +      -Wstrict-prototypes (From Denis Carilki).
      +    * arch/arm/src/calapyso/calypso_keypad.c:  Add Calypso keypad driver.  From
      +      Denis Carilki.
      +    * z8encore000zco/ostest and z8f64200100kit/ostest:  Converted to use Kconfig/
      +      mconf configuration tool.
      +    * arch/arm/src/armv7-m/up_exception.S: missing curly braces for push/pop
      +      From Freddie Chopin.
      +    * z8encore000zco/ostest and z8f64200100kit/ostest:  Can now be modified to
      +      support the Windows native builds (see corresponding README.txt files).
      +    * configs/z16f2800100zcog - All configurations updated to use the ZDS-II
      +      5.0.1 toolchain.
      +    * configs/z16f2800100zcog - All configurations updated to use Kconfig/mconf
      +      configuration tools.
      +    * configs/z16f2800100zcog/ostest - Now supports a native Windows build
      +      (other ZNEO configs may also support the native build, but this has not
      +      been verfiied).
      +    * include/nuttx/input/keypad.h, arch/arm/src/calypso/calypso_keypad.c, and
      +      configs/compal_e99/nsh_highram: First cut at a standard keypad interface
      +      definition.  Contributed by Denis Carikli.
      +    * libc/stdlib/lib_rand.c:  Always add one to result congruential generators
      +      to avoid the value zero.  Suggested by Freddie Chopin.
      +    * tools/b16.c:  Fixed precision math conversion utility.
      +    * graphics/nxglib/nxglib_splitline.c:  Fix the "fat, flat line bug"
      +    * arch/z80/src/*/Toolchain.defs:  Add dummy Toolchain.defs files for the
      +      z80 family.
      +    * configs/z80sim/ostest:  Converted to build with the Kconfig/mconf tool.
      +      Current configuration failed to build for me (Ubuntu 12.10, SDCC 3.2.0
      +      pre-built for Linux) due to a glibc memory corruptionerror in SDCC.
      +    * configs/z80sim/ostest: Default is now the Windows native build.  See
      +      configs/z80sim/README.txt for instructions to convert back to a Linux or
      +      or Cygwin build.
      +    * arch/z80/src/Makefile.sdccw:  Renamed makefiles with extensions zdiil,
      +      zdiiw, sdccl, and sdccw for the ZDS-II vs SDCC compilers and for the
      +      POSIX vs Windows native builds.
      +    * nuttx/drivers/mtd/ftl.c:  Fix for the flash translation layer. Short
      +      unaligned writes were buggy.  From Petteri Aimonen.
      +    * nuttx/libc/math/lib_round*.c:  Add rounding functions to the math
      +      library.  Contributed by Petteri Aimonen.
      +    * include/cxx/cstdlib:  Add stroul().  From Petteri Aimonen.
      +    * arch/*/include/limits.h:  Change signed minimum values from, for example,
      +      (-128) to (-127 - 1) to avoid overflows under certain conditions.  From
      +      Peterri Aimonen.
      +    * graphics/nxtk/nxtk_subwindowmove.c: Previously it was very difficult to
      +      do e.g. "scroll by dx, dy". When given the full window area, nxtk_subwindowmove
      +      would clip the offset always to 0,0. It makes more sense for it to clip the
      +      source area and not modify the offset.  From Petteri Aimonen.
      +    * graphics/nxtk/nxtk_getwindow.c: Clipping would change the offset of returned
      +      data, and caller has no way to know what the new offset would be. This messes
      +      up font drawing when the text is partially out of window, e.g. when scrolling.
      +      Also from Petteri Aimonen.
      +    * include/stdbool.h: Can now be disabled for C++ files if CONFIG_C99_BOOL8 is
      +      defined.  CONFIG_C99_BOOL8 indicates (1) that the sizeof(_Bool) is one in both
      +      C and C++, and (2) the the C compiler is C99 and supports the _Bool intrinsic
      +      type. Requested by Freddie Chopin.
      +    * include/stdlib/lib_rand.c:  Various additional changes so that the integer
      +      value zero can be returned.  Requested by Freddie Chopin.
      +    * arch/z80/src/Makefile.sdcc*, z80/up_mem.h:  Redesign Z80 build so that it
      +      no longer depends on Bash scripts.
      +    * configs/z80sim/nsh and pashello:  Converted to (1) use the kconfig-frontends
      +      configuration tool, and (2) to build natively under Windows.  The NSH
      +      configuration is verified; the pashello configuration needs a more TLC.
      +    * tools/copydir.sh:  Rename tools/winlink.sh to tools/copydir.sh
      +    * tools/link.bat, unlink.bat, and copydir.bat:  Add Windows counterparts
      +      to the link.sh, unlink.sh, and copydir.sh Bash scripts.
      +    * configs/z80sim/pashello:  Now builds correctly.
      +    * configs/xtrs/ostest, nsh, and pashello:  Converted to (1) use the kconfig-
      +      frontends configuration tool, and (2) to build natively under Windows.
      +    * drivers/serial/Kconfig and sched/Kconfig:  Two names for same configuration:
      +      CONFIG_LOWLEVEL_CONSOLE is bogus and CONFIG_DEV_LOWCONSOLE is in the wrong
      +      Kconfig file.  Moved to drivers/serial/Kconfig replacing CONFIG_LOWLEVEL_CONSOLE.
      +    * arch/z80/include/z180:  Add header files for z180 chips.  Initial versions
      +      are just clones of z80 header files.
      +    * arch/z80/src/z180:  Add source files for z180 chips.  Initial versions
      +      are just clones of z80 source files.
      +    * include/nuttx/arch.h:  Add address environment control interfaces (for use
      +      with CPUs the provide MCUs and support process-like address environments).
      +    * arch/z80/src/z180/z180_mmu.*:  Add MMU support for z180 tasks.
      +    * configs/p112:  Add very basic board support and an examples/ostest
      +      configuration for the venerable P112 board.
      +    * sched/os_bringup.c: If CONFIG_PATH_INITIAL is defined, then the initial
      +      environment of the task started by os_bringup() will have the PATH
      +      environment variable defined to be that string.
      +    * binfmt/binfmt_exepath.c:  If CONFIG_BINFMT_EXEPATH is defined, then this
      +      file will be built.  It contains logic to search for regular files at
      +      the absolutes paths found in the current PATH environment variable
      +      setting.  This is untested and not yet hooked into the binfmt exec()
      +      logic on initial check-in
      +    * binfmt/binfmt_loadmodule.c: load_module() will now traverse the PATH
      +      variable to locate files from their relative path.
      +    * include/nuttx/arch.h and arch/z80/src/z180/z180_mmu.c:  Restructure the
      +      address environment interfaces so that they will better integrate with
      +      binfmt/.
      +    * binfmt/libelf/*, binfmt/libnxflat/* and other files:  Integrate the
      +      address environment interfaces.  If CONFIG_ADDRENV=y, then binfmt/
      +      will now create an address environment for new tasks (instead of
      +      just malloc'ing the task memory).
      +    * configs/stm32f4discovery/elf:  Enable support/test of the PATH
      +      to find executables using a relative path.
      +
      +apps-6.24 2012-12-20 Gregory Nutt <gnutt@nuttx.org>
      +
      +    * apps/examples/ostest/roundrobin.c:  Replace large tables with
      +      algorithmic prime number generation.  This allows the roundrobin
      +      test to run on platforms with minimal SRAM (Freddie Chopin).
      +    * apps/nshlib/nsh_dbgcmds.c:  Add hexdump command to dump the contents
      +      of a file (or character device) to the console  Contributed by Petteri
      +      Aimonen.
      +    * apps/examples/modbus:  Fixes from Freddie Chopin
      +    * apps/examples/modbus/Kconfig: Kconfig logic for FreeModBus contributed
      +      by Freddie Chopin.
      +    * Makefile, */Makefile:  Various fixes for Windows native build.  Now uses
      +      make foreach loops instead of shell loops.
      +    * apps/examples/elf/test/*/Makefile: OSX doesn't support install -D, use
      +      mkdir -p then install without the -D.  From Mike Smith.
      +    * apps/examples/relays/Makefile: Reduced stack requirement (Darcy Gong).
      +    * apps/nshlib and apps/netutils/dhcpc:  Extend the NSH ifconfig command plus
      +      various DHCPC improvements(Darcy Gong).
      +    * apps/nshlib/nsh_apps.c: Fix compilation errors when CONFIG_NSH_DISABLEBG=y.
      +      From Freddie Chopin.
      +    * Rename CONFIG_PCODE and CONFIG_FICL as CONFIG_INTERPRETERS_PCODE and
      +      CONFIG_INTERPRETERS_FICL for consistency with other configuration naming.
      +    * apps/examples/keypadtest:  A keypad test example contributed by Denis
      +      Carikli.
      +    * apps/examples/elf and nxflat:  If CONFIG_BINFMT_EXEPATH is defined, these
      +      tests will now use a relative path to the program and expect the binfmt/
      +      logic to find the absolute path to the program using the PATH variable.
      +
      +NxWidgets-1.4 2012-12-20 Gregory Nutt <gnutt@nuttx.org>
      +
      +    * libnxwidgets/Makefile, NxWidgets/nxwm/Makefile, and
      +      NxWidgets/UnitTests/nxwm/Makefile:  Makefile improvements from
      +      submitted by Petteri Aimonen.  Other Makefiles in the UnitTests
      +      directory probably also need these changes.
      +    * libnxwidgets/src/ccallback.cxx: Fix misplaced #endif.  Provided
      +      by Petteri Aimonen.
      +    * libnxwidgets/src/cnxserver.cxx:  Reduce delay to allow NX server
      +      to start.  One second was un-necessarily long.  Reduced to 50 MS.
      +      Reduction suggested by Petteri Aimonen.
      +    * tools/bitmap_converter.py:  This script converts from any image type
      +      supported by Python imaging library to the RLE-encoded format used by
      +      NxWidgets.
      +    * NxWidgets/nxwm/src/capplicationwindow.cxx: If the "desktop" is empty,
      +      users have no need to minimize any windows. If the buttons are small,
      +      it's easy to hit minimize button accidentally when trying to close an
      +      application.  Contributed by Petteri Aimonen.
      +    * NxWidgets/nxwm/src/ctaskbar.cxx:  Add an option to eliminate the
      +      background image.  Contributed by Petteri Aimonen.
      +    * NxWidgets/nxwm/src/chexcalculator.cxx and NxWidgets/nxwm/src/cstartwindow.cxx:
      +      The config settings CONFIG_NXWM_STARTWINDOW_ICON and CONFIG_NXWM_HEXCALCULATOR_ICON
      +      allow changing the icons used for these applications. However, to declare symbols
      +      for these icons user would need to modify NxWidgets header files.
      +      This commit adds a simple forward declaration to the relevant files, based on the
      +      configured icon. If the icon does not exist, linker will give an error about it.
      +      Contributed by Petteri Aimonen.
      +    * NxWidgets::CTaskBar: Highlight the current window in the task bar.
      +      Contributed by Petteri Aimonen.
      +    * NxWidgets/libnxwidgets/src/glyph_cycle.cxx:  Width of glyph_cycle was wrong;
      +      Destructor needs to by public.  From Petteri Aimonen.
      +    * NxWidgets::CNumericEdit.  This is basically a label with plus and minus buttons.
      +      Contributed by Petteri, Aimonen.
      +    * NxWM::CStartWindow:  Fix mq_receive error handling with signal is recieved.
      +      From Petteri Aimonen.
      +    * NxWidgets::CNxTimer:  Replace the original (apparently non-functional) signal-
      +      based solution with a work queue-based solution.  This raises some isses about
      +      using the internal work queues from user space.  I have decided to implemented
      +      user-space work queues (someday) in order to accomplish that functionaliy.
      +      Submitted by Petteri Aimonen.
      +    * NxWidgets:CText and NxWidgets:CNumericEdite:  Fix some memory freeing bugs
      +      (from Petteri Aimonen).
      +    * NxWidgets::CScrollingPanel:  Usability improvements.  It is borderless for now,
      +      because there was no easy way to redraw only the required part of the border.
      +      Contributed by Petteri Aimonen.
      +    * NxWidgets::CNxWidgets and NxWM::CStartWindow: Small changes to make sub-
      +      classing easier (from Petteri Aimonen).
       
       uClibc++-1.0 2011-11-05 <gnutt@nuttx.org>
       
      diff --git a/nuttx/ReleaseNotes b/nuttx/ReleaseNotes
      index 5fe67a663..02cb8158d 100644
      --- a/nuttx/ReleaseNotes
      +++ b/nuttx/ReleaseNotes
      @@ -3184,8 +3184,8 @@ file for build information).
       This release corresponds with SVN release number: r5313
       
       Note that all SVN information has been stripped from the tarballs.  If you
      -r5313 the SVN configuration, you should check out directly from SVN.  Revision
      -r5206 should equivalent to release 6.22 of NuttX 6.22:
      +need the SVN configuration, you should check out directly from SVN.  Revision
      +r5313 should equivalent to release 6.23 of NuttX 6.23:
       
           svn checkout -r5313 svn://svn.code.sf.net/p/nuttx/code/trunk nuttx-code
       
      @@ -3249,3 +3249,194 @@ Bugfixes (see the change log for details).  Some of these are very important
            (Mike Smith), cf[get|set]speed() (Mike Smith)
       
       As well as other, less critical bugs (see the ChangeLog for details)
      +
      +NuttX-6.24
      +^^^^^^^^^^
      +
      +The 91st release of NuttX, Version 6.24, was made on December 20, 2012,
      +and is available for download from the SourceForge website.  Note
      +that release consists of two tarballs:  nuttx-6.24.tar.gz and
      +apps-6.24.tar.gz.  Both may be needed (see the top-level nuttx/README.txt
      +file for build information).
      +
      +This release corresponds with SVN release number: r5447
      +
      +Note that all SVN information has been stripped from the tarballs.  If you
      +need the SVN configuration information, you should check out directly from
      +SVN.  Revision r5447 should equivalent to release 6.24 of NuttX 6.24:
      +
      +    svn checkout -r5447 svn://svn.code.sf.net/p/nuttx/code/trunk nuttx-code
      +
      +Or (HTTP):
      +
      +    svn checkout -r5447 http://svn.code.sf.net/p/nuttx/code/trunk nuttx-code
      +
      +Additional new features and extended functionality:
      +
      +  * RTOS:
      +
      +    - Implemented the POSIX pause() function (still has some compiance
      +      issues).
      +    - Tasking logic is extended to support the notion of address
      +      environments.  An address environment is the key notion underlying
      +      "process" vs. tasks.  If tasks are created with address environments
      +      (by binfmt), the OS will propogate that environment to child threads
      +      and will destroy the address environment when the "process" exists.
      +    - If support for the PATH variable is enabled, the OS start up logic
      +      will create an initial environment containing the default PATH
      +      setting (CONFIG_PATH_INITIAL).  This initial PATH will then be
      +      inherited by all tasks.
      +
      +  * Binfmt
      +
      +    - The NuttX binary loaders have been updated to support the PATH
      +      environment variable.  Now, if the PATH is properly defined, programs
      +      can be executed from mass storage using only the file name.  This
      +      feature is added to support more standard behavior (eventually, NSH
      +      will support execution of programs in file systems by just entering
      +      the file name, perhaps in 6.25?).
      +    - The NXFLAT and ELF binary loaders have been extended to create
      +      address environments for any new tasks executed from the file system.
      +      This feature requires that the architecture support a memory management
      +      unit (MMU) and the address environment interfaces declared in
      +      include/nuttx/arch.h (currently, this is only supported by the z180).
      +
      +    * Drivers: LCD driver for the Univision UG-2864AMBAG01 OLED
      +
      +    * STM32: Support for STM32F100 high density chips contributed by Freddie
      +      Chopin.
      +
      +    * STM32 Drivers:  Added optional RS-485 direction bit control (from
      +      Freddie Chopin).
      +
      +    * STM32 Boards:
      +
      +      - Support for generic STM32F100RC board contributed by Freddie Chopin.
      +      - stm32f4discovery/nxlines: STM32F4Discovery support for the
      +        UG-2864AMBAG01 OLED.
      +      - stm32f4discovery/winbuild:  A version of the NuttX OS test
      +        configured to build natively on Windows.
      +      - stm32f4discovery/elf: Now uses the PATH variable to find ELF
      +        executables.
      +      - configs/cloudctrl: Added for Darcy Gong's CloudController board
      +
      +    * PIC32 Boards: Update the Mirtool configuration for Release 2 of the
      +      Mirtoo module.
      +
      +    * Calypso: Add Calypso keypad driver.  From Denis Cariki.
      +
      +    * ZiLOG:
      +
      +      - Add support for the z180 chip family and, specifically, for
      +        the P112 retro hardware (see http://p112.feedle.net/).
      +      - All ZiLOG configurations updated to use the current ZDS-II
      +        and/or SDCC toolchains.
      +
      +    * Graphics:
      +
      +      - Add a semaphore handshake so that operations on buffers from
      +        the NXMU client will be blocked until the NX server operates on the
      +        buffer data (from Petteri Aimonen).
      +      - nxtk_subwindowmove() and nxtk_getwindow(): Improvements to clipping
      +        logic from Petteri Aimonen.
      +
      +    * C Library: lib/ sub-directory renamed libc/ (there is a new lib/ sub-
      +      directory that is used to hold all archives).
      +
      +    * C++: Exception stubs from Petteri Aimonen.
      +
      +    * Applications:
      +
      +      - Add NSH hexdump command to dump the contents of a file (or character
      +        device) to the console (contributed by Petteri Aimonen).
      +      - Extend the NSH ifconfig command plus various DHCPC improvements
      +        (from Darcy Gong).
      +
      +    * apps/examples:
      +
      +      - ostest: Replace large tables with algorithmic prime number
      +        generation.  This allows the roundrobin test to run on platforms
      +        with minimal SRAM (Freddie Chopin).
      +      - keypadtest:  A new keypad test example contributed by Denis Carikli.
      +      - elf and nxflat:  If CONFIG_BINFMT_EXEPATH is defined, these examples
      +        will now use a relative path to the program and expect the binfmt/
      +        logic to find the absolute path to the program using the PATH
      +        variable.
      +
      +    * Build system:
      +
      +      - New top-level Makefiles: Makefile.unix and Makefile.win (along with
      +        numerous changes to other make-related files).  This adds basic
      +        support for building NuttX natively under Windows from a CMD.exe
      +        window (rather than in a POSIX-like environment). This build: (1)
      +        Uses all Windows style paths, (2) Uses primarily Windows batch
      +        commands from cmd.exe, with (3) a few extensions from GNUWin32.
      +
      +        This capability should still be considered a work in progress
      +        because: (1) it has not been verfied on all targets and tools,
      +        and (2) still lacks some of the creature-comforts of the more
      +        mature environments (like a function configure.sh script and
      +        'make menuconfig' support).
      +
      +      - Example Windows native builds for STM32F4Discovery, eZ80, z16f, z8,
      +        Z80, and Z180.
      +      - Several configurations have been converted to work the kconfig-
      +        frontends mconf configuration tool: stm32f4discovery/nxlines, and
      +        all eZ80, z16f, z8, Z80, and Z180 configurations.
      +      - Architectures now include a common Toolchain.defs file that can be
      +        used to manage toolchains in a more configurable way (most of this
      +        contributed by Mike Smith).
      +
      +    * Build tools: 
      +
      +      - Renamed tools/winlink.sh to tools/copydir.sh.
      +      - Several new tools/scripts to support the Windows native build:
      +        tools/mkdeps.bat, tools/mkdeps.c, tools/link.bat, unlink.bat, and
      +        copydir.bat.
      +      - tools/incdir.sh and incdir.bat now support an -s option to generate
      +        system header file paths.
      +      - tools/b16.c: Fixed precision math conversion utility.
      +
      +Bugfixes (see the change log for details).  Some of these are very important
      +(marked *critical*):
      +
      +    * RTOS: Fix some backward conditional compilation in the work queue
      +      logic (Freddie Chopin).
      +
      +    * File System: Uninitialized variable caused assertions (from Lorenz
      +      Meier).
      +
      +    * Drivers: Partial fix for STM32 OTGFS device drivers and fix for short,
      +      unaligned writes in the flash translation layer (drivers/mtd/ftl.c),
      +      both from Petteri Aimonen.
      +
      +    * STM32 Drivers:
      +
      +      - Qencoder driver and TIM3 driver fixes from Ryan Sundberg.
      +      - Fix timeout delay calculation in the STM32 OTG FS host driver.
      +
      +    * LPC17xx Drivers:  Resources not being properly released when I2C
      +      driver is un-initialized.
      +
      +    * Graphics:
      +
      +      - Fix logic when the mouse drags outside of the window; fix
      +        another "blocked message" handling case (both from Petteri Aimonen).
      +      - nxtk_filltrapwindow():  Correct an offset problem (also from Peterri
      +        Aimonen).
      +      - nxglib_splitline():  Correct the "fat flat line" bug.
      +
      +    * C Library:
      +
      +      - nrand() changes to prevent coefficients from becoming zero which
      +        would "lock up" the random number generate.
      +      - Add rounding functions to the math library (contributed by Petteri
      +        Aimonen).
      +
      +    * Build system:  Changes to MIN definitions in all limit.h header files
      +      to avoid integer overflows.  For example from (-128) to (-127 - 1)
      +      (from Petteri Aimonen).
      +
      +    * Applications: Modbus fixes from Freddie Chopin.
      +
      +As well as other, less critical bugs (see the ChangeLog for details)
      -- 
      cgit v1.2.3
      
      
      From 0267782782f083c53bcf49b28e4ba2ed8c28105a Mon Sep 17 00:00:00 2001
      From: px4dev 
      Date: Fri, 11 Jan 2013 02:32:05 -0800
      Subject: Recover changes lost to bad merging.
      
      ---
       apps/Makefile                     |  71 ++++++++++++-----
       apps/examples/adc/Makefile        |  21 ++---
       apps/examples/adc/adc_main.c      |   7 +-
       apps/examples/buttons/Makefile    |  21 ++---
       apps/examples/can/Makefile        |  21 ++---
       apps/examples/cdcacm/Makefile     |  19 +++--
       apps/examples/hello/Makefile      |  19 +++--
       apps/examples/helloxx/Makefile    |  23 +++---
       apps/examples/mm/Makefile         |  21 ++---
       apps/examples/mount/Makefile      |  21 ++---
       apps/examples/nsh/Makefile        |  21 ++---
       apps/examples/null/Makefile       |  21 ++---
       apps/examples/ostest/Kconfig      |  27 +++++++
       apps/examples/ostest/Makefile     |  19 +++--
       apps/examples/ostest/roundrobin.c | 156 ++++++++++++++++----------------------
       apps/examples/pipe/Makefile       |  21 ++---
       apps/examples/poll/Makefile       |  22 +++---
       apps/examples/pwm/Makefile        |  21 ++---
       apps/examples/pwm/pwm_main.c      |   1 +
       apps/examples/qencoder/Makefile   |  19 +++--
       apps/examples/romfs/Makefile      |  24 +++---
       apps/examples/serloop/Makefile    |  21 ++---
       apps/examples/watchdog/Makefile   |  19 +++--
       apps/interpreters/Makefile        |  32 ++++----
       apps/interpreters/ficl/Makefile   |  29 +++----
       apps/namedapp/Makefile            |  32 ++++----
       apps/nshlib/Kconfig               | 100 +++++++++++++++++++++++-
       apps/nshlib/Makefile              |  61 ++++++++-------
       apps/nshlib/nsh_dbgcmds.c         |  61 ++++++++++++++-
       apps/nshlib/nsh_netinit.c         |  12 ++-
       apps/system/Makefile              |  33 ++++----
       apps/system/free/Makefile         |  28 ++++---
       apps/system/i2c/Makefile          |  27 ++++---
       apps/system/install/Makefile      |  27 ++++---
       apps/system/readline/Makefile     |  24 +++---
       35 files changed, 701 insertions(+), 401 deletions(-)
      
      (limited to 'apps')
      
      diff --git a/apps/Makefile b/apps/Makefile
      index 11d95bc19..f0de58e25 100644
      --- a/apps/Makefile
      +++ b/apps/Makefile
      @@ -107,7 +107,7 @@ endif
       # Create the list of available applications (INSTALLED_APPS)
       
       define ADD_BUILTIN
      -INSTALLED_APPS += ${shell if [ -r $1/Makefile ]; then echo "$1"; fi}
      +  INSTALLED_APPS += $(if $(wildcard $1$(DELIM)Makefile),$1,)
       endef
       
       $(foreach BUILTIN, $(CONFIGURED_APPS), $(eval $(call ADD_BUILTIN,$(BUILTIN))))
      @@ -120,8 +120,10 @@ INSTALLED_APPS += $(EXTERNAL_APPS)
       # provided by the user (possibly as a symbolic link) to add libraries and
       # applications to the standard build from the repository.
       
      -INSTALLED_APPS += ${shell if [ -r external/Makefile ]; then echo "external"; fi}
      -SUBDIRS += ${shell if [ -r external/Makefile ]; then echo "external"; fi}
      +EXTERNAL_DIR := $(dir $(wildcard external$(DELIM)Makefile))
      +
      +INSTALLED_APPS += $(EXTERNAL_DIR)
      +SUBDIRS += $(EXTERNAL_DIR)
       
       # The final build target
       
      @@ -133,48 +135,81 @@ all: $(BIN)
       .PHONY: $(INSTALLED_APPS) context depend clean distclean
       
       $(INSTALLED_APPS):
      -	@$(MAKE) -C $@ TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)";
      +	$(Q) $(MAKE) -C $@ TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)"
       
       $(BIN):	$(INSTALLED_APPS)
      -	@( for obj in $(OBJS) ; do \
      -		$(call ARCHIVE, $@, $${obj}); \
      -	done ; )
       
       .context:
      -	@for dir in $(INSTALLED_APPS) ; do \
      +ifeq ($(CONFIG_WINDOWS_NATIVE),y)
      +	$(Q) for %%G in ($(INSTALLED_APPS)) do ( \
      +		if exist %%G\.context del /f /q %%G\.context \
      +		$(MAKE) -C %%G TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)" context \
      +	)
      +else
      +	$(Q) for dir in $(INSTALLED_APPS) ; do \
       		rm -f $$dir/.context ; \
      -		$(MAKE) -C $$dir TOPDIR="$(TOPDIR)"  APPDIR="$(APPDIR)" context ; \
      +		$(MAKE) -C $$dir TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)" context ; \
       	done
      -	@touch $@
      +endif
      +	$(Q) touch $@
       
       context: .context
       
       .depend: context Makefile $(SRCS)
      -	@for dir in $(INSTALLED_APPS) ; do \
      +ifeq ($(CONFIG_WINDOWS_NATIVE),y)
      +	$(Q) for %%G in ($(INSTALLED_APPS)) do ( \
      +		if exist %%G\.depend del /f /q %%G\.depend \
      +		$(MAKE) -C %%G TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)" depend \
      +	)
      +else
      +	$(Q) for dir in $(INSTALLED_APPS) ; do \
       		rm -f $$dir/.depend ; \
      -		$(MAKE) -C $$dir TOPDIR="$(TOPDIR)"  APPDIR="$(APPDIR)" depend ; \
      +		$(MAKE) -C $$dir TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)" depend ; \
       	done
      -	@touch $@
      +endif
      +	$(Q) touch $@
       
       depend: .depend
       
       clean:
      -	@for dir in $(SUBDIRS) ; do \
      +ifeq ($(CONFIG_WINDOWS_NATIVE),y)
      +	$(Q) for %%G in ($(SUBDIRS)) do ( \
      +		$(MAKE) -C %%G clean TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)" \
      +	)
      +else
      +	$(Q) for dir in $(SUBDIRS) ; do \
       		$(MAKE) -C $$dir clean TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)"; \
       	done
      -	@rm -f $(BIN) *~ .*.swp *.o
      +endif
      +	$(call DELFILE, $(BIN))
       	$(call CLEAN)
       
       distclean: # clean
      -	@for dir in $(SUBDIRS) ; do \
      +ifeq ($(CONFIG_WINDOWS_NATIVE),y)
      +	$(Q) for %%G in ($(SUBDIRS)) do ( \
      +		$(MAKE) -C %%G distclean TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)" \
      +	)
      +	$(call DELFILE, .config)
      +	$(call DELFILE, .context)
      +	$(call DELFILE, .depend)
      +	$(Q) ( if exist  external ( \
      +		echo ********************************************************" \
      +		echo * The external directory/link must be removed manually *" \
      +		echo ********************************************************" \
      +	)
      +else
      +	$(Q) for dir in $(SUBDIRS) ; do \
       		$(MAKE) -C $$dir distclean TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)"; \
       	done
      -	@rm -f .config .context .depend
      -	@( if [ -e external ]; then \
      +	$(call DELFILE, .config)
      +	$(call DELFILE, .context)
      +	$(call DELFILE, .depend)
      +	$(Q) ( if [ -e external ]; then \
       		echo "********************************************************"; \
       		echo "* The external directory/link must be removed manually *"; \
       		echo "********************************************************"; \
       	   fi; \
       	) 
      +endif
       
       
      diff --git a/apps/examples/adc/Makefile b/apps/examples/adc/Makefile
      index 6357dfc3d..69862b383 100644
      --- a/apps/examples/adc/Makefile
      +++ b/apps/examples/adc/Makefile
      @@ -1,7 +1,7 @@
       ############################################################################
       # apps/examples/adc/Makefile
       #
      -#   Copyright (C) 2011 Gregory Nutt. All rights reserved.
      +#   Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
       #   Author: Gregory Nutt 
       #
       # Redistribution and use in source and binary forms, with or without
      @@ -48,10 +48,14 @@ COBJS		= $(CSRCS:.c=$(OBJEXT))
       SRCS		= $(ASRCS) $(CSRCS)
       OBJS		= $(AOBJS) $(COBJS)
       
      +ifeq ($(CONFIG_WINDOWS_NATIVE),y)
      +  BIN		= ..\..\libapps$(LIBEXT)
      +else
       ifeq ($(WINTOOL),y)
      -  BIN		= "${shell cygpath -w  $(APPDIR)/libapps$(LIBEXT)}"
      +  BIN		= ..\\..\\libapps$(LIBEXT)
       else
      -  BIN		= "$(APPDIR)/libapps$(LIBEXT)"
      +  BIN		= ../../libapps$(LIBEXT)
      +endif
       endif
       
       ROOTDEPPATH	= --dep-path .
      @@ -76,9 +80,7 @@ $(COBJS): %$(OBJEXT): %.c
       	$(call COMPILE, $<, $@)
       
       .built: $(OBJS)
      -	@( for obj in $(OBJS) ; do \
      -		$(call ARCHIVE, $(BIN), $${obj}); \
      -	done ; )
      +	$(call ARCHIVE, $(BIN), $(OBJS))
       	@touch .built
       
       .context:
      @@ -90,16 +92,17 @@ endif
       context: .context
       
       .depend: Makefile $(SRCS)
      -	@$(MKDEP) $(ROOTDEPPATH) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
      +	@$(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
       	@touch $@
       
       depend: .depend
       
       clean:
      -	@rm -f *.o *~ .*.swp .built
      +	$(call DELFILE, .built)
       	$(call CLEAN)
       
       distclean: clean
      -	@rm -f Make.dep .depend
      +	$(call DELFILE, Make.dep)
      +	$(call DELFILE, .depend)
       
       -include Make.dep
      diff --git a/apps/examples/adc/adc_main.c b/apps/examples/adc/adc_main.c
      index 404fba8c1..553658fee 100644
      --- a/apps/examples/adc/adc_main.c
      +++ b/apps/examples/adc/adc_main.c
      @@ -289,7 +289,7 @@ int adc_main(int argc, char *argv[])
           {
             message("adc_main: open %s failed: %d\n", g_adcstate.devpath, errno);
             errval = 2;
      -      goto errout_with_dev;
      +      goto errout;
           }
       
         /* Now loop the appropriate number of times, displaying the collected
      @@ -357,6 +357,11 @@ int adc_main(int argc, char *argv[])
             }
         }
       
      +  close(fd);
      +  return OK;
      +
      +  /* Error exits */
      +
       errout_with_dev:
         close(fd);
       
      diff --git a/apps/examples/buttons/Makefile b/apps/examples/buttons/Makefile
      index 25d1ef2c2..77c1cd67d 100644
      --- a/apps/examples/buttons/Makefile
      +++ b/apps/examples/buttons/Makefile
      @@ -1,7 +1,7 @@
       ############################################################################
       # apps/examples/buttons/Makefile
       #
      -#   Copyright (C) 2011 Gregory Nutt. All rights reserved.
      +#   Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
       #   Author: Gregory Nutt 
       #
       # Redistribution and use in source and binary forms, with or without
      @@ -48,10 +48,14 @@ COBJS		= $(CSRCS:.c=$(OBJEXT))
       SRCS		= $(ASRCS) $(CSRCS)
       OBJS		= $(AOBJS) $(COBJS)
       
      +ifeq ($(CONFIG_WINDOWS_NATIVE),y)
      +  BIN		= ..\..\libapps$(LIBEXT)
      +else
       ifeq ($(WINTOOL),y)
      -  BIN		= "${shell cygpath -w  $(APPDIR)/libapps$(LIBEXT)}"
      +  BIN		= ..\\..\\libapps$(LIBEXT)
       else
      -  BIN		= "$(APPDIR)/libapps$(LIBEXT)"
      +  BIN		= ../../libapps$(LIBEXT)
      +endif
       endif
       
       ROOTDEPPATH	= --dep-path .
      @@ -76,9 +80,7 @@ $(COBJS): %$(OBJEXT): %.c
       	$(call COMPILE, $<, $@)
       
       .built: $(OBJS)
      -	@( for obj in $(OBJS) ; do \
      -		$(call ARCHIVE, $(BIN), $${obj}); \
      -	done ; )
      +	$(call ARCHIVE, $(BIN), $(OBJS))
       	@touch .built
       
       .context:
      @@ -90,16 +92,17 @@ endif
       context: .context
       
       .depend: Makefile $(SRCS)
      -	@$(MKDEP) $(ROOTDEPPATH) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
      +	@$(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
       	@touch $@
       
       depend: .depend
       
       clean:
      -	@rm -f *.o *~ .*.swp .built
      +	$(call DELFILE, .built)
       	$(call CLEAN)
       
       distclean: clean
      -	@rm -f Make.dep .depend
      +	$(call DELFILE, Make.dep)
      +	$(call DELFILE, .depend)
       
       -include Make.dep
      diff --git a/apps/examples/can/Makefile b/apps/examples/can/Makefile
      index c6dc5af84..8924797e3 100644
      --- a/apps/examples/can/Makefile
      +++ b/apps/examples/can/Makefile
      @@ -1,7 +1,7 @@
       ############################################################################
       # apps/examples/can/Makefile
       #
      -#   Copyright (C) 2011 Gregory Nutt. All rights reserved.
      +#   Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
       #   Author: Gregory Nutt 
       #
       # Redistribution and use in source and binary forms, with or without
      @@ -48,10 +48,14 @@ COBJS		= $(CSRCS:.c=$(OBJEXT))
       SRCS		= $(ASRCS) $(CSRCS)
       OBJS		= $(AOBJS) $(COBJS)
       
      +ifeq ($(CONFIG_WINDOWS_NATIVE),y)
      +  BIN		= ..\..\libapps$(LIBEXT)
      +else
       ifeq ($(WINTOOL),y)
      -  BIN		= "${shell cygpath -w  $(APPDIR)/libapps$(LIBEXT)}"
      +  BIN		= ..\\..\\libapps$(LIBEXT)
       else
      -  BIN		= "$(APPDIR)/libapps$(LIBEXT)"
      +  BIN		= ../../libapps$(LIBEXT)
      +endif
       endif
       
       ROOTDEPPATH	= --dep-path .
      @@ -76,9 +80,7 @@ $(COBJS): %$(OBJEXT): %.c
       	$(call COMPILE, $<, $@)
       
       .built: $(OBJS)
      -	@( for obj in $(OBJS) ; do \
      -		$(call ARCHIVE, $(BIN), $${obj}); \
      -	done ; )
      +	$(call ARCHIVE, $(BIN), $(OBJS))
       	@touch .built
       
       .context:
      @@ -90,16 +92,17 @@ endif
       context: .context
       
       .depend: Makefile $(SRCS)
      -	@$(MKDEP) $(ROOTDEPPATH) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
      +	@$(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
       	@touch $@
       
       depend: .depend
       
       clean:
      -	@rm -f *.o *~ .*.swp .built
      +	$(call DELFILE, .built)
       	$(call CLEAN)
       
       distclean: clean
      -	@rm -f Make.dep .depend
      +	$(call DELFILE, Make.dep)
      +	$(call DELFILE, .depend)
       
       -include Make.dep
      diff --git a/apps/examples/cdcacm/Makefile b/apps/examples/cdcacm/Makefile
      index 3fa886d56..e8d03807d 100644
      --- a/apps/examples/cdcacm/Makefile
      +++ b/apps/examples/cdcacm/Makefile
      @@ -48,10 +48,14 @@ COBJS		= $(CSRCS:.c=$(OBJEXT))
       SRCS		= $(ASRCS) $(CSRCS)
       OBJS		= $(AOBJS) $(COBJS)
       
      +ifeq ($(CONFIG_WINDOWS_NATIVE),y)
      +  BIN		= ..\..\libapps$(LIBEXT)
      +else
       ifeq ($(WINTOOL),y)
      -  BIN		= "${shell cygpath -w  $(APPDIR)/libapps$(LIBEXT)}"
      +  BIN		= ..\\..\\libapps$(LIBEXT)
       else
      -  BIN		= "$(APPDIR)/libapps$(LIBEXT)"
      +  BIN		= ../../libapps$(LIBEXT)
      +endif
       endif
       
       ROOTDEPPATH	= --dep-path .
      @@ -80,9 +84,7 @@ $(COBJS): %$(OBJEXT): %.c
       	$(call COMPILE, $<, $@)
       
       .built: $(OBJS)
      -	@( for obj in $(OBJS) ; do \
      -		$(call ARCHIVE, $(BIN), $${obj}); \
      -	done ; )
      +	$(call ARCHIVE, $(BIN), $(OBJS))
       	@touch .built
       
       .context:
      @@ -93,17 +95,18 @@ $(COBJS): %$(OBJEXT): %.c
       context: .context
       
       .depend: Makefile $(SRCS)
      -	@$(MKDEP) $(ROOTDEPPATH) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
      +	@$(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
       	@touch $@
       
       depend: .depend
       
       clean:
      -	@rm -f *.o *~ .*.swp .built
      +	$(call DELFILE, .built)
       	$(call CLEAN)
       
       distclean: clean
      -	@rm -f Make.dep .depend
      +	$(call DELFILE, Make.dep)
      +	$(call DELFILE, .depend)
       
       -include Make.dep
       
      diff --git a/apps/examples/hello/Makefile b/apps/examples/hello/Makefile
      index 1d78d723e..560b0da35 100644
      --- a/apps/examples/hello/Makefile
      +++ b/apps/examples/hello/Makefile
      @@ -54,10 +54,14 @@ COBJS		= $(CSRCS:.c=$(OBJEXT))
       SRCS		= $(ASRCS) $(CSRCS)
       OBJS		= $(AOBJS) $(COBJS)
       
      +ifeq ($(CONFIG_WINDOWS_NATIVE),y)
      +  BIN		= ..\..\libapps$(LIBEXT)
      +else
       ifeq ($(WINTOOL),y)
      -  BIN		= "${shell cygpath -w  $(APPDIR)/libapps$(LIBEXT)}"
      +  BIN		= ..\\..\\libapps$(LIBEXT)
       else
      -  BIN		= "$(APPDIR)/libapps$(LIBEXT)"
      +  BIN		= ../../libapps$(LIBEXT)
      +endif
       endif
       
       ROOTDEPPATH	= --dep-path .
      @@ -76,9 +80,7 @@ $(COBJS): %$(OBJEXT): %.c
       	$(call COMPILE, $<, $@)
       
       .built: $(OBJS)
      -	@( for obj in $(OBJS) ; do \
      -		$(call ARCHIVE, $(BIN), $${obj}); \
      -	done ; )
      +	$(call ARCHIVE, $(BIN), $(OBJS))
       	@touch .built
       
       .context:
      @@ -90,16 +92,17 @@ endif
       context: .context
       
       .depend: Makefile $(SRCS)
      -	@$(MKDEP) $(ROOTDEPPATH) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
      +	@$(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
       	@touch $@
       
       depend: .depend
       
       clean:
      -	@rm -f *.o *~ .*.swp .built
      +	$(call DELFILE, .built)
       	$(call CLEAN)
       
       distclean: clean
      -	@rm -f Make.dep .depend
      +	$(call DELFILE, Make.dep)
      +	$(call DELFILE, .depend)
       
       -include Make.dep
      diff --git a/apps/examples/helloxx/Makefile b/apps/examples/helloxx/Makefile
      index 8e85eab23..062da7d58 100644
      --- a/apps/examples/helloxx/Makefile
      +++ b/apps/examples/helloxx/Makefile
      @@ -1,7 +1,7 @@
       ############################################################################
       # apps/examples/helloxx/Makefile
       #
      -#   Copyright (C) 2009-2011 Gregory Nutt. All rights reserved.
      +#   Copyright (C) 2009-2012 Gregory Nutt. All rights reserved.
       #   Author: Gregory Nutt 
       #
       # Redistribution and use in source and binary forms, with or without
      @@ -50,10 +50,14 @@ CXXOBJS		= $(CXXSRCS:.cxx=$(OBJEXT))
       SRCS		= $(ASRCS) $(CSRCS) $(CXXSRCS)
       OBJS		= $(AOBJS) $(COBJS) $(CXXOBJS)
       
      +ifeq ($(CONFIG_WINDOWS_NATIVE),y)
      +  BIN		= ..\..\libapps$(LIBEXT)
      +else
       ifeq ($(WINTOOL),y)
      -  BIN		= "${shell cygpath -w  $(APPDIR)/libapps$(LIBEXT)}"
      +  BIN		= ..\\..\\libapps$(LIBEXT)
       else
      -  BIN		= "$(APPDIR)/libapps$(LIBEXT)"
      +  BIN		= ../../libapps$(LIBEXT)
      +endif
       endif
       
       ROOTDEPPATH	= --dep-path .
      @@ -69,7 +73,7 @@ STACKSIZE	= 2048
       VPATH		= 
       
       all: .built
      -.PHONY:	clean depend disclean chkcxx
      +.PHONY:	clean depend distclean chkcxx
       
       chkcxx:
       ifneq ($(CONFIG_HAVE_CXX),y)
      @@ -93,9 +97,7 @@ $(CXXOBJS): %$(OBJEXT): %.cxx
       	$(call COMPILEXX, $<, $@)
       
       .built: chkcxx $(OBJS)
      -	@( for obj in $(OBJS) ; do \
      -		$(call ARCHIVE, $(BIN), $${obj}); \
      -	done ; )
      +	$(call ARCHIVE, $(BIN), $(OBJS))
       	@touch .built
       
       .context:
      @@ -107,16 +109,17 @@ endif
       context: .context
       
       .depend: Makefile $(SRCS)
      -	@$(MKDEP) $(ROOTDEPPATH) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
      +	@$(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
       	@touch $@
       
       depend: .depend
       
       clean:
      -	@rm -f *.o *~ .*.swp .built
      +	$(call DELFILE, .built)
       	$(call CLEAN)
       
       distclean: clean
      -	@rm -f Make.dep .depend
      +	$(call DELFILE, Make.dep)
      +	$(call DELFILE, .depend)
       
       -include Make.dep
      diff --git a/apps/examples/mm/Makefile b/apps/examples/mm/Makefile
      index 24ed4926f..5ba7f4eec 100644
      --- a/apps/examples/mm/Makefile
      +++ b/apps/examples/mm/Makefile
      @@ -1,7 +1,7 @@
       ############################################################################
       # apps/examples/mm/Makefile
       #
      -#   Copyright (C) 2011 Gregory Nutt. All rights reserved.
      +#   Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
       #   Author: Gregory Nutt 
       #
       # Redistribution and use in source and binary forms, with or without
      @@ -48,10 +48,14 @@ COBJS		= $(CSRCS:.c=$(OBJEXT))
       SRCS		= $(ASRCS) $(CSRCS)
       OBJS		= $(AOBJS) $(COBJS)
       
      +ifeq ($(CONFIG_WINDOWS_NATIVE),y)
      +  BIN		= ..\..\libapps$(LIBEXT)
      +else
       ifeq ($(WINTOOL),y)
      -  BIN		= "${shell cygpath -w  $(APPDIR)/libapps$(LIBEXT)}"
      +  BIN		= ..\\..\\libapps$(LIBEXT)
       else
      -  BIN		= "$(APPDIR)/libapps$(LIBEXT)"
      +  BIN		= ../../libapps$(LIBEXT)
      +endif
       endif
       
       ROOTDEPPATH	= --dep-path .
      @@ -70,24 +74,23 @@ $(COBJS): %$(OBJEXT): %.c
       	$(call COMPILE, $<, $@)
       
       .built: $(OBJS)
      -	@( for obj in $(OBJS) ; do \
      -		$(call ARCHIVE, $(BIN), $${obj}); \
      -	done ; )
      +	$(call ARCHIVE, $(BIN), $(OBJS))
       	@touch .built
       
       context:
       
       .depend: Makefile $(SRCS)
      -	@$(MKDEP) $(ROOTDEPPATH) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
      +	@$(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
       	@touch $@
       
       depend: .depend
       
       clean:
      -	@rm -f *.o *~ .*.swp .built
      +	$(call DELFILE, .built)
       	$(call CLEAN)
       
       distclean: clean
      -	@rm -f Make.dep .depend
      +	$(call DELFILE, Make.dep)
      +	$(call DELFILE, .depend)
       
       -include Make.dep
      diff --git a/apps/examples/mount/Makefile b/apps/examples/mount/Makefile
      index 69cf970cf..133bdfa1f 100644
      --- a/apps/examples/mount/Makefile
      +++ b/apps/examples/mount/Makefile
      @@ -1,7 +1,7 @@
       ############################################################################
       # apps/Makefile
       #
      -#   Copyright (C) 2007-2008, 2010-2010 Gregory Nutt. All rights reserved.
      +#   Copyright (C) 2007-2008, 2010-2010, 2012 Gregory Nutt. All rights reserved.
       #   Author: Gregory Nutt 
       #
       # Redistribution and use in source and binary forms, with or without
      @@ -48,10 +48,14 @@ COBJS		= $(CSRCS:.c=$(OBJEXT))
       SRCS		= $(ASRCS) $(CSRCS)
       OBJS		= $(AOBJS) $(COBJS)
       
      +ifeq ($(CONFIG_WINDOWS_NATIVE),y)
      +  BIN		= ..\..\libapps$(LIBEXT)
      +else
       ifeq ($(WINTOOL),y)
      -  BIN		= "${shell cygpath -w  $(APPDIR)/libapps$(LIBEXT)}"
      +  BIN		= ..\\..\\libapps$(LIBEXT)
       else
      -  BIN		= "$(APPDIR)/libapps$(LIBEXT)"
      +  BIN		= ../../libapps$(LIBEXT)
      +endif
       endif
       
       ROOTDEPPATH	= --dep-path .
      @@ -70,24 +74,23 @@ $(COBJS): %$(OBJEXT): %.c
       	$(call COMPILE, $<, $@)
       
       .built: $(OBJS)
      -	@( for obj in $(OBJS) ; do \
      -		$(call ARCHIVE, $(BIN), $${obj}); \
      -	done ; )
      +	$(call ARCHIVE, $(BIN), $(OBJS))
       	@touch .built
       
       context:
       
       .depend: Makefile $(SRCS)
      -	@$(MKDEP) $(ROOTDEPPATH) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
      +	@$(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
       	@touch $@
       
       depend: .depend
       
       clean:
      -	@rm -f *.o *~ .*.swp .built
      +	$(call DELFILE, .built)
       	$(call CLEAN)
       
       distclean: clean
      -	@rm -f Make.dep .depend
      +	$(call DELFILE, Make.dep)
      +	$(call DELFILE, .depend)
       
       -include Make.dep
      diff --git a/apps/examples/nsh/Makefile b/apps/examples/nsh/Makefile
      index bad40fb2e..c7d212fc2 100644
      --- a/apps/examples/nsh/Makefile
      +++ b/apps/examples/nsh/Makefile
      @@ -1,7 +1,7 @@
       ############################################################################
       # apps/examples/nsh/Makefile
       #
      -#   Copyright (C) 2007-2008, 2010-2011 Gregory Nutt. All rights reserved.
      +#   Copyright (C) 2007-2008, 2010-2012 Gregory Nutt. All rights reserved.
       #   Author: Gregory Nutt 
       #
       # Redistribution and use in source and binary forms, with or without
      @@ -48,10 +48,14 @@ COBJS		= $(CSRCS:.c=$(OBJEXT))
       SRCS		= $(ASRCS) $(CSRCS)
       OBJS		= $(AOBJS) $(COBJS)
       
      +ifeq ($(CONFIG_WINDOWS_NATIVE),y)
      +  BIN		= ..\..\libapps$(LIBEXT)
      +else
       ifeq ($(WINTOOL),y)
      -  BIN		= "${shell cygpath -w  $(APPDIR)/libapps$(LIBEXT)}"
      +  BIN		= ..\\..\\libapps$(LIBEXT)
       else
      -  BIN		= "$(APPDIR)/libapps$(LIBEXT)"
      +  BIN		= ../../libapps$(LIBEXT)
      +endif
       endif
       
       ROOTDEPPATH	= --dep-path .
      @@ -70,24 +74,23 @@ $(COBJS): %$(OBJEXT): %.c
       	$(call COMPILE, $<, $@)
       
       .built: $(OBJS)
      -	@( for obj in $(OBJS) ; do \
      -		$(call ARCHIVE, $(BIN), $${obj}); \
      -	done ; )
      +	$(call ARCHIVE, $(BIN), $(OBJS))
       	@touch .built
       
       context:
       
       .depend: Makefile $(SRCS)
      -	@$(MKDEP) $(ROOTDEPPATH) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
      +	@$(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
       	@touch $@
       
       depend: .depend
       
       clean:
      -	@rm -f *.o *~ .*.swp .built
      +	$(call DELFILE, .built)
       	$(call CLEAN)
       
       distclean: clean
      -	@rm -f Make.dep .depend
      +	$(call DELFILE, Make.dep)
      +	$(call DELFILE, .depend)
       
       -include Make.dep
      diff --git a/apps/examples/null/Makefile b/apps/examples/null/Makefile
      index 634120600..47ec4cdaf 100644
      --- a/apps/examples/null/Makefile
      +++ b/apps/examples/null/Makefile
      @@ -1,7 +1,7 @@
       ############################################################################
       # examples/null/Makefile
       #
      -#   Copyright (C) 2007-2008, 2010-2011 Gregory Nutt. All rights reserved.
      +#   Copyright (C) 2007-2008, 2010-2012 Gregory Nutt. All rights reserved.
       #   Author: Gregory Nutt 
       #
       # Redistribution and use in source and binary forms, with or without
      @@ -48,10 +48,14 @@ COBJS		= $(CSRCS:.c=$(OBJEXT))
       SRCS		= $(ASRCS) $(CSRCS)
       OBJS		= $(AOBJS) $(COBJS)
       
      +ifeq ($(CONFIG_WINDOWS_NATIVE),y)
      +  BIN		= ..\..\libapps$(LIBEXT)
      +else
       ifeq ($(WINTOOL),y)
      -  BIN		= "${shell cygpath -w  $(APPDIR)/libapps$(LIBEXT)}"
      +  BIN		= ..\\..\\libapps$(LIBEXT)
       else
      -  BIN		= "$(APPDIR)/libapps$(LIBEXT)"
      +  BIN		= ../../libapps$(LIBEXT)
      +endif
       endif
       
       ROOTDEPPATH	= --dep-path .
      @@ -70,24 +74,23 @@ $(COBJS): %$(OBJEXT): %.c
       	$(call COMPILE, $<, $@)
       
       .built: $(OBJS)
      -	@( for obj in $(OBJS) ; do \
      -		$(call ARCHIVE, $(BIN), $${obj}); \
      -	done ; )
      +	$(call ARCHIVE, $(BIN), $(OBJS))
       	@touch .built
       
       context:
       
       .depend: Makefile $(SRCS)
      -	@$(MKDEP) $(ROOTDEPPATH) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
      +	@$(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
       	@touch $@
       
       depend: .depend
       
       clean:
      -	@rm -f *.o *~ .*.swp .built
      +	$(call DELFILE, .built)
       	$(call CLEAN)
       
       distclean: clean
      -	@rm -f Make.dep .depend
      +	$(call DELFILE, Make.dep)
      +	$(call DELFILE, .depend)
       
       -include Make.dep
      diff --git a/apps/examples/ostest/Kconfig b/apps/examples/ostest/Kconfig
      index 0da7e4ce3..c3fe8f21d 100644
      --- a/apps/examples/ostest/Kconfig
      +++ b/apps/examples/ostest/Kconfig
      @@ -39,4 +39,31 @@ config EXAMPLES_OSTEST_NBARRIER_THREADS
       		is 8 but a smaller number may be needed on systems without sufficient memory
       		to start so many threads.
       
      +config EXAMPLES_OSTEST_RR_RANGE
      +	int "Round-robin test - end of search range"
      +	default 10000
      +	range 1 32767
      +	---help---
      +		During round-robin scheduling test two threads are created. Each of the threads
      +		searches for prime numbers in the configurable range, doing that configurable
      +		number of times.
      +
      +		This value specifies the end of search range and together with number of runs
      +		allows to configure the length of this test - it should last at least a few
      +		tens of seconds. Allowed values [1; 32767], default 10000
      +
      +config EXAMPLES_OSTEST_RR_RUNS
      +	int "Round-robin test - number of runs"
      +	default 10
      +	range 1 32767
      +	---help---
      +		During round-robin scheduling test two threads are created. Each of the threads
      +		searches for prime numbers in the configurable range, doing that configurable
      +		number of times.
      +
      +		This value specifies the number of times the thread searches the range for
      +		prime numbers and together with end of search range allows to configure the
      +		length of this test - it should last at least a few tens of seconds. Allowed
      +		values [1; 32767], default 10
      +
       endif
      diff --git a/apps/examples/ostest/Makefile b/apps/examples/ostest/Makefile
      index 374964b39..3e78c64e8 100644
      --- a/apps/examples/ostest/Makefile
      +++ b/apps/examples/ostest/Makefile
      @@ -98,10 +98,14 @@ COBJS		= $(CSRCS:.c=$(OBJEXT))
       SRCS		= $(ASRCS) $(CSRCS)
       OBJS		= $(AOBJS) $(COBJS)
       
      +ifeq ($(CONFIG_WINDOWS_NATIVE),y)
      +  BIN		= ..\..\libapps$(LIBEXT)
      +else
       ifeq ($(WINTOOL),y)
      -  BIN		= "${shell cygpath -w  $(APPDIR)/libapps$(LIBEXT)}"
      +  BIN		= ..\\..\\libapps$(LIBEXT)
       else
      -  BIN		= "$(APPDIR)/libapps$(LIBEXT)"
      +  BIN		= ../../libapps$(LIBEXT)
      +endif
       endif
       
       ROOTDEPPATH	= --dep-path .
      @@ -120,9 +124,7 @@ $(COBJS): %$(OBJEXT): %.c
       	$(call COMPILE, $<, $@)
       
       .built: $(OBJS)
      -	@( for obj in $(OBJS) ; do \
      -		$(call ARCHIVE, $(BIN), $${obj}); \
      -	done ; )
      +	$(call ARCHIVE, $(BIN), $(OBJS))
       	@touch .built
       
       .context:
      @@ -134,16 +136,17 @@ endif
       context: .context
       
       .depend: Makefile $(SRCS)
      -	@$(MKDEP) $(ROOTDEPPATH) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
      +	@$(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
       	@touch $@
       
       depend: .depend
       
       clean:
      -	@rm -f *.o *~ .*.swp .built
      +	$(call DELFILE, .built)
       	$(call CLEAN)
       
       distclean: clean
      -	@rm -f Make.dep .depend
      +	$(call DELFILE, Make.dep)
      +	$(call DELFILE, .depend)
       
       -include Make.dep
      diff --git a/apps/examples/ostest/roundrobin.c b/apps/examples/ostest/roundrobin.c
      index 5167a857e..bfd344df3 100644
      --- a/apps/examples/ostest/roundrobin.c
      +++ b/apps/examples/ostest/roundrobin.c
      @@ -1,7 +1,7 @@
       /********************************************************************************
        * examples/ostest/roundrobin.c
        *
      - *   Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
      + *   Copyright (C) 2007, 2008, 2012 Gregory Nutt. All rights reserved.
        *   Author: Gregory Nutt 
        *
        * Redistribution and use in source and binary forms, with or without
      @@ -39,6 +39,7 @@
       
       #include 
       #include 
      +#include 
       #include "ostest.h"
       
       #if CONFIG_RR_INTERVAL > 0
      @@ -47,115 +48,87 @@
        * Definitions
        ********************************************************************************/
       
      -/* This number may need to be tuned for different processor speeds.  Since these
      - * arrays must be large to very correct SCHED_RR behavior, this test may require
      - * too much memory on many targets.
      - */
      +/* This numbers should be tuned for different processor speeds via .config file.
      + * With default values the test takes about 30s on Cortex-M3 @ 24MHz. With 32767
      + * range and 10 runs it takes ~320s. */
       
      -/* #define CONFIG_NINTEGERS 32768 Takes forever on 60Mhz ARM7 */
      -
      -#define CONFIG_NINTEGERS 2048
      -
      -/********************************************************************************
      - * Private Data
      - ********************************************************************************/
      +#ifndef CONFIG_EXAMPLES_OSTEST_RR_RANGE
      +#  define CONFIG_EXAMPLES_OSTEST_RR_RANGE 10000
      +#  warning "CONFIG_EXAMPLES_OSTEST_RR_RANGE undefined, using default value = 10000"
      +#elif (CONFIG_EXAMPLES_OSTEST_RR_RANGE < 1) || (CONFIG_EXAMPLES_OSTEST_RR_RANGE > 32767)
      +#  define CONFIG_EXAMPLES_OSTEST_RR_RANGE 10000
      +#  warning "Invalid value of CONFIG_EXAMPLES_OSTEST_RR_RANGE, using default value = 10000"
      +#endif
       
      -static int prime1[CONFIG_NINTEGERS];
      -static int prime2[CONFIG_NINTEGERS];
      +#ifndef CONFIG_EXAMPLES_OSTEST_RR_RUNS
      +#  define CONFIG_EXAMPLES_OSTEST_RR_RUNS 10
      +#  warning "CONFIG_EXAMPLES_OSTEST_RR_RUNS undefined, using default value = 10"
      +#elif (CONFIG_EXAMPLES_OSTEST_RR_RUNS < 1) || (CONFIG_EXAMPLES_OSTEST_RR_RUNS > 32767)
      +#  define CONFIG_EXAMPLES_OSTEST_RR_RUNS 10
      +#  warning "Invalid value of CONFIG_EXAMPLES_OSTEST_RR_RUNS, using default value = 10"
      +#endif
       
       /********************************************************************************
        * Private Functions
        ********************************************************************************/
       
       /********************************************************************************
      - * Name: dosieve
      + * Name: get_primes
        *
        * Description
      - *   This implements a "sieve of aristophanes" algorithm for finding prime number.
      - *   Credit for this belongs to someone, but I am not sure who anymore.  Anyway,
      - *   the only purpose here is that we need some algorithm that takes a long period 
      - *   of time to execute.
      - *
      + *   This function searches for prime numbers in the most primitive way possible.
        ********************************************************************************/
       
      -static void dosieve(int *prime)
      +static void get_primes(int *count, int *last)
       {
      -  int a,d;
      -  int i;
      -  int j;
      -
      -  a = 2;
      -  d = a;
      -
      -  for (i = 0; i < CONFIG_NINTEGERS; i++)
      -    {
      -      prime[i] = i+2;
      -    }
      -
      -  for (i = 1; i < 10; i++)
      +  int number;
      +  int local_count = 0;
      +  *last = 0;    // to make compiler happy
      +
      +  for (number = 1; number < CONFIG_EXAMPLES_OSTEST_RR_RANGE; number++)
      +  {
      +    int div;
      +    bool is_prime = true;
      +
      +    for (div = 2; div <= number / 2; div++)
      +      if (number % div == 0)
      +      {
      +        is_prime = false;
      +        break;
      +      }
      +
      +    if (is_prime)
           {
      -      for (j = 0; j < CONFIG_NINTEGERS; j++)
      -        {
      -          d = a + d;
      -          if (d < CONFIG_NINTEGERS)
      -            {
      -              prime[d]=0;
      -            }
      -        }
      -      a++;
      -      d = a;
      -      i++;
      -    }
      -
      +      local_count++;
      +      *last = number;
       #if 0 /* We don't really care what the numbers are */
      -  for (i = 0, j= 0; i < CONFIG_NINTEGERS; i++)
      -    {
      -      if (prime[i] != 0)
      -       {
      -         printf(" Prime %d: %d\n", j, prime[i]);
      -         j++;
      -       }
      -    }
      +      printf(" Prime %d: %d\n", local_count, number);
       #endif
      -}
      -
      -/********************************************************************************
      - * Name: sieve1
      - ********************************************************************************/
      -
      -static void *sieve1(void *parameter)
      -{
      -  int i;
      -
      -  printf("sieve1 started\n");
      -
      -  for (i = 0; i < 1000; i++)
      -    {
      -      dosieve(prime1);
           }
      +  }
       
      -  printf("sieve1 finished\n");
      -
      -  pthread_exit(NULL);
      -  return NULL; /* To keep some compilers happy */
      +  *count = local_count;
       }
       
       /********************************************************************************
      - * Name: sieve2
      + * Name: get_primes_thread
        ********************************************************************************/
       
      -static void *sieve2(void *parameter)
      +static void *get_primes_thread(void *parameter)
       {
      -  int i;
      +  int id = (int)parameter;
      +  int i, count, last;
       
      -  printf("sieve2 started\n");
      +  printf("get_primes_thread id=%d started, looking for primes < %d, doing %d run(s)\n",
      +         id, CONFIG_EXAMPLES_OSTEST_RR_RANGE, CONFIG_EXAMPLES_OSTEST_RR_RUNS);
       
      -  for (i = 0; i < 1000; i++)
      +  for (i = 0; i < CONFIG_EXAMPLES_OSTEST_RR_RUNS; i++)
           {
      -      dosieve(prime2);
      +      get_primes(&count, &last);
           }
       
      -  printf("sieve2 finished\n");
      +  printf("get_primes_thread id=%d finished, found %d primes, last one was %d\n",
      +         id, count, last);
       
         pthread_exit(NULL);
         return NULL; /* To keep some compilers happy */
      @@ -171,14 +144,13 @@ static void *sieve2(void *parameter)
       
       void rr_test(void)
       {
      -  pthread_t sieve1_thread;
      -  pthread_t sieve2_thread;
      +  pthread_t get_primes1_thread;
      +  pthread_t get_primes2_thread;
         struct sched_param sparam;
         pthread_attr_t attr;
         pthread_addr_t result;
         int status;
       
      -  printf("rr_test: Starting sieve1 thread \n");
         status = pthread_attr_init(&attr);
         if (status != OK)
           {
      @@ -203,29 +175,31 @@ void rr_test(void)
           }
         else
           {
      -      printf("rr_test: Set thread policty to SCHED_RR\n");
      +      printf("rr_test: Set thread policy to SCHED_RR\n");
           }
       
      -  status = pthread_create(&sieve1_thread, &attr, sieve1, NULL);
      +  printf("rr_test: Starting first get_primes_thread\n");
      +
      +  status = pthread_create(&get_primes1_thread, &attr, get_primes_thread, (void*)1);
         if (status != 0)
           {
             printf("rr_test: Error in thread 1 creation, status=%d\n",  status);
           }
       
      -  printf("rr_test: Starting sieve1 thread \n");
      +  printf("rr_test: Starting second get_primes_thread\n");
       
      -  status = pthread_create(&sieve2_thread, &attr, sieve2, NULL);
      +  status = pthread_create(&get_primes2_thread, &attr, get_primes_thread, (void*)2);
         if (status != 0)
           {
             printf("rr_test: Error in thread 2 creation, status=%d\n",  status);
           }
       
      -  printf("rr_test: Waiting for sieves to complete -- this should take awhile\n");
      +  printf("rr_test: Waiting for threads to complete -- this should take awhile\n");
         printf("rr_test: If RR scheduling is working, they should start and complete at\n");
         printf("rr_test: about the same time\n");
       
      -  pthread_join(sieve2_thread, &result);
      -  pthread_join(sieve1_thread, &result);
      +  pthread_join(get_primes2_thread, &result);
      +  pthread_join(get_primes1_thread, &result);
         printf("rr_test: Done\n");
       }
       
      diff --git a/apps/examples/pipe/Makefile b/apps/examples/pipe/Makefile
      index 956c911b3..bed319085 100644
      --- a/apps/examples/pipe/Makefile
      +++ b/apps/examples/pipe/Makefile
      @@ -1,7 +1,7 @@
       ############################################################################
       # apps/examples/pipe/Makefile
       #
      -#   Copyright (C) 2008, 2010-2011 Gregory Nutt. All rights reserved.
      +#   Copyright (C) 2008, 2010-2012 Gregory Nutt. All rights reserved.
       #   Author: Gregory Nutt 
       #
       # Redistribution and use in source and binary forms, with or without
      @@ -48,10 +48,14 @@ COBJS		= $(CSRCS:.c=$(OBJEXT))
       SRCS		= $(ASRCS) $(CSRCS)
       OBJS		= $(AOBJS) $(COBJS)
       
      +ifeq ($(CONFIG_WINDOWS_NATIVE),y)
      +  BIN		= ..\..\libapps$(LIBEXT)
      +else
       ifeq ($(WINTOOL),y)
      -  BIN		= "${shell cygpath -w  $(APPDIR)/libapps$(LIBEXT)}"
      +  BIN		= ..\\..\\libapps$(LIBEXT)
       else
      -  BIN		= "$(APPDIR)/libapps$(LIBEXT)"
      +  BIN		= ../../libapps$(LIBEXT)
      +endif
       endif
       
       ROOTDEPPATH	= --dep-path .
      @@ -70,24 +74,23 @@ $(COBJS): %$(OBJEXT): %.c
       	$(call COMPILE, $<, $@)
       
       .built: $(OBJS)
      -	@( for obj in $(OBJS) ; do \
      -		$(call ARCHIVE, $(BIN), $${obj}); \
      -	done ; )
      +	$(call ARCHIVE, $(BIN), $(OBJS))
       	@touch .built
       
       context:
       
       .depend: Makefile $(SRCS)
      -	@$(MKDEP) $(ROOTDEPPATH) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
      +	@$(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
       	@touch $@
       
       depend: .depend
       
       clean:
      -	@rm -f *.o *~ .*.swp .built
      +	$(call DELFILE, .built)
       	$(call CLEAN)
       
       distclean: clean
      -	@rm -f Make.dep .depend
      +	$(call DELFILE, Make.dep)
      +	$(call DELFILE, .depend)
       
       -include Make.dep
      diff --git a/apps/examples/poll/Makefile b/apps/examples/poll/Makefile
      index aef61d199..13173f125 100644
      --- a/apps/examples/poll/Makefile
      +++ b/apps/examples/poll/Makefile
      @@ -1,7 +1,7 @@
       ############################################################################
       # apps/examples/poll/Makefile
       #
      -#   Copyright (C) 2008, 2010-2011 Gregory Nutt. All rights reserved.
      +#   Copyright (C) 2008, 2010-2012 Gregory Nutt. All rights reserved.
       #   Author: Gregory Nutt 
       #
       # Redistribution and use in source and binary forms, with or without
      @@ -48,10 +48,14 @@ COBJS		= $(CSRCS:.c=$(OBJEXT))
       SRCS		= $(ASRCS) $(CSRCS)
       OBJS		= $(AOBJS) $(COBJS)
       
      +ifeq ($(CONFIG_WINDOWS_NATIVE),y)
      +  BIN		= ..\..\libapps$(LIBEXT)
      +else
       ifeq ($(WINTOOL),y)
      -  BIN		= "${shell cygpath -w  $(APPDIR)/libapps$(LIBEXT)}"
      +  BIN		= ..\\..\\libapps$(LIBEXT)
       else
      -  BIN		= "$(APPDIR)/libapps$(LIBEXT)"
      +  BIN		= ../../libapps$(LIBEXT)
      +endif
       endif
       
       ROOTDEPPATH	= --dep-path .
      @@ -70,25 +74,25 @@ $(COBJS): %$(OBJEXT): %.c
       	$(call COMPILE, $<, $@)
       
       .built: $(OBJS)
      -	@( for obj in $(OBJS) ; do \
      -		$(call ARCHIVE, $(BIN), $${obj}); \
      -	done ; )
      +	$(call ARCHIVE, $(BIN), $(OBJS))
       	@touch .built
       
       context:
       
       .depend: Makefile $(SRCS)
      -	@$(MKDEP) $(ROOTDEPPATH) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
      +	@$(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
       	@touch $@
       
       # Register application
       depend: .depend
       
       clean:
      -	@rm -f *.o *~ .*.swp .built
      +	$(call DELFILE, .built)
       	$(call CLEAN)
       
       distclean: clean
      -	@rm -f Make.dep .depend host
      +	$(call DELFILE, Make.dep)
      +	$(call DELFILE, .depend)
      +	$(call DELFILE, host$(HOSTEXEEXT))
       
       -include Make.dep
      diff --git a/apps/examples/pwm/Makefile b/apps/examples/pwm/Makefile
      index efbdb048e..3a6f2520a 100644
      --- a/apps/examples/pwm/Makefile
      +++ b/apps/examples/pwm/Makefile
      @@ -1,7 +1,7 @@
       ############################################################################
       # apps/examples/pwm/Makefile
       #
      -#   Copyright (C) 2011 Gregory Nutt. All rights reserved.
      +#   Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
       #   Author: Gregory Nutt 
       #
       # Redistribution and use in source and binary forms, with or without
      @@ -48,10 +48,14 @@ COBJS		= $(CSRCS:.c=$(OBJEXT))
       SRCS		= $(ASRCS) $(CSRCS)
       OBJS		= $(AOBJS) $(COBJS)
       
      +ifeq ($(CONFIG_WINDOWS_NATIVE),y)
      +  BIN		= ..\..\libapps$(LIBEXT)
      +else
       ifeq ($(WINTOOL),y)
      -  BIN		= "${shell cygpath -w  $(APPDIR)/libapps$(LIBEXT)}"
      +  BIN		= ..\\..\\libapps$(LIBEXT)
       else
      -  BIN		= "$(APPDIR)/libapps$(LIBEXT)"
      +  BIN		= ../../libapps$(LIBEXT)
      +endif
       endif
       
       ROOTDEPPATH	= --dep-path .
      @@ -76,9 +80,7 @@ $(COBJS): %$(OBJEXT): %.c
       	$(call COMPILE, $<, $@)
       
       .built: $(OBJS)
      -	@( for obj in $(OBJS) ; do \
      -		$(call ARCHIVE, $(BIN), $${obj}); \
      -	done ; )
      +	$(call ARCHIVE, $(BIN), $(OBJS))
       	@touch .built
       
       .context:
      @@ -88,16 +90,17 @@ $(COBJS): %$(OBJEXT): %.c
       context: .context
       
       .depend: Makefile $(SRCS)
      -	@$(MKDEP) $(ROOTDEPPATH) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
      +	@$(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
       	@touch $@
       
       depend: .depend
       
       clean:
      -	@rm -f *.o *~ .*.swp .built
      +	$(call DELFILE, .built)
       	$(call CLEAN)
       
       distclean: clean
      -	@rm -f Make.dep .depend
      +	$(call DELFILE, Make.dep)
      +	$(call DELFILE, .depend)
       
       -include Make.dep
      diff --git a/apps/examples/pwm/pwm_main.c b/apps/examples/pwm/pwm_main.c
      index 775bdba6b..a46c10f55 100644
      --- a/apps/examples/pwm/pwm_main.c
      +++ b/apps/examples/pwm/pwm_main.c
      @@ -48,6 +48,7 @@
       #include 
       #include 
       #include 
      +#include 
       
       #include 
       
      diff --git a/apps/examples/qencoder/Makefile b/apps/examples/qencoder/Makefile
      index 3f3fc9def..7d2427c6b 100644
      --- a/apps/examples/qencoder/Makefile
      +++ b/apps/examples/qencoder/Makefile
      @@ -48,10 +48,14 @@ COBJS		= $(CSRCS:.c=$(OBJEXT))
       SRCS		= $(ASRCS) $(CSRCS)
       OBJS		= $(AOBJS) $(COBJS)
       
      +ifeq ($(CONFIG_WINDOWS_NATIVE),y)
      +  BIN		= ..\..\libapps$(LIBEXT)
      +else
       ifeq ($(WINTOOL),y)
      -  BIN		= "${shell cygpath -w  $(APPDIR)/libapps$(LIBEXT)}"
      +  BIN		= ..\\..\\libapps$(LIBEXT)
       else
      -  BIN		= "$(APPDIR)/libapps$(LIBEXT)"
      +  BIN		= ../../libapps$(LIBEXT)
      +endif
       endif
       
       ROOTDEPPATH	= --dep-path .
      @@ -76,9 +80,7 @@ $(COBJS): %$(OBJEXT): %.c
       	$(call COMPILE, $<, $@)
       
       .built: $(OBJS)
      -	@( for obj in $(OBJS) ; do \
      -		$(call ARCHIVE, $(BIN), $${obj}); \
      -	done ; )
      +	$(call ARCHIVE, $(BIN), $(OBJS))
       	@touch .built
       
       .context:
      @@ -90,16 +92,17 @@ endif
       context: .context
       
       .depend: Makefile $(SRCS)
      -	@$(MKDEP) $(ROOTDEPPATH) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
      +	@$(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
       	@touch $@
       
       depend: .depend
       
       clean:
      -	@rm -f *.o *~ .*.swp .built
      +	$(call DELFILE, .built)
       	$(call CLEAN)
       
       distclean: clean
      -	@rm -f Make.dep .depend
      +	$(call DELFILE, Make.dep)
      +	$(call DELFILE, .depend)
       
       -include Make.dep
      diff --git a/apps/examples/romfs/Makefile b/apps/examples/romfs/Makefile
      index ba930b77d..2b02952ed 100644
      --- a/apps/examples/romfs/Makefile
      +++ b/apps/examples/romfs/Makefile
      @@ -1,7 +1,7 @@
       ############################################################################
       # apps/examples/romfs/Makefile
       #
      -#   Copyright (C) 2008, 2010-2011 Gregory Nutt. All rights reserved.
      +#   Copyright (C) 2008, 2010-2012 Gregory Nutt. All rights reserved.
       #   Author: Gregory Nutt 
       #
       # Redistribution and use in source and binary forms, with or without
      @@ -48,10 +48,14 @@ COBJS		= $(CSRCS:.c=$(OBJEXT))
       SRCS		= $(ASRCS) $(CSRCS)
       OBJS		= $(AOBJS) $(COBJS)
       
      +ifeq ($(CONFIG_WINDOWS_NATIVE),y)
      +  BIN		= ..\..\libapps$(LIBEXT)
      +else
       ifeq ($(WINTOOL),y)
      -  BIN		= "${shell cygpath -w  $(APPDIR)/libapps$(LIBEXT)}"
      +  BIN		= ..\\..\\libapps$(LIBEXT)
       else
      -  BIN		= "$(APPDIR)/libapps$(LIBEXT)"
      +  BIN		= ../../libapps$(LIBEXT)
      +endif
       endif
       
       ROOTDEPPATH	= --dep-path .
      @@ -61,7 +65,7 @@ ROOTDEPPATH	= --dep-path .
       VPATH		= 
       
       all: .built
      -.PHONY:	checkgenromfs clean depend disclean
      +.PHONY:	checkgenromfs clean depend distclean
       
       $(AOBJS): %$(OBJEXT): %.S
       	$(call ASSEMBLE, $<, $@)
      @@ -86,26 +90,26 @@ romfs_testdir.h : testdir.img
       	@xxd -i $< >$@ || { echo "xxd of $< failed" ; exit 1 ; }
       
       .built: romfs_testdir.h $(OBJS)
      -	@( for obj in $(OBJS) ; do \
      -		$(call ARCHIVE, $(BIN), $${obj}); \
      -	done ; )
      +	$(call ARCHIVE, $(BIN), $(OBJS))
       	@touch .built
       
       context:
       
       .depend: Makefile $(SRCS)
      -	@$(MKDEP) $(ROOTDEPPATH) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
      +	@$(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
       	@touch $@
       
       # Register application
       depend: .depend
       
       clean:
      -	@rm -f *.o *~ .*.swp .built
      +	$(call DELFILE, .built)
       	$(call CLEAN)
       
       distclean: clean
      -	@rm -f Make.dep .depend testdir.img
      +	$(call DELFILE, Make.dep)
      +	$(call DELFILE, .depend)
      +	$(call DELFILE, testdir.img)
       
       -include Make.dep
       
      diff --git a/apps/examples/serloop/Makefile b/apps/examples/serloop/Makefile
      index e1c415cdd..4a262884b 100644
      --- a/apps/examples/serloop/Makefile
      +++ b/apps/examples/serloop/Makefile
      @@ -1,7 +1,7 @@
       ############################################################################
       # apps/examples/serloop/Makefile
       #
      -#   Copyright (C) 2008, 2010-2011 Gregory Nutt. All rights reserved.
      +#   Copyright (C) 2008, 2010-2012 Gregory Nutt. All rights reserved.
       #   Author: Gregory Nutt 
       #
       # Redistribution and use in source and binary forms, with or without
      @@ -48,10 +48,14 @@ COBJS		= $(CSRCS:.c=$(OBJEXT))
       SRCS		= $(ASRCS) $(CSRCS)
       OBJS		= $(AOBJS) $(COBJS)
       
      +ifeq ($(CONFIG_WINDOWS_NATIVE),y)
      +  BIN		= ..\..\libapps$(LIBEXT)
      +else
       ifeq ($(WINTOOL),y)
      -  BIN		= "${shell cygpath -w  $(APPDIR)/libapps$(LIBEXT)}"
      +  BIN		= ..\\..\\libapps$(LIBEXT)
       else
      -  BIN		= "$(APPDIR)/libapps$(LIBEXT)"
      +  BIN		= ../../libapps$(LIBEXT)
      +endif
       endif
       
       ROOTDEPPATH	= --dep-path .
      @@ -70,26 +74,25 @@ $(COBJS): %$(OBJEXT): %.c
       	$(call COMPILE, $<, $@)
       
       .built: $(OBJS)
      -	@( for obj in $(OBJS) ; do \
      -		$(call ARCHIVE, $(BIN), $${obj}); \
      -	done ; )
      +	$(call ARCHIVE, $(BIN), $(OBJS))
       	@touch .built
       
       context:
       
       .depend: Makefile $(SRCS)
      -	@$(MKDEP) $(ROOTDEPPATH) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
      +	@$(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
       	@touch $@
       
       # Register application
       depend: .depend
       
       clean:
      -	@rm -f *.o *~ .*.swp .built
      +	$(call DELFILE, .built)
       	$(call CLEAN)
       
       distclean: clean
      -	@rm -f Make.dep .depend
      +	$(call DELFILE, Make.dep)
      +	$(call DELFILE, .depend)
       
       -include Make.dep
       
      diff --git a/apps/examples/watchdog/Makefile b/apps/examples/watchdog/Makefile
      index d2739dbb0..9890959fb 100644
      --- a/apps/examples/watchdog/Makefile
      +++ b/apps/examples/watchdog/Makefile
      @@ -48,10 +48,14 @@ COBJS		= $(CSRCS:.c=$(OBJEXT))
       SRCS		= $(ASRCS) $(CSRCS)
       OBJS		= $(AOBJS) $(COBJS)
       
      +ifeq ($(CONFIG_WINDOWS_NATIVE),y)
      +  BIN		= ..\..\libapps$(LIBEXT)
      +else
       ifeq ($(WINTOOL),y)
      -  BIN		= "${shell cygpath -w  $(APPDIR)/libapps$(LIBEXT)}"
      +  BIN		= ..\\..\\libapps$(LIBEXT)
       else
      -  BIN		= "$(APPDIR)/libapps$(LIBEXT)"
      +  BIN		= ../../libapps$(LIBEXT)
      +endif
       endif
       
       ROOTDEPPATH	= --dep-path .
      @@ -76,9 +80,7 @@ $(COBJS): %$(OBJEXT): %.c
       	$(call COMPILE, $<, $@)
       
       .built: $(OBJS)
      -	@( for obj in $(OBJS) ; do \
      -		$(call ARCHIVE, $(BIN), $${obj}); \
      -	done ; )
      +	$(call ARCHIVE, $(BIN), $(OBJS))
       	@touch .built
       
       .context:
      @@ -88,16 +90,17 @@ $(COBJS): %$(OBJEXT): %.c
       context: .context
       
       .depend: Makefile $(SRCS)
      -	@$(MKDEP) $(ROOTDEPPATH) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
      +	@$(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
       	@touch $@
       
       depend: .depend
       
       clean:
      -	@rm -f *.o *~ .*.swp .built
      +	$(call DELFILE, .built)
       	$(call CLEAN)
       
       distclean: clean
      -	@rm -f Make.dep .depend
      +	$(call DELFILE, Make.dep)
      +	$(call DELFILE, .depend)
       
       -include Make.dep
      diff --git a/apps/interpreters/Makefile b/apps/interpreters/Makefile
      index 5901fc830..867d45f99 100644
      --- a/apps/interpreters/Makefile
      +++ b/apps/interpreters/Makefile
      @@ -33,7 +33,7 @@
       #
       ############################################################################
       
      --include $(TOPDIR)/.config	# Current configuration
      +-include $(TOPDIR)/.config
       
       # Sub-directories containing interpreter runtime
       
      @@ -41,30 +41,36 @@ SUBDIRS = pcode ficl
       
       # Create the list of installed runtime modules (INSTALLED_DIRS)
       
      +ifeq ($(CONFIG_WINDOWS_NATIVE),y)
      +define ADD_DIRECTORY
      +INSTALLED_DIRS  += ${shell if exist $1\Makefile (echo $1)}
      +endef
      +else
       define ADD_DIRECTORY
       INSTALLED_DIRS  += ${shell if [ -r $1/Makefile ]; then echo "$1"; fi}
       endef
      +endif
       
       $(foreach DIR, $(SUBDIRS), $(eval $(call ADD_DIRECTORY,$(DIR))))
       
       all: nothing
       .PHONY: nothing context depend clean distclean
       
      +define SDIR_template
      +$(1)_$(2):
      +	$(Q) $(MAKE) -C $(1) $(2) TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)"
      +endef
      +
      +$(foreach SDIR, $(INSTALLED_DIRS), $(eval $(call SDIR_template,$(SDIR),depend)))
      +$(foreach SDIR, $(INSTALLED_DIRS), $(eval $(call SDIR_template,$(SDIR),clean)))
      +$(foreach SDIR, $(INSTALLED_DIRS), $(eval $(call SDIR_template,$(SDIR),distclean)))
      +
       nothing:
       
       context:
       
      -depend:
      -	@for dir in $(INSTALLED_DIRS) ; do \
      -		$(MAKE) -C $$dir depend TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)"; \
      -	done
      +depend: $(foreach SDIR, $(INSTALLED_DIRS), $(SDIR)_depend)
       
      -clean:
      -	@for dir in $(INSTALLED_DIRS) ; do \
      -		$(MAKE) -C $$dir clean TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)"; \
      -	done
      +clean: $(foreach SDIR, $(INSTALLED_DIRS), $(SDIR)_clean)
       
      -distclean: clean
      -	@for dir in $(INSTALLED_DIRS) ; do \
      -		$(MAKE) -C $$dir distclean TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)"; \
      -	done
      +distclean: clean $(foreach SDIR, $(INSTALLED_DIRS), $(SDIR)_distclean)
      diff --git a/apps/interpreters/ficl/Makefile b/apps/interpreters/ficl/Makefile
      index fb953964e..990630fb8 100644
      --- a/apps/interpreters/ficl/Makefile
      +++ b/apps/interpreters/ficl/Makefile
      @@ -1,7 +1,7 @@
       ############################################################################
       # apps/interpreters/ficl/Makefile
       #
      -#   Copyright (C) 2011 Gregory Nutt. All rights reserved.
      +#   Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
       #   Author: Gregory Nutt 
       #
       # Redistribution and use in source and binary forms, with or without
      @@ -35,14 +35,11 @@
       
       BUILDDIR := ${shell pwd | sed -e 's/ /\\ /g'}
       
      --include $(TOPDIR)/.config
       -include $(TOPDIR)/Make.defs
       include $(APPDIR)/Make.defs
       
       # Tools
       
      -INCDIR = $(TOPDIR)/tools/incdir.sh
      -
       ifeq ($(WINTOOL),y)
       INCDIROPT = -w
       endif
      @@ -69,10 +66,14 @@ COBJS = $(CSRCS:.c=$(OBJEXT))
       SRCS = $(ASRCS) $(CSRCS)
       OBJS = $(AOBJS) $(COBJS)
       
      +ifeq ($(CONFIG_WINDOWS_NATIVE),y)
      +  BIN		= ..\..\libapps$(LIBEXT)
      +else
       ifeq ($(WINTOOL),y)
      -  BIN		= "${shell cygpath -w  $(APPDIR)/libapps$(LIBEXT)}"
      +  BIN		= ..\\..\\libapps$(LIBEXT)
       else
      -  BIN		= "$(APPDIR)/libapps$(LIBEXT)"
      +  BIN		= ../../libapps$(LIBEXT)
      +endif
       endif
       
       ROOT_DEPPATH = --dep-path .
      @@ -95,24 +96,24 @@ debug:
       	@#echo "CFLAGS: $(CFLAGS)"
       
       .built: debug $(OBJS)
      -	@( for obj in $(OBJS) ; do \
      -		$(call ARCHIVE, $(BIN), $${obj}); \
      -	done ; )
      -	@touch .built
      +	$(call ARCHIVE, $(BIN), $(OBJS))
      +	$(Q) touch .built
       
       context:
       
       .depend: debug Makefile $(SRCS)
      -	@$(MKDEP) $(ROOT_DEPPATH) $(SRC_DEPPATH) $(FICL_DEPPATH) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
      -	@touch $@
      +	$(Q) $(MKDEP) $(ROOT_DEPPATH) $(SRC_DEPPATH) $(FICL_DEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
      +	$(Q) touch $@
       
       depend: .depend
       
       clean:
      -	@rm -f *.o *~ .*.swp .built
      +	$(call DELFILE, .context)
      +	$(call DELFILE, .built)
       	$(call CLEAN)
       
       distclean: clean
      -	@rm -f Make.dep .depend
      +	$(call DELFILE, Make.dep)
      +	$(call DELFILE, .depend)
       
       -include Make.dep
      diff --git a/apps/namedapp/Makefile b/apps/namedapp/Makefile
      index 6b0fd6a05..a88c73567 100644
      --- a/apps/namedapp/Makefile
      +++ b/apps/namedapp/Makefile
      @@ -1,7 +1,7 @@
       ############################################################################
       # apps/nshlib/Makefile
       #
      -#   Copyright (C) 2011 Gregory Nutt. All rights reserved.
      +#   Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
       #   Author: Gregory Nutt 
       #
       # Redistribution and use in source and binary forms, with or without
      @@ -54,10 +54,14 @@ COBJS		= $(CSRCS:.c=$(OBJEXT))
       SRCS		= $(ASRCS) $(CSRCS)
       OBJS		= $(AOBJS) $(COBJS)
       
      +ifeq ($(CONFIG_WINDOWS_NATIVE),y)
      +  BIN		= ..\libapps$(LIBEXT)
      +else
       ifeq ($(WINTOOL),y)
      -  BIN		= "${shell cygpath -w  $(APPDIR)/libapps$(LIBEXT)}"
      +  BIN		= ..\\libapps$(LIBEXT)
       else
      -  BIN		= "$(APPDIR)/libapps$(LIBEXT)"
      +  BIN		= ../libapps$(LIBEXT)
      +endif
       endif
       
       ROOTDEPPATH	= --dep-path .
      @@ -75,32 +79,32 @@ $(COBJS): %$(OBJEXT): %.c
       	$(call COMPILE, $<, $@)
       
       .built: $(OBJS)
      -	@( for obj in $(OBJS) ; do \
      -		$(call ARCHIVE, $(BIN), $${obj}); \
      -	done ; )
      -	@touch .built
      +	$(call ARCHIVE, $(BIN), $(OBJS))
      +	$(Q) touch .built
       
       .context:
       	@echo "/* List of application requirements, generated during make context. */" > namedapp_list.h
       	@echo "/* List of application entry points, generated during make context. */" > namedapp_proto.h
      -	@touch $@
      +	$(Q) touch $@
       
       context: .context
       
       .depend: Makefile $(SRCS)
      -	@$(MKDEP) $(ROOTDEPPATH) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
      -	@touch $@
      +	$(Q) $(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
      +	$(Q) touch $@
       
       depend: .depend
       
       clean:
      -	@rm -f *.o *~ .*.swp .built
      +	$(call DELFILE, .built)
       	$(call CLEAN)
       
       distclean: clean
      -	@rm -f .context Make.dep .depend
      -	@rm -f namedapp_list.h
      -	@rm -f namedapp_proto.h
      +	$(call DELFILE, .context)
      +	$(call DELFILE, Make.dep)
      +	$(call DELFILE, .depend)
      +	$(call DELFILE, namedapp_list.h)
      +	$(call DELFILE, namedapp_proto.h)
       
       -include Make.dep
       
      diff --git a/apps/nshlib/Kconfig b/apps/nshlib/Kconfig
      index d12a32973..17b107b8f 100644
      --- a/apps/nshlib/Kconfig
      +++ b/apps/nshlib/Kconfig
      @@ -23,122 +23,194 @@ config NSH_BUILTIN_APPS
       		(NAMEDAPP).
       
       menu "Disable Individual commands"
      +
      +config NSH_DISABLE_BASE64DEC
      +	bool "Disable base64dec"
      +	default n
      +	depends on NETUTILS_CODECS && CODECS_BASE64
      +
      +config NSH_DISABLE_BASE64ENC
      +	bool "Disable base64enc"
      +	default n
      +	depends on NETUTILS_CODECS && CODECS_BASE64
      +
       config NSH_DISABLE_CAT
       	bool "Disable cat"
       	default n
      +
       config NSH_DISABLE_CD
       	bool "Disable cd"
       	default n
      +
       config NSH_DISABLE_CP
       	bool "Disable cp"
       	default n
      +
       config NSH_DISABLE_DD
       	bool "Disable dd"
       	default n
      +
       config NSH_DISABLE_ECHO
       	bool "Disable echo"
       	default n
      +
       config NSH_DISABLE_EXEC
       	bool "Disable exec"
       	default n
      +
       config NSH_DISABLE_EXIT
       	bool "Disable exit"
       	default n
      +
       config NSH_DISABLE_FREE
       	bool "Disable free"
       	default n
      +
       config NSH_DISABLE_GET
       	bool "Disable get"
       	default n
      +
       config NSH_DISABLE_HELP
       	bool "Disable help"
       	default n
      +
      +config NSH_DISABLE_HEXDUMP
      +	bool "Disable hexdump"
      +	default n
      +
       config NSH_DISABLE_IFCONFIG
       	bool "Disable ifconfig"
       	default n
      +
       config NSH_DISABLE_KILL
       	bool "Disable kill"
       	default n
      +
       config NSH_DISABLE_LOSETUP
       	bool "Disable losetup"
       	default n
      +
       config NSH_DISABLE_LS
       	bool "Disable ls"
       	default n
      +
       config NSH_DISABLE_MB
       	bool "Disable mb"
       	default n
      +
      +config NSH_DISABLE_MD5
      +	bool "Disable md5"
      +	default n
      +	depends on NETUTILS_CODECS && CODECS_HASH_MD5
      +
       config NSH_DISABLE_MKDIR
       	bool "Disable mkdir"
       	default n
      +
       config NSH_DISABLE_MKFATFS
       	bool "Disable mkfatfs"
       	default n
      +
       config NSH_DISABLE_MKFIFO
       	bool "Disable mkfifo"
       	default n
      +
       config NSH_DISABLE_MKRD
       	bool "Disable mkrd"
       	default n
      +
       config NSH_DISABLE_MH
       	bool "Disable mh"
       	default n
      +
       config NSH_DISABLE_MOUNT
       	bool "Disable mount"
       	default n
      +
       config NSH_DISABLE_MW
       	bool "Disable mw"
       	default n
      +
       config NSH_DISABLE_NSFMOUNT
       	bool "Disable nfsmount"
       	default n
      +
       config NSH_DISABLE_PS
       	bool "Disable ps"
       	default n
      +
       config NSH_DISABLE_PING
       	bool "Disable ping"
       	default n
      +
       config NSH_DISABLE_PUT
       	bool "Disable put"
       	default n
      +
       config NSH_DISABLE_PWD
       	bool "Disable pwd"
       	default n
      +
       config NSH_DISABLE_RM
       	bool "Disable rm"
       	default n
      +
       config NSH_DISABLE_RMDIR
       	bool "Disable rmdir"
       	default n
      +
       config NSH_DISABLE_SET
       	bool "Disable set"
       	default n
      +
       config NSH_DISABLE_SH
       	bool "Disable sh"
       	default n
      +
       config NSH_DISABLE_SLEEP
       	bool "Disable sleep"
       	default n
      +
       config NSH_DISABLE_TEST
       	bool "Disable test"
       	default n
      +
       config NSH_DISABLE_UMOUNT
       	bool "Disable umount"
       	default n
      +
       config NSH_DISABLE_UNSET
       	bool "Disable unset"
       	default n
      +
      +config NSH_DISABLE_URLDECODE
      +	bool "Disable urldecode"
      +	default n
      +	depends on NETUTILS_CODECS && CODECS_URLCODE
      +
      +config NSH_DISABLE_URLENCODE
      +	bool "Disable urlencode"
      +	default n
      +	depends on NETUTILS_CODECS && CODECS_URLCODE
      +
       config NSH_DISABLE_USLEEP
       	bool "Disable usleep"
       	default n
      +
       config NSH_DISABLE_WGET
       	bool "Disable wget"
       	default n
      +
       config NSH_DISABLE_XD
       	bool "Disable xd"
       	default n
      +
       endmenu
       
      +config NSH_CODECS_BUFSIZE
      +	int "File buffer size used by CODEC commands"
      +	default 128
      +
       config NSH_FILEIOSIZE
       	int "NSH I/O buffer size"
       	default 1024
      @@ -490,7 +562,7 @@ config NSH_DHCPC
       
       config NSH_IPADDR
       	hex "Target IP address"
      -	default 0x10000002
      +	default 0xa0000002
       	depends on NSH_LIBRARY && NET && !NSH_DHCPC
       	---help---
       		If NSH_DHCPC is NOT set, then the static IP address must be provided.
      @@ -499,7 +571,7 @@ config NSH_IPADDR
       
       config NSH_DRIPADDR
       	hex "Router IP address"
      -	default 0x10000001
      +	default 0xa0000001
       	depends on NSH_LIBRARY && NET && !NSH_DHCPC
       	---help---
       		Default router IP address (aka, Gateway).  This is a 32-bit integer
      @@ -513,6 +585,21 @@ config NSH_NETMASK
       		Network mask.  This is a 32-bit integer value in host order.  So, as
       		an example, 0xffffff00 would be 255.255.255.0.
       
      +config NSH_DNS
      +	bool "Use DNS"
      +	default n
      +	depends on NSH_LIBRARY && NET && NET_UDP && NET_BROADCAST
      +	---help---
      +		Configure to use a DNS.
      +
      +config NSH_DNSIPADDR
      +	hex "DNS IP address"
      +	default 0xa0000001
      +	depends on NSH_DNS
      +	---help---
      +		Configure the DNS address.  This is a 32-bit integer value in host
      +		order.  So, as an example, 0xa0000001 would be 10.0.0.1.
      +
       config NSH_NOMAC
       	bool "Hardware has no MAC address"
       	default n
      @@ -520,3 +607,12 @@ config NSH_NOMAC
       	---help---
       		Set if your ethernet hardware has no built-in MAC address.
       		If set, a bogus MAC will be assigned.
      +
      +config NSH_MAX_ROUNDTRIP
      +	int "Max Ping Round-Trip (DSEC)"
      +	default 20
      +	depends on NSH_LIBRARY && NET && !NSH_DISABLE_PING
      +	---help---
      +		This is the maximum round trip for a response to a ICMP ECHO request.
      +		It is in units of deciseconds.  The default is 20 (2 seconds).
      +
      diff --git a/apps/nshlib/Makefile b/apps/nshlib/Makefile
      index f616374bf..73325e899 100644
      --- a/apps/nshlib/Makefile
      +++ b/apps/nshlib/Makefile
      @@ -39,64 +39,72 @@ include $(APPDIR)/Make.defs
       
       # NSH Library
       
      -ASRCS	=
      -CSRCS	= nsh_init.c nsh_parse.c nsh_console.c nsh_fscmds.c nsh_ddcmd.c \
      +ASRCS =
      +CSRCS = nsh_init.c nsh_parse.c nsh_console.c nsh_fscmds.c nsh_ddcmd.c \
       		nsh_proccmds.c nsh_mmcmds.c nsh_envcmds.c nsh_dbgcmds.c
       
       ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
      -CSRCS	+= nsh_apps.c
      +CSRCS += nsh_apps.c
       endif
       
       ifeq ($(CONFIG_NSH_ROMFSETC),y)
      -CSRCS	+= nsh_romfsetc.c
      +CSRCS += nsh_romfsetc.c
       endif
       
       ifeq ($(CONFIG_NET),y)
      -CSRCS	+= nsh_netinit.c nsh_netcmds.c
      +CSRCS += nsh_netinit.c nsh_netcmds.c
       endif
       
       ifeq ($(CONFIG_RTC),y)
      -CSRCS	+= nsh_timcmds.c
      +CSRCS += nsh_timcmds.c
       endif
       
       ifneq ($(CONFIG_DISABLE_MOUNTPOINT),y)
      -CSRCS	+= nsh_mntcmds.c
      +CSRCS += nsh_mntcmds.c
       endif
       
       ifeq ($(CONFIG_NSH_CONSOLE),y)
      -CSRCS	+= nsh_consolemain.c
      +CSRCS += nsh_consolemain.c
       endif
       
       ifeq ($(CONFIG_NSH_TELNET),y)
      -CSRCS	+= nsh_telnetd.c
      +CSRCS += nsh_telnetd.c
       endif
       
       ifneq ($(CONFIG_NSH_DISABLESCRIPT),y)
      -CSRCS	+= nsh_test.c
      +CSRCS += nsh_test.c
       endif
       
       ifeq ($(CONFIG_USBDEV),y)
      -CSRCS	+= nsh_usbdev.c
      +CSRCS += nsh_usbdev.c
       endif
       
      -AOBJS		= $(ASRCS:.S=$(OBJEXT))
      -COBJS		= $(CSRCS:.c=$(OBJEXT))
      +ifeq ($(CONFIG_NETUTILS_CODECS),y)
      +CSRCS += nsh_codeccmd.c
      +endif
      +
      +AOBJS = $(ASRCS:.S=$(OBJEXT))
      +COBJS = $(CSRCS:.c=$(OBJEXT))
       
      -SRCS		= $(ASRCS) $(CSRCS)
      -OBJS		= $(AOBJS) $(COBJS)
      +SRCS = $(ASRCS) $(CSRCS)
      +OBJS = $(AOBJS) $(COBJS)
       
      +ifeq ($(CONFIG_WINDOWS_NATIVE),y)
      +  BIN		= ..\libapps$(LIBEXT)
      +else
       ifeq ($(WINTOOL),y)
      -  BIN		= "${shell cygpath -w  $(APPDIR)/libapps$(LIBEXT)}"
      +  BIN		= ..\\libapps$(LIBEXT)
       else
      -  BIN		= "$(APPDIR)/libapps$(LIBEXT)"
      +  BIN		= ../libapps$(LIBEXT)
      +endif
       endif
       
      -ROOTDEPPATH	= --dep-path .
      -VPATH		= 
      +ROOTDEPPATH = --dep-path .
      +VPATH = 
       
       # Build targets
       
      -all:	.built
      +all: .built
       .PHONY: context .depend depend clean distclean
       
       $(AOBJS): %$(OBJEXT): %.S
      @@ -106,26 +114,25 @@ $(COBJS): %$(OBJEXT): %.c
       	$(call COMPILE, $<, $@)
       
       .built: $(OBJS)
      -	@( for obj in $(OBJS) ; do \
      -		$(call ARCHIVE, $(BIN), $${obj}); \
      -	done ; )
      +	$(call ARCHIVE, $(BIN), $(OBJS))
       	@touch .built
       
       context:
       
       .depend: Makefile $(SRCS)
      -	@$(MKDEP) $(ROOTDEPPATH) \
      -	  $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
      +	@$(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
       	@touch $@
       
       depend: .depend
       
       clean:
      -	@rm -f *.o *~ .*.swp .built
      +	$(call DELFILE, .built)
       	$(call CLEAN)
       
       distclean: clean
      -	@rm -f Make.dep .depend
      +	$(call DELFILE, .context)
      +	$(call DELFILE, Make.dep)
      +	$(call DELFILE, .depend)
       
       -include Make.dep
       
      diff --git a/apps/nshlib/nsh_dbgcmds.c b/apps/nshlib/nsh_dbgcmds.c
      index eb081fe9f..85a4ccb9c 100644
      --- a/apps/nshlib/nsh_dbgcmds.c
      +++ b/apps/nshlib/nsh_dbgcmds.c
      @@ -46,6 +46,10 @@
       #include 
       #include 
       
      +#if CONFIG_NFILE_DESCRIPTORS > 0
      +# include 
      +#endif
      +
       #include "nsh.h"
       #include "nsh_console.h"
       
      @@ -328,7 +332,7 @@ void nsh_dumpbuffer(FAR struct nsh_vtbl_s *vtbl, const char *msg,
       }
       
       /****************************************************************************
      - * Name: cmd_xd
      + * Name: cmd_xd, hex dump of memory
        ****************************************************************************/
       
       #ifndef CONFIG_NSH_DISABLE_XD
      @@ -354,3 +358,58 @@ int cmd_xd(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
         return OK;
       }
       #endif
      +
      +/****************************************************************************
      + * Name: cmd_hexdump, hex dump of files
      + ****************************************************************************/
      +
      +#if CONFIG_NFILE_DESCRIPTORS > 0
      +#ifndef CONFIG_NSH_DISABLE_HEXDUMP
      +int cmd_hexdump(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
      +{
      +  uint8_t buffer[IOBUFFERSIZE];
      +  char msg[32];
      +  int position;
      +  int fd;
      +  int ret = OK;
      +  
      +  /* Open the file for reading */
      +
      +  fd = open(argv[1], O_RDONLY);
      +  if (fd < 0)
      +    {
      +      nsh_output(vtbl, g_fmtcmdfailed, "hexdump", "open", NSH_ERRNO);
      +      return ERROR;
      +    }
      +  
      +  position = 0;
      +  for (;;)
      +  {
      +    int nbytesread = read(fd, buffer, IOBUFFERSIZE);
      +
      +    /* Check for read errors */
      +
      +    if (nbytesread < 0)
      +      {
      +        int errval = errno;
      +        nsh_output(vtbl, g_fmtcmdfailed, "hexdump", "read", NSH_ERRNO_OF(errval));
      +        ret = ERROR;
      +        break;
      +      }
      +    else if (nbytesread > 0)
      +      {
      +        snprintf(msg, sizeof(msg), "%s at %08x", argv[1], position);
      +        nsh_dumpbuffer(vtbl, msg, buffer, nbytesread);
      +        position += nbytesread;
      +      }
      +    else
      +      {
      +        break; // EOF
      +      }
      +  }
      +  
      +  (void)close(fd);
      +  return ret;
      +}
      +#endif
      +#endif
      diff --git a/apps/nshlib/nsh_netinit.c b/apps/nshlib/nsh_netinit.c
      index c95bf4c40..58d238312 100644
      --- a/apps/nshlib/nsh_netinit.c
      +++ b/apps/nshlib/nsh_netinit.c
      @@ -47,7 +47,7 @@
       #include 
       
       #include 
      -#if defined(CONFIG_NSH_DHCPC)
      +#if defined(CONFIG_NSH_DHCPC) || defined(CONFIG_NSH_DNS)
       #  include 
       #  include 
       #endif
      @@ -60,6 +60,10 @@
        * Definitions
        ****************************************************************************/
       
      +#if defined(CONFIG_NSH_DRIPADDR) && !defined(CONFIG_NSH_DNSIPADDR)
      +#  define CONFIG_NSH_DNSIPADDR CONFIG_NSH_DRIPADDR
      +#endif
      +
       /****************************************************************************
        * Private Types
        ****************************************************************************/
      @@ -125,10 +129,14 @@ int nsh_netinit(void)
         addr.s_addr = HTONL(CONFIG_NSH_NETMASK);
         uip_setnetmask("eth0", &addr);
       
      -#if defined(CONFIG_NSH_DHCPC)
      +#if defined(CONFIG_NSH_DHCPC) || defined(CONFIG_NSH_DNS)
         /* Set up the resolver */
       
         resolv_init();
      +#if defined(CONFIG_NSH_DNS)
      +  addr.s_addr = HTONL(CONFIG_NSH_DNSIPADDR);
      +  resolv_conf(&addr);
      +#endif
       #endif
       
       #if defined(CONFIG_NSH_DHCPC)
      diff --git a/apps/system/Makefile b/apps/system/Makefile
      index d64bb54c6..9955a6b2c 100644
      --- a/apps/system/Makefile
      +++ b/apps/system/Makefile
      @@ -41,31 +41,36 @@ SUBDIRS = free i2c install readline poweroff ramtron sdcard sysinfo
       
       # Create the list of installed runtime modules (INSTALLED_DIRS)
       
      +ifeq ($(CONFIG_WINDOWS_NATIVE),y)
       define ADD_DIRECTORY
      -INSTALLED_DIRS  += ${shell if [ -r $1/Makefile ]; then echo "$1"; fi}
      +  INSTALLED_DIRS  += $(if $(wildcard .\$1\Makefile),$1,)
       endef
      +else
      +define ADD_DIRECTORY
      +  INSTALLED_DIRS  += $(if $(wildcard ./$1/Makefile),$1,)
      +endef
      +endif
       
       $(foreach DIR, $(SUBDIRS), $(eval $(call ADD_DIRECTORY,$(DIR))))
       
       all: nothing
       .PHONY: nothing context depend clean distclean
       
      +define SDIR_template
      +$(1)_$(2):
      +	$(Q) $(MAKE) -C $(1) $(2) TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)"
      +endef
      +
      +$(foreach SDIR, $(INSTALLED_DIRS), $(eval $(call SDIR_template,$(SDIR),depend)))
      +$(foreach SDIR, $(INSTALLED_DIRS), $(eval $(call SDIR_template,$(SDIR),clean)))
      +$(foreach SDIR, $(INSTALLED_DIRS), $(eval $(call SDIR_template,$(SDIR),distclean)))
      +
       nothing:
       
       context:
       
      -depend:
      -	@for dir in $(INSTALLED_DIRS) ; do \
      -		$(MAKE) -C $$dir depend TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)"; \
      -	done
      -
      -clean:
      -	@for dir in $(INSTALLED_DIRS) ; do \
      -		$(MAKE) -C $$dir clean TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)"; \
      -	done
      +depend: $(foreach SDIR, $(INSTALLED_DIRS), $(SDIR)_depend)
       
      -distclean: clean
      -	@for dir in $(INSTALLED_DIRS) ; do \
      -		$(MAKE) -C $$dir distclean TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)"; \
      -	done
      +clean: $(foreach SDIR, $(INSTALLED_DIRS), $(SDIR)_clean)
       
      +distclean: clean $(foreach SDIR, $(INSTALLED_DIRS), $(SDIR)_distclean)
      diff --git a/apps/system/free/Makefile b/apps/system/free/Makefile
      index 7f911d81c..dada00d99 100644
      --- a/apps/system/free/Makefile
      +++ b/apps/system/free/Makefile
      @@ -1,7 +1,7 @@
       ############################################################################
       # apps/system/free/Makefile
       #
      -#   Copyright (C) 2011 Uros Platise. All rights reserved.
      +#   Copyright (C) 2011-2012 Uros Platise. All rights reserved.
       #   Author: Uros Platise 
       #           Gregory Nutt 
       #
      @@ -61,10 +61,14 @@ COBJS		= $(CSRCS:.c=$(OBJEXT))
       SRCS		= $(ASRCS) $(CSRCS)
       OBJS		= $(AOBJS) $(COBJS)
       
      +ifeq ($(CONFIG_WINDOWS_NATIVE),y)
      +  BIN		= ..\..\libapps$(LIBEXT)
      +else
       ifeq ($(WINTOOL),y)
      -  BIN		= "${shell cygpath -w  $(APPDIR)/libapps$(LIBEXT)}"
      +  BIN		= ..\\..\\libapps$(LIBEXT)
       else
      -  BIN		= "$(APPDIR)/libapps$(LIBEXT)"
      +  BIN		= ../../libapps$(LIBEXT)
      +endif
       endif
       
       ROOTDEPPATH	= --dep-path .
      @@ -83,32 +87,32 @@ $(COBJS): %$(OBJEXT): %.c
       	$(call COMPILE, $<, $@)
       
       .built: $(OBJS)
      -	@( for obj in $(OBJS) ; do \
      -		$(call ARCHIVE, $(BIN), $${obj}); \
      -	done ; )
      -	@touch .built
      +	$(call ARCHIVE, $(BIN), $(OBJS))
      +	$(Q) touch .built
       
       # Register application
       
       .context:
       	$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
      -	@touch $@
      +	$(Q) touch $@
       
       context: .context
       
       # Create dependencies
       
       .depend: Makefile $(SRCS)
      -	@$(MKDEP) $(ROOTDEPPATH) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
      -	@touch $@
      +	$(Q) $(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
      +	$(Q) touch $@
       
       depend: .depend
       
       clean:
      -	@rm -f *.o *~ .*.swp .built
      +	$(call DELFILE, .built)
       	$(call CLEAN)
       
       distclean: clean
      -	@rm -f .context Make.dep .depend
      +	$(call DELFILE, .context)
      +	$(call DELFILE, Make.dep)
      +	$(call DELFILE, .depend)
       
       -include Make.dep
      diff --git a/apps/system/i2c/Makefile b/apps/system/i2c/Makefile
      index 00db91bb7..029d2b6fe 100644
      --- a/apps/system/i2c/Makefile
      +++ b/apps/system/i2c/Makefile
      @@ -48,10 +48,14 @@ COBJS		= $(CSRCS:.c=$(OBJEXT))
       SRCS		= $(ASRCS) $(CSRCS)
       OBJS		= $(AOBJS) $(COBJS)
       
      +ifeq ($(CONFIG_WINDOWS_NATIVE),y)
      +  BIN		= ..\..\libapps$(LIBEXT)
      +else
       ifeq ($(WINTOOL),y)
      -  BIN		= "${shell cygpath -w  $(APPDIR)/libapps$(LIBEXT)}"
      +  BIN		= ..\\..\\libapps$(LIBEXT)
       else
      -  BIN		= "$(APPDIR)/libapps$(LIBEXT)"
      +  BIN		= ../../libapps$(LIBEXT)
      +endif
       endif
       
       ROOTDEPPATH	= --dep-path .
      @@ -73,30 +77,29 @@ $(COBJS): %$(OBJEXT): %.c
       	$(call COMPILE, $<, $@)
       
       .built: $(OBJS)
      -	@( for obj in $(OBJS) ; do \
      -		$(call ARCHIVE, $(BIN), $${obj}); \
      -	done ; )
      -	@touch .built
      +	$(call ARCHIVE, $(BIN), $(OBJS))
      +	$(Q) touch .built
       
       .context:
       	$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
      -	@touch $@
      +	$(Q) touch $@
       
       context: .context
       
       .depend: Makefile $(SRCS)
      -	@$(MKDEP) $(ROOTDEPPATH) \
      -	  $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
      -	@touch $@
      +	$(Q) $(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
      +	$(Q) touch $@
       
       depend: .depend
       
       clean:
      -	@rm -f *.o *~ .*.swp .built
      +	$(call DELFILE, .built)
       	$(call CLEAN)
       
       distclean: clean
      -	@rm -f Make.dep .depend
      +	$(call DELFILE, .context)
      +	$(call DELFILE, Make.dep)
      +	$(call DELFILE, .depend)
       
       -include Make.dep
       
      diff --git a/apps/system/install/Makefile b/apps/system/install/Makefile
      index 71d82f34c..6a02d859f 100644
      --- a/apps/system/install/Makefile
      +++ b/apps/system/install/Makefile
      @@ -2,6 +2,7 @@
       # apps/system/install/Makefile
       #
       #   Copyright (C) 2011 Uros Platise. All rights reserved.
      +#   Copyright (C) 2012 Gregory Nutt. All rights reserved.
       #   Author: Uros Platise 
       #           Gregory Nutt 
       #
      @@ -61,10 +62,14 @@ COBJS		= $(CSRCS:.c=$(OBJEXT))
       SRCS		= $(ASRCS) $(CSRCS)
       OBJS		= $(AOBJS) $(COBJS)
       
      +ifeq ($(CONFIG_WINDOWS_NATIVE),y)
      +  BIN		= ..\..\libapps$(LIBEXT)
      +else
       ifeq ($(WINTOOL),y)
      -  BIN		= "${shell cygpath -w  $(APPDIR)/libapps$(LIBEXT)}"
      +  BIN		= ..\\..\\libapps$(LIBEXT)
       else
      -  BIN		= "$(APPDIR)/libapps$(LIBEXT)"
      +  BIN		= ../../libapps$(LIBEXT)
      +endif
       endif
       
       ROOTDEPPATH	= --dep-path .
      @@ -83,32 +88,32 @@ $(COBJS): %$(OBJEXT): %.c
       	$(call COMPILE, $<, $@)
       
       .built: $(OBJS)
      -	@( for obj in $(OBJS) ; do \
      -		$(call ARCHIVE, $(BIN), $${obj}); \
      -	done ; )
      -	@touch .built
      +	$(call ARCHIVE, $(BIN), $(OBJS))
      +	$(Q) touch .built
       
       # Register application
       
       .context:
       	$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
      -	@touch $@
      +	$(Q) touch $@
       
       context: .context
       
       # Create dependencies
       
       .depend: Makefile $(SRCS)
      -	@$(MKDEP) $(ROOTDEPPATH) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
      -	@touch $@
      +	$(Q) $(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
      +	$(Q) touch $@
       
       depend: .depend
       
       clean:
      -	@rm -f *.o *~ .*.swp .built
      +	$(call DELFILE, .built)
       	$(call CLEAN)
       
       distclean: clean
      -	@rm -f .context Make.dep .depend
      +	$(call DELFILE, .context)
      +	$(call DELFILE, Make.dep)
      +	$(call DELFILE, .depend)
       
       -include Make.dep
      diff --git a/apps/system/readline/Makefile b/apps/system/readline/Makefile
      index 34fab7e81..3a48d324e 100644
      --- a/apps/system/readline/Makefile
      +++ b/apps/system/readline/Makefile
      @@ -52,10 +52,14 @@ COBJS		= $(CSRCS:.c=$(OBJEXT))
       SRCS		= $(ASRCS) $(CSRCS)
       OBJS		= $(AOBJS) $(COBJS)
       
      +ifeq ($(CONFIG_WINDOWS_NATIVE),y)
      +  BIN		= ..\..\libapps$(LIBEXT)
      +else
       ifeq ($(WINTOOL),y)
      -  BIN		= "${shell cygpath -w  $(APPDIR)/libapps$(LIBEXT)}"
      +  BIN		= ..\\..\\libapps$(LIBEXT)
       else
      -  BIN		= "$(APPDIR)/libapps$(LIBEXT)"
      +  BIN		= ../../libapps$(LIBEXT)
      +endif
       endif
       
       ROOTDEPPATH	= --dep-path .
      @@ -74,10 +78,8 @@ $(COBJS): %$(OBJEXT): %.c
       	$(call COMPILE, $<, $@)
       
       .built: $(OBJS)
      -	@( for obj in $(OBJS) ; do \
      -		$(call ARCHIVE, $(BIN), $${obj}); \
      -	done ; )
      -	@touch .built
      +	$(call ARCHIVE, $(BIN), $(OBJS))
      +	$(Q) touch .built
       
       # Context build phase target
       
      @@ -86,18 +88,20 @@ context:
       # Dependency build phase target
       
       .depend: Makefile $(SRCS)
      -	@$(MKDEP) $(ROOTDEPPATH) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
      -	@touch $@
      +	$(Q) $(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
      +	$(Q) touch $@
       
       depend: .depend
       
       # Housekeeping targets
       
       clean:
      -	@rm -f *.o *~ .*.swp .built
      +	$(call DELFILE, .built)
       	$(call CLEAN)
       
       distclean: clean
      -	@rm -f .context Make.dep .depend
      +	$(call DELFILE, .context)
      +	$(call DELFILE, Make.dep)
      +	$(call DELFILE, .depend)
       
       -include Make.dep
      -- 
      cgit v1.2.3
      
      
      From 2b37f33a221966628152144ddf050f731f8106d1 Mon Sep 17 00:00:00 2001
      From: px4dev 
      Date: Fri, 11 Jan 2013 02:39:56 -0800
      Subject: The tests structure doesn't need to be writable.
      
      ---
       apps/px4/tests/tests_main.c | 2 +-
       1 file changed, 1 insertion(+), 1 deletion(-)
      
      (limited to 'apps')
      
      diff --git a/apps/px4/tests/tests_main.c b/apps/px4/tests/tests_main.c
      index 26f7ef96b..d99464546 100644
      --- a/apps/px4/tests/tests_main.c
      +++ b/apps/px4/tests/tests_main.c
      @@ -78,7 +78,7 @@ static int test_jig(int argc, char *argv[]);
        * Private Data
        ****************************************************************************/
       
      -struct {
      +const struct {
       	const char 	*name;
       	int	(* fn)(int argc, char *argv[]);
       	unsigned	options;
      -- 
      cgit v1.2.3
      
      
      From c38ad4ded570eddadeeca3579d02dfc63dcc8a9d Mon Sep 17 00:00:00 2001
      From: px4dev 
      Date: Mon, 14 Jan 2013 10:08:47 -0800
      Subject: Fix the 'time' test, now that rand() seems to be working.
      
      ---
       apps/px4/tests/test_time.c  |  8 +++---
       apps/px4/tests/tests_main.c | 66 ++++++++++++++++++++++++---------------------
       2 files changed, 39 insertions(+), 35 deletions(-)
      
      (limited to 'apps')
      
      diff --git a/apps/px4/tests/test_time.c b/apps/px4/tests/test_time.c
      index 25bf02c31..8a164f3fc 100644
      --- a/apps/px4/tests/test_time.c
      +++ b/apps/px4/tests/test_time.c
      @@ -95,7 +95,7 @@ cycletime(void)
       
       	lasttime = cycles;
       
      -	return (basetime + cycles) / 168;
      +	return (basetime + cycles) / 168;	/* XXX magic number */
       }
       
       /****************************************************************************
      @@ -133,9 +133,9 @@ int test_time(int argc, char *argv[])
       	lowdelta = abs(delta / 100);
       
       	/* loop checking the time */
      -	for (unsigned i = 0; i < 100000; i++) {
      +	for (unsigned i = 0; i < 100; i++) {
       
      -		usleep(rand() * 10);
      +		usleep(rand());
       
       		uint32_t flags = irqsave();
       
      @@ -154,7 +154,7 @@ int test_time(int argc, char *argv[])
       			fprintf(stderr, "h %llu  c %llu  d %lld\n", h, c, delta - lowdelta);
       	}
       
      -	printf("Maximum jitter %lld\n", maxdelta);
      +	printf("Maximum jitter %lldus\n", maxdelta);
       
       	return 0;
       }
      diff --git a/apps/px4/tests/tests_main.c b/apps/px4/tests/tests_main.c
      index d99464546..5bedd257b 100644
      --- a/apps/px4/tests/tests_main.c
      +++ b/apps/px4/tests/tests_main.c
      @@ -82,38 +82,39 @@ const struct {
       	const char 	*name;
       	int	(* fn)(int argc, char *argv[]);
       	unsigned	options;
      -	int			passed;
       #define OPT_NOHELP	(1<<0)
       #define OPT_NOALLTEST	(1<<1)
       #define OPT_NOJIGTEST	(1<<2)
       } tests[] = {
      -	{"led",			test_led,	0, 0},
      -	{"int",			test_int,	0, 0},
      -	{"float",		test_float,	0, 0},
      -	{"sensors",		test_sensors,	0, 0},
      -	{"gpio",		test_gpio,	OPT_NOJIGTEST | OPT_NOALLTEST, 0},
      -	{"hrt",			test_hrt,	OPT_NOJIGTEST | OPT_NOALLTEST, 0},
      -	{"ppm",			test_ppm,	OPT_NOJIGTEST | OPT_NOALLTEST, 0},
      -	{"servo",		test_servo,	OPT_NOJIGTEST | OPT_NOALLTEST, 0},
      -	{"adc",			test_adc,	OPT_NOJIGTEST, 0},
      -	{"jig_voltages",	test_jig_voltages,	OPT_NOALLTEST, 0},
      -	{"uart_loopback",	test_uart_loopback,	OPT_NOJIGTEST | OPT_NOALLTEST, 0},
      -	{"uart_baudchange",	test_uart_baudchange,	OPT_NOJIGTEST | OPT_NOALLTEST, 0},
      -	{"uart_send",		test_uart_send,	OPT_NOJIGTEST | OPT_NOALLTEST, 0},
      -	{"uart_console",	test_uart_console,	OPT_NOJIGTEST | OPT_NOALLTEST, 0},
      -	{"tone",		test_tone,	0, 0},
      -	{"sleep",		test_sleep,	OPT_NOJIGTEST, 0},
      -	{"time",		test_time,	OPT_NOJIGTEST, 0},
      -	{"perf",		test_perf,	OPT_NOJIGTEST, 0},
      -	{"all",			test_all,	OPT_NOALLTEST | OPT_NOJIGTEST, 0},
      -	{"jig",			test_jig,	OPT_NOJIGTEST | OPT_NOALLTEST, 0},
      -	{"param",		test_param,	0, 0},
      -	{"bson",		test_bson,	0, 0},
      -	{"file",		test_file,	0, 0},
      -	{"help",		test_help,	OPT_NOALLTEST | OPT_NOHELP | OPT_NOJIGTEST, 0},
      -	{NULL,			NULL, 		0, 0}
      +	{"led",			test_led,	0},
      +	{"int",			test_int,	0},
      +	{"float",		test_float,	0},
      +	{"sensors",		test_sensors,	0},
      +	{"gpio",		test_gpio,	OPT_NOJIGTEST | OPT_NOALLTEST},
      +	{"hrt",			test_hrt,	OPT_NOJIGTEST | OPT_NOALLTEST},
      +	{"ppm",			test_ppm,	OPT_NOJIGTEST | OPT_NOALLTEST},
      +	{"servo",		test_servo,	OPT_NOJIGTEST | OPT_NOALLTEST},
      +	{"adc",			test_adc,	OPT_NOJIGTEST},
      +	{"jig_voltages",	test_jig_voltages,	OPT_NOALLTEST},
      +	{"uart_loopback",	test_uart_loopback,	OPT_NOJIGTEST | OPT_NOALLTEST},
      +	{"uart_baudchange",	test_uart_baudchange,	OPT_NOJIGTEST | OPT_NOALLTEST},
      +	{"uart_send",		test_uart_send,	OPT_NOJIGTEST | OPT_NOALLTEST},
      +	{"uart_console",	test_uart_console,	OPT_NOJIGTEST | OPT_NOALLTEST},
      +	{"tone",		test_tone,	0},
      +	{"sleep",		test_sleep,	OPT_NOJIGTEST},
      +	{"time",		test_time,	OPT_NOJIGTEST},
      +	{"perf",		test_perf,	OPT_NOJIGTEST},
      +	{"all",			test_all,	OPT_NOALLTEST | OPT_NOJIGTEST},
      +	{"jig",			test_jig,	OPT_NOJIGTEST | OPT_NOALLTEST},
      +	{"param",		test_param,	0},
      +	{"bson",		test_bson,	0},
      +	{"file",		test_file,	0},
      +	{"help",		test_help,	OPT_NOALLTEST | OPT_NOHELP | OPT_NOJIGTEST},
      +	{NULL,			NULL, 		0}
       };
       
      +#define NTESTS (sizeof(tests) / sizeof(tests[0]))
      +
       static int
       test_help(int argc, char *argv[])
       {
      @@ -133,6 +134,7 @@ test_all(int argc, char *argv[])
       	unsigned	i;
       	char		*args[2] = {"all", NULL};
       	unsigned int failcount = 0;
      +	bool		passed[NTESTS];
       
       	printf("\nRunning all tests...\n\n");
       
      @@ -147,11 +149,11 @@ test_all(int argc, char *argv[])
       				fprintf(stderr, "  [%s] \t\t\tFAIL\n", tests[i].name);
       				fflush(stderr);
       				failcount++;
      -
      +				passed[i] = false;
       			} else {
      -				tests[i].passed = 1;
       				printf("  [%s] \t\t\tPASS\n", tests[i].name);
       				fflush(stdout);
      +				passed[i] = true;
       			}
       		}
       	}
      @@ -195,7 +197,7 @@ test_all(int argc, char *argv[])
       	unsigned int k;
       
       	for (k = 0; k < i; k++) {
      -		if ((tests[k].passed == 0) && !(tests[k].options & OPT_NOALLTEST)) {
      +		if (!passed[k] && !(tests[k].options & OPT_NOALLTEST)) {
       			printf(" [%s] to obtain details, please re-run with\n\t nsh> tests %s\n\n", tests[k].name, tests[k].name);
       		}
       	}
      @@ -242,6 +244,7 @@ int test_jig(int argc, char *argv[])
       	unsigned	i;
       	char		*args[2] = {"jig", NULL};
       	unsigned int failcount = 0;
      +	bool		passed[NTESTS];
       
       	printf("\nRunning all tests...\n\n");
       	for (i = 0; tests[i].name; i++) {
      @@ -254,10 +257,11 @@ int test_jig(int argc, char *argv[])
       				fprintf(stderr, "  [%s] \t\t\tFAIL\n", tests[i].name);
       				fflush(stderr);
       				failcount++;
      +				passed[i] = false;
       			} else {
      -				tests[i].passed = 1;
       				printf("  [%s] \t\t\tPASS\n", tests[i].name);
       				fflush(stdout);
      +				passed[i] = true;
       			}
       		}
       	}
      @@ -296,7 +300,7 @@ int test_jig(int argc, char *argv[])
       	unsigned int k;
       	for (k = 0; k < i; k++)
       	{
      -		if ((tests[k].passed == 0) && !(tests[k].options & OPT_NOJIGTEST))
      +		if (!passed[i] && !(tests[k].options & OPT_NOJIGTEST))
       		{
       			printf(" [%s] to obtain details, please re-run with\n\t nsh> tests %s\n\n", tests[k].name, tests[k].name);
       		}
      -- 
      cgit v1.2.3