mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-15 01:33:35 +08:00
Merge branch 'NuttX/master'
This commit is contained in:
Executable → Regular
+25
@@ -305,3 +305,28 @@
|
||||
netutils/webserver/httpd_fsdata.c has been replaced with a dynamically
|
||||
built configuration located at apps/examples/uip (Contributed by
|
||||
Max Holtzberg).
|
||||
* apps/netutils/webserver: Several inenhancements from Kate including the
|
||||
ability to elide scripting and SERVER headers and the ability to map
|
||||
files into memory before transferring them.
|
||||
* apps/netutils/webserver: Add ability to map a URL to CGI function.
|
||||
Contributed by Kate.
|
||||
* apps/nshlib/nsh_mntcmds.c: The changes of 6.21 introduced holes in the
|
||||
error handling: Now the number of arguments to mount can be 0 or 4.
|
||||
Additional parameter checking is required to prevent mysterious errors
|
||||
(submiteed by Kate).
|
||||
* apps/netutils/webserver/httpd_mmap.c: Fix errors when the mmap()
|
||||
length is zero (submitted by Kate).
|
||||
* apps/netutils/webserver/httpd_sendfile.c: Add and option,
|
||||
CONFIG_NETUTILS_HTTPD_SENDFILE to transfer files using the NuttX
|
||||
sendfile() interface.
|
||||
* apps/netutils/discover: A UDP network discovery utility contributed
|
||||
by Max Holtzberg.
|
||||
* apps/examples/discover: A test example for the UDP network discovery
|
||||
utility (also contribed by Max Holtzberg).
|
||||
* apps/examples/*/main.c: Too many files called main.c. Each renamed
|
||||
to something unique so that they will not collide in the archive.
|
||||
* apps/netutils/xmlrpc: The Embeddable Lightweight XML-RPC Server
|
||||
discussed at http://www.drdobbs.com/web-development/\
|
||||
an-embeddable-lightweight-xml-rpc-server/184405364. Contributed by
|
||||
Max Holtzberg.
|
||||
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
# Common make definitions provided to all applications
|
||||
#
|
||||
# Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
|
||||
+56
-48
@@ -3,115 +3,115 @@
|
||||
# see misc/tools/kconfig-language.txt.
|
||||
#
|
||||
|
||||
menu "ADC example"
|
||||
menu "ADC Example"
|
||||
source "$APPSDIR/examples/adc/Kconfig"
|
||||
endmenu
|
||||
|
||||
menu "Buttons example"
|
||||
menu "Buttons Example"
|
||||
source "$APPSDIR/examples/buttons/Kconfig"
|
||||
endmenu
|
||||
|
||||
menu "CAN example"
|
||||
menu "CAN Example"
|
||||
source "$APPSDIR/examples/can/Kconfig"
|
||||
endmenu
|
||||
|
||||
menu "USB CDC/ACM class driver example"
|
||||
menu "USB CDC/ACM Class Driver Example"
|
||||
source "$APPSDIR/examples/cdcacm/Kconfig"
|
||||
endmenu
|
||||
|
||||
menu "USB composite class driver example"
|
||||
menu "USB composite Class Driver Example"
|
||||
source "$APPSDIR/examples/composite/Kconfig"
|
||||
endmenu
|
||||
|
||||
menu "DHCP server example"
|
||||
menu "DHCP Server Example"
|
||||
source "$APPSDIR/examples/dhcpd/Kconfig"
|
||||
endmenu
|
||||
|
||||
menu "FTP client example"
|
||||
menu "FTP Client Example"
|
||||
source "$APPSDIR/examples/ftpc/Kconfig"
|
||||
endmenu
|
||||
|
||||
menu "FTP server example"
|
||||
menu "FTP Server Example"
|
||||
source "$APPSDIR/examples/ftpd/Kconfig"
|
||||
endmenu
|
||||
|
||||
menu "\"Hello, World!\" example"
|
||||
menu "\"Hello, World!\" Example"
|
||||
source "$APPSDIR/examples/hello/Kconfig"
|
||||
endmenu
|
||||
|
||||
menu "\"Hello, World!\" C++ example"
|
||||
menu "\"Hello, World!\" C++ Example"
|
||||
source "$APPSDIR/examples/helloxx/Kconfig"
|
||||
endmenu
|
||||
|
||||
menu "USB HID keyboard example"
|
||||
menu "USB HID Keyboard Example"
|
||||
source "$APPSDIR/examples/hidkbd/Kconfig"
|
||||
endmenu
|
||||
|
||||
menu "IGMP example"
|
||||
menu "IGMP Example"
|
||||
source "$APPSDIR/examples/igmp/Kconfig"
|
||||
endmenu
|
||||
|
||||
menu "LCD read/write example"
|
||||
menu "LCD Read/Write Example"
|
||||
source "$APPSDIR/examples/lcdrw/Kconfig"
|
||||
endmenu
|
||||
|
||||
menu "Memory management example"
|
||||
menu "Memory Management Example"
|
||||
source "$APPSDIR/examples/mm/Kconfig"
|
||||
endmenu
|
||||
|
||||
menu "File system mount example"
|
||||
menu "File System Mount Example"
|
||||
source "$APPSDIR/examples/mount/Kconfig"
|
||||
endmenu
|
||||
|
||||
menu "FreeModBus example"
|
||||
menu "FreeModBus Example"
|
||||
source "$APPSDIR/examples/modbus/Kconfig"
|
||||
endmenu
|
||||
|
||||
menu "Network test example"
|
||||
menu "Network Test Example"
|
||||
source "$APPSDIR/examples/nettest/Kconfig"
|
||||
endmenu
|
||||
|
||||
menu "NuttShell (NSH) example"
|
||||
menu "NuttShell (NSH) Example"
|
||||
source "$APPSDIR/examples/nsh/Kconfig"
|
||||
endmenu
|
||||
|
||||
menu "NULL example"
|
||||
menu "NULL Example"
|
||||
source "$APPSDIR/examples/null/Kconfig"
|
||||
endmenu
|
||||
|
||||
menu "NX graphics example"
|
||||
menu "NX Graphics Example"
|
||||
source "$APPSDIR/examples/nx/Kconfig"
|
||||
endmenu
|
||||
|
||||
menu "NxConsole example"
|
||||
menu "NxConsole Example"
|
||||
source "$APPSDIR/examples/nxconsole/Kconfig"
|
||||
endmenu
|
||||
|
||||
menu "NXFFS file system example"
|
||||
menu "NXFFS File System Example"
|
||||
source "$APPSDIR/examples/nxffs/Kconfig"
|
||||
endmenu
|
||||
|
||||
menu "NXFLAT example"
|
||||
menu "NXFLAT Example"
|
||||
source "$APPSDIR/examples/nxflat/Kconfig"
|
||||
endmenu
|
||||
|
||||
menu "NX graphics \"Hello, World!\" example"
|
||||
menu "NX Graphics \"Hello, World!\" Example"
|
||||
source "$APPSDIR/examples/nxhello/Kconfig"
|
||||
endmenu
|
||||
|
||||
menu "NX graphics image example"
|
||||
menu "NX Graphics image Example"
|
||||
source "$APPSDIR/examples/nximage/Kconfig"
|
||||
endmenu
|
||||
|
||||
menu "NX graphics lines example"
|
||||
menu "NX Graphics lines Example"
|
||||
source "$APPSDIR/examples/nxlines/Kconfig"
|
||||
endmenu
|
||||
|
||||
menu "NX graphics text example"
|
||||
menu "NX Graphics Text Example"
|
||||
source "$APPSDIR/examples/nxtext/Kconfig"
|
||||
endmenu
|
||||
|
||||
menu "OS test example"
|
||||
menu "OS Test Example"
|
||||
source "$APPSDIR/examples/ostest/Kconfig"
|
||||
endmenu
|
||||
|
||||
@@ -119,82 +119,90 @@ menu "Pascal \"Hello, World!\"example"
|
||||
source "$APPSDIR/examples/pashello/Kconfig"
|
||||
endmenu
|
||||
|
||||
menu "Pipe example"
|
||||
menu "Pipe Example"
|
||||
source "$APPSDIR/examples/pipe/Kconfig"
|
||||
endmenu
|
||||
|
||||
menu "Poll example"
|
||||
menu "Poll Example"
|
||||
source "$APPSDIR/examples/poll/Kconfig"
|
||||
endmenu
|
||||
|
||||
menu "Pulse width modulation (PWM) example"
|
||||
menu "Pulse Width Modulation (PWM) Example"
|
||||
source "$APPSDIR/examples/pwm/Kconfig"
|
||||
endmenu
|
||||
|
||||
menu "Quadrature encoder example"
|
||||
menu "Quadrature Encoder Example"
|
||||
source "$APPSDIR/examples/qencoder/Kconfig"
|
||||
endmenu
|
||||
|
||||
menu "RGMP example"
|
||||
menu "RGMP Example"
|
||||
source "$APPSDIR/examples/rgmp/Kconfig"
|
||||
endmenu
|
||||
|
||||
menu "ROMFS example"
|
||||
menu "ROMFS Example"
|
||||
source "$APPSDIR/examples/romfs/Kconfig"
|
||||
endmenu
|
||||
|
||||
menu "sendmail example"
|
||||
menu "sendmail Example"
|
||||
source "$APPSDIR/examples/sendmail/Kconfig"
|
||||
endmenu
|
||||
|
||||
menu "Serial loopback example"
|
||||
menu "Serial Loopback Example"
|
||||
source "$APPSDIR/examples/serloop/Kconfig"
|
||||
endmenu
|
||||
|
||||
menu "Telnet daemon example"
|
||||
menu "Telnet Daemon Example"
|
||||
source "$APPSDIR/examples/telnetd/Kconfig"
|
||||
endmenu
|
||||
|
||||
menu "THTTPD web server example"
|
||||
menu "THTTPD Web Server Example"
|
||||
source "$APPSDIR/examples/thttpd/Kconfig"
|
||||
endmenu
|
||||
|
||||
menu "TIFF generation example"
|
||||
menu "TIFF Generation Example"
|
||||
source "$APPSDIR/examples/tiff/Kconfig"
|
||||
endmenu
|
||||
|
||||
menu "Touchscreen example"
|
||||
menu "Touchscreen Example"
|
||||
source "$APPSDIR/examples/touchscreen/Kconfig"
|
||||
endmenu
|
||||
|
||||
menu "UDP example"
|
||||
menu "UDP Example"
|
||||
source "$APPSDIR/examples/udp/Kconfig"
|
||||
endmenu
|
||||
|
||||
menu "uIP web server example"
|
||||
menu "UDP Discovery Daemon Example"
|
||||
source "$APPSDIR/examples/discover/Kconfig"
|
||||
endmenu
|
||||
|
||||
menu "uIP Web Server Example"
|
||||
source "$APPSDIR/examples/uip/Kconfig"
|
||||
endmenu
|
||||
|
||||
menu "USB serial test example"
|
||||
menu "USB Serial Test Example"
|
||||
source "$APPSDIR/examples/usbserial/Kconfig"
|
||||
endmenu
|
||||
|
||||
menu "USB mass storage class example"
|
||||
menu "USB Mass Storage Class Example"
|
||||
source "$APPSDIR/examples/usbstorage/Kconfig"
|
||||
endmenu
|
||||
|
||||
menu "USB serial terminal example"
|
||||
menu "USB Serial Terminal Example"
|
||||
source "$APPSDIR/examples/usbterm/Kconfig"
|
||||
endmenu
|
||||
|
||||
menu "Watchdog timer example"
|
||||
menu "Watchdog timer Example"
|
||||
source "$APPSDIR/examples/watchdog/Kconfig"
|
||||
endmenu
|
||||
|
||||
menu "wget example"
|
||||
menu "wget Example"
|
||||
source "$APPSDIR/examples/wget/Kconfig"
|
||||
endmenu
|
||||
|
||||
menu "WLAN example"
|
||||
menu "WLAN Example"
|
||||
source "$APPSDIR/examples/wlan/Kconfig"
|
||||
endmenu
|
||||
|
||||
menu "XML RPC Example"
|
||||
source "$APPSDIR/examples/xmlrpc/Kconfig"
|
||||
endmenu
|
||||
|
||||
@@ -58,6 +58,10 @@ ifeq ($(CONFIG_EXAMPLES_DHCPD),y)
|
||||
CONFIGURED_APPS += examples/dhcpd
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_EXAMPLE_DISCOVER),y)
|
||||
CONFIGURED_APPS += examples/discover
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_EXAMPLES_FTPC),y)
|
||||
CONFIGURED_APPS += examples/ftpc
|
||||
endif
|
||||
@@ -221,3 +225,7 @@ endif
|
||||
ifeq ($(CONFIG_EXAMPLES_WLAN),y)
|
||||
CONFIGURED_APPS += examples/wlan
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_EXAMPLES_XMLRPC),y)
|
||||
CONFIGURED_APPS += examples/xmlrpc
|
||||
endif
|
||||
|
||||
@@ -37,11 +37,12 @@
|
||||
|
||||
# Sub-directories
|
||||
|
||||
SUBDIRS = adc buttons can cdcacm composite dhcpd ftpc ftpd hello helloxx \
|
||||
hidkbd igmp lcdrw mm modbus mount nettest nsh null nx nxconsole nxffs \
|
||||
nxflat nxhello nximage nxlines nxtext ostest pashello pipe poll pwm \
|
||||
qencoder rgmp romfs serloop telnetd thttpd tiff touchscreen udp uip \
|
||||
usbserial sendmail usbstorage usbterm watchdog wget wlan
|
||||
SUBDIRS = adc buttons can cdcacm composite dhcpd discover ftpc ftpd hello
|
||||
SUBDIRS += helloxx hidkbd igmp lcdrw mm modbus mount nettest nsh null nx
|
||||
SUBDIRS += nxconsole nxffs nxflat nxhello nximage nxlines nxtext ostest
|
||||
SUBDIRS += pashello pipe poll pwm qencoder rgmp romfs serloop telnetd
|
||||
SUBDIRS += thttpd tiff touchscreen udp uip usbserial sendmail usbstorage
|
||||
SUBDIRS += usbterm watchdog wget wlan
|
||||
|
||||
# Sub-directories that might need context setup. Directories may need
|
||||
# context setup for a variety of reasons, but the most common is because
|
||||
@@ -56,7 +57,8 @@ SUBDIRS = adc buttons can cdcacm composite dhcpd ftpc ftpd hello helloxx \
|
||||
CNTXTDIRS = pwm
|
||||
|
||||
ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
|
||||
CNTXTDIRS += adc can cdcacm composite ftpd dhcpd modbus nettest qencoder telnetd watchdog
|
||||
CNTXTDIRS += adc can cdcacm composite discover ftpd dhcpd modbus nettest
|
||||
CNTXTDIRS += qencoder telnetd watchdog
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_EXAMPLES_HELLO_BUILTIN),y)
|
||||
|
||||
@@ -275,6 +275,28 @@ examples/dhcpd
|
||||
|
||||
CONFIGURED_APPS += uiplib
|
||||
|
||||
examples/discover
|
||||
^^^^^^^^^^^^^^^^^
|
||||
|
||||
This example exercises netutils/discover utility. This example initializes
|
||||
and starts the UDP discover daemon. This daemon is useful for discovering
|
||||
devices in local networks, especially with DHCP configured devices. It
|
||||
listens for UDP broadcasts which also can include a device class so that
|
||||
groups of devices can be discovered. It is also possible to address all
|
||||
classes with a kind of broadcast discover.
|
||||
|
||||
This example will automatically be built as an NSH built-in if
|
||||
CONFIG_NSH_BUILTIN_APPS is selected. Otherwise, it will be a standalone
|
||||
program with entry point "discover_main".
|
||||
|
||||
NuttX configuration settings:
|
||||
|
||||
CONFIG_EXAMPLE_DISCOVER_DHCPC - DHCP Client
|
||||
CONFIG_EXAMPLE_DISCOVER_NOMAC - Use canned MAC address
|
||||
CONFIG_EXAMPLE_DISCOVER_IPADDR - Target IP address
|
||||
CONFIG_EXAMPLE_DISCOVER_DRIPADDR - Router IP address
|
||||
CONFIG_EXAMPLE_DISCOVER_NETMASK - Network Mask
|
||||
|
||||
examples/ftpc
|
||||
^^^^^^^^^^^^^
|
||||
|
||||
@@ -1111,7 +1133,7 @@ examples/rgmp
|
||||
|
||||
See http://rgmp.sourceforge.net/wiki/index.php/Main_Page for further
|
||||
|
||||
At present, the RGMP example folder contains only an empty main.c file.
|
||||
At present, the RGMP example folder contains only an empty rgmp_main.c file.
|
||||
|
||||
examples/romfs
|
||||
^^^^^^^^^^^^^^
|
||||
@@ -1646,8 +1668,27 @@ examples/wget
|
||||
file in the configuration driver with instruction to build applications
|
||||
like:
|
||||
|
||||
CONFIGURED_APPS += uiplib
|
||||
CONFIGURED_APPS += resolv
|
||||
CONFIGURED_APPS += webclient
|
||||
CONFIGURED_APPS += uiplib
|
||||
CONFIGURED_APPS += resolv
|
||||
CONFIGURED_APPS += webclient
|
||||
|
||||
examples/xmlrpc
|
||||
|
||||
This example exercises the "Embeddable Lightweight XML-RPC Server" which
|
||||
is discussed at:
|
||||
|
||||
http://www.drdobbs.com/web-development/an-embeddable-lightweight-xml-rpc-server/184405364
|
||||
|
||||
Configuration options:
|
||||
|
||||
CONFIG_EXAMPLES_XMLRPC_BUFFERSIZE - HTTP buffer size. Default 1024
|
||||
CONFIG_EXAMPLES_XMLRPC_DHCPC - Use DHCP Client. Default n. Ignored
|
||||
if CONFIG_NSH_BUILTIN_APPS is selected.
|
||||
CONFIG_EXAMPLES_XMLRPC_NOMAC - Use Canned MAC Address. Defaul n. Ignored
|
||||
if CONFIG_NSH_BUILTIN_APPS is selected.
|
||||
CONFIG_EXAMPLES_XMLRPC_IPADDR - Target IP address. Default 0x0a000002.
|
||||
Ignored if CONFIG_NSH_BUILTIN_APPS is selected.
|
||||
CONFIG_EXAMPLES_XMLRPC_DRIPADDR - Default Router IP address (Gateway).
|
||||
Default 0x0a000001. Ignored if CONFIG_NSH_BUILTIN_APPS is selected.
|
||||
CONFIG_EXAMPLES_XMLRPC_NETMASK - Network Mask. Default 0xffffff00
|
||||
Ignored if CONFIG_NSH_BUILTIN_APPS is selected.
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# apps/examples/buttons/Makefile
|
||||
#
|
||||
# Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
@@ -40,7 +40,7 @@ include $(APPDIR)/Make.defs
|
||||
# Hello, World! Example
|
||||
|
||||
ASRCS =
|
||||
CSRCS = main.c
|
||||
CSRCS = buttons_main.c
|
||||
|
||||
AOBJS = $(ASRCS:.S=$(OBJEXT))
|
||||
COBJS = $(CSRCS:.c=$(OBJEXT))
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* examples/buttons/main.c
|
||||
* examples/buttons/buttons_main.c
|
||||
*
|
||||
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
@@ -2,7 +2,7 @@
|
||||
* examples/can/can_main.c
|
||||
*
|
||||
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
||||
@@ -46,7 +46,7 @@ STACKSIZE = 2048
|
||||
# Hello, World! Example
|
||||
|
||||
ASRCS =
|
||||
CSRCS = main.c
|
||||
CSRCS = hello_main.c
|
||||
|
||||
AOBJS = $(ASRCS:.S=$(OBJEXT))
|
||||
COBJS = $(CSRCS:.c=$(OBJEXT))
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* examples/hello/main.c
|
||||
* examples/hello/hello_main.c
|
||||
*
|
||||
* Copyright (C) 2008, 2011-2012 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
@@ -2,7 +2,7 @@
|
||||
# apps/examples/helloxx/Makefile
|
||||
#
|
||||
# Copyright (C) 2009-2011 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
@@ -41,7 +41,7 @@ include $(APPDIR)/Make.defs
|
||||
|
||||
ASRCS =
|
||||
CSRCS =
|
||||
CXXSRCS = main.cxx
|
||||
CXXSRCS = helloxx_main.cxx
|
||||
|
||||
AOBJS = $(ASRCS:.S=$(OBJEXT))
|
||||
COBJS = $(CSRCS:.c=$(OBJEXT))
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
//***************************************************************************
|
||||
// examples/helloxx/main.cxx
|
||||
// examples/helloxx/helloxx_main.cxx
|
||||
//
|
||||
// Copyright (C) 2009, 2011-2012 Gregory Nutt. All rights reserved.
|
||||
// Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
@@ -1,253 +0,0 @@
|
||||
/****************************************************************************
|
||||
* examples/lcdrw/lcdrw_main.c
|
||||
*
|
||||
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
*
|
||||
* 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 <nuttx/config.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <nuttx/lcd/lcd.h>
|
||||
#include <nuttx/nx/nxglib.h>
|
||||
|
||||
/****************************************************************************
|
||||
* Definitions
|
||||
****************************************************************************/
|
||||
/* Configuration ************************************************************/
|
||||
/* Most of the NX configuration settings are probbably *not* needed by this
|
||||
* example. But, presumeably you are using NX too and so the checks might
|
||||
* be good for you.
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_NX
|
||||
# error "CONFIG_NX must be defined to use this test"
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_NX_LCDDRIVER
|
||||
# error "CONFIG_NX_LCDDRIVER must be defined to use this test"
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_EXAMPLES_LCDRW_BPP
|
||||
# define CONFIG_EXAMPLES_LCDRW_BPP 16
|
||||
#endif
|
||||
|
||||
#if CONFIG_EXAMPLES_LCDRW_BPP != 16
|
||||
# error "Currently only RGB565 is supported -- feel free to extend"
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_NX_DISABLE_16BPP
|
||||
# error "CONFIG_NX_DISABLE_16BPP disables 16-bit support"
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_EXAMPLES_LDCRW_DEVNO
|
||||
# define CONFIG_EXAMPLES_LDCRW_DEVNO 0
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_EXAMPLES_LDCRW_XRES
|
||||
# define CONFIG_EXAMPLES_LDCRW_XRES 240
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_EXAMPLES_LDCRW_YRES
|
||||
# define CONFIG_EXAMPLES_LDCRW_YRES 320
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Private Types
|
||||
****************************************************************************/
|
||||
|
||||
struct lcdrw_instance_s
|
||||
{
|
||||
/* LCD device handle and planeinfo */
|
||||
|
||||
FAR struct lcd_dev_s *dev;
|
||||
struct lcd_planeinfo_s pinfo;
|
||||
};
|
||||
|
||||
/****************************************************************************
|
||||
* Private Data
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Private Functions
|
||||
****************************************************************************/
|
||||
/****************************************************************************
|
||||
* Name: lcdrw_initialize
|
||||
****************************************************************************/
|
||||
|
||||
static inline int lcdrw_initialize(FAR struct lcdrw_instance_s *inst)
|
||||
{
|
||||
int ret;
|
||||
|
||||
/* Initialize the LCD device */
|
||||
|
||||
printf("screens_initialize: Initializing LCD\n");
|
||||
ret = up_lcdinitialize();
|
||||
if (ret < 0)
|
||||
{
|
||||
fprintf(stderr, "screens_initialize: up_lcdinitialize failed: %d\n", -ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Get the device instance. */
|
||||
|
||||
printf("Get LCD instance\n");
|
||||
inst->dev = up_lcdgetdev(CONFIG_EXAMPLES_LDCRW_DEVNO);
|
||||
if (!inst->dev)
|
||||
{
|
||||
fprintf(stderr, "up_lcdgetdev failed, devno=%d\n", CONFIG_EXAMPLES_LDCRW_DEVNO);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Turn the LCD on at 75% power. This should not be necessary. */
|
||||
|
||||
(void)inst->dev->setpower(inst->dev, ((3*CONFIG_LCD_MAXPOWER + 3)/4));
|
||||
|
||||
/* Get the planeinfo structure */
|
||||
|
||||
ret = inst->dev->getplaneinfo(inst->dev, 0, &inst->pinfo);
|
||||
if (ret < 0)
|
||||
{
|
||||
fprintf(stderr, "getplaneinfo failed: %d\n", ret);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
* Name: lcdrw_main
|
||||
****************************************************************************/
|
||||
|
||||
int lcdrw_main(int argc, char *argv[])
|
||||
{
|
||||
struct lcdrw_instance_s inst;
|
||||
nxgl_coord_t row;
|
||||
nxgl_coord_t col;
|
||||
uint16_t value;
|
||||
uint32_t offset;
|
||||
FAR uint16_t *ptr;
|
||||
int ret;
|
||||
|
||||
/* Initialize the LCD driver */
|
||||
|
||||
ret = lcdrw_initialize(&inst);
|
||||
if (ret < 0)
|
||||
{
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/* Loop, writing all possible values to the LCD */
|
||||
|
||||
value = 0;
|
||||
for (row = 0; row < CONFIG_EXAMPLES_LDCRW_YRES; row++)
|
||||
{
|
||||
/* Create a dummy row. The important thing is to try all
|
||||
* bit combinations in a predictable way.
|
||||
*/
|
||||
|
||||
ptr = (FAR uint16_t*)inst.pinfo.buffer;
|
||||
for (col = 0; col < CONFIG_EXAMPLES_LDCRW_XRES; col++)
|
||||
{
|
||||
*ptr++ = value++;
|
||||
}
|
||||
|
||||
/* Write the row to the LCD */
|
||||
|
||||
ret = inst.pinfo.putrun(row, 0, inst.pinfo.buffer,
|
||||
CONFIG_EXAMPLES_LDCRW_XRES);
|
||||
if (ret < 0)
|
||||
{
|
||||
fprintf(stderr, "putrun failed: %d\n", ret);
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
/* Print a header */
|
||||
|
||||
printf(" ");
|
||||
for (col = 0; col < 15; col++)
|
||||
{
|
||||
printf("---%x ", col);
|
||||
}
|
||||
printf("---f\n");
|
||||
|
||||
/* Then read each line back from the LCD. */
|
||||
|
||||
offset = 0;
|
||||
for (row = 0; row < CONFIG_EXAMPLES_LDCRW_YRES; row++)
|
||||
{
|
||||
/* Read the row */
|
||||
|
||||
ret = inst.pinfo.getrun(row, 0, inst.pinfo.buffer,
|
||||
CONFIG_EXAMPLES_LDCRW_XRES);
|
||||
if (ret < 0)
|
||||
{
|
||||
fprintf(stderr, "getrun failed: %d\n", ret);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
/* Then dump the row to the display */
|
||||
|
||||
ptr = (FAR uint16_t*)inst.pinfo.buffer;
|
||||
for (col = 0; col < CONFIG_EXAMPLES_LDCRW_XRES; col++)
|
||||
{
|
||||
if ((offset & 15) == 0)
|
||||
{
|
||||
printf("%06x ", offset);
|
||||
}
|
||||
|
||||
value = *ptr++;
|
||||
offset++;
|
||||
|
||||
if ((offset & 15) == 0)
|
||||
{
|
||||
printf("%04x\n", value);
|
||||
}
|
||||
else
|
||||
{
|
||||
printf("%04x ", value);
|
||||
}
|
||||
}
|
||||
}
|
||||
fflush(stdout);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# apps/examples/mm/Makefile
|
||||
#
|
||||
# Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* examples/mm/mm_main.c
|
||||
*
|
||||
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# apps/Makefile
|
||||
#
|
||||
# Copyright (C) 2007-2008, 2010-2010 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* examples/mount/mount.h
|
||||
*
|
||||
* Copyright (C) 2008 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* examples/mount/mount_main.c
|
||||
*
|
||||
* Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* examples/mount/ramdisk.c
|
||||
*
|
||||
* Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
config EXAMPLES_NSH
|
||||
bool "NuttShell (NSH) example"
|
||||
default n
|
||||
select NSH_LIBRARY
|
||||
select SYSTEM_READLINE
|
||||
---help---
|
||||
Enable the NuttShell (NSH) example
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# apps/examples/nsh/Makefile
|
||||
#
|
||||
# Copyright (C) 2007-2008, 2010-2011 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# examples/null/Makefile
|
||||
#
|
||||
# Copyright (C) 2007-2008, 2010-2011 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* examples/null/null_main.c
|
||||
*
|
||||
* Copyright (C) 2007, 2009, 2011 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
||||
@@ -10,4 +10,33 @@ config EXAMPLES_OSTEST
|
||||
Enable the OS test example
|
||||
|
||||
if EXAMPLES_OSTEST
|
||||
|
||||
config EXAMPLES_OSTEST_BUILTIN
|
||||
bool "NSH built-in application"
|
||||
default y if NSH_LIBRARY
|
||||
default n if !NSH_LIBRARY
|
||||
---help---
|
||||
Build the OS test example as an NSH built-in application.
|
||||
|
||||
config EXAMPLES_OSTEST_LOOPS
|
||||
int "OS test loop"
|
||||
default 1
|
||||
---help---
|
||||
Used to control the number of executions of the test. If undefined, the test
|
||||
executes one time. If defined to be zero, the test runs forever.
|
||||
|
||||
config EXAMPLES_OSTEST_STACKSIZE
|
||||
int "OS test stack size"
|
||||
default 8192
|
||||
---help---
|
||||
Size of the stack used to create the ostest task. Default is 8192.
|
||||
|
||||
config EXAMPLES_OSTEST_NBARRIER_THREADS
|
||||
int "Number of barrier threads"
|
||||
default 8
|
||||
---help---
|
||||
Specifies the number of threads to create in the barrier test. The default
|
||||
is 8 but a smaller number may be needed on systems without sufficient memory
|
||||
to start so many threads.
|
||||
|
||||
endif
|
||||
|
||||
@@ -46,7 +46,7 @@ STACKSIZE = 2048
|
||||
# NuttX OS Test
|
||||
|
||||
ASRCS =
|
||||
CSRCS = main.c dev_null.c
|
||||
CSRCS = ostest_main.c dev_null.c
|
||||
|
||||
ifeq ($(CONFIG_ARCH_FPU),y)
|
||||
CSRCS += fpu.c
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* examples/ostest/barrier.c
|
||||
*
|
||||
* Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* examples/ostest/cancel.c
|
||||
*
|
||||
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* cond.c
|
||||
*
|
||||
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* examples/ostest/dev_null.c
|
||||
*
|
||||
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* mutex.c
|
||||
*
|
||||
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/****************************************************************************
|
||||
* apps/examples/ostest/main.c
|
||||
* apps/examples/ostest/ostest_main.c
|
||||
*
|
||||
* Copyright (C) 2007-2009, 2011-2012 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
@@ -2,7 +2,7 @@
|
||||
* examples/ostest/posixtimer.c
|
||||
*
|
||||
* Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* examples/ostest/prioinherit.c
|
||||
*
|
||||
* Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* rmutex.c
|
||||
*
|
||||
* Copyright (C) 2008 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* examples/ostest/roundrobin.c
|
||||
*
|
||||
* Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* sem.c
|
||||
*
|
||||
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* apps/examples/ostest/sighand.c
|
||||
*
|
||||
* Copyright (C) 2007, 2008, 2011 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* apps/examples/ostest/mqueue.c
|
||||
*
|
||||
* Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* examples/ostest/timedwait.c
|
||||
*
|
||||
* Copyright (C) 2007, 2008, 2011 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# apps/examples/pipe/Makefile
|
||||
#
|
||||
# Copyright (C) 2008, 2010-2011 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* examples/pipe/interlock_test.c
|
||||
*
|
||||
* Copyright (C) 2008 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* examples/pipe/pipe.h
|
||||
*
|
||||
* Copyright (C) 2008 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* examples/pipe/pipe_main.c
|
||||
*
|
||||
* Copyright (C) 2008-2009, 2011 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* examples/pipe/redirect_test.c
|
||||
*
|
||||
* Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* examples/pipe/transfer_test.c
|
||||
*
|
||||
* Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# apps/examples/poll/Makefile
|
||||
#
|
||||
# Copyright (C) 2008, 2010-2011 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# apps/examples/poll/Makefile.host
|
||||
#
|
||||
# Copyright (C) 2008, 2009, 2011 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* examples/poll/poll_internal.h
|
||||
*
|
||||
* Copyright (C) 2008, 2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* examples/poll/poll_listener.c
|
||||
*
|
||||
* Copyright (C) 2008 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* examples/poll/poll_main.c
|
||||
*
|
||||
* Copyright (C) 2008, 2011 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* examples/poll/select_listener.c
|
||||
*
|
||||
* Copyright (C) 2008, 2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# apps/examples/romfs/Makefile
|
||||
#
|
||||
# Copyright (C) 2008, 2010-2011 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* examples/romfs/romfs_main.c
|
||||
*
|
||||
* Copyright (C) 2008-2009, 2011 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# apps/examples/serloop/Makefile
|
||||
#
|
||||
# Copyright (C) 2008, 2010-2011 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
@@ -40,7 +40,7 @@ include $(APPDIR)/Make.defs
|
||||
# Mindlessly simple console loopack test
|
||||
|
||||
ASRCS =
|
||||
CSRCS = main.c
|
||||
CSRCS = serloop_main.c
|
||||
|
||||
AOBJS = $(ASRCS:.S=$(OBJEXT))
|
||||
COBJS = $(CSRCS:.c=$(OBJEXT))
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/****************************************************************************
|
||||
* examples/serloop/main.c
|
||||
* examples/serloop/serloop_main.c
|
||||
*
|
||||
* Copyright (C) 2008-2009, 2011 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
@@ -2,7 +2,7 @@
|
||||
# apps/interpreters/Makefile
|
||||
#
|
||||
# Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
# apps/interpreters/ficl/Makefile
|
||||
#
|
||||
# Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
|
||||
Executable → Regular
@@ -2,7 +2,7 @@
|
||||
# apps/nshlib/Makefile
|
||||
#
|
||||
# Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
||||
# Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
# Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* Copyright (C) 2011 Uros Platise. All rights reserved.
|
||||
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
||||
* Authors: Uros Platise <uros.platise@isotel.eu>
|
||||
* Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
* Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
||||
+9
-2
@@ -6,6 +6,7 @@
|
||||
config NSH_LIBRARY
|
||||
bool "NSH Library"
|
||||
default n
|
||||
select SYSTEM_READLINE
|
||||
---help---
|
||||
Build the NSH support library. This is used, for example, by examples/nsh
|
||||
in order to implement the full NuttShell (NSH).
|
||||
@@ -201,6 +202,7 @@ config NSH_MMCSDMINOR
|
||||
config NSH_ROMFSETC
|
||||
bool "Support ROMFS start-up script"
|
||||
default n
|
||||
depends on FS_ROMFS
|
||||
---help---
|
||||
Mount a ROMFS filesystem at /etc and provide a startup script
|
||||
at /etc/init.d/rcS. The default startup script will mount
|
||||
@@ -244,6 +246,7 @@ config NSH_ROMFSSECTSIZE
|
||||
config NSH_FATDEVNO
|
||||
int "FAT block device minor number"
|
||||
default 0
|
||||
depends on FS_FAT
|
||||
---help---
|
||||
When the default rcS file used when NSH_ROMFSETC is selected, it
|
||||
will mount a FAT FS under /tmp. This is the minor number of the FAT
|
||||
@@ -252,6 +255,7 @@ config NSH_FATDEVNO
|
||||
config NSH_FATSECTSIZE
|
||||
int "FAT sector size"
|
||||
default 512
|
||||
depends on FS_FAT
|
||||
---help---
|
||||
When the default rcS file used when NSH_ROMFSETC is selected, it
|
||||
will mount a FAT FS under /tmp. This is the sector size use with the
|
||||
@@ -260,6 +264,7 @@ config NSH_FATSECTSIZE
|
||||
config NSH_FATNSECTORS
|
||||
int "FAT number of sectors"
|
||||
default 1024
|
||||
depends on FS_FAT
|
||||
---help---
|
||||
When the default rcS file used when NSH_ROMFSETC is selected, it
|
||||
will mount a FAT FS under /tmp. This is the number of sectors to use
|
||||
@@ -268,11 +273,13 @@ config NSH_FATNSECTORS
|
||||
|
||||
config NSH_FATMOUNTPT
|
||||
string "FAT mount point"
|
||||
default 512
|
||||
default "/tmp"
|
||||
depends on FS_FAT
|
||||
---help---
|
||||
When the default rcS file used when NSH_ROMFSETC is selected, it
|
||||
will mount a FAT FS under /tmp. This is the location where the FAT
|
||||
FS will be mounted. Default is /tmp.
|
||||
FS will be mounted. Default is "/tmp".
|
||||
|
||||
endif
|
||||
|
||||
if NSH_LIBRARY
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* apps/nshlib/nsh_console.h
|
||||
*
|
||||
* Copyright (C) 2007-2012 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
||||
@@ -97,9 +97,10 @@
|
||||
int nsh_consolemain(int argc, char *argv[])
|
||||
{
|
||||
FAR struct console_stdio_s *pstate = nsh_newconsole();
|
||||
DEBUGASSERT(pstate);
|
||||
int ret;
|
||||
|
||||
DEBUGASSERT(pstate);
|
||||
|
||||
/* If we are using a USB serial console, then we will have to wait for the
|
||||
* USB to be connected to the host.
|
||||
*/
|
||||
|
||||
@@ -195,10 +195,11 @@ int cmd_df(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
|
||||
defined(CONFIG_FS_READABLE) && !defined(CONFIG_NSH_DISABLE_MOUNT)
|
||||
int cmd_mount(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
|
||||
{
|
||||
char *source;
|
||||
char *target;
|
||||
char *filesystem = 0;
|
||||
FAR char *source;
|
||||
FAR char *target;
|
||||
FAR char *filesystem = NULL;
|
||||
bool badarg = false;
|
||||
int option;
|
||||
int ret;
|
||||
|
||||
/* The mount command behaves differently if no parameters are provided */
|
||||
@@ -208,9 +209,12 @@ int cmd_mount(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
|
||||
return mount_show(vtbl, argv[0]);
|
||||
}
|
||||
|
||||
/* Get the mount options */
|
||||
/* Get the mount options. NOTE: getopt() is not thread safe nor re-entrant.
|
||||
* To keep its state proper for the next usage, it is necessary to parse to
|
||||
* the end of the line even if an error occurs. If an error occurs, this
|
||||
* logic just sets 'badarg' and continues.
|
||||
*/
|
||||
|
||||
int option;
|
||||
while ((option = getopt(argc, argv, ":t:")) != ERROR)
|
||||
{
|
||||
switch (option)
|
||||
@@ -232,14 +236,18 @@ int cmd_mount(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
|
||||
}
|
||||
}
|
||||
|
||||
/* If a bad argument was encountered, then return without processing the command */
|
||||
/* If a bad argument was encountered, then return without processing the
|
||||
* command.
|
||||
*/
|
||||
|
||||
if (badarg)
|
||||
{
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
/* There are two required arguments after the options */
|
||||
/* There are two required arguments after the options: the source and target
|
||||
* paths.
|
||||
*/
|
||||
|
||||
if (optind + 2 < argc)
|
||||
{
|
||||
@@ -252,6 +260,16 @@ int cmd_mount(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
/* While the above parsing for the -t argument looks nice, the -t argument
|
||||
* not really optional.
|
||||
*/
|
||||
|
||||
if (!filesystem)
|
||||
{
|
||||
nsh_output(vtbl, g_fmtargrequired, argv[0]);
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
/* The source and target paths might be relative to the current
|
||||
* working directory.
|
||||
*/
|
||||
|
||||
@@ -164,6 +164,7 @@ int nsh_netinit(void)
|
||||
dhcpc_close(handle);
|
||||
}
|
||||
#endif
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
||||
@@ -34,18 +34,18 @@
|
||||
#
|
||||
############################################################################
|
||||
|
||||
ifeq ($(CONFIG_VSN_POWEROFF),y)
|
||||
CONFIGURED_APPS += vsn/poweroff
|
||||
ifeq ($(CONFIG_SYSTEM_FREE),y)
|
||||
CONFIGURED_APPS += system/free
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_VSN_RAMTRON),y)
|
||||
CONFIGURED_APPS += vsn/ramtron
|
||||
ifeq ($(CONFIG_SYSTEM_I2CTOOL),y)
|
||||
CONFIGURED_APPS += system/i2c
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_VSN_SDCARD),y)
|
||||
CONFIGURED_APPS += vsn/sdcard
|
||||
ifeq ($(CONFIG_SYSTEM_INSTALL),y)
|
||||
CONFIGURED_APPS += system/install
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_VSN_SYSINFO),y)
|
||||
CONFIGURED_APPS += vsn/sysinfo
|
||||
ifeq ($(CONFIG_SYSTEM_READLINE),y)
|
||||
CONFIGURED_APPS += system/readline
|
||||
endif
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#
|
||||
# Copyright (C) 2011 Uros Platise. All rights reserved.
|
||||
# Author: Uros Platise <uros.platise@isotel.eu>
|
||||
# Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
# Gregory Nutt <gnutt@nuttx.org>
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
|
||||
@@ -2,5 +2,5 @@
|
||||
This application provides UNIX style memory free information.
|
||||
|
||||
Source: NuttX
|
||||
Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
Date: 17. March 2011
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* apps/system/free/free.c
|
||||
*
|
||||
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
||||
Executable → Regular
+1
-1
@@ -211,7 +211,7 @@ COMMAND SUMMARY
|
||||
===============
|
||||
|
||||
We have already seen the I2C help (or ?) commands above. This section will
|
||||
discusse the remaining commands.
|
||||
discuss the remaining commands.
|
||||
|
||||
List buses: bus [OPTIONS]
|
||||
--------------------------
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* apps/system/i2c/i2c_bus.c
|
||||
*
|
||||
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* apps/system/i2c/i2c_common.c
|
||||
*
|
||||
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* apps/system/i2c/i2c_dev.c
|
||||
*
|
||||
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* apps/system/i2c/i2c_get.c
|
||||
*
|
||||
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* apps/system/i2c/i2c_main.c
|
||||
*
|
||||
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* apps/system/i2c/i2c_set.c
|
||||
*
|
||||
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* apps/system/i2c/i2c_verf.c
|
||||
*
|
||||
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* apps/system/i2c/i2ctool.h
|
||||
*
|
||||
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
||||
Executable → Regular
+1
-1
@@ -3,7 +3,7 @@
|
||||
#
|
||||
# Copyright (C) 2011 Uros Platise. All rights reserved.
|
||||
# Author: Uros Platise <uros.platise@isotel.eu>
|
||||
# Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
# Gregory Nutt <gnutt@nuttx.org>
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
|
||||
Executable → Regular
Executable → Regular
@@ -19,21 +19,4 @@ config READLINE_ECHO
|
||||
already has local echo support or you need to suppress the back-channel
|
||||
responses for any other reason.
|
||||
|
||||
choice
|
||||
prompt "Newline Options"
|
||||
default EOL_IS_EITHER_CRLF
|
||||
|
||||
config EOL_IS_CR
|
||||
bool "EOL is CR"
|
||||
|
||||
config EOL_IS_LF
|
||||
bool "EOL is LF"
|
||||
|
||||
config EOL_IS_BOTH_CRLF
|
||||
bool "EOL is CR and LF"
|
||||
|
||||
config EOL_IS_EITHER_CRLF
|
||||
bool "EOL is CR or LF"
|
||||
|
||||
endchoice
|
||||
endif
|
||||
|
||||
@@ -63,13 +63,32 @@
|
||||
#define CONFIG_READLINE_ECHO 1
|
||||
|
||||
/* Some environments may return CR as end-of-line, others LF, and others
|
||||
* both. The logic here assumes either but not both.
|
||||
* both. If not specified, the logic here assumes either (but not both) as
|
||||
* the default.
|
||||
*/
|
||||
|
||||
#undef CONFIG_EOL_IS_CR
|
||||
#undef CONFIG_EOL_IS_LF
|
||||
#undef CONFIG_EOL_IS_BOTH_CRLF
|
||||
#define CONFIG_EOL_IS_EITHER_CRLF 1
|
||||
#if defined(CONFIG_EOL_IS_CR)
|
||||
# undef CONFIG_EOL_IS_LF
|
||||
# undef CONFIG_EOL_IS_BOTH_CRLF
|
||||
# undef CONFIG_EOL_IS_EITHER_CRLF
|
||||
#elif defined(CONFIG_EOL_IS_LF)
|
||||
# undef CONFIG_EOL_IS_CR
|
||||
# undef CONFIG_EOL_IS_BOTH_CRLF
|
||||
# undef CONFIG_EOL_IS_EITHER_CRLF
|
||||
#elif defined(CONFIG_EOL_IS_BOTH_CRLF)
|
||||
# undef CONFIG_EOL_IS_CR
|
||||
# undef CONFIG_EOL_IS_LF
|
||||
# undef CONFIG_EOL_IS_EITHER_CRLF
|
||||
#elif defined(CONFIG_EOL_IS_EITHER_CRLF)
|
||||
# undef CONFIG_EOL_IS_CR
|
||||
# undef CONFIG_EOL_IS_LF
|
||||
# undef CONFIG_EOL_IS_BOTH_CRLF
|
||||
#else
|
||||
# undef CONFIG_EOL_IS_CR
|
||||
# undef CONFIG_EOL_IS_LF
|
||||
# undef CONFIG_EOL_IS_BOTH_CRLF
|
||||
# define CONFIG_EOL_IS_EITHER_CRLF 1
|
||||
#endif
|
||||
|
||||
/****************************************************************************
|
||||
* Private Type Declarations
|
||||
|
||||
+6
-1
@@ -71,7 +71,12 @@ FAT Long File Names
|
||||
FAT implementations that include support for long filenames, and that
|
||||
removable solid state media and consumer devices only using short names
|
||||
would be unaffected. ..."
|
||||
|
||||
|
||||
This Wikipedia entry has been updated with recent legal decisions in favor
|
||||
of Microsoft. Refer to:
|
||||
|
||||
http://en.wikipedia.org/wiki/File_Allocation_Table#Legal_issues
|
||||
|
||||
So you have been forewarned: Use the long filename at your own risk!
|
||||
|
||||
uIP
|
||||
|
||||
@@ -3250,3 +3250,102 @@
|
||||
* sched/work_cancel.c: Fix a bad assertion (reported by Mike Smith)
|
||||
* configs/stm3210e-eval/src/up_idle.c: Correct some power management
|
||||
compilation errors (reported by Diego Sanchez).
|
||||
* include/nuttx/wqueue.h, sched/work*, and others: Added logic to support
|
||||
a second, lower priority work queue (CONFIG_SCHED_LPWORK).
|
||||
* arch/arm/src/stm32/stm32_dma.c, chip/stm32*_memorymap.h: FSMC SRAM is
|
||||
only 16-bits wide and the SDIO DMA must be set up differently.
|
||||
* arch/arm/src/stm32/stm32_dma.c: Back out the 16-bit DMA change. It
|
||||
is incorrect.
|
||||
* configs/: Make use of UART4/5 vs USART4/5 consistent in all places.
|
||||
* Kconfig: Serial 2STOP setting must be integer 0/1, not a boolean.
|
||||
* lib/misc/sendfile.c and include/sys/sendfile.h: Add a Linux style
|
||||
sendfile() (non-standard!)
|
||||
* Kconfig: Refactor serial settings (moved from chip to drivers/serial).
|
||||
AVR "teensy" now builds with Kconfig (contributed by Richard Cochran).
|
||||
* Kconfig: Add configuration settings for the LPC17xx
|
||||
* Kconfig: Add configuration settings for the LM3S (from Richard Cochran).
|
||||
* Kconfig: Verify configuration settings for the STM32. This includes
|
||||
changes in the way that the external SRAM is configured: Define
|
||||
CONFIG_HEAP2_SIZE (decimal) instead of CONFIG_HEAP2_END (hex).
|
||||
* tools/configure.sh: Don't append the apps directory path setting
|
||||
if the correct setting is already in defined in the defconfig file.
|
||||
* fs/fat/fs_utils.c: Improper constructed bool expression. This
|
||||
would cause many unnecessary writes to FLASH (Thanks Ronen Vainish).
|
||||
* Kconfig: Verify configuration settings for the LPC43xx. This includes
|
||||
some corrections to configuration variable names and defconfig settings.
|
||||
* Kconfig: Add and verify configuration settings for the LPC31xx.
|
||||
* arch/arm/src/stm32/stm32_uart.h and stm32_serial.c: Add logic to
|
||||
re-initialize the console UART as needed to enable DMA on the
|
||||
console UART (contributed by Mike Smith).
|
||||
* net/recvfrom.c, net/Kconfig, include/nuttx/net/uipopt.h: Remove delay
|
||||
after receiving data. That has historical reasons to be there (it
|
||||
was needed before read-ahead buffering was added), but kills performance.
|
||||
(Noted by Max Holtzberg).
|
||||
* configs/shenzhou: Add beginnings of a board configuration for the
|
||||
Shenzhou STM32107 board (see www.armjishu.com). Very little is in
|
||||
place as of this initial check-in.
|
||||
* QEMU: Fixes from Richard Cochran to build QEMU with Kconfig files.
|
||||
* arch/*/src/Makefile: Remove some old logic that was kicked off
|
||||
when CONFIG_BOOT_RUNFROMFLASH=y. The old logic used to use
|
||||
objcopy to move sections. Newer logic changes the load position
|
||||
of sections in the the linker script. As far as I can tell, there
|
||||
is nothing in the source tree now that depends on the old way of
|
||||
doing things (if I am wrong, they will need a change to the linker
|
||||
script).
|
||||
* configs/fire-stm32v2: Configuration for the M3 Wildfire board. I
|
||||
don't know very much about this board other than is has an
|
||||
STM32F103VET6 chip, LCD, touchscreen, and ENC28J60 network. Very
|
||||
little is in place on the initial check-in.
|
||||
* configs/shenzhou: Coding for the Shenzhou board port is complete,
|
||||
but tested has been deferred until I get the right tools.
|
||||
* arch/arc/include/stm32/chip.h and arch/arm/src/stm32/chip.h:
|
||||
Add support for the STM32F103VET6.
|
||||
* fs/fs_fdopen.c: Bad check for failure to allocate memory. (Noted
|
||||
by Ronen Vainish).
|
||||
* drivers/mmcsd/mmcsd_sdio.c: If the MMC/SD driver were ever
|
||||
uninitialized then there would be a double release of memory
|
||||
(Noted by Ronen Vainish).
|
||||
* fs/mmap/fs_rammap.c: Fix logic error and errno check (contributed
|
||||
by Kate).
|
||||
* arch/avr/src: Fixes from AVR32 build errors that have crept in
|
||||
over the time; incorporated Kconfig for AVR3 (Richard Cochran).
|
||||
* fs/fat and include/nuttx/fs/fat.h: The FAT file system allocates
|
||||
memory for sector I/O buffers used to exchange data with the
|
||||
configured block driver. In some contexts, the block driver may
|
||||
require DMA-capable memory. If CONFIG_FAT_DMAMEMORY is defined,
|
||||
then the FAT FS will use platform-provided DMA memory allocators
|
||||
to allocate the block driver I/O buffers.
|
||||
* CONFIG_NET_ENC28J60 renamed CONFIG_ENC28J60 to be consistent
|
||||
in all places.
|
||||
* drivers/enc28j60.c, include/nuttx/net/enc28j60.h, and
|
||||
olimex-strp711/src/up_enc28j60.c: No longer passes IRQ number
|
||||
as a parameters. Instead now passes a call table to manage
|
||||
ENC28J60 GPIO interrupts. That is because GPIO interrupts are
|
||||
handled in different ways by different MCUs and some do not
|
||||
support IRQ numbers for GPIO interrupts.
|
||||
* mm/mm_gran* and include/nuttx/gran.h: Add a simple granule-
|
||||
based allocator. The intent of this allocator is to support
|
||||
simple allocation of DMA I/O buffers. The initiali check-in
|
||||
is code complete but untested (not event built into the
|
||||
mm/Makefile yet.
|
||||
* confgs/fire-stm32v2: The board port is basically functional.
|
||||
Not all features have been verified. The ENC28J60 network
|
||||
is not yet functional.
|
||||
* configs/stm3240g-eval/discover: A configuration for testing
|
||||
the UDP discovery utility. Contributed by Max Holtzberg.
|
||||
* mm/README.txt: Add a new README file.
|
||||
* include/nuttx/usb/usb.h, arch/*/src/*usb.c, and arch/*/src/*otg*.c:
|
||||
Add hooks to to use common, external DMA buffer allocation
|
||||
implementation.
|
||||
* net/recvfrom.c: Don't block in recvfrom if (1) read-ahead buffering
|
||||
is enabled and (2) some data was obtained from read-ahead buffers.
|
||||
Blocking is a bad idea in that case because there is no timeout!
|
||||
(submitted by Max Holtzberg).
|
||||
* configs/stm3240g-eval/xmlrpc: An example configuration for the
|
||||
Embeddable Lightweight XML-RPC Server at apps/examples/xmlrpc.
|
||||
See http://www.drdobbs.com/web-development/\
|
||||
an-embeddable-lightweight-xml-rpc-server/184405364 for more info.
|
||||
Contributed by Max Holtzberg.
|
||||
* configs/*/nxwm/defconfig and sched/task_exithook.c: Fixes for
|
||||
bugs that crept in during recent changes. (Submitted by Max
|
||||
Holtzberg).
|
||||
|
||||
+76
-11
@@ -16,7 +16,7 @@ config NUTTX_NEWCONFIG
|
||||
bool
|
||||
default y
|
||||
|
||||
menu "General Setup"
|
||||
menu "Build Setup"
|
||||
config EXPERIMENTAL
|
||||
bool "Prompt for development and/or incomplete code/drivers"
|
||||
|
||||
@@ -152,26 +152,91 @@ config RAW_BINARY
|
||||
should not be selected if you are not using the GNU toolchain.
|
||||
endmenu
|
||||
|
||||
menu "Customize Header Files"
|
||||
|
||||
config ARCH_STDBOOL_H
|
||||
bool "stdbool.h"
|
||||
default n
|
||||
---help---
|
||||
The stdbool.h header file can be found at nuttx/include/stdbool.h.
|
||||
However, that header includes logic to redirect the inclusion of an
|
||||
architecture specific header file like:
|
||||
|
||||
#ifdef CONFIG_ARCH_STDBOOL_H
|
||||
# include <arch/stdbool.h>
|
||||
#else
|
||||
...
|
||||
#endif
|
||||
|
||||
Recall that that include path, include/arch, is a symbolic link and
|
||||
will refer to a version of stdbool.h at nuttx/arch/<architecture>/include/stdbool.h.
|
||||
|
||||
config ARCH_MATH_H
|
||||
bool "math.h"
|
||||
default n
|
||||
---help---
|
||||
There is also a re-directing version of math.h in the source tree.
|
||||
However, it resides out-of-the-way at include/nuttx/math.h because it
|
||||
conflicts too often with the system math.h. If ARCH_MATH_H=y is
|
||||
defined, however, the top-level makefile will copy the redirecting
|
||||
math.h header file from include/nuttx/math.h to include/math.h. math.h
|
||||
will then include the architecture-specific version of math.h that you
|
||||
must provide at nuttx/arch/>architecture</include/math.h.
|
||||
|
||||
#ifdef CONFIG_ARCH_MATH_H
|
||||
# include <arch/math.h>
|
||||
#endif
|
||||
|
||||
So for the architectures that define ARCH_MATH_H=y, include/math.h
|
||||
will be the redirecting math.h header file; for the architectures
|
||||
that don't select ARCH_MATH_H, the redirecting math.h header file
|
||||
will stay out-of-the-way in include/nuttx/.
|
||||
|
||||
config ARCH_STDARG_H
|
||||
bool "stdarg.h"
|
||||
default n
|
||||
---help---
|
||||
There is also a redirecting version of stdarg.h in the source tree
|
||||
as well. It also resides out-of-the-way at include/nuttx/stdarg.h.
|
||||
This is because you should normally use your toolchain's stdarg.h
|
||||
file. But sometimes, your toolchain's stdarg.h file may have other
|
||||
header file dependencies and so may not be usable in the NuttX build
|
||||
environment. In those cases, you may have to create a architecture-
|
||||
specific stdarg.h header file at nuttx/arch/<architecture>/include/stdarg.h
|
||||
|
||||
If ARCH_STDARG_H=y is defined, the top-level makefile will copy the
|
||||
re-directing stdarg.h header file from include/nuttx/stdarg.h to
|
||||
include/stdarg.h. So for the architectures that cannot use their
|
||||
toolchain's stdarg.h file, they can use this alternative by defining
|
||||
ARCH_STDARG_H=y and providing. If ARCH_STDARG_H, is not defined, then
|
||||
the stdarg.h header file will stay out-of-the-way in include/nuttx/.
|
||||
|
||||
endmenu
|
||||
|
||||
menu "Debug Options"
|
||||
|
||||
config DEBUG
|
||||
bool "Enable debug output"
|
||||
bool "Enable debug features"
|
||||
default n
|
||||
---help---
|
||||
enables built-in debug options
|
||||
Enables built-in debug features. Selecting this option will (1) Enable
|
||||
debug assertions in the code, (2) enable extended parameter testing in
|
||||
many functions, and (3) enable support for debug output. Note that enabling
|
||||
this option by itself does not produce debug output. Debug output must
|
||||
also be selected on a subsystem-by-subsystem basis.
|
||||
|
||||
if DEBUG
|
||||
config DEBUG_VERBOSE
|
||||
bool "Enable debug verbose output"
|
||||
default n
|
||||
---help---
|
||||
enables verbose debug output
|
||||
Enables verbose debug output (assuming debug output is enabled)
|
||||
|
||||
config DEBUG_ENABLE
|
||||
bool "Enable debug controls"
|
||||
default n
|
||||
---help---
|
||||
Support an interface to enable or disable debug output.
|
||||
Support an interface to dynamically enable or disable debug output.
|
||||
|
||||
config DEBUG_SCHED
|
||||
bool "Enable scheduler debug output"
|
||||
@@ -258,7 +323,7 @@ menu "Board Selection"
|
||||
source "configs/Kconfig"
|
||||
endmenu
|
||||
|
||||
menu "Kernel Features"
|
||||
menu "RTOS Features"
|
||||
source sched/Kconfig
|
||||
endmenu
|
||||
|
||||
@@ -266,24 +331,24 @@ menu "Device Drivers"
|
||||
source drivers/Kconfig
|
||||
endmenu
|
||||
|
||||
menu "Networking support"
|
||||
menu "Networking Support"
|
||||
source net/Kconfig
|
||||
endmenu
|
||||
|
||||
menu "File systems"
|
||||
menu "File Systems"
|
||||
source fs/Kconfig
|
||||
endmenu
|
||||
|
||||
menu "Memory management"
|
||||
menu "Memory Management"
|
||||
source mm/Kconfig
|
||||
endmenu
|
||||
|
||||
menu "Library routines"
|
||||
menu "Library Routines"
|
||||
source lib/Kconfig
|
||||
source libxx/Kconfig
|
||||
endmenu
|
||||
|
||||
menu "Application configuration"
|
||||
menu "Application Configuration"
|
||||
source "$APPSDIR/Kconfig"
|
||||
endmenu
|
||||
|
||||
|
||||
+15
-8
@@ -603,7 +603,7 @@ distclean: clean subdir_distclean clean_context
|
||||
ifeq ($(CONFIG_BUILD_2PASS),y)
|
||||
@$(MAKE) -C $(CONFIG_PASS1_BUILDIR) TOPDIR="$(TOPDIR)" distclean
|
||||
endif
|
||||
@rm -f Make.defs setenv.sh .config
|
||||
@rm -f Make.defs setenv.sh .config .config.old
|
||||
|
||||
# Application housekeeping targets. The APPDIR variable refers to the user
|
||||
# application directory. A sample apps/ directory is included with NuttX,
|
||||
@@ -616,9 +616,10 @@ endif
|
||||
# apps_clean: Perform the clean operation only in the user application
|
||||
# directory
|
||||
# apps_distclean: Perform the distclean operation only in the user application
|
||||
# directory. Note that the apps/.config file is preserved
|
||||
# so that this is not a "full" distclean but more of a
|
||||
# configuration "reset."
|
||||
# directory. Note that the apps/.config file (inf any) is
|
||||
# preserved so that this is not a "full" distclean but more of a
|
||||
# configuration "reset." (There willnot be an apps/.config
|
||||
# file if the configuration was generated via make menuconfig).
|
||||
|
||||
apps_clean:
|
||||
ifneq ($(APPDIR),)
|
||||
@@ -627,10 +628,16 @@ endif
|
||||
|
||||
apps_distclean:
|
||||
ifneq ($(APPDIR),)
|
||||
@cp "$(TOPDIR)/$(APPDIR)/.config" _SAVED_APPS_config || \
|
||||
{ echo "Copy of $(APPDIR)/.config failed" ; exit 1 ; }
|
||||
@if [ -r "$(TOPDIR)/$(APPDIR)/.config" ]; then \
|
||||
cp "$(TOPDIR)/$(APPDIR)/.config" _SAVED_APPS_config || \
|
||||
{ echo "Copy of $(APPDIR)/.config failed" ; exit 1 ; } \
|
||||
else \
|
||||
rm -f _SAVED_APPS_config; \
|
||||
fi
|
||||
@$(MAKE) -C "$(TOPDIR)/$(APPDIR)" TOPDIR="$(TOPDIR)" distclean
|
||||
@mv _SAVED_APPS_config "$(TOPDIR)/$(APPDIR)/.config" || \
|
||||
{ echo "Copy of _SAVED_APPS_config failed" ; exit 1 ; }
|
||||
@if [ -r _SAVED_APPS_config ]; then \
|
||||
@mv _SAVED_APPS_config "$(TOPDIR)/$(APPDIR)/.config" || \
|
||||
{ echo "Copy of _SAVED_APPS_config failed" ; exit 1 ; } \
|
||||
fi
|
||||
endif
|
||||
|
||||
|
||||
@@ -654,6 +654,8 @@ nuttx
|
||||
| | |- ostest/README.txt
|
||||
| | |- poll/README.txt
|
||||
| | `- README.txt
|
||||
| |- fire-stm32v2/
|
||||
| | `- README.txt
|
||||
| |- hymini-stm32v/
|
||||
| | |- include/README.txt
|
||||
| | |- src/README.txt
|
||||
@@ -735,6 +737,8 @@ nuttx
|
||||
| | |- include/README.txt
|
||||
| | |- src/README.txt
|
||||
| | `- README.txt
|
||||
| |- shenzhou/
|
||||
| | `- README.txt
|
||||
| |- skp16c26/
|
||||
| | |- include/README.txt
|
||||
| | |- src/README.txt
|
||||
@@ -802,6 +806,8 @@ nuttx
|
||||
| `- README.txt
|
||||
|- libxx/
|
||||
| `- README.txt
|
||||
|- mm/
|
||||
| `- README.txt
|
||||
|- syscall/
|
||||
| `- README.txt
|
||||
`- tools/
|
||||
@@ -820,6 +826,8 @@ apps
|
||||
|- modbus/
|
||||
| `- README.txt
|
||||
|- netutils/
|
||||
| |- discover
|
||||
| | `- README.txt
|
||||
| |- ftpc
|
||||
| | `- README.txt
|
||||
| |- telnetd
|
||||
|
||||
+73
-3
@@ -14,23 +14,27 @@ config ARCH_8051
|
||||
|
||||
config ARCH_ARM
|
||||
bool "ARM"
|
||||
select ARCH_HAVE_INTERRUPTSTACK
|
||||
---help---
|
||||
The ARM architectures
|
||||
|
||||
config ARCH_AVR
|
||||
bool "AVR"
|
||||
select ARCH_NOINTC
|
||||
select ARCH_HAVE_INTERRUPTSTACK
|
||||
---help---
|
||||
Atmel 8-bit bit AVR and 32-bit AVR32 architectures
|
||||
|
||||
config ARCH_HC
|
||||
bool "Freescale HC"
|
||||
select ARCH_NOINTC
|
||||
select ARCH_HAVE_INTERRUPTSTACK
|
||||
---help---
|
||||
Freescale HC architectures (M9S12)
|
||||
|
||||
config ARCH_MIPS
|
||||
bool "MIPS"
|
||||
select ARCH_HAVE_INTERRUPTSTACK
|
||||
---help---
|
||||
MIPS architectures (PIC32)
|
||||
|
||||
@@ -43,6 +47,7 @@ config ARCH_RGMP
|
||||
config ARCH_SH
|
||||
bool "Renesas"
|
||||
select ARCH_NOINTC
|
||||
select ARCH_HAVE_INTERRUPTSTACK
|
||||
---help---
|
||||
Renesas architectures (SH and M16C).
|
||||
|
||||
@@ -58,11 +63,13 @@ config ARCH_X86
|
||||
|
||||
config ARCH_Z16
|
||||
bool "ZNEO"
|
||||
select ARCH_HAVE_HEAP2
|
||||
---help---
|
||||
ZiLOG ZNEO 16-bit architectures (z16f).
|
||||
|
||||
config ARCH_Z80
|
||||
bool "z80"
|
||||
select ARCH_HAVE_HEAP2
|
||||
---help---
|
||||
ZiLOG 8-bit architectures (z80, ez80, z8).
|
||||
|
||||
@@ -100,6 +107,10 @@ config ARCH_NOINTC
|
||||
bool
|
||||
default n
|
||||
|
||||
config ARCH_DMA
|
||||
bool
|
||||
default n
|
||||
|
||||
config ARCH_STACKDUMP
|
||||
bool "Dump stack on assertions"
|
||||
default n
|
||||
@@ -117,11 +128,70 @@ config BOARD_LOOPSPERMSEC
|
||||
is 100 seconds.
|
||||
|
||||
config DRAM_START
|
||||
hex "DRAM start address"
|
||||
hex "DRAM start physical address"
|
||||
help
|
||||
The physical start address of installed RAM.
|
||||
The physical start address of installed RAM. Despite the naming,
|
||||
this may be SDRAM or SRAM or any other RAM technology that support
|
||||
program execution.
|
||||
|
||||
config DRAM_VSTART
|
||||
hex "DRAM start virtual address"
|
||||
depends on ARCH_HAVE_MMU
|
||||
help
|
||||
The virtual start address of installed RAM. Despite the naming,
|
||||
this may be SDRAM or SRAM or any other RAM technology that support
|
||||
program execution.
|
||||
|
||||
config DRAM_SIZE
|
||||
int "DRAM size"
|
||||
help
|
||||
The size in bytes of the installed RAM.
|
||||
The size in bytes of the installed RAM. Despite the naming,
|
||||
this may be SDRAM or SRAM or any other RAM technology that support
|
||||
program execution.
|
||||
|
||||
config ARCH_HAVE_INTERRUPTSTACK
|
||||
bool
|
||||
|
||||
config ARCH_INTERRUPTSTACK
|
||||
bool "Use interrupt stack"
|
||||
depends on ARCH_HAVE_INTERRUPTSTACK
|
||||
default y
|
||||
---help---
|
||||
This architecture supports an interrupt stack. If defined, this symbol
|
||||
is the size of the interrupt stack in bytes. If not defined, the user
|
||||
task stacks will be used during interrupt handling.
|
||||
|
||||
comment "Boot options"
|
||||
|
||||
choice
|
||||
prompt "Boot Mode"
|
||||
default BOOT_RUNFROMFLASH
|
||||
|
||||
config BOOT_RUNFROMEXTSRAM
|
||||
bool "Run from external SRAM"
|
||||
---help---
|
||||
Some configuration support booting and running from external SRAM.
|
||||
|
||||
config BOOT_RUNFROMFLASH
|
||||
bool "Boot and run from flash"
|
||||
---help---
|
||||
Most configurations support XIP operation from FLASH but must copy
|
||||
initialized .data sections to RAM. (This is the default).
|
||||
|
||||
config BOOT_RUNFROMISRAM
|
||||
bool "Boot and run from internal SRAM"
|
||||
---help---
|
||||
Some configuration support booting and running from internal SRAM.
|
||||
|
||||
config BOOT_RUNFROMSDRAM
|
||||
bool "Boot and run from external SDRAM"
|
||||
---help---
|
||||
Some configuration support booting and running from external SDRAM.
|
||||
|
||||
config BOOT_COPYTORAM
|
||||
bool "Boot from FLASH but copy to ram"
|
||||
---help---
|
||||
Some configurations boot in FLASH but copy themselves entirely into
|
||||
RAM for better performance.
|
||||
|
||||
endchoice
|
||||
|
||||
+104
-20
@@ -10,71 +10,106 @@ choice
|
||||
|
||||
config ARCH_CHIP_C5471
|
||||
bool "TMS320 C5471"
|
||||
select ARCH_ARM7TDMI
|
||||
select ARCH_HAVE_LOWVECTORS
|
||||
---help---
|
||||
TI TMS320 C5471, A180, or DA180 (ARM7TDMI)
|
||||
|
||||
config ARCH_CHIP_CALYPSO
|
||||
bool "Calypso"
|
||||
select ARCH_ARM7TDMI
|
||||
select ARCH_HAVE_HEAP2
|
||||
select ARCH_HAVE_LOWVECTORS
|
||||
---help---
|
||||
TI Calypso-based cell phones (ARM7TDMI)
|
||||
|
||||
config ARCH_CHIP_DM320
|
||||
bool "TMS320 DM320"
|
||||
select ARCH_ARM926EJS
|
||||
select ARCH_HAVE_LOWVECTORS
|
||||
select ARCH_HAVE_MMU
|
||||
---help---
|
||||
TI DMS320 DM320 (ARM926EJS)
|
||||
|
||||
config ARCH_CHIP_IMX
|
||||
bool "Freescale iMX"
|
||||
select ARCH_ARM920T
|
||||
select ARCH_HAVE_HEAP2
|
||||
select ARCH_HAVE_LOWVECTORS
|
||||
select ARCH_HAVE_MMU
|
||||
---help---
|
||||
Freescale iMX architectures (ARM920T)
|
||||
|
||||
config ARCH_CHIP_KINETIS
|
||||
bool "Freescale Kinetis"
|
||||
select ARCH_CORTEXM4
|
||||
select ARCH_HAVE_MPU
|
||||
---help---
|
||||
Freescale Kinetis Architectures (ARM Cortex-M4)
|
||||
|
||||
config ARCH_CHIP_LM3S
|
||||
bool "TI Stellaris"
|
||||
select ARCH_CORTEXM3
|
||||
select ARCH_HAVE_MPU
|
||||
---help---
|
||||
TI Stellaris LMS3 architecutres (ARM Cortex-M3)
|
||||
|
||||
config ARCH_CHIP_LPC17XX
|
||||
bool "NXP LPC17xx"
|
||||
select ARCH_CORTEXM3
|
||||
select ARCH_HAVE_MPU
|
||||
---help---
|
||||
NXP LPC17xx architectures (ARM Cortex-M3)
|
||||
|
||||
config ARCH_CHIP_LPC214X
|
||||
bool "NXP LPC214x"
|
||||
select ARCH_ARM7TDMI
|
||||
select ARCH_HAVE_LOWVECTORS
|
||||
---help---
|
||||
NXP LPC2145x architectures (ARM7TDMI)
|
||||
|
||||
config ARCH_CHIP_LPC2378
|
||||
bool "NXP LPC2378"
|
||||
select ARCH_ARM7TDMI
|
||||
select ARCH_HAVE_LOWVECTORS
|
||||
---help---
|
||||
NXP LPC2145x architectures (ARM7TDMI)
|
||||
|
||||
config ARCH_CHIP_LPC31XX
|
||||
bool "NXP LPC31XX"
|
||||
select ARCH_ARM926EJS
|
||||
select ARCH_HAVE_LOWVECTORS
|
||||
select ARCH_HAVE_MMU
|
||||
---help---
|
||||
NPX LPC31XX architectures (ARM926EJS).
|
||||
|
||||
config ARCH_CHIP_LPC43XX
|
||||
bool "NXP LPC43XX"
|
||||
select ARCH_CORTEXM4
|
||||
select ARCH_HAVE_CMNVECTOR
|
||||
select ARMV7M_CMNVECTOR
|
||||
select ARCH_HAVE_MPU
|
||||
---help---
|
||||
NPX LPC43XX architectures (ARM Cortex-M4).
|
||||
|
||||
config ARCH_CHIP_SAM3U
|
||||
bool "Atmel AT91SAM3U"
|
||||
select ARCH_CORTEXM3
|
||||
select ARCH_HAVE_MPU
|
||||
---help---
|
||||
Atmel AT91SAM3U architectures (ARM Cortex-M3)
|
||||
|
||||
config ARCH_CHIP_STM32
|
||||
bool "STMicro STM32"
|
||||
select ARCH_HAVE_CMNVECTOR
|
||||
select ARCH_HAVE_MPU
|
||||
---help---
|
||||
STMicro STM32 architectures (ARM Cortex-M3/4).
|
||||
|
||||
config ARCH_CHIP_STR71X
|
||||
bool "STMicro STR71x"
|
||||
select ARCH_ARM7TDMI
|
||||
select ARCH_HAVE_LOWVECTORS
|
||||
---help---
|
||||
STMicro STR71x architectures (ARM7TDMI).
|
||||
|
||||
@@ -82,24 +117,23 @@ endchoice
|
||||
|
||||
config ARCH_ARM7TDMI
|
||||
bool
|
||||
default y if ARCH_CHIP_C5471 || ARCH_CHIP_CALYPSO || ARCH_CHIP_LPC214X || ARCH_CHIP_LPC2378 || ARCH_CHIP_STR71X
|
||||
|
||||
config ARCH_ARM926EJS
|
||||
bool
|
||||
default y if ARCH_CHIP_DM320 || ARCH_CHIP_LPC31XX
|
||||
|
||||
config ARCH_ARM920T
|
||||
bool
|
||||
default y if ARCH_CHIP_IMX
|
||||
|
||||
config ARCH_CORTEXM
|
||||
config ARCH_CORTEXM3
|
||||
bool
|
||||
|
||||
config ARCH_CORTEXM4
|
||||
bool
|
||||
default y if ARCH_CHIP_KINETIS || ARCH_CHIP_LM3S || ARCH_CHIP_LPC17XX || ARCH_CHIP_LPC43XX || ARCH_CHIP_SAM3U || ARCH_CHIP_STM32
|
||||
|
||||
config ARCH_FAMILY
|
||||
string
|
||||
default "arm" if ARCH_ARM7TDMI || ARCH_ARM926EJS || ARCH_ARM920T
|
||||
default "armv7-m" if ARCH_CORTEXM
|
||||
default "armv7-m" if ARCH_CORTEXM3 || ARCH_CORTEXM4
|
||||
|
||||
config ARCH_CHIP
|
||||
string
|
||||
@@ -109,7 +143,7 @@ config ARCH_CHIP
|
||||
default "imx" if ARCH_CHIP_IMX
|
||||
default "kinetis" if ARCH_CHIP_KINETIS
|
||||
default "lm3s" if ARCH_CHIP_LM3S
|
||||
default "lpc17x" if ARCH_CHIP_LPC17XX
|
||||
default "lpc17xx" if ARCH_CHIP_LPC17XX
|
||||
default "lpc214x" if ARCH_CHIP_LPC214X
|
||||
default "lpc2378" if ARCH_CHIP_LPC2378
|
||||
default "lpc31xx" if ARCH_CHIP_LPC31XX
|
||||
@@ -118,27 +152,77 @@ config ARCH_CHIP
|
||||
default "stm32" if ARCH_CHIP_STM32
|
||||
default "str71x" if ARCH_CHIP_STR71X
|
||||
|
||||
config ARCH_LEDS
|
||||
bool "Use board LEDs to show state"
|
||||
default y
|
||||
config ARMV7M_CMNVECTOR
|
||||
bool "Use common ARMv7-M vectors"
|
||||
default n
|
||||
depends on ARCH_HAVE_CMNVECTOR
|
||||
---help---
|
||||
Use LEDs to show state. Unique to boards that have LEDs
|
||||
Some architectures use their own, built-in vector logic. Some use only
|
||||
the common vector logic. Some can use either their own built-in vector
|
||||
logic or the common vector logic. This applies only to ARMv7-M
|
||||
architectures.
|
||||
|
||||
config ARCH_INTERRUPTSTACK
|
||||
bool "Use interrupt stack"
|
||||
config ARCH_FPU
|
||||
bool "FPU support"
|
||||
default y
|
||||
depends on ARCH_CORTEXM4
|
||||
---help---
|
||||
This architecture supports an interrupt stack. If defined, this symbol
|
||||
is the size of the interrupt stack in bytes. If not defined, the user
|
||||
task stacks will be used during interrupt handling.
|
||||
Build in support for the ARM Cortex-M4 Floating Point Unit (FPU).
|
||||
Check your chip specifications first; not all Cortex-M4 chips support the FPU.
|
||||
|
||||
config ARCH_HAVE_MPU
|
||||
bool
|
||||
|
||||
config ARMV7M_MPU
|
||||
bool "MPU support"
|
||||
default n
|
||||
depends on ARCH_HAVE_MPU
|
||||
---help---
|
||||
Build in support for the ARM Cortex-M3/4 Memory Protection Unit (MPU).
|
||||
Check your chip specifications first; not all Cortex-M3/4 chips support the MPU.
|
||||
|
||||
config ARCH_HAVE_LOWVECTORS
|
||||
bool
|
||||
|
||||
config ARCH_LOWVECTORS
|
||||
bool "Vectors in low memory"
|
||||
default n
|
||||
depends on ARCH_HAVE_LOWVECTORS
|
||||
---help---
|
||||
Support ARM vectors in low memory.
|
||||
|
||||
config ARCH_HAVE_MMU
|
||||
bool
|
||||
|
||||
config PGTABLE_VADDR
|
||||
hex "Page table virtual address"
|
||||
depends on ARCH_HAVE_MMU
|
||||
---help---
|
||||
Page table virtual address (might be defined in the board.h file). Not
|
||||
applicable to all architectures.
|
||||
|
||||
config ARCH_ROMPGTABLE
|
||||
bool "ROM page table"
|
||||
default n
|
||||
depends on ARCH_HAVE_MMU
|
||||
---help---
|
||||
Support a fixed memory mapping use a (read-only) page table in ROM/FLASH.
|
||||
|
||||
config PAGING
|
||||
bool "On-demand paging"
|
||||
default n
|
||||
depends on ARCH_HAVE_MMU && !ARCH_ROMPGTABLE
|
||||
---help---
|
||||
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_CORTEXM
|
||||
default y if ARCH_CORTEXM3 || ARCH_CORTEXM4
|
||||
---help---
|
||||
Select if your board supports interrupt prioritization.
|
||||
|
||||
config ARCH_LOOPSPERMSEC
|
||||
config BOARD_LOOPSPERMSEC
|
||||
int "Delay loops per millisecond"
|
||||
default 5000
|
||||
---help---
|
||||
@@ -150,8 +234,8 @@ config ARCH_CALIBRATION
|
||||
---help---
|
||||
Enables some built in instrumentation that causes a 100 second delay
|
||||
during boot-up. This 100 second delay serves no purpose other than it
|
||||
allows you to calibratre ARCH_LOOPSPERMSEC. You simply use a stop
|
||||
watch to measure the 100 second delay then adjust ARCH_LOOPSPERMSEC until
|
||||
allows you to calibratre BOARD_LOOPSPERMSEC. You simply use a stop
|
||||
watch to measure the 100 second delay then adjust BOARD_LOOPSPERMSEC until
|
||||
the delay actually is 100 seconds.
|
||||
|
||||
if ARCH_CHIP_C5471
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* arch/arm/include/arch.h
|
||||
*
|
||||
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* arch/arm/include/arm/irq.h
|
||||
*
|
||||
* Copyright (C) 2009-2011 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* arch/arm/include/arm/syscall.h
|
||||
*
|
||||
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* arch/arm/include/armv7-m/syscall.h
|
||||
*
|
||||
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* arch/arm/include/irq.h
|
||||
*
|
||||
* Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* arch/arm/include/serial.h
|
||||
*
|
||||
* Copyright (C) 2007-2009, 2011 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
||||
@@ -56,6 +56,8 @@
|
||||
* the chip datasheet.
|
||||
*/
|
||||
|
||||
/* STM32 F100 Value Line ************************************************************/
|
||||
|
||||
#if defined(CONFIG_ARCH_CHIP_STM32F100C8) || defined(CONFIG_ARCH_CHIP_STM32F100CB) \
|
||||
|| defined(CONFIG_ARCH_CHIP_STM32F100R8) || defined(CONFIG_ARCH_CHIP_STM32F100RB) \
|
||||
|| defined(CONFIG_ARCH_CHIP_STM32F100V8) || defined(CONFIG_ARCH_CHIP_STM32F100VB)
|
||||
@@ -87,34 +89,10 @@
|
||||
# define STM32_NRNG 0 /* No random number generator (RNG) */
|
||||
# define STM32_NDCMI 0 /* No digital camera interface (DCMI) */
|
||||
|
||||
#elif defined(CONFIG_ARCH_CHIP_STM32F103ZET6)
|
||||
# define CONFIG_STM32_STM32F10XX 1 /* STM32F10xxx family */
|
||||
# undef CONFIG_STM32_LOWDENSITY /* STM32F101x, STM32F102x and STM32F103x w/ 16/32 Kbytes */
|
||||
# undef CONFIG_STM32_MEDIUMDENSITY /* STM32F101x, STM32F102x and STM32F103x w/ 64/128 Kbytes */
|
||||
# define CONFIG_STM32_HIGHDENSITY 1 /* STM32F101x and STM32F103x w/ 256/512 Kbytes */
|
||||
# undef CONFIG_STM32_VALUELINE /* STM32F100x */
|
||||
# undef CONFIG_STM32_CONNECTIVITYLINE /* STM32F105x and STM32F107x */
|
||||
# undef CONFIG_STM32_STM32F20XX /* STM32F205x and STM32F207x */
|
||||
# undef CONFIG_STM32_STM32F40XX /* STM32F405xx and STM32407xx families */
|
||||
# define STM32_NFSMC 1 /* FSMC */
|
||||
# define STM32_NATIM 1 /* One advanced timer TIM1 */
|
||||
# define STM32_NGTIM 4 /* 16-bit generall timers TIM2,3,4,5 with DMA */
|
||||
# define STM32_NBTIM 0 /* No basic timers */
|
||||
# define STM32_NDMA 2 /* DMA1-2 */
|
||||
# define STM32_NSPI 2 /* SPI1-2 */
|
||||
# define STM32_NI2S 0 /* No I2S (?) */
|
||||
# define STM32_NUSART 3 /* USART1-3 */
|
||||
# define STM32_NI2C 2 /* I2C1-2 */
|
||||
# define STM32_NCAN 1 /* CAN1 */
|
||||
# define STM32_NSDIO 1 /* SDIO */
|
||||
# define STM32_NUSBOTG 0 /* No USB OTG FS/HS */
|
||||
# define STM32_NGPIO 112 /* GPIOA-G */
|
||||
# define STM32_NADC 1 /* ADC1 */
|
||||
# define STM32_NDAC 0 /* No DAC */
|
||||
# define STM32_NCRC 0 /* No CRC */
|
||||
# define STM32_NETHERNET 0 /* No ethernet */
|
||||
# define STM32_NRNG 0 /* No random number generator (RNG) */
|
||||
# define STM32_NDCMI 0 /* No digital camera interface (DCMI) */
|
||||
/* STM32 F103 High Density Family ***************************************************/
|
||||
/* STM32F103RC, STM32F103RD, and STM32F103RE are all provided in 64 pin packages and differ
|
||||
* only in the available FLASH and SRAM.
|
||||
*/
|
||||
|
||||
#elif defined(CONFIG_ARCH_CHIP_STM32F103RET6)
|
||||
# define CONFIG_STM32_STM32F10XX 1 /* STM32F10xxx family */
|
||||
@@ -145,7 +123,11 @@
|
||||
# define STM32_NRNG 0 /* No random number generator (RNG) */
|
||||
# define STM32_NDCMI 0 /* No digital camera interface (DCMI) */
|
||||
|
||||
#elif defined(CONFIG_ARCH_CHIP_STM32F103VCT6)
|
||||
/* STM32F103VC, STM32F103VD, and STM32F103VE are all provided in 100 pin packages and differ
|
||||
* only in the available FLASH and SRAM.
|
||||
*/
|
||||
|
||||
#elif defined(CONFIG_ARCH_CHIP_STM32F103VCT6) || defined(CONFIG_ARCH_CHIP_STM32F103VET6)
|
||||
# define CONFIG_STM32_STM32F10XX 1 /* STM32F10xxx family */
|
||||
# undef CONFIG_STM32_LOWDENSITY /* STM32F101x, STM32F102x and STM32F103x w/ 16/32 Kbytes */
|
||||
# undef CONFIG_STM32_MEDIUMDENSITY /* STM32F101x, STM32F102x and STM32F103x w/ 64/128 Kbytes */
|
||||
@@ -174,6 +156,40 @@
|
||||
# define STM32_NRNG 0 /* No random number generator (RNG) */
|
||||
# define STM32_NDCMI 0 /* No digital camera interface (DCMI) */
|
||||
|
||||
/* STM32F103ZC, STM32F103ZD, and STM32F103ZE are all provided in 144 pin packages and differ
|
||||
* only in the available FLASH and SRAM.
|
||||
*/
|
||||
|
||||
#elif defined(CONFIG_ARCH_CHIP_STM32F103ZET6)
|
||||
# define CONFIG_STM32_STM32F10XX 1 /* STM32F10xxx family */
|
||||
# undef CONFIG_STM32_LOWDENSITY /* STM32F101x, STM32F102x and STM32F103x w/ 16/32 Kbytes */
|
||||
# undef CONFIG_STM32_MEDIUMDENSITY /* STM32F101x, STM32F102x and STM32F103x w/ 64/128 Kbytes */
|
||||
# define CONFIG_STM32_HIGHDENSITY 1 /* STM32F101x and STM32F103x w/ 256/512 Kbytes */
|
||||
# undef CONFIG_STM32_VALUELINE /* STM32F100x */
|
||||
# undef CONFIG_STM32_CONNECTIVITYLINE /* STM32F105x and STM32F107x */
|
||||
# undef CONFIG_STM32_STM32F20XX /* STM32F205x and STM32F207x */
|
||||
# undef CONFIG_STM32_STM32F40XX /* STM32F405xx and STM32407xx families */
|
||||
# define STM32_NFSMC 1 /* FSMC */
|
||||
# define STM32_NATIM 1 /* One advanced timer TIM1 */
|
||||
# define STM32_NGTIM 4 /* 16-bit generall timers TIM2,3,4,5 with DMA */
|
||||
# define STM32_NBTIM 0 /* No basic timers */
|
||||
# define STM32_NDMA 2 /* DMA1-2 */
|
||||
# define STM32_NSPI 2 /* SPI1-2 */
|
||||
# define STM32_NI2S 0 /* No I2S (?) */
|
||||
# define STM32_NUSART 3 /* USART1-3 */
|
||||
# define STM32_NI2C 2 /* I2C1-2 */
|
||||
# define STM32_NCAN 1 /* CAN1 */
|
||||
# define STM32_NSDIO 1 /* SDIO */
|
||||
# define STM32_NUSBOTG 0 /* No USB OTG FS/HS */
|
||||
# define STM32_NGPIO 112 /* GPIOA-G */
|
||||
# define STM32_NADC 1 /* ADC1 */
|
||||
# define STM32_NDAC 0 /* No DAC */
|
||||
# define STM32_NCRC 0 /* No CRC */
|
||||
# define STM32_NETHERNET 0 /* No ethernet */
|
||||
# define STM32_NRNG 0 /* No random number generator (RNG) */
|
||||
# define STM32_NDCMI 0 /* No digital camera interface (DCMI) */
|
||||
|
||||
/* STM32 F105/F107 Connectivity Line *******************************************************/
|
||||
#elif defined(CONFIG_ARCH_CHIP_STM32F105VBT7)
|
||||
# define CONFIG_STM32_STM32F10XX 1 /* STM32F10xxx family */
|
||||
# undef CONFIG_STM32_LOWDENSITY /* STM32F101x, STM32F102x and STM32F103x w/ 16/32 Kbytes */
|
||||
@@ -232,6 +248,7 @@
|
||||
# define STM32_NRNG 0 /* No random number generator (RNG) */
|
||||
# define STM32_NDCMI 0 /* No digital camera interface (DCMI) */
|
||||
|
||||
/* STM32 F2 Family ******************************************************************/
|
||||
#elif defined(CONFIG_ARCH_CHIP_STM32F207IG) /* UFBGA-176 1024Kb FLASH 128Kb SRAM */
|
||||
# undef CONFIG_STM32_STM32F10XX /* STM32F10xxx family */
|
||||
# undef CONFIG_STM32_LOWDENSITY /* STM32F101x, STM32F102x and STM32F103x w/ 16/32 Kbytes */
|
||||
@@ -263,6 +280,7 @@
|
||||
# define STM32_NRNG 1 /* Random number generator (RNG) */
|
||||
# define STM32_NDCMI 1 /* Digital camera interface (DCMI) */
|
||||
|
||||
/* STM23 F4 Family ******************************************************************/
|
||||
#elif defined(CONFIG_ARCH_CHIP_STM32F405RG) /* LQFP 64 10x10x1.4 1024Kb FLASH 192Kb SRAM */
|
||||
# undef CONFIG_STM32_STM32F10XX /* STM32F10xxx family */
|
||||
# undef CONFIG_STM32_LOWDENSITY /* STM32F101x, STM32F102x and STM32F103x w/ 16/32 Kbytes */
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* arch/arm/include/syscall.h
|
||||
*
|
||||
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* arch/arm/include/types.h
|
||||
*
|
||||
* Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
|
||||
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
|
||||
* Author: Gregory Nutt <gnutt@nuttx.org>
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user