summaryrefslogtreecommitdiff
path: root/nuttx/configs
diff options
context:
space:
mode:
authorLorenz Meier <lm@inf.ethz.ch>2013-06-13 09:14:40 +0200
committerLorenz Meier <lm@inf.ethz.ch>2013-06-13 09:14:40 +0200
commitc255df1df9c1cd51e6d0e71ee5f2e92a22eac5cf (patch)
tree2254ceb7c66ba63b6cb6738af92c839f3868c748 /nuttx/configs
parentbc5c15a4909386a1efd556f4648385440379b164 (diff)
downloadpx4-nuttx-c255df1df9c1cd51e6d0e71ee5f2e92a22eac5cf.tar.gz
px4-nuttx-c255df1df9c1cd51e6d0e71ee5f2e92a22eac5cf.tar.bz2
px4-nuttx-c255df1df9c1cd51e6d0e71ee5f2e92a22eac5cf.zip
Merged in upstream, took upstream UART driver without changes, needs re-evaluation (minor diffs to local version)
Diffstat (limited to 'nuttx/configs')
-rw-r--r--nuttx/configs/Kconfig13
-rw-r--r--nuttx/configs/cloudctrl/src/up_usbmsc.c4
-rw-r--r--nuttx/configs/compal_e99/nsh_highram/defconfig3
-rw-r--r--nuttx/configs/ekk-lm3s9b96/ostest/defconfig1
-rw-r--r--nuttx/configs/ez80f910200kitg/ostest/defconfig1
-rw-r--r--nuttx/configs/ez80f910200zco/ostest/defconfig1
-rw-r--r--nuttx/configs/fire-stm32v2/nsh/defconfig2
-rw-r--r--nuttx/configs/fire-stm32v2/src/up_usbmsc.c4
-rw-r--r--nuttx/configs/freedom-kl25z/ostest/defconfig1
-rw-r--r--nuttx/configs/hymini-stm32v/README.txt2
-rw-r--r--nuttx/configs/hymini-stm32v/nsh2/defconfig3
-rw-r--r--nuttx/configs/hymini-stm32v/ostest/defconfig1
-rw-r--r--nuttx/configs/hymini-stm32v/src/up_usbmsc.c6
-rwxr-xr-xnuttx/configs/hymini-stm32v/usbserial/defconfig1
-rwxr-xr-xnuttx/configs/hymini-stm32v/usbstorage/defconfig1
-rwxr-xr-xnuttx/configs/kwikstik-k40/ostest/defconfig1
-rw-r--r--nuttx/configs/kwikstik-k40/src/up_usbmsc.c4
-rwxr-xr-xnuttx/configs/lm3s6965-ek/ostest/defconfig1
-rwxr-xr-xnuttx/configs/lm4f120-launchpad/ostest/defconfig1
-rw-r--r--nuttx/configs/lpc4330-xplorer/nsh/defconfig1
-rw-r--r--nuttx/configs/lpc4330-xplorer/ostest/defconfig1
-rw-r--r--nuttx/configs/mikroe-stm32f4/fulldemo/defconfig2
-rw-r--r--nuttx/configs/mikroe-stm32f4/kostest/defconfig1
-rw-r--r--nuttx/configs/mikroe-stm32f4/nx/defconfig1
-rw-r--r--nuttx/configs/mikroe-stm32f4/nxtext/defconfig1
-rw-r--r--nuttx/configs/mikroe-stm32f4/src/mikroe-stm32f4-internal.h1
-rw-r--r--nuttx/configs/nutiny-nuc120/ostest/defconfig1
-rw-r--r--nuttx/configs/open1788/README.txt15
-rw-r--r--nuttx/configs/open1788/ostest/defconfig1
-rw-r--r--nuttx/configs/p112/ostest/defconfig1
-rw-r--r--nuttx/configs/pcblogic-pic32mx/ostest/defconfig1
-rw-r--r--nuttx/configs/pic32-starterkit/nsh/defconfig3
-rw-r--r--nuttx/configs/pic32-starterkit/nsh2/defconfig3
-rw-r--r--nuttx/configs/pic32-starterkit/ostest/defconfig3
-rw-r--r--nuttx/configs/pic32-starterkit/src/up_usbmsc.c6
-rw-r--r--nuttx/configs/pic32-starterkit/src/up_usbterm.c4
-rw-r--r--nuttx/configs/pic32mx7mmb/nsh/defconfig7
-rw-r--r--nuttx/configs/pic32mx7mmb/ostest/defconfig3
-rw-r--r--nuttx/configs/pic32mx7mmb/src/up_usbmsc.c6
-rw-r--r--nuttx/configs/pic32mx7mmb/src/up_usbterm.c4
-rw-r--r--nuttx/configs/sam3u-ek/README.txt161
-rw-r--r--nuttx/configs/sam3u-ek/include/board.h38
-rw-r--r--nuttx/configs/sam3u-ek/knsh/defconfig94
-rw-r--r--nuttx/configs/sam3u-ek/nsh/defconfig103
-rw-r--r--nuttx/configs/sam3u-ek/nx/defconfig105
-rw-r--r--nuttx/configs/sam3u-ek/ostest/defconfig94
-rw-r--r--nuttx/configs/sam3u-ek/src/Makefile2
-rw-r--r--nuttx/configs/sam3u-ek/src/sam3u-ek.h7
-rw-r--r--nuttx/configs/sam3u-ek/src/up_lcd.c6
-rw-r--r--nuttx/configs/sam3u-ek/src/up_nsh.c39
-rw-r--r--nuttx/configs/sam3u-ek/src/up_touchscreen.c4
-rw-r--r--nuttx/configs/sam4l-xplained/README.txt183
-rw-r--r--nuttx/configs/sam4l-xplained/include/board.h179
-rw-r--r--nuttx/configs/sam4l-xplained/nsh/Make.defs (renamed from nuttx/configs/sam3u-ek/touchscreen/Make.defs)4
-rw-r--r--nuttx/configs/sam4l-xplained/nsh/defconfig (renamed from nuttx/configs/sam3u-ek/touchscreen/defconfig)327
-rwxr-xr-xnuttx/configs/sam4l-xplained/nsh/setenv.sh (renamed from nuttx/configs/sam3u-ek/touchscreen/setenv.sh)32
-rw-r--r--nuttx/configs/sam4l-xplained/ostest/defconfig93
-rwxr-xr-xnuttx/configs/sam4l-xplained/scripts/ld.script36
-rw-r--r--nuttx/configs/sam4l-xplained/src/Makefile4
-rw-r--r--nuttx/configs/sam4l-xplained/src/sam4l-xplained.h12
-rw-r--r--nuttx/configs/sam4l-xplained/src/sam_autoleds.c36
-rw-r--r--nuttx/configs/sam4l-xplained/src/sam_cxxinitialize.c154
-rw-r--r--nuttx/configs/sam4s-xplained/Kconfig7
-rw-r--r--nuttx/configs/sam4s-xplained/README.txt599
-rw-r--r--nuttx/configs/sam4s-xplained/include/board.h323
-rw-r--r--nuttx/configs/sam4s-xplained/nsh/Make.defs109
-rw-r--r--nuttx/configs/sam4s-xplained/nsh/defconfig676
-rwxr-xr-xnuttx/configs/sam4s-xplained/nsh/setenv.sh63
-rw-r--r--nuttx/configs/sam4s-xplained/ostest/Make.defs109
-rw-r--r--nuttx/configs/sam4s-xplained/ostest/defconfig604
-rwxr-xr-xnuttx/configs/sam4s-xplained/ostest/setenv.sh63
-rwxr-xr-xnuttx/configs/sam4s-xplained/scripts/ld.script121
-rw-r--r--nuttx/configs/sam4s-xplained/src/Makefile100
-rw-r--r--nuttx/configs/sam4s-xplained/src/sam4s-xplained.h132
-rw-r--r--nuttx/configs/sam4s-xplained/src/sam_autoleds.c155
-rw-r--r--nuttx/configs/sam4s-xplained/src/sam_boot.c75
-rw-r--r--nuttx/configs/sam4s-xplained/src/sam_buttons.c155
-rw-r--r--nuttx/configs/sam4s-xplained/src/sam_cxxinitialize.c154
-rw-r--r--nuttx/configs/sam4s-xplained/src/sam_userleds.c141
-rw-r--r--nuttx/configs/shenzhou/src/up_usbmsc.c4
-rw-r--r--nuttx/configs/sim/nsh2/defconfig3
-rw-r--r--nuttx/configs/sim/ostest/defconfig1
-rw-r--r--nuttx/configs/sim/touchscreen/defconfig1
-rw-r--r--nuttx/configs/stm3210e-eval/README.txt2
-rwxr-xr-xnuttx/configs/stm3210e-eval/composite/defconfig1
-rw-r--r--nuttx/configs/stm3210e-eval/nsh2/defconfig5
-rw-r--r--nuttx/configs/stm3210e-eval/nx/defconfig2
-rw-r--r--nuttx/configs/stm3210e-eval/nxconsole/defconfig3
-rw-r--r--nuttx/configs/stm3210e-eval/nxlines/defconfig3
-rw-r--r--nuttx/configs/stm3210e-eval/nxtext/defconfig3
-rw-r--r--nuttx/configs/stm3210e-eval/pm/defconfig5
-rw-r--r--nuttx/configs/stm3210e-eval/src/up_usbmsc.c6
-rwxr-xr-xnuttx/configs/stm3210e-eval/usbstorage/defconfig1
-rw-r--r--nuttx/configs/stm3220g-eval/dhcpd/defconfig1
-rw-r--r--nuttx/configs/stm3220g-eval/nettest/defconfig1
-rw-r--r--nuttx/configs/stm3220g-eval/nsh/defconfig6
-rw-r--r--nuttx/configs/stm3220g-eval/nsh2/defconfig6
-rw-r--r--nuttx/configs/stm3220g-eval/ostest/defconfig6
-rw-r--r--nuttx/configs/stm3220g-eval/telnetd/defconfig1
-rw-r--r--nuttx/configs/stm3240g-eval/dhcpd/defconfig1
-rw-r--r--nuttx/configs/stm3240g-eval/nettest/defconfig1
-rw-r--r--nuttx/configs/stm3240g-eval/nsh/defconfig6
-rw-r--r--nuttx/configs/stm3240g-eval/nsh2/defconfig1
-rw-r--r--nuttx/configs/stm3240g-eval/nxconsole/defconfig5
-rw-r--r--nuttx/configs/stm3240g-eval/nxwm/defconfig6
-rw-r--r--nuttx/configs/stm3240g-eval/ostest/defconfig1
-rw-r--r--nuttx/configs/stm3240g-eval/telnetd/defconfig1
-rw-r--r--nuttx/configs/stm3240g-eval/webserver/defconfig6
-rw-r--r--nuttx/configs/stm32f100rc_generic/ostest/defconfig1
-rw-r--r--nuttx/configs/stm32f3discovery/ostest/defconfig1
-rw-r--r--nuttx/configs/stm32f4discovery/kostest/defconfig1
-rw-r--r--nuttx/configs/stm32f4discovery/ostest/defconfig1
-rw-r--r--nuttx/configs/stm32f4discovery/winbuild/defconfig1
-rw-r--r--nuttx/configs/stm32ldiscovery/src/stm32_autoleds.c5
-rw-r--r--nuttx/configs/stm32ldiscovery/src/stm32_userleds.c3
-rw-r--r--nuttx/configs/sure-pic32mx/ostest/defconfig1
-rw-r--r--nuttx/configs/sure-pic32mx/src/pic32mx_usbterm.c2
-rw-r--r--nuttx/configs/twr-k60n512/ostest/defconfig1
-rw-r--r--nuttx/configs/twr-k60n512/src/up_usbmsc.c6
-rw-r--r--nuttx/configs/ubw32/ostest/defconfig1
-rw-r--r--nuttx/configs/ubw32/src/up_usbterm.c4
-rw-r--r--nuttx/configs/xtrs/ostest/defconfig1
-rw-r--r--nuttx/configs/z16f2800100zcog/ostest/defconfig1
-rw-r--r--nuttx/configs/z80sim/ostest/defconfig1
-rw-r--r--nuttx/configs/z8encore000zco/ostest/defconfig1
-rw-r--r--nuttx/configs/z8f64200100kit/ostest/defconfig1
126 files changed, 4822 insertions, 716 deletions
diff --git a/nuttx/configs/Kconfig b/nuttx/configs/Kconfig
index dcfa1c3eb..6bbfe96e2 100644
--- a/nuttx/configs/Kconfig
+++ b/nuttx/configs/Kconfig
@@ -482,6 +482,15 @@ config ARCH_BOARD_SAM4L_XPLAINED
---help---
The port of NuttX to the Atmel SAM4L-Xplained Pro development board.
+config ARCH_BOARD_SAM4S_XPLAINED
+ bool "Atmel SAM4S-Xplained development board"
+ depends on ARCH_CHIP_ATSAM4S16C
+ select ARCH_HAVE_LEDS
+ select ARCH_HAVE_BUTTONS
+ select ARCH_HAVE_IRQBUTTONS
+ ---help---
+ The port of NuttX to the Atmel SAM4S-Xplained development board.
+
config ARCH_BOARD_SHENZHOU
bool "Shenzhou STM32F107 board"
depends on ARCH_CHIP_STM32F107VC
@@ -796,6 +805,7 @@ config ARCH_BOARD
default "rgmp" if ARCH_BOARD_RGMP
default "sam3u-ek" if ARCH_BOARD_SAM3UEK
default "sam4l-xplained" if ARCH_BOARD_SAM4L_XPLAINED
+ default "sam4s-xplained" if ARCH_BOARD_SAM4S_XPLAINED
default "shenzhou" if ARCH_BOARD_SHENZHOU
default "skp16c26" if ARCH_BOARD_SKP16C26
default "stm32_tiny" if ARCH_BOARD_STM32_TINY
@@ -1021,6 +1031,9 @@ endif
if ARCH_BOARD_SAM4L_XPLAINED
source "configs/sam4l-xplained/Kconfig"
endif
+if ARCH_BOARD_SAM4S_XPLAINED
+source "configs/sam4s-xplained/Kconfig"
+endif
if ARCH_BOARD_SHENZHOU
source "configs/shenzhou/Kconfig"
endif
diff --git a/nuttx/configs/cloudctrl/src/up_usbmsc.c b/nuttx/configs/cloudctrl/src/up_usbmsc.c
index 04f35efea..454cfccf5 100644
--- a/nuttx/configs/cloudctrl/src/up_usbmsc.c
+++ b/nuttx/configs/cloudctrl/src/up_usbmsc.c
@@ -1,7 +1,7 @@
/****************************************************************************
* configs/cloudctrl/src/up_usbmsc.c
*
- * Copyright (C) 2012 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2012, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
* Darcy Gong <darcy.gong@gmail.com>
*
@@ -96,7 +96,7 @@ int usbmsc_archinitialize(void)
* this case, there is nothing further to be done here.
*/
-#ifndef CONFIG_EXAMPLES_USBMSC_BUILTIN
+#ifndef CONFIG_NSH_BUILTIN_APPS
return stm32_sdinitialize(CONFIG_EXAMPLES_USBMSC_DEVMINOR1);
#else
return OK;
diff --git a/nuttx/configs/compal_e99/nsh_highram/defconfig b/nuttx/configs/compal_e99/nsh_highram/defconfig
index bc3cbd649..56fe639cb 100644
--- a/nuttx/configs/compal_e99/nsh_highram/defconfig
+++ b/nuttx/configs/compal_e99/nsh_highram/defconfig
@@ -262,9 +262,6 @@ CONFIG_NSH_BUILTIN_APPS=y
# Settings for examples/hello
#
-CONFIG_EXAMPLES_NXHELLO_BUILTIN=y
-CONFIG_EXAMPLES_NXTEXT_BUILTIN=y
-CONFIG_EXAMPLES_NXIMAGE_BUILTIN=y
CONFIG_EXAMPLES_NXLINES_BORDERWIDTH=2
CONFIG_EXAMPLES_NXLINES_LINEWIDTH=4
diff --git a/nuttx/configs/ekk-lm3s9b96/ostest/defconfig b/nuttx/configs/ekk-lm3s9b96/ostest/defconfig
index 9331512b8..c5b088967 100644
--- a/nuttx/configs/ekk-lm3s9b96/ostest/defconfig
+++ b/nuttx/configs/ekk-lm3s9b96/ostest/defconfig
@@ -429,7 +429,6 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512
# CONFIG_EXAMPLES_NXLINES is not set
# CONFIG_EXAMPLES_NXTEXT is not set
CONFIG_EXAMPLES_OSTEST=y
-# CONFIG_EXAMPLES_OSTEST_BUILTIN is not set
CONFIG_EXAMPLES_OSTEST_LOOPS=1
CONFIG_EXAMPLES_OSTEST_STACKSIZE=2048
CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=3
diff --git a/nuttx/configs/ez80f910200kitg/ostest/defconfig b/nuttx/configs/ez80f910200kitg/ostest/defconfig
index 1abc3fb58..b32a9ed75 100644
--- a/nuttx/configs/ez80f910200kitg/ostest/defconfig
+++ b/nuttx/configs/ez80f910200kitg/ostest/defconfig
@@ -368,7 +368,6 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512
# CONFIG_EXAMPLES_NXLINES is not set
# CONFIG_EXAMPLES_NXTEXT is not set
CONFIG_EXAMPLES_OSTEST=y
-# CONFIG_EXAMPLES_OSTEST_BUILTIN is not set
CONFIG_EXAMPLES_OSTEST_LOOPS=1
CONFIG_EXAMPLES_OSTEST_STACKSIZE=2048
CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=3
diff --git a/nuttx/configs/ez80f910200zco/ostest/defconfig b/nuttx/configs/ez80f910200zco/ostest/defconfig
index e67f93da6..6df0efdb7 100644
--- a/nuttx/configs/ez80f910200zco/ostest/defconfig
+++ b/nuttx/configs/ez80f910200zco/ostest/defconfig
@@ -376,7 +376,6 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512
# CONFIG_EXAMPLES_NXLINES is not set
# CONFIG_EXAMPLES_NXTEXT is not set
CONFIG_EXAMPLES_OSTEST=y
-# CONFIG_EXAMPLES_OSTEST_BUILTIN is not set
CONFIG_EXAMPLES_OSTEST_LOOPS=1
CONFIG_EXAMPLES_OSTEST_STACKSIZE=2048
CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=3
diff --git a/nuttx/configs/fire-stm32v2/nsh/defconfig b/nuttx/configs/fire-stm32v2/nsh/defconfig
index e9df03b99..f1a89316b 100644
--- a/nuttx/configs/fire-stm32v2/nsh/defconfig
+++ b/nuttx/configs/fire-stm32v2/nsh/defconfig
@@ -773,7 +773,6 @@ CONFIG_EXAMPLES_NSH=y
# USB Mass Storage Class Example
#
CONFIG_EXAMPLES_USBMSC=y
-CONFIG_EXAMPLES_USBMSC_BUILTIN=y
CONFIG_EXAMPLES_USBMSC_NLUNS=1
CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0
CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0"
@@ -996,7 +995,6 @@ CONFIG_NSH_NOMAC=y
# I2C tool
#
CONFIG_SYSTEM_I2CTOOL=y
-CONFIG_I2CTOOL_BUILTIN=y
CONFIG_I2CTOOL_MINBUS=1
CONFIG_I2CTOOL_MAXBUS=2
CONFIG_I2CTOOL_MINADDR=0x03
diff --git a/nuttx/configs/fire-stm32v2/src/up_usbmsc.c b/nuttx/configs/fire-stm32v2/src/up_usbmsc.c
index 98c06336f..3a1ebe0e0 100644
--- a/nuttx/configs/fire-stm32v2/src/up_usbmsc.c
+++ b/nuttx/configs/fire-stm32v2/src/up_usbmsc.c
@@ -1,7 +1,7 @@
/****************************************************************************
* configs/fire-stm32v2/src/up_usbmsc.c
*
- * Copyright (C) 2012 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2012, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Configure and register the STM32 SPI-based MMC/SD block driver.
@@ -95,7 +95,7 @@ int usbmsc_archinitialize(void)
* this case, there is nothing further to be done here.
*/
-#ifndef CONFIG_EXAMPLES_USBMSC_BUILTIN
+#ifndef CONFIG_NSH_BUILTIN_APPS
return stm32_sdinitialize(CONFIG_EXAMPLES_USBMSC_DEVMINOR1);
#else
return OK;
diff --git a/nuttx/configs/freedom-kl25z/ostest/defconfig b/nuttx/configs/freedom-kl25z/ostest/defconfig
index 442487f3e..89cad14c6 100644
--- a/nuttx/configs/freedom-kl25z/ostest/defconfig
+++ b/nuttx/configs/freedom-kl25z/ostest/defconfig
@@ -449,7 +449,6 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512
# CONFIG_EXAMPLES_NXLINES is not set
# CONFIG_EXAMPLES_NXTEXT is not set
CONFIG_EXAMPLES_OSTEST=y
-# CONFIG_EXAMPLES_OSTEST_BUILTIN is not set
CONFIG_EXAMPLES_OSTEST_LOOPS=1
CONFIG_EXAMPLES_OSTEST_STACKSIZE=1536
CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=3
diff --git a/nuttx/configs/hymini-stm32v/README.txt b/nuttx/configs/hymini-stm32v/README.txt
index 3765dbf35..02ab52113 100644
--- a/nuttx/configs/hymini-stm32v/README.txt
+++ b/nuttx/configs/hymini-stm32v/README.txt
@@ -627,7 +627,7 @@ Where <subdir> is one of the following:
long file names in the FAT file system. Please refer to the
details in the top-level COPYING file. Please do not use FAT
long file name unless you are familiar with these patent issues.
- (4) When built as an NSH add-on command (CONFIG_EXAMPLES_USBMSC_BUILTIN=y),
+ (4) When built as an NSH add-on command (CONFIG_NSH_BUILTIN_APPS=y),
Caution should be used to assure that the SD drive is not in use when
the USB storage device is configured. Specifically, the SD driver
should be unmounted like:
diff --git a/nuttx/configs/hymini-stm32v/nsh2/defconfig b/nuttx/configs/hymini-stm32v/nsh2/defconfig
index 62793df97..0c3897eff 100644
--- a/nuttx/configs/hymini-stm32v/nsh2/defconfig
+++ b/nuttx/configs/hymini-stm32v/nsh2/defconfig
@@ -691,7 +691,6 @@ CONFIG_EXAMPLES_BUTTONS_NAME7="Button 7"
CONFIG_EXAMPLES_NSH=y
# CONFIG_EXAMPLES_NULL is not set
CONFIG_EXAMPLES_NX=y
-CONFIG_EXAMPLES_NX_BUILTIN=y
CONFIG_EXAMPLES_NX_VPLANE=0
CONFIG_EXAMPLES_NX_DEVNO=0
CONFIG_EXAMPLES_NX_DEFAULT_COLORS=y
@@ -719,14 +718,12 @@ CONFIG_EXAMPLES_NXIMAGE=y
# CONFIG_EXAMPLES_THTTPD is not set
# CONFIG_EXAMPLES_TIFF is not set
CONFIG_EXAMPLES_TOUCHSCREEN=y
-CONFIG_EXAMPLES_TOUCHSCREEN_BUILTIN=y
CONFIG_EXAMPLES_TOUCHSCREEN_MINOR=0
CONFIG_EXAMPLES_TOUCHSCREEN_DEVPATH="/dev/input0"
# CONFIG_EXAMPLES_UDP is not set
# CONFIG_EXAMPLES_UIP is not set
# CONFIG_EXAMPLES_USBSERIAL is not set
CONFIG_EXAMPLES_USBMSC=y
-CONFIG_EXAMPLES_USBMSC_BUILTIN=y
CONFIG_EXAMPLES_USBMSC_NLUNS=1
CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0
CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0"
diff --git a/nuttx/configs/hymini-stm32v/ostest/defconfig b/nuttx/configs/hymini-stm32v/ostest/defconfig
index 6f515839b..209b5634b 100644
--- a/nuttx/configs/hymini-stm32v/ostest/defconfig
+++ b/nuttx/configs/hymini-stm32v/ostest/defconfig
@@ -516,7 +516,6 @@ CONFIG_SCHED_WORKSTACKSIZE=1024
# CONFIG_EXAMPLES_NXLINES is not set
# CONFIG_EXAMPLES_NXTEXT is not set
CONFIG_EXAMPLES_OSTEST=y
-# CONFIG_EXAMPLES_OSTEST_BUILTIN is not set
CONFIG_EXAMPLES_OSTEST_LOOPS=1
CONFIG_EXAMPLES_OSTEST_STACKSIZE=8192
CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=8
diff --git a/nuttx/configs/hymini-stm32v/src/up_usbmsc.c b/nuttx/configs/hymini-stm32v/src/up_usbmsc.c
index c5abaa911..e7fc41907 100644
--- a/nuttx/configs/hymini-stm32v/src/up_usbmsc.c
+++ b/nuttx/configs/hymini-stm32v/src/up_usbmsc.c
@@ -1,7 +1,7 @@
/****************************************************************************
* configs/hymini-stm32v/src/up_usbmsc.c
*
- * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2009, 2011, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Configure and register the STM32 MMC/SD SDIO block driver.
@@ -114,7 +114,7 @@ int usbmsc_archinitialize(void)
* this case, there is nothing further to be done here.
*/
-#ifndef CONFIG_EXAMPLES_USBMSC_BUILTIN
+#ifndef CONFIG_NSH_BUILTIN_APPS
FAR struct sdio_dev_s *sdio;
int ret;
@@ -156,7 +156,7 @@ int usbmsc_archinitialize(void)
sdio_mediachange(sdio, true);
-#endif /* CONFIG_EXAMPLES_USBMSC_BUILTIN */
+#endif /* CONFIG_NSH_BUILTIN_APPS */
return OK;
}
diff --git a/nuttx/configs/hymini-stm32v/usbserial/defconfig b/nuttx/configs/hymini-stm32v/usbserial/defconfig
index ca793bae7..25382b32b 100755
--- a/nuttx/configs/hymini-stm32v/usbserial/defconfig
+++ b/nuttx/configs/hymini-stm32v/usbserial/defconfig
@@ -477,7 +477,6 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n
#
# Settings for examples/usbterm
#
-CONFIG_EXAMPLES_USBTERM_BUILTIN=n
CONFIG_EXAMPLES_USBTERM_BUFLEN=256
CONFIG_EXAMPLES_USBTERM_TRACEINIT=n
CONFIG_EXAMPLES_USBTERM_TRACECLASS=n
diff --git a/nuttx/configs/hymini-stm32v/usbstorage/defconfig b/nuttx/configs/hymini-stm32v/usbstorage/defconfig
index 1982faaf0..da13197a5 100755
--- a/nuttx/configs/hymini-stm32v/usbstorage/defconfig
+++ b/nuttx/configs/hymini-stm32v/usbstorage/defconfig
@@ -464,7 +464,6 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n
#
# Settings for examples/usbstorage
#
-CONFIG_EXAMPLES_USBMSC_BUILTIN=n
CONFIG_EXAMPLES_USBMSC_NLUNS=1
CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0
CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0"
diff --git a/nuttx/configs/kwikstik-k40/ostest/defconfig b/nuttx/configs/kwikstik-k40/ostest/defconfig
index 16b3bd321..bcf204bb4 100755
--- a/nuttx/configs/kwikstik-k40/ostest/defconfig
+++ b/nuttx/configs/kwikstik-k40/ostest/defconfig
@@ -463,7 +463,6 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512
# CONFIG_EXAMPLES_NXLINES is not set
# CONFIG_EXAMPLES_NXTEXT is not set
CONFIG_EXAMPLES_OSTEST=y
-# CONFIG_EXAMPLES_OSTEST_BUILTIN is not set
CONFIG_EXAMPLES_OSTEST_LOOPS=1
CONFIG_EXAMPLES_OSTEST_STACKSIZE=2048
CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=3
diff --git a/nuttx/configs/kwikstik-k40/src/up_usbmsc.c b/nuttx/configs/kwikstik-k40/src/up_usbmsc.c
index ea97cb99f..bbdbbba94 100644
--- a/nuttx/configs/kwikstik-k40/src/up_usbmsc.c
+++ b/nuttx/configs/kwikstik-k40/src/up_usbmsc.c
@@ -110,9 +110,9 @@ int usbmsc_archinitialize(void)
* this case, there is nothing further to be done here.
*/
-#ifndef CONFIG_EXAMPLES_USBMSC_BUILTIN
+#ifndef CONFIG_NSH_BUILTIN_APPS
# warning "Missing logic"
-#endif /* CONFIG_EXAMPLES_USBMSC_BUILTIN */
+#endif /* CONFIG_NSH_BUILTIN_APPS */
return OK;
}
diff --git a/nuttx/configs/lm3s6965-ek/ostest/defconfig b/nuttx/configs/lm3s6965-ek/ostest/defconfig
index eff3f6b21..2c554bfd2 100755
--- a/nuttx/configs/lm3s6965-ek/ostest/defconfig
+++ b/nuttx/configs/lm3s6965-ek/ostest/defconfig
@@ -413,7 +413,6 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512
# CONFIG_EXAMPLES_NXLINES is not set
# CONFIG_EXAMPLES_NXTEXT is not set
CONFIG_EXAMPLES_OSTEST=y
-# CONFIG_EXAMPLES_OSTEST_BUILTIN is not set
CONFIG_EXAMPLES_OSTEST_LOOPS=1
CONFIG_EXAMPLES_OSTEST_STACKSIZE=2048
CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=3
diff --git a/nuttx/configs/lm4f120-launchpad/ostest/defconfig b/nuttx/configs/lm4f120-launchpad/ostest/defconfig
index 3ee3a56bd..9eee8efeb 100755
--- a/nuttx/configs/lm4f120-launchpad/ostest/defconfig
+++ b/nuttx/configs/lm4f120-launchpad/ostest/defconfig
@@ -432,7 +432,6 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512
# CONFIG_EXAMPLES_NXLINES is not set
# CONFIG_EXAMPLES_NXTEXT is not set
CONFIG_EXAMPLES_OSTEST=y
-# CONFIG_EXAMPLES_OSTEST_BUILTIN is not set
CONFIG_EXAMPLES_OSTEST_LOOPS=1
CONFIG_EXAMPLES_OSTEST_STACKSIZE=2048
CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=3
diff --git a/nuttx/configs/lpc4330-xplorer/nsh/defconfig b/nuttx/configs/lpc4330-xplorer/nsh/defconfig
index 4aba64d42..75d55359b 100644
--- a/nuttx/configs/lpc4330-xplorer/nsh/defconfig
+++ b/nuttx/configs/lpc4330-xplorer/nsh/defconfig
@@ -537,7 +537,6 @@ CONFIG_NSH_MMCSDMINOR=0
#
# I2C tool settings
#
-CONFIG_I2CTOOL_BUILTIN=y
CONFIG_I2CTOOL_MINBUS=1
CONFIG_I2CTOOL_MAXBUS=3
#CONFIG_I2CTOOL_MINADDR
diff --git a/nuttx/configs/lpc4330-xplorer/ostest/defconfig b/nuttx/configs/lpc4330-xplorer/ostest/defconfig
index d4b1bda47..1f1eb5bc9 100644
--- a/nuttx/configs/lpc4330-xplorer/ostest/defconfig
+++ b/nuttx/configs/lpc4330-xplorer/ostest/defconfig
@@ -520,7 +520,6 @@ CONFIG_NSH_MMCSDMINOR=0
#
# I2C tool settings
#
-CONFIG_I2CTOOL_BUILTIN=y
CONFIG_I2CTOOL_MINBUS=1
CONFIG_I2CTOOL_MAXBUS=3
#CONFIG_I2CTOOL_MINADDR
diff --git a/nuttx/configs/mikroe-stm32f4/fulldemo/defconfig b/nuttx/configs/mikroe-stm32f4/fulldemo/defconfig
index 67bc28f19..d870b629a 100644
--- a/nuttx/configs/mikroe-stm32f4/fulldemo/defconfig
+++ b/nuttx/configs/mikroe-stm32f4/fulldemo/defconfig
@@ -747,7 +747,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024
CONFIG_EXAMPLES_NSH=y
# CONFIG_EXAMPLES_NULL is not set
CONFIG_EXAMPLES_NX=y
-CONFIG_EXAMPLES_NX_BUILTIN=y
CONFIG_EXAMPLES_NX_VPLANE=0
CONFIG_EXAMPLES_NX_DEVNO=0
CONFIG_EXAMPLES_NX_DEFAULT_COLORS=y
@@ -787,7 +786,6 @@ CONFIG_EXAMPLES_NXIMAGE=y
# CONFIG_EXAMPLES_THTTPD is not set
# CONFIG_EXAMPLES_TIFF is not set
CONFIG_EXAMPLES_TOUCHSCREEN=y
-CONFIG_EXAMPLES_TOUCHSCREEN_BUILTIN=y
CONFIG_EXAMPLES_TOUCHSCREEN_MINOR=0
CONFIG_EXAMPLES_TOUCHSCREEN_DEVPATH="/dev/input0"
# CONFIG_EXAMPLES_UDP is not set
diff --git a/nuttx/configs/mikroe-stm32f4/kostest/defconfig b/nuttx/configs/mikroe-stm32f4/kostest/defconfig
index 651243f99..5c09035e5 100644
--- a/nuttx/configs/mikroe-stm32f4/kostest/defconfig
+++ b/nuttx/configs/mikroe-stm32f4/kostest/defconfig
@@ -671,7 +671,6 @@ CONFIG_EXAMPLES_NSH=y
# CONFIG_EXAMPLES_NXLINES is not set
# CONFIG_EXAMPLES_NXTEXT is not set
CONFIG_EXAMPLES_OSTEST=y
-CONFIG_EXAMPLES_OSTEST_BUILTIN=y
CONFIG_EXAMPLES_OSTEST_LOOPS=1
CONFIG_EXAMPLES_OSTEST_STACKSIZE=8192
CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=8
diff --git a/nuttx/configs/mikroe-stm32f4/nx/defconfig b/nuttx/configs/mikroe-stm32f4/nx/defconfig
index cda392981..0e3d21360 100644
--- a/nuttx/configs/mikroe-stm32f4/nx/defconfig
+++ b/nuttx/configs/mikroe-stm32f4/nx/defconfig
@@ -586,7 +586,6 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024
# CONFIG_EXAMPLES_NSH is not set
# CONFIG_EXAMPLES_NULL is not set
CONFIG_EXAMPLES_NX=y
-# CONFIG_EXAMPLES_NX_BUILTIN is not set
CONFIG_EXAMPLES_NX_VPLANE=0
CONFIG_EXAMPLES_NX_DEVNO=0
CONFIG_EXAMPLES_NX_DEFAULT_COLORS=y
diff --git a/nuttx/configs/mikroe-stm32f4/nxtext/defconfig b/nuttx/configs/mikroe-stm32f4/nxtext/defconfig
index 6f7f569b3..a7d388093 100644
--- a/nuttx/configs/mikroe-stm32f4/nxtext/defconfig
+++ b/nuttx/configs/mikroe-stm32f4/nxtext/defconfig
@@ -596,7 +596,6 @@ CONFIG_EXAMPLES_NXTEXT=y
#
# Basic Configuration of the example
#
-# CONFIG_EXAMPLES_NXTEXT_BUILTIN is not set
CONFIG_EXAMPLES_NXTEXT_VPLANE=0
CONFIG_EXAMPLES_NXTEXT_DEVNO=0
CONFIG_EXAMPLES_NXTEXT_BPP=16
diff --git a/nuttx/configs/mikroe-stm32f4/src/mikroe-stm32f4-internal.h b/nuttx/configs/mikroe-stm32f4/src/mikroe-stm32f4-internal.h
index 0f6894316..c27306048 100644
--- a/nuttx/configs/mikroe-stm32f4/src/mikroe-stm32f4-internal.h
+++ b/nuttx/configs/mikroe-stm32f4/src/mikroe-stm32f4-internal.h
@@ -190,7 +190,6 @@
GPIO_OUTPUT_SET|GPIO_PORTC|GPIO_PIN7)
#define GPIO_VS1053_DREQ (GPIO_INPUT|GPIO_SPEED_50MHz|GPIO_PORTC|GPIO_PIN6)
-
/****************************************************************************************************
* Public Types
****************************************************************************************************/
diff --git a/nuttx/configs/nutiny-nuc120/ostest/defconfig b/nuttx/configs/nutiny-nuc120/ostest/defconfig
index 2dd7568d4..014bd1d15 100644
--- a/nuttx/configs/nutiny-nuc120/ostest/defconfig
+++ b/nuttx/configs/nutiny-nuc120/ostest/defconfig
@@ -468,7 +468,6 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512
# CONFIG_EXAMPLES_NXLINES is not set
# CONFIG_EXAMPLES_NXTEXT is not set
CONFIG_EXAMPLES_OSTEST=y
-# CONFIG_EXAMPLES_OSTEST_BUILTIN is not set
CONFIG_EXAMPLES_OSTEST_LOOPS=1
CONFIG_EXAMPLES_OSTEST_STACKSIZE=1536
CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=3
diff --git a/nuttx/configs/open1788/README.txt b/nuttx/configs/open1788/README.txt
index c15985d16..f4a269f58 100644
--- a/nuttx/configs/open1788/README.txt
+++ b/nuttx/configs/open1788/README.txt
@@ -540,11 +540,22 @@ CONFIGURATION
CONFIG_GPIO_IRQ=y : GPIO interrupt support
CONFIG_LPC17_SSP1=y : Enable support for SSP1
+ RTOS Features:
+ CONFIG_DISABLE_SIGNALS=n : Signals are required
+
+ Library Support:
+ CONFIG_SCHED_WORKQUEUE=y : Work queue support required
+
Applicaton Configuration:
CONFIG_EXAMPLES_TOUCHSCREEN=y : Enable the touchscreen built-int test
- CONFIG_EXAMPLES_TOUCHSCREEN_BUILTIN=y
- Defaults should be okay for related touchscreen settings.
+ Defaults should be okay for related touchscreen settings. Touchscreen
+ debug output can be enabled with:
+
+ Build Setup:
+ CONFIG_DEBUG=y : Enable debug features
+ CONFIG_DEBUG_VERBOSE=y : Enable verbose debug output
+ CONFIG_DEBUG_INPUT=y : Enable debug output from input devices
c) You will also have to disable SD card support to use this test. The
SD card detect (CD) signal is on P0[13]. This signal is shared. It
diff --git a/nuttx/configs/open1788/ostest/defconfig b/nuttx/configs/open1788/ostest/defconfig
index f78adeaaa..010f5a80f 100644
--- a/nuttx/configs/open1788/ostest/defconfig
+++ b/nuttx/configs/open1788/ostest/defconfig
@@ -469,7 +469,6 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512
# CONFIG_EXAMPLES_NXLINES is not set
# CONFIG_EXAMPLES_NXTEXT is not set
CONFIG_EXAMPLES_OSTEST=y
-# CONFIG_EXAMPLES_OSTEST_BUILTIN is not set
CONFIG_EXAMPLES_OSTEST_LOOPS=1
CONFIG_EXAMPLES_OSTEST_STACKSIZE=2048
CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=3
diff --git a/nuttx/configs/p112/ostest/defconfig b/nuttx/configs/p112/ostest/defconfig
index 3699475c5..000b1b57d 100644
--- a/nuttx/configs/p112/ostest/defconfig
+++ b/nuttx/configs/p112/ostest/defconfig
@@ -405,7 +405,6 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512
# CONFIG_EXAMPLES_NXLINES is not set
# CONFIG_EXAMPLES_NXTEXT is not set
CONFIG_EXAMPLES_OSTEST=y
-# CONFIG_EXAMPLES_OSTEST_BUILTIN is not set
CONFIG_EXAMPLES_OSTEST_LOOPS=1
CONFIG_EXAMPLES_OSTEST_STACKSIZE=1024
CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=4
diff --git a/nuttx/configs/pcblogic-pic32mx/ostest/defconfig b/nuttx/configs/pcblogic-pic32mx/ostest/defconfig
index 5db131205..569b34adb 100644
--- a/nuttx/configs/pcblogic-pic32mx/ostest/defconfig
+++ b/nuttx/configs/pcblogic-pic32mx/ostest/defconfig
@@ -537,7 +537,6 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512
# CONFIG_EXAMPLES_NXLINES is not set
# CONFIG_EXAMPLES_NXTEXT is not set
CONFIG_EXAMPLES_OSTEST=y
-# CONFIG_EXAMPLES_OSTEST_BUILTIN is not set
CONFIG_EXAMPLES_OSTEST_LOOPS=1
CONFIG_EXAMPLES_OSTEST_STACKSIZE=2048
CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=3
diff --git a/nuttx/configs/pic32-starterkit/nsh/defconfig b/nuttx/configs/pic32-starterkit/nsh/defconfig
index 2c88881da..89e5d2498 100644
--- a/nuttx/configs/pic32-starterkit/nsh/defconfig
+++ b/nuttx/configs/pic32-starterkit/nsh/defconfig
@@ -599,7 +599,6 @@ CONFIG_NSH_MMCSDMINOR=0
#
# I2C tool settings
#
-CONFIG_I2CTOOL_BUILTIN=y
CONFIG_I2CTOOL_MINBUS=1
CONFIG_I2CTOOL_MAXBUS=4
#CONFIG_I2CTOOL_MINADDR
@@ -628,7 +627,6 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n
#
# Settings for examples/usbstorage
#
-CONFIG_EXAMPLES_USBMSC_BUILTIN=y
CONFIG_EXAMPLES_USBMSC_NLUNS=1
CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0
CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0"
@@ -641,7 +639,6 @@ CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n
#
# Settings for examples/usbterm
#
-CONFIG_EXAMPLES_USBTERM_BUILTIN=y
CONFIG_EXAMPLES_USBTERM_DEVINIT=y
#CONFIG_EXAMPLES_USBTERM_BUFLEN
CONFIG_EXAMPLES_USBTERM_TRACEINIT=n
diff --git a/nuttx/configs/pic32-starterkit/nsh2/defconfig b/nuttx/configs/pic32-starterkit/nsh2/defconfig
index 23deb4471..2b596ea2f 100644
--- a/nuttx/configs/pic32-starterkit/nsh2/defconfig
+++ b/nuttx/configs/pic32-starterkit/nsh2/defconfig
@@ -598,7 +598,6 @@ CONFIG_NSH_MMCSDMINOR=0
#
# I2C tool settings
#
-CONFIG_I2CTOOL_BUILTIN=y
CONFIG_I2CTOOL_MINBUS=1
CONFIG_I2CTOOL_MAXBUS=4
#CONFIG_I2CTOOL_MINADDR
@@ -627,7 +626,6 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n
#
# Settings for examples/usbstorage
#
-CONFIG_EXAMPLES_USBMSC_BUILTIN=y
CONFIG_EXAMPLES_USBMSC_NLUNS=1
CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0
CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0"
@@ -640,7 +638,6 @@ CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n
#
# Settings for examples/usbterm
#
-CONFIG_EXAMPLES_USBTERM_BUILTIN=y
CONFIG_EXAMPLES_USBTERM_DEVINIT=y
#CONFIG_EXAMPLES_USBTERM_BUFLEN
CONFIG_EXAMPLES_USBTERM_TRACEINIT=n
diff --git a/nuttx/configs/pic32-starterkit/ostest/defconfig b/nuttx/configs/pic32-starterkit/ostest/defconfig
index b1b99e4c6..048a148af 100644
--- a/nuttx/configs/pic32-starterkit/ostest/defconfig
+++ b/nuttx/configs/pic32-starterkit/ostest/defconfig
@@ -595,7 +595,6 @@ CONFIG_NSH_MMCSDMINOR=0
#
# I2C tool settings
#
-CONFIG_I2CTOOL_BUILTIN=y
CONFIG_I2CTOOL_MINBUS=1
CONFIG_I2CTOOL_MAXBUS=4
#CONFIG_I2CTOOL_MINADDR
@@ -624,7 +623,6 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n
#
# Settings for examples/usbstorage
#
-CONFIG_EXAMPLES_USBMSC_BUILTIN=n
CONFIG_EXAMPLES_USBMSC_NLUNS=1
CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0
CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0"
@@ -637,7 +635,6 @@ CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n
#
# Settings for examples/usbterm
#
-CONFIG_EXAMPLES_USBTERM_BUILTIN=y
CONFIG_EXAMPLES_USBTERM_DEVINIT=y
#CONFIG_EXAMPLES_USBTERM_BUFLEN
CONFIG_EXAMPLES_USBTERM_TRACEINIT=n
diff --git a/nuttx/configs/pic32-starterkit/src/up_usbmsc.c b/nuttx/configs/pic32-starterkit/src/up_usbmsc.c
index 51e450c56..00b374dfd 100644
--- a/nuttx/configs/pic32-starterkit/src/up_usbmsc.c
+++ b/nuttx/configs/pic32-starterkit/src/up_usbmsc.c
@@ -1,7 +1,7 @@
/****************************************************************************
* configs/pic32-starterkit/src/up_usbmsc.c
*
- * Copyright (C) 2012 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2012, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -87,9 +87,9 @@ int usbmsc_archinitialize(void)
* this case, there is nothing further to be done here.
*/
-#ifndef CONFIG_EXAMPLES_USBMSC_BUILTIN
+#ifndef CONFIG_NSH_BUILTIN_APPS
# warning "Missing Logic"
-#endif /* CONFIG_EXAMPLES_USBMSC_BUILTIN */
+#endif /* CONFIG_NSH_BUILTIN_APPS */
return 0;
}
diff --git a/nuttx/configs/pic32-starterkit/src/up_usbterm.c b/nuttx/configs/pic32-starterkit/src/up_usbterm.c
index 012e8a5c0..e362f09ef 100644
--- a/nuttx/configs/pic32-starterkit/src/up_usbterm.c
+++ b/nuttx/configs/pic32-starterkit/src/up_usbterm.c
@@ -2,7 +2,7 @@
* configs/pic32-starterkit/src/up_usbterm.c
* arch/arm/src/board/up_usbterm.c
*
- * Copyright (C) 2012 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2012-2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -80,7 +80,7 @@ int usbterm_devinit(void)
* pic32mx_usbattach() will be called in nsh_archinitialize().
*/
-#ifndef CONFIG_EXAMPLES_USBTERM_BUILTIN
+#ifndef CONFIG_NSH_BUILTIN_APPS
pic32mx_usbattach();
#endif
return OK;
diff --git a/nuttx/configs/pic32mx7mmb/nsh/defconfig b/nuttx/configs/pic32mx7mmb/nsh/defconfig
index 23adc8f5b..781b81971 100644
--- a/nuttx/configs/pic32mx7mmb/nsh/defconfig
+++ b/nuttx/configs/pic32mx7mmb/nsh/defconfig
@@ -646,7 +646,6 @@ CONFIG_NSH_MMCSDMINOR=0
#
# I2C tool settings
#
-CONFIG_I2CTOOL_BUILTIN=y
CONFIG_I2CTOOL_MINBUS=1
CONFIG_I2CTOOL_MAXBUS=4
#CONFIG_I2CTOOL_MINADDR
@@ -661,7 +660,6 @@ CONFIG_I2CTOOL_DEFFREQ=100000
#
# Settings for examples/nx
#
-CONFIG_EXAMPLES_NX_BUILTIN=y
CONFIG_EXAMPLES_NX_VPLANE=0
CONFIG_EXAMPLES_NX_DEVNO=0
CONFIG_EXAMPLES_NX_BGCOLOR=0x0011
@@ -681,7 +679,6 @@ CONFIG_EXAMPLES_NX_EXTERNINIT=n
#
# Settings for examples/nxhello
#
-CONFIG_EXAMPLES_NXHELLO_BUILTIN=y
CONFIG_EXAMPLES_NXHELLO_VPLANE=0
CONFIG_EXAMPLES_NXHELLO_DEVNO=0
CONFIG_EXAMPLES_NXHELLO_BGCOLOR=0x0011
@@ -693,7 +690,6 @@ CONFIG_EXAMPLES_NXHELLO_EXTERNINIT=n
#
# Settings for examples/nximage
#
-CONFIG_EXAMPLES_NXIMAGE_BUILTIN=y
CONFIG_EXAMPLES_NXIMAGE_VPLANE=0
CONFIG_EXAMPLES_NXIMAGE_DEVNO=0
CONFIG_EXAMPLES_NXIMAGE_BPP=16
@@ -722,7 +718,6 @@ CONFIG_EXAMPLES_NXLINES_EXTERNINIT=n
#
# Settings for examples/touchscreen
#
-CONFIG_EXAMPLES_TOUCHSCREEN_BUILTIN=y
CONFIG_EXAMPLES_TOUCHSCREEN_MINOR=0
CONFIG_EXAMPLES_TOUCHSCREEN_DEVPATH="/dev/input0"
CONFIG_EXAMPLES_TOUCHSCREEN_NSAMPLES=25
@@ -744,7 +739,6 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n
#
# Settings for examples/usbstorage
#
-CONFIG_EXAMPLES_USBMSC_BUILTIN=y
CONFIG_EXAMPLES_USBMSC_NLUNS=1
CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0
CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0"
@@ -757,7 +751,6 @@ CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n
#
# Settings for examples/usbterm
#
-CONFIG_EXAMPLES_USBTERM_BUILTIN=y
CONFIG_EXAMPLES_USBTERM_DEVINIT=y
#CONFIG_EXAMPLES_USBTERM_BUFLEN
CONFIG_EXAMPLES_USBTERM_TRACEINIT=n
diff --git a/nuttx/configs/pic32mx7mmb/ostest/defconfig b/nuttx/configs/pic32mx7mmb/ostest/defconfig
index 1148aac37..70f6db37e 100644
--- a/nuttx/configs/pic32mx7mmb/ostest/defconfig
+++ b/nuttx/configs/pic32mx7mmb/ostest/defconfig
@@ -595,7 +595,6 @@ CONFIG_NSH_MMCSDMINOR=0
#
# I2C tool settings
#
-CONFIG_I2CTOOL_BUILTIN=y
CONFIG_I2CTOOL_MINBUS=1
CONFIG_I2CTOOL_MAXBUS=4
#CONFIG_I2CTOOL_MINADDR
@@ -624,7 +623,6 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n
#
# Settings for examples/usbstorage
#
-CONFIG_EXAMPLES_USBMSC_BUILTIN=n
CONFIG_EXAMPLES_USBMSC_NLUNS=1
CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0
CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0"
@@ -637,7 +635,6 @@ CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n
#
# Settings for examples/usbterm
#
-CONFIG_EXAMPLES_USBTERM_BUILTIN=y
CONFIG_EXAMPLES_USBTERM_DEVINIT=y
#CONFIG_EXAMPLES_USBTERM_BUFLEN
CONFIG_EXAMPLES_USBTERM_TRACEINIT=n
diff --git a/nuttx/configs/pic32mx7mmb/src/up_usbmsc.c b/nuttx/configs/pic32mx7mmb/src/up_usbmsc.c
index d1f473d4f..5ec64336c 100644
--- a/nuttx/configs/pic32mx7mmb/src/up_usbmsc.c
+++ b/nuttx/configs/pic32mx7mmb/src/up_usbmsc.c
@@ -1,7 +1,7 @@
/****************************************************************************
* configs/pic32mx7mmb/src/up_usbmsc.c
*
- * Copyright (C) 2012 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2012, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -87,9 +87,9 @@ int usbmsc_archinitialize(void)
* this case, there is nothing further to be done here.
*/
-#ifndef CONFIG_EXAMPLES_USBMSC_BUILTIN
+#ifndef CONFIG_NSH_BUILTIN_APPS
# warning "Missing Logic"
-#endif /* CONFIG_EXAMPLES_USBMSC_BUILTIN */
+#endif /* CONFIG_NSH_BUILTIN_APPS */
return 0;
}
diff --git a/nuttx/configs/pic32mx7mmb/src/up_usbterm.c b/nuttx/configs/pic32mx7mmb/src/up_usbterm.c
index e9da92be8..7640befc7 100644
--- a/nuttx/configs/pic32mx7mmb/src/up_usbterm.c
+++ b/nuttx/configs/pic32mx7mmb/src/up_usbterm.c
@@ -2,7 +2,7 @@
* configs/pic32mx7mmb/src/up_usbterm.c
* arch/arm/src/board/up_usbterm.c
*
- * Copyright (C) 2012 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2012-2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -81,7 +81,7 @@ int usbterm_devinit(void)
* pic32mx_usbattach() will be called in nsh_archinitialize().
*/
-#ifndef CONFIG_EXAMPLES_USBTERM_BUILTIN
+#ifndef CONFIG_NSH_BUILTIN_APPS
pic32mx_usbattach();
#endif
return OK;
diff --git a/nuttx/configs/sam3u-ek/README.txt b/nuttx/configs/sam3u-ek/README.txt
index fbda5d92c..6cb173e92 100644
--- a/nuttx/configs/sam3u-ek/README.txt
+++ b/nuttx/configs/sam3u-ek/README.txt
@@ -1,8 +1,8 @@
README
^^^^^^
-This README discusses issues unique to NuttX configurations for the
-Atmel SAM3U-EK development board.
+This README discusses issues unique to NuttX configurations for the Atmel
+SAM3U-EK development board featuring the ATAM3U
Contents
^^^^^^^^
@@ -91,7 +91,7 @@ IDEs
NuttX is built using command-line make. It can be used with an IDE, but some
effort will be required to create the project (There is a simple RIDE project
in the RIDE subdirectory).
-
+
Makefile Build
--------------
Under Eclipse, it is pretty easy to set up an "empty makefile project" and
@@ -188,7 +188,7 @@ NXFLAT Toolchain
tools -- just the NXFLAT tools. The buildroot with the NXFLAT tools can
be downloaded from the NuttX SourceForge download site
(https://sourceforge.net/projects/nuttx/files/).
-
+
This GNU toolchain builds and executes in the Linux or Cygwin environment.
1. You must have already configured Nuttx in <some-dir>/nuttx.
@@ -313,15 +313,28 @@ SAM3U-EK-specific Configuration Options
Individual subsystems can be enabled:
- CONFIG_SAM34_DMA
- CONFIG_SAM34_HSMCI
- CONFIG_SAM34_NAND
- CONFIG_SAM34_SPI
- CONFIG_SAM34_UART
- CONFIG_SAM34_USART0
- CONFIG_SAM34_USART1
- CONFIG_SAM34_USART2
- CONFIG_SAM34_USART3
+ CONFIG_SAM34_RTC - Real Time Clock
+ CONFIG_SAM34_RTT - Real Time Timer
+ CONFIG_SAM34_WDT - Watchdog Timer
+ CONFIG_SAM34_UART0 - UART 0
+ CONFIG_SAM34_SMC - Static Memory Controller
+ CONFIG_SAM34_USART0 - USART 0
+ CONFIG_SAM34_USART1 - USART 1
+ CONFIG_SAM34_USART2 - USART 2
+ CONFIG_SAM34_USART3 - USART 3
+ CONFIG_SAM34_HSMCI - High Speed Multimedia Card Interface
+ CONFIG_SAM34_TWI0 - Two-Wire Interface 0
+ CONFIG_SAM34_TWI1 - Two-Wire Interface 1
+ CONFIG_SAM34_SPI - Serial Peripheral Interface
+ CONFIG_SAM34_SSC - Synchronous Serial Controller
+ CONFIG_SAM34_TC0 - Timer Counter 0
+ CONFIG_SAM34_TC1 - Timer Counter 1
+ CONFIG_SAM34_TC2 - Timer Counter 2
+ CONFIG_SAM34_PWM - Pulse Width Modulation Controller
+ CONFIG_SAM34_ADC12B - 12-bit ADC Controller
+ CONFIG_SAM34_ADC - 10-bit ADC Controller
+ CONFIG_SAM34_DMA - DMA Controller
+ CONFIG_SAM34_UDPHS - USB Device High Speed
Some subsystems can be configured to operate in different ways. The drivers
need to know how to configure the subsystem.
@@ -333,6 +346,7 @@ SAM3U-EK-specific Configuration Options
CONFIG_USART1_ISUART
CONFIG_USART2_ISUART
CONFIG_USART3_ISUART
+ CONFIG_SAM34_NAND - NAND memory
AT91SAM3U specific device driver settings
@@ -357,25 +371,42 @@ SAM3U-EK-specific Configuration Options
Configurations
^^^^^^^^^^^^^^
-Each SAM3U-EK configuration is maintained in a sub-directory and
-can be selected as follow:
+ Each SAM3U-EK configuration is maintained in a sub-directory and
+ can be selected as follow:
cd tools
./configure.sh sam3u-ek/<subdir>
cd -
. ./setenv.sh
-Before sourcing the setenv.sh file above, you should examine it and perform
-edits as necessary so that BUILDROOT_BIN is the correct path to the directory
-than holds your toolchain binaries.
+ Before sourcing the setenv.sh file above, you should examine it and perform
+ edits as necessary so that BUILDROOT_BIN is the correct path to the directory
+ than holds your toolchain binaries.
-And then build NuttX by simply typing the following. At the conclusion of
-the make, the nuttx binary will reside in an ELF file called, simply, nuttx.
+ And then build NuttX by simply typing the following. At the conclusion of
+ the make, the nuttx binary will reside in an ELF file called, simply, nuttx.
make
-The <subdir> that is provided above as an argument to the tools/configure.sh
-must be is one of the following:
+ The <subdir> that is provided above as an argument to the tools/configure.sh
+ must be is one of the following.
+
+ NOTES:
+
+ 1. These configurations use the mconf-based configuration tool. To
+ change any of these configurations using that tool, you should:
+
+ a. Build and install the kconfig-mconf tool. See nuttx/README.txt
+ and misc/tools/
+
+ b. Execute 'make menuconfig' in nuttx/ in order to start the
+ reconfiguration process.
+
+ 2. Unless stated otherwise, all configurations generate console
+ output of UART0 (J3).
+
+Configuration sub-directories
+-----------------------------
knsh:
This is identical to the nsh configuration below except that NuttX
@@ -392,23 +423,14 @@ must be is one of the following:
binaries (pass2)
NOTES:
-
- 1. This configuration uses the mconf-based configuration tool. To
- change this configuration using that tool, you should:
-
- a. Build and install the kconfig-mconf tool. See nuttx/README.txt
- and misc/tools/README.txt.
- b. Execute 'make menuconfig' in nuttx/ in order to start the
- reconfiguration process.
-
- 2. Uses the older, OABI, buildroot toolchain. But that is easily
- reconfigured:
+ 1. This configuration uses the older, OABI, buildroot toolchain. But
+ that is easily reconfigured:
CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT=y : Buildroot toolchain
CONFIG_ARMV7M_OABI_TOOLCHAIN=y : Older, OABI toolchain
- 3. At the end of the build, there will be several files in the top-level
+ 2. At the end of the build, there will be several files in the top-level
NuttX build directory:
PASS1:
@@ -424,7 +446,7 @@ must be is one of the following:
The J-Link programmer will except files in .hex, .mot, .srec, and .bin
formats.
- 4. Combining .hex files. If you plan to use the .hex files with your
+ 3. Combining .hex files. If you plan to use the .hex files with your
debugger or FLASH utility, then you may need to combine the two hex
files into a single .hex file. Here is how you can do that.
@@ -472,18 +494,71 @@ must be is one of the following:
Configures the NuttShell (nsh) located at examples/nsh. The
Configuration enables both the serial and telnetd NSH interfaces.
+ NOTES:
+
+ 1. This configuration uses the older, OABI, buildroot toolchain. But
+ that is easily reconfigured:
+
+ System Type:
+ CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT=y : Buildroot toolchain
+ CONFIG_ARMV7M_OABI_TOOLCHAIN=y : Older, OABI toolchain
+
+ 2. NSH built-in applications are supported. However, there are
+ no built-in applications built with the default configuration.
+
+ Binary Formats:
+ CONFIG_BUILTIN=y : Enable support for built-in programs
+
+ Applicaton Configuration:
+ CONFIG_NSH_BUILTIN_APPS=y : Enable starting apps from NSH command line
+
+ 3. This configuration has been used for verifying the touchscreen on
+ on the SAM3U-EK LCD. With these modifications, you can include the
+ touchscreen test program at apps/examples/touchscreen as an NSH built-in
+ application. You can enable the touchscreen and test by modifying the
+ default configuration in the following ways:
+
+ Drivers:
+ CONFIG_INPUT=y : Enable support for input devices
+ CONFIG_INPUT_ADS7843E=y : Enable support for the XPT2048
+ CONFIG_ADS7843E_SPIDEV=0 : Use SPI for communication
+ CONFIG_ADS7843E_SPIMODE=0 : Use SPI mode 0
+ CONFIG_ADS7843E_THRESHX=39 : These will probably need to be tuned
+ CONFIG_ADS7843E_THRESHY=51
+ CONFIG_SPI=y : Enable SPI support
+ CONFIG_SPI_EXCHANGE=n : exchange() method is not supported
+
+ System Type:
+ CONFIG_GPIO_IRQ=y : GPIO interrupt support
+ CONFIG_GPIOA_IRQ=y : Enable GPIO interrupts from port A
+ CONFIG_SAM34_SPI=y : Enable support for SPI
+
+ RTOS Features:
+ CONFIG_DISABLE_SIGNALS=n : Signals are required
+
+ Library Support:
+ CONFIG_SCHED_WORKQUEUE=y : Work queue support required
+
+ Applicaton Configuration:
+ CONFIG_EXAMPLES_TOUCHSCREEN=y : Enable the touchscreen built-int test
+
+ Defaults should be okay for related touchscreen settings. Touchscreen
+ debug output on UART0 can be enabled with:
+
+ Build Setup:
+ CONFIG_DEBUG=y : Enable debug features
+ CONFIG_DEBUG_VERBOSE=y : Enable verbose debug output
+ CONFIG_DEBUG_INPUT=y : Enable debug output from input devices
+
+ NOTE:
+ As of this writing, the touchscreen is not functional (no
+ interrupts). More work is needed.
+
nx:
- Configures to use examples/nx using the HX834x LCD hardwar on
+ Configures to use examples/nx using the HX834x LCD hardware on
the SAM3U-EK development board.
ostest:
This configuration directory, performs a simple OS test using
examples/ostest. By default, this project assumes that you are
using the DFU bootloader.
-
- touchscreen:
- This configuration implements an NSH configuratin with several
- built-in applications. The configuration is called touchscreen
- because we intend to use this configuration to develop the
- SAM3U-EK touchscreen. However, there is no touchscreen driver
- in place as of this writing.
diff --git a/nuttx/configs/sam3u-ek/include/board.h b/nuttx/configs/sam3u-ek/include/board.h
index b5e112479..98b3e74b6 100644
--- a/nuttx/configs/sam3u-ek/include/board.h
+++ b/nuttx/configs/sam3u-ek/include/board.h
@@ -33,8 +33,8 @@
*
************************************************************************************/
-#ifndef __ARCH_BOARD_BOARD_H
-#define __ARCH_BOARD_BOARD_H
+#ifndef __ARCH_SAM3U_EK_INCLUDE_BOARD_H
+#define __ARCH_SAM3U_EK_INCLUDE_BOARD_H
/************************************************************************************
* Included Files
@@ -60,14 +60,14 @@
/* Main oscillator register settings */
-#define BOARD_CKGR_MOR_MOSCXTST (63 << CKGR_MOR_MOSCXTST_SHIFT) /* Start-up Time */
+#define BOARD_CKGR_MOR_MOSCXTST (63 << PMC_CKGR_MOR_MOSCXTST_SHIFT) /* Start-up Time */
/* PLLA configuration */
-#define BOARD_CKGR_PLLAR_MULA (7 << CKGR_PLLAR_MULA_SHIFT)
-#define BOARD_CKGR_PLLAR_STMODE CKGR_PLLAR_STMODE_FAST
-#define BOARD_CKGR_PLLAR_PLLACOUNT (63 << CKGR_PLLAR_PLLACOUNT_SHIFT)
-#define BOARD_CKGR_PLLAR_DIVA CKGR_PLLAR_DIVA_BYPASS
+#define BOARD_CKGR_PLLAR_MUL (7 << PMC_CKGR_PLLAR_MUL_SHIFT)
+#define BOARD_CKGR_PLLAR_STMODE PMC_CKGR_PLLAR_STMODE_FAST
+#define BOARD_CKGR_PLLAR_COUNT (63 << PMC_CKGR_PLLAR_COUNT_SHIFT)
+#define BOARD_CKGR_PLLAR_DIV PMC_CKGR_PLLAR_DIV_BYPASS
/* PMC master clock register settings */
@@ -76,14 +76,14 @@
/* USB UTMI PLL start-up time */
-#define BOARD_CKGR_UCKR_UPLLCOUNT (3 << CKGR_UCKR_UPLLCOUNT_SHIFT)
+#define BOARD_CKGR_UCKR_UPLLCOUNT (3 << PMC_CKGR_UCKR_UPLLCOUNT_SHIFT)
/* Resulting frequencies */
-#define SAM_MAINOSC_FREQUENCY (12000000)
-#define SAM_MCK_FREQUENCY (48000000)
-#define SAM_PLLA_FREQUENCY (96000000)
-#define SAM_CPU_FREQUENCY (48000000)
+#define BOARD_MAINOSC_FREQUENCY (12000000)
+#define BOARD_MCK_FREQUENCY (48000000)
+#define BOARD_PLLA_FREQUENCY (96000000)
+#define BOARD_CPU_FREQUENCY (48000000)
/* HSMCI clocking
*
@@ -96,16 +96,20 @@
/* MCK = 48MHz, CLKDIV = 59, MCI_SPEED = 48MHz / 2 * (59+1) = 400 KHz */
-#define HSMCI_INIT_CLKDIV (59 << HSMCI_MR_CLKDIV_SHIFT)
+#define HSMCI_INIT_CLKDIV (59 << HSMCI_MR_CLKDIV_SHIFT)
/* MCK = 48MHz, CLKDIV = 1, MCI_SPEED = 48MHz / 2 * (1+1) = 12 MHz */
-#define HSMCI_MMCXFR_CLKDIV (3 << HSMCI_MR_CLKDIV_SHIFT)
+#define HSMCI_MMCXFR_CLKDIV (3 << HSMCI_MR_CLKDIV_SHIFT)
/* MCK = 48MHz, CLKDIV = 0, MCI_SPEED = 48MHz / 2 * (0+1) = 24 MHz */
-#define HSMCI_SDXFR_CLKDIV (0 << HSMCI_MR_CLKDIV_SHIFT)
-#define HSMCI_SDWIDEXFR_CLKDIV HSMCI_SDXFR_CLKDIV
+#define HSMCI_SDXFR_CLKDIV (0 << HSMCI_MR_CLKDIV_SHIFT)
+#define HSMCI_SDWIDEXFR_CLKDIV HSMCI_SDXFR_CLKDIV
+
+/* FLASH wait states */
+
+#define BOARD_FWS 2
/* LED definitions ******************************************************************/
@@ -201,4 +205,4 @@ xcpt_t up_irqbutton(int id, xcpt_t irqhandler);
#endif
#endif /* __ASSEMBLY__ */
-#endif /* __ARCH_BOARD_BOARD_H */
+#endif /* __ARCH_SAM3U_EK_INCLUDE_BOARD_H */
diff --git a/nuttx/configs/sam3u-ek/knsh/defconfig b/nuttx/configs/sam3u-ek/knsh/defconfig
index 82bb5d021..8411ea3c7 100644
--- a/nuttx/configs/sam3u-ek/knsh/defconfig
+++ b/nuttx/configs/sam3u-ek/knsh/defconfig
@@ -85,6 +85,7 @@ CONFIG_ARCH_CORTEXM3=y
CONFIG_ARCH_FAMILY="armv7-m"
CONFIG_ARCH_CHIP="sam34"
# CONFIG_ARMV7M_USEBASEPRI is not set
+# CONFIG_ARCH_HAVE_FPU is not set
CONFIG_ARCH_HAVE_MPU=y
CONFIG_ARMV7M_MPU=y
CONFIG_ARMV7M_MPU_NREGIONS=8
@@ -97,37 +98,76 @@ CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT=y
# CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL is not set
# CONFIG_ARMV7M_TOOLCHAIN_GNU_EABI is not set
CONFIG_ARMV7M_OABI_TOOLCHAIN=y
+# CONFIG_GPIO_IRQ is not set
# CONFIG_SDIO_DMA is not set
# CONFIG_SDIO_WIDTH_D1_ONLY is not set
#
-# AT91SAM3/SAM4 Configuration Options
+# AT91SAM3/4 Configuration Options
#
CONFIG_ARCH_CHIP_AT91SAM3U4E=y
+# CONFIG_ARCH_CHIP_SAM34_NDMACHANC2C is not set
+# CONFIG_ARCH_CHIP_ATSAM4LC2B is not set
+# CONFIG_ARCH_CHIP_ATSAM4LC2A is not set
+# CONFIG_ARCH_CHIP_ATSAM4LC4C is not set
+# CONFIG_ARCH_CHIP_ATSAM4LC4B is not set
+# CONFIG_ARCH_CHIP_ATSAM4LC4A is not set
+# CONFIG_ARCH_CHIP_ATSAM4LS2C is not set
+# CONFIG_ARCH_CHIP_ATSAM4LS2B is not set
+# CONFIG_ARCH_CHIP_ATSAM4LS2A is not set
+# CONFIG_ARCH_CHIP_ATSAM4LS4C is not set
+# CONFIG_ARCH_CHIP_ATSAM4LS4B is not set
+# CONFIG_ARCH_CHIP_ATSAM4LS4A is not set
+# CONFIG_ARCH_CHIP_ATSAM4SD32C is not set
+# CONFIG_ARCH_CHIP_ATSAM4SD32B is not set
+# CONFIG_ARCH_CHIP_ATSAM4SD16C is not set
+# CONFIG_ARCH_CHIP_ATSAM4SD16B is not set
+# CONFIG_ARCH_CHIP_ATSAM4SA16C is not set
+# CONFIG_ARCH_CHIP_ATSAM4SA16B is not set
+# CONFIG_ARCH_CHIP_ATSAM4S16C is not set
+# CONFIG_ARCH_CHIP_ATSAM4S16B is not set
+# CONFIG_ARCH_CHIP_ATSAM4S8C is not set
+# CONFIG_ARCH_CHIP_ATSAM4S8B is not set
CONFIG_ARCH_CHIP_SAM3U=y
-
-#
-# AT91SAM3 Peripheral Support
-#
-# CONFIG_SAM34_DMA is not set
-# CONFIG_SAM34_NAND is not set
-# CONFIG_SAM34_HSMCI is not set
-CONFIG_SAM34_UART=y
+# CONFIG_ARCH_CHIP_SAM4L is not set
+# CONFIG_ARCH_CHIP_SAM4S is not set
+
+#
+# AT91SAM3/4 Peripheral Support
+#
+# CONFIG_SAM34_SPI is not set
+# CONFIG_SAM34_SSC is not set
+# CONFIG_SAM34_TC0 is not set
+# CONFIG_SAM34_TC1 is not set
+# CONFIG_SAM34_TC2 is not set
+# CONFIG_SAM34_PWM is not set
+# CONFIG_SAM34_TWIM0 is not set
+# CONFIG_SAM34_TWIS0 is not set
+# CONFIG_SAM34_TWIM1 is not set
+# CONFIG_SAM34_TWIS1 is not set
+CONFIG_SAM34_UART0=y
# CONFIG_SAM34_USART0 is not set
# CONFIG_SAM34_USART1 is not set
# CONFIG_SAM34_USART2 is not set
# CONFIG_SAM34_USART3 is not set
+# CONFIG_SAM34_ADC12B is not set
+# CONFIG_SAM34_ADC is not set
+# CONFIG_SAM34_SMC is not set
+# CONFIG_SAM34_NAND is not set
+# CONFIG_SAM34_DMA is not set
+# CONFIG_SAM34_UDPHS is not set
+# CONFIG_SAM34_RTC is not set
+# CONFIG_SAM34_RTT is not set
+# CONFIG_SAM34_WDT is not set
+# CONFIG_SAM34_HSMCI is not set
#
-# AT91SAM3 UART Configuration
+# AT91SAM3/4 USART Configuration
#
#
-# AT91SAM3 GPIO Interrupt Configuration
+# AT91SAM3/4 GPIO Interrupt Configuration
#
-# CONFIG_GPIOA_IRQ is not set
-# CONFIG_GPIOB_IRQ is not set
-# CONFIG_GPIOC_IRQ is not set
#
# External Memory Configuration
@@ -145,7 +185,8 @@ CONFIG_ARCH_IRQPRIO=y
CONFIG_ARCH_HAVE_VFORK=y
CONFIG_ARCH_STACKDUMP=y
# CONFIG_ENDIAN_BIG is not set
-# CONFIG_ARCH_HAVE_RAMFUNCS is not set
+CONFIG_ARCH_HAVE_RAMFUNCS=y
+# CONFIG_ARCH_RAMFUNCS is not set
CONFIG_ARCH_HAVE_RAMVECTORS=y
# CONFIG_ARCH_RAMVECTORS is not set
@@ -297,21 +338,25 @@ CONFIG_SDIO_BLOCKSETUP=y
CONFIG_SERIAL=y
# CONFIG_DEV_LOWCONSOLE is not set
# CONFIG_16550_UART is not set
-CONFIG_ARCH_HAVE_UART=y
+CONFIG_ARCH_HAVE_UART0=y
CONFIG_MCU_SERIAL=y
CONFIG_STANDARD_SERIAL=y
-CONFIG_UART_SERIAL_CONSOLE=y
+CONFIG_UART0_SERIAL_CONSOLE=y
# CONFIG_NO_SERIAL_CONSOLE is not set
#
-# UART Configuration
+# UART0 Configuration
#
-CONFIG_UART_RXBUFSIZE=256
-CONFIG_UART_TXBUFSIZE=256
-CONFIG_UART_BAUD=115200
-CONFIG_UART_BITS=8
-CONFIG_UART_PARITY=0
-CONFIG_UART_2STOP=0
+CONFIG_UART0_RXBUFSIZE=256
+CONFIG_UART0_TXBUFSIZE=256
+CONFIG_UART0_BAUD=115200
+CONFIG_UART0_BITS=8
+CONFIG_UART0_PARITY=0
+CONFIG_UART0_2STOP=0
+# CONFIG_UART0_IFLOWCONTROL is not set
+# CONFIG_UART0_OFLOWCONTROL is not set
+# CONFIG_SERIAL_IFLOWCONTROL is not set
+# CONFIG_SERIAL_OFLOWCONTROL is not set
# CONFIG_USBDEV is not set
# CONFIG_USBHOST is not set
# CONFIG_WIRELESS is not set
@@ -588,6 +633,7 @@ CONFIG_NSH_DISABLE_PS=y
CONFIG_NSH_CODECS_BUFSIZE=128
CONFIG_NSH_FILEIOSIZE=512
CONFIG_NSH_LINELEN=64
+CONFIG_NSH_MAXARGUMENTS=6
CONFIG_NSH_NESTDEPTH=3
# CONFIG_NSH_DISABLESCRIPT is not set
# CONFIG_NSH_DISABLEBG is not set
diff --git a/nuttx/configs/sam3u-ek/nsh/defconfig b/nuttx/configs/sam3u-ek/nsh/defconfig
index ef2475c1b..2f0e524ab 100644
--- a/nuttx/configs/sam3u-ek/nsh/defconfig
+++ b/nuttx/configs/sam3u-ek/nsh/defconfig
@@ -80,6 +80,7 @@ CONFIG_ARCH_CORTEXM3=y
CONFIG_ARCH_FAMILY="armv7-m"
CONFIG_ARCH_CHIP="sam34"
# CONFIG_ARMV7M_USEBASEPRI is not set
+# CONFIG_ARCH_HAVE_FPU is not set
CONFIG_ARCH_HAVE_MPU=y
# CONFIG_ARMV7M_MPU is not set
@@ -91,35 +92,74 @@ CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT=y
# CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL is not set
# CONFIG_ARMV7M_TOOLCHAIN_GNU_EABI is not set
CONFIG_ARMV7M_OABI_TOOLCHAIN=y
+# CONFIG_GPIO_IRQ is not set
#
-# AT91SAM3/SAM4 Configuration Options
+# AT91SAM3/4 Configuration Options
#
CONFIG_ARCH_CHIP_AT91SAM3U4E=y
+# CONFIG_ARCH_CHIP_SAM34_NDMACHANC2C is not set
+# CONFIG_ARCH_CHIP_ATSAM4LC2B is not set
+# CONFIG_ARCH_CHIP_ATSAM4LC2A is not set
+# CONFIG_ARCH_CHIP_ATSAM4LC4C is not set
+# CONFIG_ARCH_CHIP_ATSAM4LC4B is not set
+# CONFIG_ARCH_CHIP_ATSAM4LC4A is not set
+# CONFIG_ARCH_CHIP_ATSAM4LS2C is not set
+# CONFIG_ARCH_CHIP_ATSAM4LS2B is not set
+# CONFIG_ARCH_CHIP_ATSAM4LS2A is not set
+# CONFIG_ARCH_CHIP_ATSAM4LS4C is not set
+# CONFIG_ARCH_CHIP_ATSAM4LS4B is not set
+# CONFIG_ARCH_CHIP_ATSAM4LS4A is not set
+# CONFIG_ARCH_CHIP_ATSAM4SD32C is not set
+# CONFIG_ARCH_CHIP_ATSAM4SD32B is not set
+# CONFIG_ARCH_CHIP_ATSAM4SD16C is not set
+# CONFIG_ARCH_CHIP_ATSAM4SD16B is not set
+# CONFIG_ARCH_CHIP_ATSAM4SA16C is not set
+# CONFIG_ARCH_CHIP_ATSAM4SA16B is not set
+# CONFIG_ARCH_CHIP_ATSAM4S16C is not set
+# CONFIG_ARCH_CHIP_ATSAM4S16B is not set
+# CONFIG_ARCH_CHIP_ATSAM4S8C is not set
+# CONFIG_ARCH_CHIP_ATSAM4S8B is not set
CONFIG_ARCH_CHIP_SAM3U=y
-
-#
-# AT91SAM3 Peripheral Support
-#
-# CONFIG_SAM34_DMA is not set
-# CONFIG_SAM34_NAND is not set
-# CONFIG_SAM34_HSMCI is not set
-CONFIG_SAM34_UART=y
+# CONFIG_ARCH_CHIP_SAM4L is not set
+# CONFIG_ARCH_CHIP_SAM4S is not set
+
+#
+# AT91SAM3/4 Peripheral Support
+#
+# CONFIG_SAM34_SPI is not set
+# CONFIG_SAM34_SSC is not set
+# CONFIG_SAM34_TC0 is not set
+# CONFIG_SAM34_TC1 is not set
+# CONFIG_SAM34_TC2 is not set
+# CONFIG_SAM34_PWM is not set
+# CONFIG_SAM34_TWIM0 is not set
+# CONFIG_SAM34_TWIS0 is not set
+# CONFIG_SAM34_TWIM1 is not set
+# CONFIG_SAM34_TWIS1 is not set
+CONFIG_SAM34_UART0=y
# CONFIG_SAM34_USART0 is not set
# CONFIG_SAM34_USART1 is not set
# CONFIG_SAM34_USART2 is not set
# CONFIG_SAM34_USART3 is not set
+# CONFIG_SAM34_ADC12B is not set
+# CONFIG_SAM34_ADC is not set
+# CONFIG_SAM34_SMC is not set
+# CONFIG_SAM34_NAND is not set
+# CONFIG_SAM34_DMA is not set
+# CONFIG_SAM34_UDPHS is not set
+# CONFIG_SAM34_RTC is not set
+# CONFIG_SAM34_RTT is not set
+# CONFIG_SAM34_WDT is not set
+# CONFIG_SAM34_HSMCI is not set
#
-# AT91SAM3 UART Configuration
+# AT91SAM3/4 USART Configuration
#
#
-# AT91SAM3 GPIO Interrupt Configuration
+# AT91SAM3/4 GPIO Interrupt Configuration
#
-# CONFIG_GPIOA_IRQ is not set
-# CONFIG_GPIOB_IRQ is not set
-# CONFIG_GPIOC_IRQ is not set
#
# External Memory Configuration
@@ -137,7 +177,8 @@ CONFIG_ARCH_IRQPRIO=y
CONFIG_ARCH_HAVE_VFORK=y
CONFIG_ARCH_STACKDUMP=y
# CONFIG_ENDIAN_BIG is not set
-# CONFIG_ARCH_HAVE_RAMFUNCS is not set
+CONFIG_ARCH_HAVE_RAMFUNCS=y
+# CONFIG_ARCH_RAMFUNCS is not set
CONFIG_ARCH_HAVE_RAMVECTORS=y
# CONFIG_ARCH_RAMVECTORS is not set
@@ -273,21 +314,25 @@ CONFIG_DEV_NULL=y
CONFIG_SERIAL=y
# CONFIG_DEV_LOWCONSOLE is not set
# CONFIG_16550_UART is not set
-CONFIG_ARCH_HAVE_UART=y
+CONFIG_ARCH_HAVE_UART0=y
CONFIG_MCU_SERIAL=y
CONFIG_STANDARD_SERIAL=y
-CONFIG_UART_SERIAL_CONSOLE=y
+CONFIG_UART0_SERIAL_CONSOLE=y
# CONFIG_NO_SERIAL_CONSOLE is not set
#
-# UART Configuration
+# UART0 Configuration
#
-CONFIG_UART_RXBUFSIZE=256
-CONFIG_UART_TXBUFSIZE=256
-CONFIG_UART_BAUD=115200
-CONFIG_UART_BITS=8
-CONFIG_UART_PARITY=0
-CONFIG_UART_2STOP=0
+CONFIG_UART0_RXBUFSIZE=256
+CONFIG_UART0_TXBUFSIZE=256
+CONFIG_UART0_BAUD=115200
+CONFIG_UART0_BITS=8
+CONFIG_UART0_PARITY=0
+CONFIG_UART0_2STOP=0
+# CONFIG_UART0_IFLOWCONTROL is not set
+# CONFIG_UART0_OFLOWCONTROL is not set
+# CONFIG_SERIAL_IFLOWCONTROL is not set
+# CONFIG_SERIAL_OFLOWCONTROL is not set
# CONFIG_USBDEV is not set
# CONFIG_USBHOST is not set
# CONFIG_WIRELESS is not set
@@ -323,6 +368,7 @@ CONFIG_FS_FAT=y
# CONFIG_FS_NXFFS is not set
# CONFIG_FS_ROMFS is not set
# CONFIG_FS_SMARTFS is not set
+# CONFIG_FS_BINFS is not set
#
# System Logging
@@ -355,7 +401,7 @@ CONFIG_MM_REGIONS=3
# CONFIG_BINFMT_EXEPATH is not set
# CONFIG_NXFLAT is not set
# CONFIG_ELF is not set
-# CONFIG_BUILTIN is not set
+CONFIG_BUILTIN=y
# CONFIG_PIC is not set
# CONFIG_SYMTAB_ORDEREDBYNAME is not set
@@ -408,6 +454,7 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512
#
# Built-In Applications
#
+CONFIG_BUILTIN_PROXY_STACKSIZE=1024
#
# Examples
@@ -443,7 +490,6 @@ CONFIG_EXAMPLES_NSH=y
# CONFIG_EXAMPLES_OSTEST is not set
# CONFIG_EXAMPLES_PASHELLO is not set
# CONFIG_EXAMPLES_PIPE is not set
-# CONFIG_EXAMPLES_POLL is not set
# CONFIG_EXAMPLES_POSIXSPAWN is not set
# CONFIG_EXAMPLES_QENCODER is not set
# CONFIG_EXAMPLES_RGMP is not set
@@ -451,6 +497,7 @@ CONFIG_EXAMPLES_NSH=y
# CONFIG_EXAMPLES_SENDMAIL is not set
# CONFIG_EXAMPLES_SERLOOP is not set
# CONFIG_EXAMPLES_SLCD is not set
+# CONFIG_EXAMPLES_SMART_TEST is not set
# CONFIG_EXAMPLES_SMART is not set
# CONFIG_EXAMPLES_TCPECHO is not set
# CONFIG_EXAMPLES_TELNETD is not set
@@ -505,6 +552,7 @@ CONFIG_EXAMPLES_NSH=y
# NSH Library
#
CONFIG_NSH_LIBRARY=y
+CONFIG_NSH_BUILTIN_APPS=y
#
# Disable Individual commands
@@ -556,6 +604,7 @@ CONFIG_NSH_LIBRARY=y
CONFIG_NSH_CODECS_BUFSIZE=128
CONFIG_NSH_FILEIOSIZE=512
CONFIG_NSH_LINELEN=64
+CONFIG_NSH_MAXARGUMENTS=6
CONFIG_NSH_NESTDEPTH=3
# CONFIG_NSH_DISABLESCRIPT is not set
# CONFIG_NSH_DISABLEBG is not set
@@ -565,7 +614,7 @@ CONFIG_NSH_CONSOLE=y
# USB Trace Support
#
# CONFIG_NSH_CONDEV is not set
-# CONFIG_NSH_ARCHINIT is not set
+CONFIG_NSH_ARCHINIT=y
#
# NxWidgets/NxWM
diff --git a/nuttx/configs/sam3u-ek/nx/defconfig b/nuttx/configs/sam3u-ek/nx/defconfig
index 7329bd2a4..feb302b27 100644
--- a/nuttx/configs/sam3u-ek/nx/defconfig
+++ b/nuttx/configs/sam3u-ek/nx/defconfig
@@ -80,6 +80,7 @@ CONFIG_ARCH_CORTEXM3=y
CONFIG_ARCH_FAMILY="armv7-m"
CONFIG_ARCH_CHIP="sam34"
# CONFIG_ARMV7M_USEBASEPRI is not set
+# CONFIG_ARCH_HAVE_FPU is not set
CONFIG_ARCH_HAVE_MPU=y
# CONFIG_ARMV7M_MPU is not set
@@ -91,35 +92,74 @@ CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT=y
# CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL is not set
# CONFIG_ARMV7M_TOOLCHAIN_GNU_EABI is not set
CONFIG_ARMV7M_OABI_TOOLCHAIN=y
+# CONFIG_GPIO_IRQ is not set
#
-# AT91SAM3/SAM4 Configuration Options
+# AT91SAM3/4 Configuration Options
#
CONFIG_ARCH_CHIP_AT91SAM3U4E=y
+# CONFIG_ARCH_CHIP_SAM34_NDMACHANC2C is not set
+# CONFIG_ARCH_CHIP_ATSAM4LC2B is not set
+# CONFIG_ARCH_CHIP_ATSAM4LC2A is not set
+# CONFIG_ARCH_CHIP_ATSAM4LC4C is not set
+# CONFIG_ARCH_CHIP_ATSAM4LC4B is not set
+# CONFIG_ARCH_CHIP_ATSAM4LC4A is not set
+# CONFIG_ARCH_CHIP_ATSAM4LS2C is not set
+# CONFIG_ARCH_CHIP_ATSAM4LS2B is not set
+# CONFIG_ARCH_CHIP_ATSAM4LS2A is not set
+# CONFIG_ARCH_CHIP_ATSAM4LS4C is not set
+# CONFIG_ARCH_CHIP_ATSAM4LS4B is not set
+# CONFIG_ARCH_CHIP_ATSAM4LS4A is not set
+# CONFIG_ARCH_CHIP_ATSAM4SD32C is not set
+# CONFIG_ARCH_CHIP_ATSAM4SD32B is not set
+# CONFIG_ARCH_CHIP_ATSAM4SD16C is not set
+# CONFIG_ARCH_CHIP_ATSAM4SD16B is not set
+# CONFIG_ARCH_CHIP_ATSAM4SA16C is not set
+# CONFIG_ARCH_CHIP_ATSAM4SA16B is not set
+# CONFIG_ARCH_CHIP_ATSAM4S16C is not set
+# CONFIG_ARCH_CHIP_ATSAM4S16B is not set
+# CONFIG_ARCH_CHIP_ATSAM4S8C is not set
+# CONFIG_ARCH_CHIP_ATSAM4S8B is not set
CONFIG_ARCH_CHIP_SAM3U=y
-
-#
-# AT91SAM3 Peripheral Support
-#
-# CONFIG_SAM34_DMA is not set
-# CONFIG_SAM34_NAND is not set
-# CONFIG_SAM34_HSMCI is not set
-CONFIG_SAM34_UART=y
+# CONFIG_ARCH_CHIP_SAM4L is not set
+# CONFIG_ARCH_CHIP_SAM4S is not set
+
+#
+# AT91SAM3/4 Peripheral Support
+#
+# CONFIG_SAM34_SPI is not set
+# CONFIG_SAM34_SSC is not set
+# CONFIG_SAM34_TC0 is not set
+# CONFIG_SAM34_TC1 is not set
+# CONFIG_SAM34_TC2 is not set
+# CONFIG_SAM34_PWM is not set
+# CONFIG_SAM34_TWIM0 is not set
+# CONFIG_SAM34_TWIS0 is not set
+# CONFIG_SAM34_TWIM1 is not set
+# CONFIG_SAM34_TWIS1 is not set
+CONFIG_SAM34_UART0=y
# CONFIG_SAM34_USART0 is not set
# CONFIG_SAM34_USART1 is not set
# CONFIG_SAM34_USART2 is not set
# CONFIG_SAM34_USART3 is not set
+# CONFIG_SAM34_ADC12B is not set
+# CONFIG_SAM34_ADC is not set
+# CONFIG_SAM34_SMC is not set
+# CONFIG_SAM34_NAND is not set
+# CONFIG_SAM34_DMA is not set
+# CONFIG_SAM34_UDPHS is not set
+# CONFIG_SAM34_RTC is not set
+# CONFIG_SAM34_RTT is not set
+# CONFIG_SAM34_WDT is not set
+# CONFIG_SAM34_HSMCI is not set
#
-# AT91SAM3 UART Configuration
+# AT91SAM3/4 USART Configuration
#
#
-# AT91SAM3 GPIO Interrupt Configuration
+# AT91SAM3/4 GPIO Interrupt Configuration
#
-# CONFIG_GPIOA_IRQ is not set
-# CONFIG_GPIOB_IRQ is not set
-# CONFIG_GPIOC_IRQ is not set
#
# External Memory Configuration
@@ -137,7 +177,8 @@ CONFIG_ARCH_IRQPRIO=y
CONFIG_ARCH_HAVE_VFORK=y
CONFIG_ARCH_STACKDUMP=y
# CONFIG_ENDIAN_BIG is not set
-# CONFIG_ARCH_HAVE_RAMFUNCS is not set
+CONFIG_ARCH_HAVE_RAMFUNCS=y
+# CONFIG_ARCH_RAMFUNCS is not set
CONFIG_ARCH_HAVE_RAMVECTORS=y
# CONFIG_ARCH_RAMVECTORS is not set
@@ -149,7 +190,7 @@ CONFIG_BOARD_LOOPSPERMSEC=4768
CONFIG_DRAM_START=0x20000000
CONFIG_DRAM_SIZE=32768
CONFIG_ARCH_HAVE_INTERRUPTSTACK=y
-CONFIG_ARCH_INTERRUPTSTACK=0
+CONFIG_ARCH_INTERRUPTSTACK=1024
#
# Boot options
@@ -281,8 +322,8 @@ CONFIG_LCD_MAXPOWER=31
# CONFIG_LCD_ST7567 is not set
# CONFIG_LCD_UG2864AMBAG01 is not set
# CONFIG_LCD_SSD1289 is not set
-CONFIG_LCD_LANDSCAPE=y
-# CONFIG_LCD_PORTRAIT is not set
+# CONFIG_LCD_LANDSCAPE is not set
+CONFIG_LCD_PORTRAIT=y
# CONFIG_LCD_RPORTRAIT is not set
# CONFIG_LCD_RLANDSCAPE is not set
@@ -299,21 +340,25 @@ CONFIG_LCD_LANDSCAPE=y
CONFIG_SERIAL=y
# CONFIG_DEV_LOWCONSOLE is not set
# CONFIG_16550_UART is not set
-CONFIG_ARCH_HAVE_UART=y
+CONFIG_ARCH_HAVE_UART0=y
CONFIG_MCU_SERIAL=y
CONFIG_STANDARD_SERIAL=y
-CONFIG_UART_SERIAL_CONSOLE=y
+CONFIG_UART0_SERIAL_CONSOLE=y
# CONFIG_NO_SERIAL_CONSOLE is not set
#
-# UART Configuration
+# UART0 Configuration
#
-CONFIG_UART_RXBUFSIZE=256
-CONFIG_UART_TXBUFSIZE=256
-CONFIG_UART_BAUD=115200
-CONFIG_UART_BITS=8
-CONFIG_UART_PARITY=0
-CONFIG_UART_2STOP=0
+CONFIG_UART0_RXBUFSIZE=256
+CONFIG_UART0_TXBUFSIZE=256
+CONFIG_UART0_BAUD=115200
+CONFIG_UART0_BITS=8
+CONFIG_UART0_PARITY=0
+CONFIG_UART0_2STOP=0
+# CONFIG_UART0_IFLOWCONTROL is not set
+# CONFIG_UART0_OFLOWCONTROL is not set
+# CONFIG_SERIAL_IFLOWCONTROL is not set
+# CONFIG_SERIAL_OFLOWCONTROL is not set
# CONFIG_USBDEV is not set
# CONFIG_USBHOST is not set
# CONFIG_WIRELESS is not set
@@ -378,9 +423,9 @@ CONFIG_NX_KBD=y
# Framed Window Borders
#
CONFIG_NXTK_BORDERWIDTH=4
-CONFIG_NXTK_BORDERCOLOR1=0
-CONFIG_NXTK_BORDERCOLOR2=0
-CONFIG_NXTK_BORDERCOLOR3=0
+CONFIG_NXTK_BORDERCOLOR1=0x5cb7
+CONFIG_NXTK_BORDERCOLOR2=0x21c9
+CONFIG_NXTK_BORDERCOLOR3=0xffdf
# CONFIG_NXTK_AUTORAISE is not set
#
diff --git a/nuttx/configs/sam3u-ek/ostest/defconfig b/nuttx/configs/sam3u-ek/ostest/defconfig
index 9152a0528..1cf406a93 100644
--- a/nuttx/configs/sam3u-ek/ostest/defconfig
+++ b/nuttx/configs/sam3u-ek/ostest/defconfig
@@ -80,6 +80,7 @@ CONFIG_ARCH_CORTEXM3=y
CONFIG_ARCH_FAMILY="armv7-m"
CONFIG_ARCH_CHIP="sam34"
# CONFIG_ARMV7M_USEBASEPRI is not set
+# CONFIG_ARCH_HAVE_FPU is not set
CONFIG_ARCH_HAVE_MPU=y
# CONFIG_ARMV7M_MPU is not set
@@ -91,35 +92,74 @@ CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT=y
# CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL is not set
# CONFIG_ARMV7M_TOOLCHAIN_GNU_EABI is not set
CONFIG_ARMV7M_OABI_TOOLCHAIN=y
+# CONFIG_GPIO_IRQ is not set
#
-# AT91SAM3/SAM4 Configuration Options
+# AT91SAM3/4 Configuration Options
#
CONFIG_ARCH_CHIP_AT91SAM3U4E=y
+# CONFIG_ARCH_CHIP_SAM34_NDMACHANC2C is not set
+# CONFIG_ARCH_CHIP_ATSAM4LC2B is not set
+# CONFIG_ARCH_CHIP_ATSAM4LC2A is not set
+# CONFIG_ARCH_CHIP_ATSAM4LC4C is not set
+# CONFIG_ARCH_CHIP_ATSAM4LC4B is not set
+# CONFIG_ARCH_CHIP_ATSAM4LC4A is not set
+# CONFIG_ARCH_CHIP_ATSAM4LS2C is not set
+# CONFIG_ARCH_CHIP_ATSAM4LS2B is not set
+# CONFIG_ARCH_CHIP_ATSAM4LS2A is not set
+# CONFIG_ARCH_CHIP_ATSAM4LS4C is not set
+# CONFIG_ARCH_CHIP_ATSAM4LS4B is not set
+# CONFIG_ARCH_CHIP_ATSAM4LS4A is not set
+# CONFIG_ARCH_CHIP_ATSAM4SD32C is not set
+# CONFIG_ARCH_CHIP_ATSAM4SD32B is not set
+# CONFIG_ARCH_CHIP_ATSAM4SD16C is not set
+# CONFIG_ARCH_CHIP_ATSAM4SD16B is not set
+# CONFIG_ARCH_CHIP_ATSAM4SA16C is not set
+# CONFIG_ARCH_CHIP_ATSAM4SA16B is not set
+# CONFIG_ARCH_CHIP_ATSAM4S16C is not set
+# CONFIG_ARCH_CHIP_ATSAM4S16B is not set
+# CONFIG_ARCH_CHIP_ATSAM4S8C is not set
+# CONFIG_ARCH_CHIP_ATSAM4S8B is not set
CONFIG_ARCH_CHIP_SAM3U=y
-
-#
-# AT91SAM3 Peripheral Support
-#
-# CONFIG_SAM34_DMA is not set
-# CONFIG_SAM34_NAND is not set
-# CONFIG_SAM34_HSMCI is not set
-CONFIG_SAM34_UART=y
+# CONFIG_ARCH_CHIP_SAM4L is not set
+# CONFIG_ARCH_CHIP_SAM4S is not set
+
+#
+# AT91SAM3/4 Peripheral Support
+#
+# CONFIG_SAM34_SPI is not set
+# CONFIG_SAM34_SSC is not set
+# CONFIG_SAM34_TC0 is not set
+# CONFIG_SAM34_TC1 is not set
+# CONFIG_SAM34_TC2 is not set
+# CONFIG_SAM34_PWM is not set
+# CONFIG_SAM34_TWIM0 is not set
+# CONFIG_SAM34_TWIS0 is not set
+# CONFIG_SAM34_TWIM1 is not set
+# CONFIG_SAM34_TWIS1 is not set
+CONFIG_SAM34_UART0=y
# CONFIG_SAM34_USART0 is not set
# CONFIG_SAM34_USART1 is not set
# CONFIG_SAM34_USART2 is not set
# CONFIG_SAM34_USART3 is not set
+# CONFIG_SAM34_ADC12B is not set
+# CONFIG_SAM34_ADC is not set
+# CONFIG_SAM34_SMC is not set
+# CONFIG_SAM34_NAND is not set
+# CONFIG_SAM34_DMA is not set
+# CONFIG_SAM34_UDPHS is not set
+# CONFIG_SAM34_RTC is not set
+# CONFIG_SAM34_RTT is not set
+# CONFIG_SAM34_WDT is not set
+# CONFIG_SAM34_HSMCI is not set
#
-# AT91SAM3 UART Configuration
+# AT91SAM3/4 USART Configuration
#
#
-# AT91SAM3 GPIO Interrupt Configuration
+# AT91SAM3/4 GPIO Interrupt Configuration
#
-# CONFIG_GPIOA_IRQ is not set
-# CONFIG_GPIOB_IRQ is not set
-# CONFIG_GPIOC_IRQ is not set
#
# External Memory Configuration
@@ -137,7 +177,8 @@ CONFIG_ARCH_IRQPRIO=y
CONFIG_ARCH_HAVE_VFORK=y
CONFIG_ARCH_STACKDUMP=y
# CONFIG_ENDIAN_BIG is not set
-# CONFIG_ARCH_HAVE_RAMFUNCS is not set
+CONFIG_ARCH_HAVE_RAMFUNCS=y
+# CONFIG_ARCH_RAMFUNCS is not set
CONFIG_ARCH_HAVE_RAMVECTORS=y
# CONFIG_ARCH_RAMVECTORS is not set
@@ -272,20 +313,24 @@ CONFIG_DEV_NULL=y
CONFIG_SERIAL=y
CONFIG_DEV_LOWCONSOLE=y
# CONFIG_16550_UART is not set
-CONFIG_ARCH_HAVE_UART=y
+CONFIG_ARCH_HAVE_UART0=y
CONFIG_MCU_SERIAL=y
-CONFIG_UART_SERIAL_CONSOLE=y
+CONFIG_UART0_SERIAL_CONSOLE=y
# CONFIG_NO_SERIAL_CONSOLE is not set
#
-# UART Configuration
+# UART0 Configuration
#
-CONFIG_UART_RXBUFSIZE=256
-CONFIG_UART_TXBUFSIZE=256
-CONFIG_UART_BAUD=115200
-CONFIG_UART_BITS=8
-CONFIG_UART_PARITY=0
-CONFIG_UART_2STOP=0
+CONFIG_UART0_RXBUFSIZE=256
+CONFIG_UART0_TXBUFSIZE=256
+CONFIG_UART0_BAUD=115200
+CONFIG_UART0_BITS=8
+CONFIG_UART0_PARITY=0
+CONFIG_UART0_2STOP=0
+# CONFIG_UART0_IFLOWCONTROL is not set
+# CONFIG_UART0_OFLOWCONTROL is not set
+# CONFIG_SERIAL_IFLOWCONTROL is not set
+# CONFIG_SERIAL_OFLOWCONTROL is not set
# CONFIG_USBDEV is not set
# CONFIG_USBHOST is not set
# CONFIG_WIRELESS is not set
@@ -429,7 +474,6 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512
# CONFIG_EXAMPLES_NXLINES is not set
# CONFIG_EXAMPLES_NXTEXT is not set
CONFIG_EXAMPLES_OSTEST=y
-# CONFIG_EXAMPLES_OSTEST_BUILTIN is not set
CONFIG_EXAMPLES_OSTEST_LOOPS=1
CONFIG_EXAMPLES_OSTEST_STACKSIZE=2048
CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=3
diff --git a/nuttx/configs/sam3u-ek/src/Makefile b/nuttx/configs/sam3u-ek/src/Makefile
index 8dbf0eae5..788a50620 100644
--- a/nuttx/configs/sam3u-ek/src/Makefile
+++ b/nuttx/configs/sam3u-ek/src/Makefile
@@ -42,7 +42,7 @@ AOBJS = $(ASRCS:.S=$(OBJEXT))
CSRCS = up_boot.c up_leds.c up_buttons.c up_spi.c up_usbdev.c
-ifeq ($(CONFIG_SAM34_HSMCI),y)
+ifeq ($(CONFIG_LCD),y)
CSRCS += up_lcd.c
endif
diff --git a/nuttx/configs/sam3u-ek/src/sam3u-ek.h b/nuttx/configs/sam3u-ek/src/sam3u-ek.h
index 21e0e2649..df53985cf 100644
--- a/nuttx/configs/sam3u-ek/src/sam3u-ek.h
+++ b/nuttx/configs/sam3u-ek/src/sam3u-ek.h
@@ -138,7 +138,12 @@
#define GPIO_LCD_BKL (GPIO_OUTPUT|GPIO_CFG_DEFAULT|GPIO_OUTPUT_CLEAR|GPIO_PORT_PIOC|GPIO_PIN19)
-/* Touchscreen controller (TSC) */
+/* Touchscreen controller (TSC)
+ *
+ * BUSY is high impedance when CS is high (not selected). When CS is
+ * is low, BUSY is active high. Since the pin is pulled up, it will appear
+ * busy if CS is not selected.
+ */
#define GPIO_TCS_IRQ (GPIO_INPUT|GPIO_CFG_PULLUP|GPIO_PORT_PIOA|GPIO_PIN24)
#define GPIO_TCS_BUSY (GPIO_INPUT|GPIO_CFG_PULLUP|GPIO_PORT_PIOA|GPIO_PIN2)
diff --git a/nuttx/configs/sam3u-ek/src/up_lcd.c b/nuttx/configs/sam3u-ek/src/up_lcd.c
index ebeb35d91..5951f7a18 100644
--- a/nuttx/configs/sam3u-ek/src/up_lcd.c
+++ b/nuttx/configs/sam3u-ek/src/up_lcd.c
@@ -88,7 +88,7 @@
* other custom usage).
*
* The SAM3U4E communicates with the LCD through PIOB where a 16-bit parallel
- * “8080-like” protocol data bus has to be implemented by software.
+ * 8080-like protocol data bus has to be implemented by software.
*
* LCD backlight is made of 4 white chip LEDs in parallel, driven by an AAT3194
* charge pump, MN4. The AAT3194 is controlled by the SAM3U4E through a single line
@@ -125,7 +125,7 @@
#include "up_arch.h"
#include "sam_gpio.h"
-#include "chip/sam_pmc.h"
+#include "chip/sam3u_pmc.h"
#include "chip/sam_smc.h"
#include "sam3u-ek.h"
@@ -910,7 +910,7 @@ int up_lcdinitialize(void)
putreg32(regval, SAM_SMCCS_SETUP(2));
regval = (5 << SMCCS_PULSE_NWEPULSE_SHIFT) | (18 << SMCCS_PULSE_NCSWRPULSE_SHIFT) |
- (5 << SMCCS_PULSE_RDPULSE_SHIFT) | (18 << SMCCS_PULSE_NCSRDPULSE_SHIFT);
+ (5 << SMCCS_PULSE_NRDPULSE_SHIFT) | (18 << SMCCS_PULSE_NCSRDPULSE_SHIFT);
putreg32(regval, SAM_SMCCS_PULSE(2));
regval = (22 << SMCCS_CYCLE_NWECYCLE_SHIFT) | (22 << SMCCS_CYCLE_NRDCYCLE_SHIFT);
diff --git a/nuttx/configs/sam3u-ek/src/up_nsh.c b/nuttx/configs/sam3u-ek/src/up_nsh.c
index dfa296117..ded7d5527 100644
--- a/nuttx/configs/sam3u-ek/src/up_nsh.c
+++ b/nuttx/configs/sam3u-ek/src/up_nsh.c
@@ -50,8 +50,6 @@
#include "sam_hsmci.h"
#include "sam3u-ek.h"
-#ifdef CONFIG_SAM34_HSMCI
-
/****************************************************************************
* Pre-Processor Definitions
****************************************************************************/
@@ -63,19 +61,10 @@
#define NSH_HAVE_USBDEV 1
#define NSH_HAVE_MMCSD 1
-#if defined(CONFIG_NSH_MMCSDSLOTNO) && CONFIG_NSH_MMCSDSLOTNO != 0
-# error "Only one MMC/SD slot"
-# undef CONFIG_NSH_MMCSDSLOTNO
-#endif
-
-#ifndef CONFIG_NSH_MMCSDSLOTNO
-# define CONFIG_NSH_MMCSDSLOTNO 0
-#endif
-
-/* Can't support USB features if USB is not enabled */
+/* Can't support MMC/SD if the card interface is not enable */
-#ifndef CONFIG_USBDEV
-# undef NSH_HAVE_USBDEV
+#ifndef CONFIG_SAM34_HSMCI
+# undef NSH_HAVE_MMCSD
#endif
/* Can't support MMC/SD features if mountpoints are disabled or if SDIO support
@@ -86,8 +75,25 @@
# undef NSH_HAVE_MMCSD
#endif
-#ifndef CONFIG_NSH_MMCSDMINOR
-# define CONFIG_NSH_MMCSDMINOR 0
+#ifdef NSH_HAVE_MMCSD
+# if defined(CONFIG_NSH_MMCSDSLOTNO) && CONFIG_NSH_MMCSDSLOTNO != 0
+# error "Only one MMC/SD slot"
+# undef CONFIG_NSH_MMCSDSLOTNO
+# endif
+
+# ifndef CONFIG_NSH_MMCSDMINOR
+# define CONFIG_NSH_MMCSDMINOR 0
+# endif
+
+# ifndef CONFIG_NSH_MMCSDSLOTNO
+# define CONFIG_NSH_MMCSDSLOTNO 0
+# endif
+#endif
+
+/* Can't support USB features if USB is not enabled */
+
+#ifndef CONFIG_USBDEV
+# undef NSH_HAVE_USBDEV
#endif
/* Debug ********************************************************************/
@@ -155,4 +161,3 @@ int nsh_archinitialize(void)
#endif
return OK;
}
-#endif
diff --git a/nuttx/configs/sam3u-ek/src/up_touchscreen.c b/nuttx/configs/sam3u-ek/src/up_touchscreen.c
index 251d9b624..f8b465748 100644
--- a/nuttx/configs/sam3u-ek/src/up_touchscreen.c
+++ b/nuttx/configs/sam3u-ek/src/up_touchscreen.c
@@ -183,7 +183,9 @@ static bool tsc_busy(FAR struct ads7843e_config_s *state)
static bool last = (bool)-1;
#endif
- /* REVISIT: This might need to be inverted */
+ /* BUSY is high impedance when CS is high (not selected). When CS is
+ * is low, BUSY is active high.
+ */
bool busy = sam_gpioread(GPIO_TCS_BUSY);
#if defined(CONFIG_DEBUG_INPUT) && defined(CONFIG_DEBUG_VERBOSE)
diff --git a/nuttx/configs/sam4l-xplained/README.txt b/nuttx/configs/sam4l-xplained/README.txt
index ea97942f7..6057223ec 100644
--- a/nuttx/configs/sam4l-xplained/README.txt
+++ b/nuttx/configs/sam4l-xplained/README.txt
@@ -15,7 +15,7 @@ Contents
- NuttX OABI "buildroot" Toolchain
- NXFLAT Toolchain
- LEDs
- - Virtual COM Port
+ - Serial Consoles
- SAM4L Xplained Pro-specific Configuration Options
- Configurations
@@ -243,8 +243,27 @@ LEDs
apparently, running normmally. If LED0 is flashing at approximately
2Hz, then a fatal error has been detected and the system has halted.
-Virtual COM Port
-^^^^^^^^^^^^^^^^
+Serial Consoles
+^^^^^^^^^^^^^^^
+
+ USART0
+ ------
+
+ USART is available on connectors EXT1 and EXT4
+
+ EXT1 TXT4 GPIO Function
+ ---- ---- ------ -----------
+ 13 13 PB00 USART0_RXD
+ 14 14 PB01 USART0_TXD
+ 19 19 GND
+ 20 20 VCC
+
+ If you have a TTL to RS-232 convertor then this is the most convenient
+ serial console to use. It is the default in all of these configurations.
+ An option is to use the virtual COM port.
+
+ Virtual COM Port
+ ----------------
The SAM4L Xplained Pro contains an Embedded Debugger (EDBG) that can be
used to program and debug the ATSAM4LC4C using Serial Wire Debug (SWD).
@@ -268,7 +287,7 @@ SAM4L Xplained Pro-specific Configuration Options
CONFIG_ARCH_architecture - For use in C code:
- CONFIG_ARCH_CORTEXM3=y
+ CONFIG_ARCH_CORTEXM4=y
CONFIG_ARCH_CHIP - Identifies the arch/*/chip subdirectory
@@ -278,8 +297,8 @@ SAM4L Xplained Pro-specific Configuration Options
chip:
CONFIG_ARCH_CHIP_SAM34
- CONFIG_ARCH_CHIP_SAM3U
- CONFIG_ARCH_CHIP_AT91SAM3U4
+ CONFIG_ARCH_CHIP_SAM4L
+ CONFIG_ARCH_CHIP_ATSAM4LC4C
CONFIG_ARCH_BOARD - Identifies the configs subdirectory and
hence, the board that supports the particular chip or SoC.
@@ -298,7 +317,7 @@ SAM4L Xplained Pro-specific Configuration Options
CONFIG_DRAM_SIZE - Describes the installed DRAM (SRAM in this case):
- CONFIG_DRAM_SIZE=0x0000c000 (48Kb)
+ CONFIG_DRAM_SIZE=0x00008000 (32Kb)
CONFIG_DRAM_START - The start address of installed DRAM
@@ -329,15 +348,61 @@ SAM4L Xplained Pro-specific Configuration Options
Individual subsystems can be enabled:
- CONFIG_SAM34_DMA
- CONFIG_SAM34_HSMCI
- CONFIG_SAM34_NAND
+ CPU
+ ---
+ CONFIG_SAM34_OCD
+
+ HSB
+ ---
+ CONFIG_SAM34_APBA
+ CONFIG_SAM34_AESA
+
+ PBA
+ ---
+ CONFIG_SAM34_IISC
CONFIG_SAM34_SPI
- CONFIG_SAM34_UART
+ CONFIG_SAM34_TC0
+ CONFIG_SAM34_TC1
+ CONFIG_SAM34_TWIM0
+ CONFIG_SAM34_TWIS0
+ CONFIG_SAM34_TWIM1
+ CONFIG_SAM34_TWIS1
CONFIG_SAM34_USART0
CONFIG_SAM34_USART1
CONFIG_SAM34_USART2
CONFIG_SAM34_USART3
+ CONFIG_SAM34_ADC12B
+ CONFIG_SAM34_DACC
+ CONFIG_SAM34_ACC
+ CONFIG_SAM34_GLOC
+ CONFIG_SAM34_ABDACB
+ CONFIG_SAM34_TRNG
+ CONFIG_SAM34_PARC
+ CONFIG_SAM34_CATB
+ CONFIG_SAM34_TWIM2
+ CONFIG_SAM34_TWIM3
+ CONFIG_SAM34_LCDCA
+
+ PBB
+ ---
+ CONFIG_SAM34_HRAMC1
+ CONFIG_SAM34_HMATRIX
+ CONFIG_SAM34_PDCA
+ CONFIG_SAM34_CRCCU
+ CONFIG_SAM34_USBC
+ CONFIG_SAM34_PEVC
+
+ PBC
+ ---
+ CONFIG_SAM34_CHIPID
+ CONFIG_SAM34_FREQM
+
+ PBD
+ ---
+ CONFIG_SAM34_AST
+ CONFIG_SAM34_WDT
+ CONFIG_SAM34_EIC
+ CONFIG_SAM34_PICOUART
Some subsystems can be configured to operate in different ways. The drivers
need to know how to configure the subsystem.
@@ -350,7 +415,7 @@ SAM4L Xplained Pro-specific Configuration Options
CONFIG_USART2_ISUART
CONFIG_USART3_ISUART
- AT91SAM3U specific device driver settings
+ ST91SAM4L specific device driver settings
CONFIG_U[S]ARTn_SERIAL_CONSOLE - selects the USARTn (n=0,1,2,3) or UART
m (m=4,5) for the console and ttys0 (default is the USART1).
@@ -363,36 +428,96 @@ SAM4L Xplained Pro-specific Configuration Options
CONFIG_U[S]ARTn_PARTIY - 0=no parity, 1=odd parity, 2=even parity
CONFIG_U[S]ARTn_2STOP - Two stop bits
- LCD Options. Other than the standard LCD configuration options
- (see configs/README.txt), the SAM4L Xplained Pro driver also supports:
-
- CONFIG_LCD_PORTRAIT - Present the display in the standard 240x320
- "Portrait" orientation. Default: The display is rotated to
- support a 320x240 "Landscape" orientation.
-
Configurations
^^^^^^^^^^^^^^
-Each SAM4L Xplained Pro configuration is maintained in a sub-directory and
-can be selected as follow:
+ Each SAM4L Xplained Pro configuration is maintained in a sub-directory and
+ can be selected as follow:
cd tools
./configure.shsam4l-xplained/<subdir>
cd -
. ./setenv.sh
-Before sourcing the setenv.sh file above, you should examine it and perform
-edits as necessary so that BUILDROOT_BIN is the correct path to the directory
-than holds your toolchain binaries.
+ Before sourcing the setenv.sh file above, you should examine it and perform
+ edits as necessary so that BUILDROOT_BIN is the correct path to the directory
+ than holds your toolchain binaries.
-And then build NuttX by simply typing the following. At the conclusion of
-the make, the nuttx binary will reside in an ELF file called, simply, nuttx.
+ And then build NuttX by simply typing the following. At the conclusion of
+ the make, the nuttx binary will reside in an ELF file called, simply, nuttx.
make
-The <subdir> that is provided above as an argument to the tools/configure.sh
-must be is one of the following:
+ The <subdir> that is provided above as an argument to the tools/configure.sh
+ must be is one of the following.
+
+ NOTE: These configurations use the mconf-based configuration tool. To
+ change any of these configurations using that tool, you should:
+
+ a. Build and install the kconfig-mconf tool. See nuttx/README.txt
+ and misc/tools/
+
+ b. Execute 'make menuconfig' in nuttx/ in order to start the
+ reconfiguration process.
+
+Configuration sub-directories
+-----------------------------
ostest:
- This configuration directory, performs a simple OS test using
+ This configuration directory performs a simple OS test using
examples/ostest.
+
+ NOTES:
+
+ 1. This configuration provides test output on USART0 which is available
+ on EXT1 or EXT4 (see the section "Serial Consoles" above). The
+ virtual COM port could be used, instead, by reconfiguring to use
+ USART1 instead of USART0:
+
+ System Type -> AT91SAM3/4 Peripheral Support
+ CONFIG_SAM_USART0=y
+ CONFIG_SAM_USART1=n
+
+ Device Drivers -> Serial Driver Support -> Serial Console
+ CONFIG_USART0_SERIAL_CONSOLE=y
+
+ Device Drivers -> Serial Driver Support -> USART0 Configuration
+ CONFIG_USART0_2STOP=0
+ CONFIG_USART0_BAUD=115200
+ CONFIG_USART0_BITS=8
+ CONFIG_USART0_PARITY=0
+ CONFIG_USART0_RXBUFSIZE=256
+ CONFIG_USART0_TXBUFSIZE=256
+
+ 2. This configuration is set up to use the NuttX OABI toolchain (see
+ above). Of course this can be reconfigured if you prefer a different
+ toolchain.
+
+ nsh:
+ This configuration directory will built the NuttShell.
+
+ NOTES:
+
+ 1. This configuration provides test output on USART0 which is available
+ on EXT1 or EXT4 (see the section "Serial Consoles" above). The
+ virtual COM port could be used, instead, by reconfiguring to use
+ USART1 instead of USART0:
+
+ System Type -> AT91SAM3/4 Peripheral Support
+ CONFIG_SAM_USART0=y
+ CONFIG_SAM_USART1=n
+
+ Device Drivers -> Serial Driver Support -> Serial Console
+ CONFIG_USART0_SERIAL_CONSOLE=y
+
+ Device Drivers -> Serial Driver Support -> USART0 Configuration
+ CONFIG_USART0_2STOP=0
+ CONFIG_USART0_BAUD=115200
+ CONFIG_USART0_BITS=8
+ CONFIG_USART0_PARITY=0
+ CONFIG_USART0_RXBUFSIZE=256
+ CONFIG_USART0_TXBUFSIZE=256
+
+ 2. This configuration is set up to use the NuttX OABI toolchain (see
+ above). Of course this can be reconfigured if you prefer a different
+ toolchain.
diff --git a/nuttx/configs/sam4l-xplained/include/board.h b/nuttx/configs/sam4l-xplained/include/board.h
index 4aaefd3fb..de175a484 100644
--- a/nuttx/configs/sam4l-xplained/include/board.h
+++ b/nuttx/configs/sam4l-xplained/include/board.h
@@ -54,66 +54,144 @@
************************************************************************************/
/* Clocking *************************************************************************/
-/* After power-on reset, the sam3u device is running on a 4MHz internal RC. These
- * definitions will configure clocking with MCK = 48MHz, PLLA = 96, and CPU=48MHz.
- */
-
-/* Main oscillator register settings */
-
-#define BOARD_CKGR_MOR_MOSCXTST (63 << CKGR_MOR_MOSCXTST_SHIFT) /* Start-up Time */
-/* PLLA configuration */
+/* Select the DFLL as the source of the system clock.
+ *
+ * Options (define one):
+ * BOARD_SYSCLK_SOURCE_RCSYS - System RC oscillator
+ * BOARD_SYSCLK_SOURCE_OSC0 - Oscillator 0
+ * BOARD_SYSCLK_SOURCE_PLL0 - Phase Locked Loop 0
+ * BOARD_SYSCLK_SOURCE_DFLL0 - Digital Frequency Locked Loop
+ * BOARD_SYSCLK_SOURCE_RC80M - 80 MHz RC oscillator
+ * BOARD_SYSCLK_SOURCE_FCFAST12M - 12 MHz RC oscillator
+ * BOARD_SYSCLK_SOURCE_FCFAST8M - 8 MHz RC oscillator
+ * BOARD_SYSCLK_SOURCE_FCFAST4M - 4 MHz RC oscillator
+ * BOARD_SYSCLK_SOURCE_RC1M - 1 MHz RC oscillator
+ */
-#define BOARD_CKGR_PLLAR_MULA (7 << CKGR_PLLAR_MULA_SHIFT)
-#define BOARD_CKGR_PLLAR_STMODE CKGR_PLLAR_STMODE_FAST
-#define BOARD_CKGR_PLLAR_PLLACOUNT (63 << CKGR_PLLAR_PLLACOUNT_SHIFT)
-#define BOARD_CKGR_PLLAR_DIVA CKGR_PLLAR_DIVA_BYPASS
+#define BOARD_SYSCLK_SOURCE_DFLL0 1
-/* PMC master clock register settings */
+/* Nominal frequencies in on-chip RC oscillators. These are *not* configurable
+ * but appear here for use in frequency calculations. NOTE: These may frequencies
+ * may vary with temperature changes.
+ */
-#define BOARD_PMC_MCKR_CSS PMC_MCKR_CSS_PLLA
-#define BOARD_PMC_MCKR_PRES PMC_MCKR_PRES_DIV2
+#define BOARD_RCSYS_FREQUENCY 115000 /* Nominal frequency of RCSYS (Hz) */
+#define BOARD_RC32K_FREQUENCY 32768 /* Nominal frequency of RC32K (Hz) */
+#define BOARD_RC80M_FREQUENCY 80000000 /* Nominal frequency of RC80M (Hz) */
+#define BOARD_RCFAST4M_FREQUENCY 4000000 /* Nominal frequency of RCFAST4M (Hz) */
+#define BOARD_RCFAST8M_FREQUENCY 8000000 /* Nominal frequency of RCFAST8M (Hz) */
+#define BOARD_RCFAST12M_FREQUENCY 12000000 /* Nominal frequency of RCFAST12M (Hz) */
+#define BOARD_RC1M_FREQUENCY 1000000 /* Nominal frequency of RC1M (Hz) */
+
+/* The SAM4L Xplained Pro has two on-board crystals:
+ * XC100 12MHz OSC0
+ * XC101 32.768KHz OSC32
+ */
-/* USB UTMI PLL start-up time */
+/* OSC0 Configuration */
-#define BOARD_CKGR_UCKR_UPLLCOUNT (3 << CKGR_UCKR_UPLLCOUNT_SHIFT)
+#define BOARD_OSC0_FREQUENCY 12000000 /* 12MHz XTAL */
-/* System clock dividers: Fbus = Fsys / (2 ^ BUS_div) */
+/* OSC32 Configuration */
-#define BOARD_SYSCLK_CPU_DIV 0
-#define BOARD_SYSCLK_PBA_DIV 0
-#define BOARD_SYSCLK_PBB_DIV 0
-#define BOARD_SYSCLK_PBC_DIV 0
-#define BOARD_SYSCLK_PBD_DIV 0
+#define BOARD_OSC32_FREQUENCY 32768 /* 32.768KHz XTAL */
+#define BOARD_OSC32_STARTUP_US 6100
+#define BOARD_OSC32_SELCURR BSCIF_OSCCTRL32_SELCURR_300
+#define BOARD_OSC32_ISXTAL 1 /* OSC32 is a crystal */
-/* Resulting frequencies */
+/* Digital Frequency Locked Loop configuration
+ * Fdfll = (Fclk * DFLLmul) / DFLLdiv
+ * = 32768 * (48000000/32768) / 1 = 48MHz
+ *
+ * The actual frequency is 47.97MHz due to truncation of the multiplier.
+ * The 48MHz target value is treated as "not-to-exceed" value). Use OSC0
+ * if you need more accuracy (12MHz with a multiplier of 4).
+ *
+ * DFLL0 source options (select one):
+ * BOARD_DFLL0_SOURCE_RCSYS - System RC oscillator
+ * BOARD_DFLL0_SOURCE_OSC32K - 32.768KHz oscillator
+ * BOARD_DFLL0_SOURCE_OSC0 - Oscillator 0
+ * BOARD_DFLL0_SOURCE_RC80M - 80 MHz RC oscillator
+ * BOARD_DFLL0_SOURCE_RC32K - 32 kHz RC oscillator
+ *
+ * NOTE: Nothing must be defined if the DFPLL is not used
+ */
-#define SAM_MAINOSC_FREQUENCY (12000000)
-#define SAM_MCK_FREQUENCY (48000000)
-#define SAM_PLLA_FREQUENCY (96000000)
-#define SAM_CPU_FREQUENCY (48000000)
+#define BOARD_DFLL0_SOURCE_OSC32K 1
+#define BOARD_DFLL0_TARGET 48000000
+#define BOARD_DFLL0_MUL (BOARD_DFLL0_TARGET / BOARD_OSC32_FREQUENCY)
+#define BOARD_DFLL0_DIV 1
+#define BOARD_DFLL0_FREQUENCY (BOARD_OSC32_FREQUENCY * BOARD_DFLL0_MUL / BOARD_DFLL0_DIV)
-/* HSMCI clocking
+/* Phase Locked Loop configuration
+ * Fdfll = (Fclk * PLLmul) / PLLdiv
*
- * Multimedia Card Interface clock (MCCK or MCI_CK) is Master Clock (MCK)
- * divided by (2*(CLKDIV+1)).
+ * PLL0 source options (select one):
+ * BOARD_PLL0_SOURCE_OSC0 - Oscillator 0
+ * BOARD_PLL0_SOURCE_GCLK9 - General clock 9
*
- * MCI_SPEED = MCK / (2*(CLKDIV+1))
- * CLKDIV = MCI / MCI_SPEED / 2 - 1
+ * BOARD_GLCK9_SOURCE_RCSYS - System RC oscillator
+ * BOARD_GLCK9_SOURCE_OSC32K - Output from OSC32K
+ * BOARD_GLCK9_SOURCE_DFLL0 - Output from DFLL0
+ * BOARD_GLCK9_SOURCE_OSC0 - Output from Oscillator0
+ * BOARD_GLCK9_SOURCE_RC80M - Output from 80MHz RCOSC
+ * BOARD_GLCK9_SOURCE_RCFAST - Output from 4,8,12MHz RCFAST
+ * BOARD_GLCK9_SOURCE_RC1M - Output from 1MHz RC1M
+ * BOARD_GLCK9_SOURCE_CPUCLK - The CPU clock
+ * BOARD_GLCK9_SOURCE_HSBCLK - High Speed Bus clock
+ * BOARD_GLCK9_SOURCE_PBACLK - Peripheral Bus A clock
+ * BOARD_GLCK9_SOURCE_PBBCLK - Peripheral Bus B clock
+ * BOARD_GLCK9_SOURCE_PBCCLK - Peripheral Bus C clock
+ * BOARD_GLCK9_SOURCE_PBDCLK - Peripheral Bus D clock
+ * BOARD_GLCK9_SOURCE_RC32K - Output from 32kHz RCOSC
+ *
+ * NOTE: Nothing must be defined if the PLL0 is not used
*/
-/* MCK = 48MHz, CLKDIV = 59, MCI_SPEED = 48MHz / 2 * (59+1) = 400 KHz */
+/* System clock dividers: Fbus = Fmck >> BUSshift */
-#define HSMCI_INIT_CLKDIV (59 << HSMCI_MR_CLKDIV_SHIFT)
+#define BOARD_CPU_SHIFT 0 /* Fcpu = Fmck = 48MHz */
+#define BOARD_PBA_SHIFT 0 /* Fpba = Fmck = 48MHz */
+#define BOARD_PBB_SHIFT 0 /* Fpbb = Fmck = 48MHz */
+#define BOARD_PBC_SHIFT 0 /* Fpbc = Fmck = 48MHz */
+#define BOARD_PBD_SHIFT 0 /* Fpbd = Fmck = 48MHz */
-/* MCK = 48MHz, CLKDIV = 1, MCI_SPEED = 48MHz / 2 * (1+1) = 12 MHz */
+/* Resulting frequencies */
-#define HSMCI_MMCXFR_CLKDIV (3 << HSMCI_MR_CLKDIV_SHIFT)
+#define BOARD_MCK_FREQUENCY (BOARD_DFLL0_FREQUENCY)
+#define BOARD_CPU_FREQUENCY (BOARD_MCK_FREQUENCY >> BOARD_CPU_SHIFT)
+#define BOARD_PBA_FREQUENCY (BOARD_MCK_FREQUENCY >> BOARD_PBA_SHIFT)
+#define BOARD_PBB_FREQUENCY (BOARD_MCK_FREQUENCY >> BOARD_PBB_SHIFT)
+#define BOARD_PBC_FREQUENCY (BOARD_MCK_FREQUENCY >> BOARD_PBC_SHIFT)
+#define BOARD_PBD_FREQUENCY (BOARD_MCK_FREQUENCY >> BOARD_PBD_SHIFT)
-/* MCK = 48MHz, CLKDIV = 0, MCI_SPEED = 48MHz / 2 * (0+1) = 24 MHz */
+/* USBC.
+ *
+ * "The USBC has two bus clocks connected: One High Speed Bus clock
+ * (CLK_USBC_AHB) and one Peripheral Bus clock (CLK_USBC_APB). These clocks
+ * are generated by the Power Manager. Both clocks are enabled at reset
+ * and can be disabled by the Power Manager. It is recommended to disable
+ * the USBC before disabling the clocks, to avoid freezing the USBC in
+ * an undefined state.
+ *
+ * "To follow the usb data rate at 12Mbit/s in full-speed mode, the
+ * CLK_USBC_AHB clock should be at minimum 12MHz.
+ *
+ * "The 48MHz USB clock is generated by a dedicated generic clock from
+ * the SCIF module. Before using the USB, the user must ensure that the
+ * USB generic clock (GCLK_USBC) is enabled at 48MHz in the SCIF module."
+ *
+ * USB Generic Clock 7 (GCLK_USBC) source selection (one only)
+ *
+ * BOARD_USBC_SRC_OSC0
+ * BOARD_USBC_SRC_PLL0
+ * BOARD_USBC_SRC_DFLL
+ * BOARD_USBC_SRC_GCLKIN0
+ */
-#define HSMCI_SDXFR_CLKDIV (0 << HSMCI_MR_CLKDIV_SHIFT)
-#define HSMCI_SDWIDEXFR_CLKDIV HSMCI_SDXFR_CLKDIV
+#define BOARD_USBC_SRC_DFLL 1 /* Source DFLL0 at 48MHz */
+#define BOARD_USBC_GCLK_DIV 1 /* Fusb = Fdfll / 1 = 48MHz */
/* LED definitions ******************************************************************/
/* There are three LEDs on board the SAM4L Xplained Pro board: The EDBG
@@ -135,7 +213,7 @@
#define BOARD_LED0_BIT (1 << BOARD_LED0)
/* When CONFIG_ARCH_LEDS is defined in the NuttX configuration, NuttX will
- * control LED0 as defined below. Thus is LED0 is statically on, NuttX has
+ * control LED0 as defined below. Thus if LED0 is statically on, NuttX has
* successfully booted and is, apparently, running normmally. If LED0 is
* flashing at approximately 2Hz, then a fatal error has been detected and the
* system has halted.
@@ -175,10 +253,21 @@
#define BUTTON_SW0_BIT (1 << BUTTON_SW0)
/* Alternate Function Disambiguation ************************************************/
-/* The SAM4L Xplained Pro contains an Embedded Debugger (EDBG) that can be
- * used to program and debug the ATSAM4LC4C using Serial Wire Debug (SWD).
- * The Embedded debugger also include a Virtual Com port interface over
- * USART1. Virtual COM port connections:
+/* USART0 is also available on connectors EXT1 and EXT4:
+ *
+ * EXT1 TXT4 GPIO Function
+ * ---- ---- ------ -----------
+ * 13 13 PB00 USART0_RXD
+ * 14 14 PB01 USART0_TXD
+ */
+
+#define GPIO_USART0_RXD GPIO_USART0_RXD_4
+#define GPIO_USART0_TXD GPIO_USART0_TXD_4
+
+/* The SAM4L Xplained Pro contains an Embedded Debugger (EDBG) that can be used to
+ * program and debug the ATSAM4LC4C using Serial Wire Debug (SWD). The Embedded
+ * debugger also include a Virtual Com port interface over USART1. Virtual COM
+ * port connections:
*
* PC26 USART1 RXD
* PC27 USART1 TXD
diff --git a/nuttx/configs/sam3u-ek/touchscreen/Make.defs b/nuttx/configs/sam4l-xplained/nsh/Make.defs
index 436d316c8..25cdee290 100644
--- a/nuttx/configs/sam3u-ek/touchscreen/Make.defs
+++ b/nuttx/configs/sam4l-xplained/nsh/Make.defs
@@ -1,7 +1,7 @@
############################################################################
-# configs/sam3u-ek/touchscreen/Make.defs
+# configs/sam4l-xplained/nsh/Make.defs
#
-# Copyright (C) 2011 Gregory Nutt. All rights reserved.
+# Copyright (C) 2013 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
diff --git a/nuttx/configs/sam3u-ek/touchscreen/defconfig b/nuttx/configs/sam4l-xplained/nsh/defconfig
index f2d933864..a2c2551f7 100644
--- a/nuttx/configs/sam3u-ek/touchscreen/defconfig
+++ b/nuttx/configs/sam4l-xplained/nsh/defconfig
@@ -76,10 +76,11 @@ CONFIG_ARCH="arm"
CONFIG_ARCH_CHIP_SAM34=y
# CONFIG_ARCH_CHIP_STM32 is not set
# CONFIG_ARCH_CHIP_STR71X is not set
-CONFIG_ARCH_CORTEXM3=y
+CONFIG_ARCH_CORTEXM4=y
CONFIG_ARCH_FAMILY="armv7-m"
CONFIG_ARCH_CHIP="sam34"
# CONFIG_ARMV7M_USEBASEPRI is not set
+# CONFIG_ARCH_HAVE_FPU is not set
CONFIG_ARCH_HAVE_MPU=y
# CONFIG_ARMV7M_MPU is not set
@@ -93,32 +94,88 @@ CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT=y
CONFIG_ARMV7M_OABI_TOOLCHAIN=y
#
-# AT91SAM3/SAM4 Configuration Options
-#
-CONFIG_ARCH_CHIP_AT91SAM3U4E=y
-CONFIG_ARCH_CHIP_SAM3U=y
-
-#
-# AT91SAM3 Peripheral Support
-#
-# CONFIG_SAM34_DMA is not set
-# CONFIG_SAM34_NAND is not set
-# CONFIG_SAM34_HSMCI is not set
-CONFIG_SAM34_UART=y
-# CONFIG_SAM34_USART0 is not set
+# AT91SAM3/4 Configuration Options
+#
+# CONFIG_ARCH_CHIP_AT91SAM3U4E is not set
+# CONFIG_ARCH_CHIP_SAM34_NDMACHANC2C is not set
+# CONFIG_ARCH_CHIP_ATSAM4LC2B is not set
+# CONFIG_ARCH_CHIP_ATSAM4LC2A is not set
+CONFIG_ARCH_CHIP_ATSAM4LC4C=y
+# CONFIG_ARCH_CHIP_ATSAM4LC4B is not set
+# CONFIG_ARCH_CHIP_ATSAM4LC4A is not set
+# CONFIG_ARCH_CHIP_ATSAM4LS2C is not set
+# CONFIG_ARCH_CHIP_ATSAM4LS2B is not set
+# CONFIG_ARCH_CHIP_ATSAM4LS2A is not set
+# CONFIG_ARCH_CHIP_ATSAM4LS4C is not set
+# CONFIG_ARCH_CHIP_ATSAM4LS4B is not set
+# CONFIG_ARCH_CHIP_ATSAM4LS4A is not set
+# CONFIG_CONFIG_ARCH_CHIP_ATSAM4SD32C is not set
+# CONFIG_CONFIG_ARCH_CHIP_ATSAM4SD32B is not set
+# CONFIG_CONFIG_ARCH_CHIP_ATSAM4SD16C is not set
+# CONFIG_CONFIG_ARCH_CHIP_ATSAM4SD16B is not set
+# CONFIG_CONFIG_ARCH_CHIP_ATSAM4SA16C is not set
+# CONFIG_CONFIG_ARCH_CHIP_ATSAM4SA16B is not set
+# CONFIG_CONFIG_ARCH_CHIP_ATSAM4S16C is not set
+# CONFIG_CONFIG_ARCH_CHIP_ATSAM4S16B is not set
+# CONFIG_CONFIG_ARCH_CHIP_ATSAM4S8C is not set
+# CONFIG_CONFIG_ARCH_CHIP_ATSAM4S8B is not set
+# CONFIG_ARCH_CHIP_SAM3U is not set
+CONFIG_ARCH_CHIP_SAM4L=y
+# CONFIG_ARCH_CHIP_SAM4S is not set
+
+#
+# AT91SAM3/4 Peripheral Support
+#
+CONFIG_SAM_PICOCACHE=y
+# CONFIG_SAM34_OCD is not set
+# CONFIG_SAM34_APBA is not set
+# CONFIG_SAM34_AESA is not set
+# CONFIG_SAM34_IISC is not set
+# CONFIG_SAM34_SPI is not set
+# CONFIG_SAM34_TC0 is not set
+# CONFIG_SAM34_TC1 is not set
+# CONFIG_SAM34_TWIM0 is not set
+# CONFIG_SAM34_TWIS0 is not set
+# CONFIG_SAM34_TWIM1 is not set
+# CONFIG_SAM34_TWIS1 is not set
+# CONFIG_SAM34_TWIM2 is not set
+# CONFIG_SAM34_TWIM3 is not set
+# CONFIG_SAM34_PICOUART is not set
+CONFIG_SAM34_USART0=y
# CONFIG_SAM34_USART1 is not set
# CONFIG_SAM34_USART2 is not set
# CONFIG_SAM34_USART3 is not set
-CONFIG_SAM34_SPI=y
-
-#
-# AT91SAM3 UART Configuration
-#
-
-#
-# AT91SAM3 GPIO Interrupt Configuration
-#
-CONFIG_GPIOA_IRQ=y
+# CONFIG_SAM34_ADCIFE is not set
+# CONFIG_SAM34_DACC is not set
+# CONFIG_SAM34_ACIFC is not set
+# CONFIG_SAM34_GLOC is not set
+# CONFIG_SAM34_ABDACB is not set
+# CONFIG_SAM34_TRNG is not set
+# CONFIG_SAM34_PARC is not set
+# CONFIG_SAM34_CATB is not set
+# CONFIG_SAM34_LCDCA is not set
+# CONFIG_SAM34_HRAMC1 is not set
+# CONFIG_SAM34_HMATRIX is not set
+# CONFIG_SAM34_PDCA is not set
+# CONFIG_SAM34_CRCCU is not set
+# CONFIG_SAM34_USBC is not set
+# CONFIG_SAM34_PEVC is not set
+# CONFIG_SAM34_CHIPID is not set
+# CONFIG_SAM34_FREQM is not set
+# CONFIG_SAM34_AST is not set
+# CONFIG_SAM34_WDT is not set
+# CONFIG_SAM34_EIC is not set
+# CONFIG_SAM32_RESET_PERIPHCLKS is not set
+
+#
+# AT91SAM3/4 USART Configuration
+#
+CONFIG_USART0_ISUART=y
+
+#
+# AT91SAM3/4 GPIO Interrupt Configuration
+#
+# CONFIG_GPIOA_IRQ is not set
# CONFIG_GPIOB_IRQ is not set
# CONFIG_GPIOC_IRQ is not set
@@ -138,14 +195,15 @@ CONFIG_ARCH_IRQPRIO=y
CONFIG_ARCH_HAVE_VFORK=y
CONFIG_ARCH_STACKDUMP=y
# CONFIG_ENDIAN_BIG is not set
-# CONFIG_ARCH_HAVE_RAMFUNCS is not set
+CONFIG_ARCH_HAVE_RAMFUNCS=y
+CONFIG_ARCH_RAMFUNCS=y
CONFIG_ARCH_HAVE_RAMVECTORS=y
# CONFIG_ARCH_RAMVECTORS is not set
#
# Board Settings
#
-CONFIG_BOARD_LOOPSPERMSEC=4768
+CONFIG_BOARD_LOOPSPERMSEC=3410
# CONFIG_ARCH_CALIBRATION is not set
CONFIG_DRAM_START=0x20000000
CONFIG_DRAM_SIZE=32768
@@ -164,9 +222,9 @@ CONFIG_BOOT_RUNFROMFLASH=y
#
# Board Selection
#
-CONFIG_ARCH_BOARD_SAM3UEK=y
+CONFIG_ARCH_BOARD_SAM4L_XPLAINED=y
# CONFIG_ARCH_BOARD_CUSTOM is not set
-CONFIG_ARCH_BOARD="sam3u-ek"
+CONFIG_ARCH_BOARD="sam4l-xplained"
#
# Common Board Options
@@ -193,16 +251,16 @@ CONFIG_RR_INTERVAL=200
CONFIG_TASK_NAME_SIZE=0
# CONFIG_SCHED_HAVE_PARENT is not set
# CONFIG_JULIAN_TIME is not set
-CONFIG_START_YEAR=2011
-CONFIG_START_MONTH=9
-CONFIG_START_DAY=30
+CONFIG_START_YEAR=2013
+CONFIG_START_MONTH=6
+CONFIG_START_DAY=9
CONFIG_DEV_CONSOLE=y
# CONFIG_MUTEX_TYPES is not set
# CONFIG_PRIORITY_INHERITANCE is not set
# CONFIG_FDCLONE_DISABLE is not set
# CONFIG_FDCLONE_STDIO is not set
CONFIG_SDCLONE_DISABLE=y
-CONFIG_SCHED_WAITPID=y
+# CONFIG_SCHED_WAITPID is not set
# CONFIG_SCHED_STARTHOOK is not set
# CONFIG_SCHED_ATEXIT is not set
# CONFIG_SCHED_ONEXIT is not set
@@ -213,7 +271,7 @@ CONFIG_DISABLE_OS_API=y
# CONFIG_DISABLE_PTHREAD is not set
# CONFIG_DISABLE_SIGNALS is not set
# CONFIG_DISABLE_MQUEUE is not set
-# CONFIG_DISABLE_ENVIRON is not set
+CONFIG_DISABLE_ENVIRON=y
#
# Signal Numbers
@@ -222,7 +280,6 @@ CONFIG_SIG_SIGUSR1=1
CONFIG_SIG_SIGUSR2=2
CONFIG_SIG_SIGALARM=3
CONFIG_SIG_SIGCONDTIMEDOUT=16
-CONFIG_SIG_SIGWORK=17
#
# Sizes of configurable things (0 disables)
@@ -243,9 +300,9 @@ CONFIG_PREALLOC_TIMERS=4
# Stack and heap information
#
CONFIG_IDLETHREAD_STACKSIZE=1024
-CONFIG_USERMAIN_STACKSIZE=2048
+CONFIG_USERMAIN_STACKSIZE=1536
CONFIG_PTHREAD_STACK_MIN=256
-CONFIG_PTHREAD_STACK_DEFAULT=2048
+CONFIG_PTHREAD_STACK_DEFAULT=1536
#
# Device Drivers
@@ -258,55 +315,14 @@ CONFIG_DEV_NULL=y
# CONFIG_CAN is not set
# CONFIG_PWM is not set
# CONFIG_I2C is not set
-CONFIG_SPI=y
-# CONFIG_SPI_OWNBUS is not set
-CONFIG_SPI_EXCHANGE=y
-# CONFIG_SPI_CMDDATA is not set
+# CONFIG_SPI is not set
# CONFIG_RTC is not set
# CONFIG_WATCHDOG is not set
# CONFIG_ANALOG is not set
# CONFIG_AUDIO_DEVICES is not set
# CONFIG_BCH is not set
-CONFIG_INPUT=y
-# CONFIG_INPUT_TSC2007 is not set
-CONFIG_INPUT_ADS7843E=y
-# CONFIG_ADS7843E_MULTIPLE is not set
-CONFIG_ADS7843E_SPIDEV=0
-CONFIG_ADS7843E_DEVMINOR=0
-CONFIG_ADS7843E_SPIMODE=0
-CONFIG_ADS7843E_FREQUENCY=100000
-# CONFIG_ADS7843E_SWAPXY is not set
-CONFIG_ADS7843E_THRESHX=12
-CONFIG_ADS7843E_THRESHY=12
-# CONFIG_INPUT_STMPE811 is not set
-CONFIG_LCD=y
-
-#
-# Common LCD Settings
-#
-# CONFIG_LCD_NOGETRUN is not set
-CONFIG_LCD_MAXCONTRAST=1
-CONFIG_LCD_MAXPOWER=31
-
-#
-# Graphic LCD Devices
-#
-# CONFIG_LCD_P14201 is not set
-# CONFIG_LCD_NOKIA6100 is not set
-# CONFIG_LCD_MIO283QT2 is not set
-# CONFIG_LCD_UG9664HSWAG01 is not set
-# CONFIG_LCD_ST7567 is not set
-# CONFIG_LCD_UG2864AMBAG01 is not set
-# CONFIG_LCD_SSD1289 is not set
-# CONFIG_LCD_LANDSCAPE is not set
-CONFIG_LCD_PORTRAIT=y
-# CONFIG_LCD_RPORTRAIT is not set
-# CONFIG_LCD_RLANDSCAPE is not set
-
-#
-# Alphanumeric/Segment LCD Devices
-#
-# CONFIG_LCD_LCD1602 is not set
+# CONFIG_INPUT is not set
+# CONFIG_LCD is not set
# CONFIG_MMCSD is not set
# CONFIG_MTD is not set
# CONFIG_PIPES is not set
@@ -316,21 +332,25 @@ CONFIG_LCD_PORTRAIT=y
CONFIG_SERIAL=y
# CONFIG_DEV_LOWCONSOLE is not set
# CONFIG_16550_UART is not set
-CONFIG_ARCH_HAVE_UART=y
+CONFIG_ARCH_HAVE_USART0=y
CONFIG_MCU_SERIAL=y
CONFIG_STANDARD_SERIAL=y
-CONFIG_UART_SERIAL_CONSOLE=y
+CONFIG_USART0_SERIAL_CONSOLE=y
# CONFIG_NO_SERIAL_CONSOLE is not set
#
-# UART Configuration
+# USART0 Configuration
#
-CONFIG_UART_RXBUFSIZE=256
-CONFIG_UART_TXBUFSIZE=256
-CONFIG_UART_BAUD=115200
-CONFIG_UART_BITS=8
-CONFIG_UART_PARITY=0
-CONFIG_UART_2STOP=0
+CONFIG_USART0_RXBUFSIZE=256
+CONFIG_USART0_TXBUFSIZE=256
+CONFIG_USART0_BAUD=115200
+CONFIG_USART0_BITS=8
+CONFIG_USART0_PARITY=0
+CONFIG_USART0_2STOP=0
+# CONFIG_USART0_IFLOWCONTROL is not set
+# CONFIG_USART0_OFLOWCONTROL is not set
+# CONFIG_SERIAL_IFLOWCONTROL is not set
+# CONFIG_SERIAL_OFLOWCONTROL is not set
# CONFIG_USBDEV is not set
# CONFIG_USBHOST is not set
# CONFIG_WIRELESS is not set
@@ -358,12 +378,7 @@ CONFIG_UART_2STOP=0
#
# CONFIG_DISABLE_MOUNTPOINT is not set
# CONFIG_FS_RAMMAP is not set
-CONFIG_FS_FAT=y
-CONFIG_FAT_LCNAMES=y
-CONFIG_FAT_LFN=y
-CONFIG_FAT_MAXFNAME=32
-# CONFIG_FS_FATTIME is not set
-# CONFIG_FAT_DMAMEMORY is not set
+# CONFIG_FS_FAT is not set
# CONFIG_FS_NXFFS is not set
# CONFIG_FS_ROMFS is not set
# CONFIG_FS_SMARTFS is not set
@@ -378,66 +393,7 @@ CONFIG_FAT_MAXFNAME=32
#
# Graphics Support
#
-CONFIG_NX=y
-CONFIG_NX_LCDDRIVER=y
-CONFIG_NX_NPLANES=1
-# CONFIG_NX_WRITEONLY is not set
-
-#
-# Supported Pixel Depths
-#
-CONFIG_NX_DISABLE_1BPP=y
-CONFIG_NX_DISABLE_2BPP=y
-CONFIG_NX_DISABLE_4BPP=y
-CONFIG_NX_DISABLE_8BPP=y
-# CONFIG_NX_DISABLE_16BPP is not set
-CONFIG_NX_DISABLE_24BPP=y
-CONFIG_NX_DISABLE_32BPP=y
-# CONFIG_NX_PACKEDMSFIRST is not set
-
-#
-# Input Devices
-#
-CONFIG_NX_MOUSE=y
-CONFIG_NX_KBD=y
-
-#
-# Framed Window Borders
-#
-CONFIG_NXTK_BORDERWIDTH=4
-CONFIG_NXTK_BORDERCOLOR1=0
-CONFIG_NXTK_BORDERCOLOR2=0
-CONFIG_NXTK_BORDERCOLOR3=0
-# CONFIG_NXTK_AUTORAISE is not set
-
-#
-# Font Selections
-#
-CONFIG_NXFONTS_CHARBITS=7
-# CONFIG_NXFONT_MONO5X8 is not set
-# CONFIG_NXFONT_SANS17X22 is not set
-# CONFIG_NXFONT_SANS20X26 is not set
-CONFIG_NXFONT_SANS23X27=y
-# CONFIG_NXFONT_SANS22X29 is not set
-# CONFIG_NXFONT_SANS28X37 is not set
-# CONFIG_NXFONT_SANS39X48 is not set
-# CONFIG_NXFONT_SANS17X23B is not set
-# CONFIG_NXFONT_SANS20X27B is not set
-# CONFIG_NXFONT_SANS22X29B is not set
-# CONFIG_NXFONT_SANS28X37B is not set
-# CONFIG_NXFONT_SANS40X49B is not set
-# CONFIG_NXFONT_SERIF22X29 is not set
-# CONFIG_NXFONT_SERIF29X37 is not set
-# CONFIG_NXFONT_SERIF38X48 is not set
-# CONFIG_NXFONT_SERIF22X28B is not set
-# CONFIG_NXFONT_SERIF27X38B is not set
-# CONFIG_NXFONT_SERIF38X49B is not set
-# CONFIG_NXCONSOLE is not set
-
-#
-# NX Multi-user only options
-#
-# CONFIG_NX_MULTIUSER is not set
+# CONFIG_NX is not set
#
# Memory Management
@@ -456,7 +412,6 @@ CONFIG_MM_REGIONS=3
# Binary Formats
#
# CONFIG_BINFMT_DISABLE is not set
-# CONFIG_BINFMT_EXEPATH is not set
# CONFIG_NXFLAT is not set
# CONFIG_ELF is not set
CONFIG_BUILTIN=y
@@ -473,7 +428,6 @@ CONFIG_BUILTIN=y
CONFIG_STDIO_BUFFER_SIZE=64
CONFIG_STDIO_LINEBUFFER=y
CONFIG_NUNGET_CHARS=2
-CONFIG_LIB_HOMEDIR="/"
# CONFIG_LIBM is not set
# CONFIG_NOPRINTF_FIELDWIDTH is not set
# CONFIG_LIBC_FLOATINGPOINT is not set
@@ -484,7 +438,7 @@ CONFIG_LIB_RAND_ORDER=1
CONFIG_EOL_IS_EITHER_CRLF=y
# CONFIG_LIBC_EXECFUNCS is not set
CONFIG_POSIX_SPAWN_PROXY_STACKSIZE=1024
-CONFIG_TASK_SPAWN_DEFAULT_STACKSIZE=2048
+CONFIG_TASK_SPAWN_DEFAULT_STACKSIZE=1536
# CONFIG_LIBC_STRERROR is not set
# CONFIG_LIBC_PERROR_STDOUT is not set
CONFIG_ARCH_LOWPUTC=y
@@ -495,12 +449,7 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512
#
# Non-standard Library Support
#
-CONFIG_SCHED_WORKQUEUE=y
-CONFIG_SCHED_HPWORK=y
-CONFIG_SCHED_WORKPRIORITY=192
-CONFIG_SCHED_WORKPERIOD=50000
-CONFIG_SCHED_WORKSTACKSIZE=1024
-# CONFIG_SCHED_LPWORK is not set
+# CONFIG_SCHED_WORKQUEUE is not set
# CONFIG_LIB_KBDCODEC is not set
# CONFIG_LIB_SLCDCODEC is not set
@@ -508,7 +457,14 @@ CONFIG_SCHED_WORKSTACKSIZE=1024
# Basic CXX Support
#
# CONFIG_C99_BOOL8 is not set
-# CONFIG_HAVE_CXX is not set
+CONFIG_HAVE_CXX=y
+CONFIG_HAVE_CXXINITIALIZE=y
+CONFIG_CXX_NEWLONG=y
+
+#
+# uClibc++ Standard C++ Library
+#
+# CONFIG_UCLIBCXX is not set
#
# Application Configuration
@@ -525,6 +481,7 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024
# CONFIG_EXAMPLES_BUTTONS is not set
# CONFIG_EXAMPLES_CAN is not set
# CONFIG_EXAMPLES_COMPOSITE is not set
+# CONFIG_EXAMPLES_CXXTEST is not set
# CONFIG_EXAMPLES_DHCPD is not set
# CONFIG_EXAMPLES_ELF is not set
# CONFIG_EXAMPLES_FTPC is not set
@@ -542,41 +499,11 @@ CONFIG_BUILTIN_PROXY_STACKSIZE=1024
# CONFIG_EXAMPLES_NRF24L01TERM is not set
CONFIG_EXAMPLES_NSH=y
# CONFIG_EXAMPLES_NULL is not set
-CONFIG_EXAMPLES_NX=y
-CONFIG_EXAMPLES_NX_BUILTIN=y
-CONFIG_EXAMPLES_NX_VPLANE=0
-CONFIG_EXAMPLES_NX_DEVNO=0
-# CONFIG_EXAMPLES_NX_DEFAULT_COLORS is not set
-CONFIG_EXAMPLES_NX_BGCOLOR=0x7b5d
-CONFIG_EXAMPLES_NX_COLOR1=0xe73f
-CONFIG_EXAMPLES_NX_COLOR2=0xdefb
-CONFIG_EXAMPLES_NX_TBCOLOR=0xad55
-CONFIG_EXAMPLES_NX_FONTCOLOR=0x0000
-CONFIG_EXAMPLES_NX_DEFAULT_FONT=y
-CONFIG_EXAMPLES_NX_BPP=16
-# CONFIG_EXAMPLES_NX_RAWWINDOWS is not set
-# CONFIG_EXAMPLES_NX_EXTERNINIT is not set
+# CONFIG_EXAMPLES_NX is not set
# CONFIG_EXAMPLES_NXCONSOLE is not set
# CONFIG_EXAMPLES_NXFFS is not set
# CONFIG_EXAMPLES_NXFLAT is not set
-CONFIG_EXAMPLES_NXHELLO=y
-CONFIG_EXAMPLES_NXHELLO_VPLANE=0
-CONFIG_EXAMPLES_NXHELLO_DEVNO=0
-CONFIG_EXAMPLES_NXHELLO_BPP=16
-
-#
-# Example Color Configuration
-#
-# CONFIG_EXAMPLES_NXHELLO_DEFAULT_COLORS is not set
-CONFIG_EXAMPLES_NXHELLO_BGCOLOR=0x0011
-CONFIG_EXAMPLES_NXHELLO_FONTCOLOR=0xffdf
-
-#
-# Example Font Configuration
-#
-# CONFIG_EXAMPLES_NXHELLO_DEFAULT_FONT is not set
-CONFIG_EXAMPLES_NXHELLO_FONTID=6
-# CONFIG_EXAMPLES_NXHELLO_EXTERNINIT is not set
+# CONFIG_EXAMPLES_NXHELLO is not set
# CONFIG_EXAMPLES_NXIMAGE is not set
# CONFIG_EXAMPLES_NXLINES is not set
# CONFIG_EXAMPLES_NXTEXT is not set
@@ -596,10 +523,7 @@ CONFIG_EXAMPLES_NXHELLO_FONTID=6
# CONFIG_EXAMPLES_TELNETD is not set
# CONFIG_EXAMPLES_THTTPD is not set
# CONFIG_EXAMPLES_TIFF is not set
-CONFIG_EXAMPLES_TOUCHSCREEN=y
-CONFIG_EXAMPLES_TOUCHSCREEN_MINOR=0
-CONFIG_EXAMPLES_TOUCHSCREEN_DEVPATH="/dev/input0"
-CONFIG_EXAMPLES_TOUCHSCREEN_NSAMPLES=25
+# CONFIG_EXAMPLES_TOUCHSCREEN is not set
# CONFIG_EXAMPLES_UDP is not set
# CONFIG_EXAMPLES_UIP is not set
# CONFIG_EXAMPLES_USBSERIAL is not set
@@ -700,6 +624,7 @@ CONFIG_NSH_BUILTIN_APPS=y
CONFIG_NSH_CODECS_BUFSIZE=128
CONFIG_NSH_FILEIOSIZE=512
CONFIG_NSH_LINELEN=64
+CONFIG_NSH_MAXARGUMENTS=6
CONFIG_NSH_NESTDEPTH=3
# CONFIG_NSH_DISABLESCRIPT is not set
# CONFIG_NSH_DISABLEBG is not set
diff --git a/nuttx/configs/sam3u-ek/touchscreen/setenv.sh b/nuttx/configs/sam4l-xplained/nsh/setenv.sh
index 868c4de38..f83126fdf 100755
--- a/nuttx/configs/sam3u-ek/touchscreen/setenv.sh
+++ b/nuttx/configs/sam4l-xplained/nsh/setenv.sh
@@ -1,7 +1,7 @@
#!/bin/bash
-# configs/sam3u-ek/toolchain/setenv.sh
+# configs/sam4l-xplained/nsh/setenv.sh
#
-# Copyright (C) 2010 Gregory Nutt. All rights reserved.
+# Copyright (C) 2013 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
@@ -32,16 +32,32 @@
# POSSIBILITY OF SUCH DAMAGE.
#
-if [ "$(basename $0)" = "setenv.sh" ] ; then
+
+if [ "$_" = "$0" ] ; then
echo "You must source this script, not run it!" 1>&2
exit 1
fi
-if [ -z "${PATH_ORIG}" ]; then export PATH_ORIG="${PATH}"; fi
-
WD=`pwd`
-export BUILDROOT_BIN="${WD}/../misc/buildroot/build_arm_nofpu/staging_dir/bin"
-export PATH="${BUILDROOT_BIN}:/sbin:/usr/sbin:${PATH_ORIG}"
+if [ ! -x "setenv.sh" ]; then
+ echo "This script must be executed from the top-level NuttX build directory"
+ exit 1
+fi
-echo "PATH : ${PATH}"
+if [ -z "${PATH_ORIG}" ]; then
+ export PATH_ORIG="${PATH}"
+fi
+
+# This is the Cygwin path to the location where I installed the CodeSourcery
+# toolchain under windows. You will also have to edit this if you install
+# the CodeSourcery toolchain in any other location
+#export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/CodeSourcery/Sourcery G++ Lite/bin"
+
+# This is the Cygwin path to the location where I build the buildroot
+# toolchain.
+export TOOLCHAIN_BIN="${WD}/../misc/buildroot/build_arm_nofpu/staging_dir/bin"
+# Add the path to the toolchain to the PATH varialble
+export PATH="${TOOLCHAIN_BIN}:/sbin:/usr/sbin:${PATH_ORIG}"
+
+echo "PATH : ${PATH}"
diff --git a/nuttx/configs/sam4l-xplained/ostest/defconfig b/nuttx/configs/sam4l-xplained/ostest/defconfig
index 3cab5109b..3d674f455 100644
--- a/nuttx/configs/sam4l-xplained/ostest/defconfig
+++ b/nuttx/configs/sam4l-xplained/ostest/defconfig
@@ -94,7 +94,7 @@ CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT=y
CONFIG_ARMV7M_OABI_TOOLCHAIN=y
#
-# AT91SAM3/SAM4 Configuration Options
+# AT91SAM3/4 Configuration Options
#
# CONFIG_ARCH_CHIP_AT91SAM3U4E is not set
# CONFIG_ARCH_CHIP_SAM34_NDMACHANC2C is not set
@@ -124,25 +124,56 @@ CONFIG_ARCH_CHIP_SAM4L=y
# CONFIG_ARCH_CHIP_SAM4S is not set
#
-# AT91SAM3 Peripheral Support
+# AT91SAM3/4 Peripheral Support
#
-# CONFIG_SAM34_DMA is not set
-# CONFIG_SAM34_NAND is not set
-# CONFIG_SAM34_HSMCI is not set
-# CONFIG_SAM34_UART is not set
-# CONFIG_SAM34_USART0 is not set
-CONFIG_SAM34_USART1=y
+CONFIG_SAM_PICOCACHE=y
+# CONFIG_SAM34_OCD is not set
+# CONFIG_SAM34_APBA is not set
+# CONFIG_SAM34_AESA is not set
+# CONFIG_SAM34_IISC is not set
+# CONFIG_SAM34_SPI is not set
+# CONFIG_SAM34_TC0 is not set
+# CONFIG_SAM34_TC1 is not set
+# CONFIG_SAM34_TWIM0 is not set
+# CONFIG_SAM34_TWIS0 is not set
+# CONFIG_SAM34_TWIM1 is not set
+# CONFIG_SAM34_TWIS1 is not set
+# CONFIG_SAM34_TWIM2 is not set
+# CONFIG_SAM34_TWIM3 is not set
+# CONFIG_SAM34_PICOUART is not set
+CONFIG_SAM34_USART0=y
+# CONFIG_SAM34_USART1 is not set
# CONFIG_SAM34_USART2 is not set
# CONFIG_SAM34_USART3 is not set
-# CONFIG_SAM34_SPI is not set
-
-#
-# AT91SAM3 UART Configuration
-#
-CONFIG_USART1_ISUART=y
-
-#
-# AT91SAM3 GPIO Interrupt Configuration
+# CONFIG_SAM34_ADCIFE is not set
+# CONFIG_SAM34_DACC is not set
+# CONFIG_SAM34_ACIFC is not set
+# CONFIG_SAM34_GLOC is not set
+# CONFIG_SAM34_ABDACB is not set
+# CONFIG_SAM34_TRNG is not set
+# CONFIG_SAM34_PARC is not set
+# CONFIG_SAM34_CATB is not set
+# CONFIG_SAM34_LCDCA is not set
+# CONFIG_SAM34_HRAMC1 is not set
+# CONFIG_SAM34_HMATRIX is not set
+# CONFIG_SAM34_PDCA is not set
+# CONFIG_SAM34_CRCCU is not set
+# CONFIG_SAM34_USBC is not set
+# CONFIG_SAM34_PEVC is not set
+# CONFIG_SAM34_CHIPID is not set
+# CONFIG_SAM34_FREQM is not set
+# CONFIG_SAM34_AST is not set
+# CONFIG_SAM34_WDT is not set
+# CONFIG_SAM34_EIC is not set
+# CONFIG_SAM32_RESET_PERIPHCLKS is not set
+
+#
+# AT91SAM3/4 USART Configuration
+#
+CONFIG_USART0_ISUART=y
+
+#
+# AT91SAM3/4 GPIO Interrupt Configuration
#
# CONFIG_GPIOA_IRQ is not set
# CONFIG_GPIOB_IRQ is not set
@@ -164,14 +195,15 @@ CONFIG_ARCH_IRQPRIO=y
CONFIG_ARCH_HAVE_VFORK=y
CONFIG_ARCH_STACKDUMP=y
# CONFIG_ENDIAN_BIG is not set
-# CONFIG_ARCH_HAVE_RAMFUNCS is not set
+CONFIG_ARCH_HAVE_RAMFUNCS=y
+CONFIG_ARCH_RAMFUNCS=y
CONFIG_ARCH_HAVE_RAMVECTORS=y
# CONFIG_ARCH_RAMVECTORS is not set
#
# Board Settings
#
-CONFIG_BOARD_LOOPSPERMSEC=4768
+CONFIG_BOARD_LOOPSPERMSEC=3410
# CONFIG_ARCH_CALIBRATION is not set
CONFIG_DRAM_START=0x20000000
CONFIG_DRAM_SIZE=32768
@@ -299,20 +331,24 @@ CONFIG_DEV_NULL=y
CONFIG_SERIAL=y
CONFIG_DEV_LOWCONSOLE=y
# CONFIG_16550_UART is not set
-CONFIG_ARCH_HAVE_USART1=y
+CONFIG_ARCH_HAVE_USART0=y
CONFIG_MCU_SERIAL=y
-CONFIG_USART1_SERIAL_CONSOLE=y
+CONFIG_USART0_SERIAL_CONSOLE=y
# CONFIG_NO_SERIAL_CONSOLE is not set
#
-# USART1 Configuration
+# USART0 Configuration
#
-CONFIG_USART1_RXBUFSIZE=256
-CONFIG_USART1_TXBUFSIZE=256
-CONFIG_USART1_BAUD=115200
-CONFIG_USART1_BITS=8
-CONFIG_USART1_PARITY=0
-CONFIG_USART1_2STOP=0
+CONFIG_USART0_RXBUFSIZE=256
+CONFIG_USART0_TXBUFSIZE=256
+CONFIG_USART0_BAUD=115200
+CONFIG_USART0_BITS=8
+CONFIG_USART0_PARITY=0
+CONFIG_USART0_2STOP=0
+# CONFIG_USART0_IFLOWCONTROL is not set
+# CONFIG_USART0_OFLOWCONTROL is not set
+# CONFIG_SERIAL_IFLOWCONTROL is not set
+# CONFIG_SERIAL_OFLOWCONTROL is not set
# CONFIG_USBDEV is not set
# CONFIG_USBHOST is not set
# CONFIG_WIRELESS is not set
@@ -456,7 +492,6 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512
# CONFIG_EXAMPLES_NXLINES is not set
# CONFIG_EXAMPLES_NXTEXT is not set
CONFIG_EXAMPLES_OSTEST=y
-# CONFIG_EXAMPLES_OSTEST_BUILTIN is not set
CONFIG_EXAMPLES_OSTEST_LOOPS=1
CONFIG_EXAMPLES_OSTEST_STACKSIZE=2048
CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=3
diff --git a/nuttx/configs/sam4l-xplained/scripts/ld.script b/nuttx/configs/sam4l-xplained/scripts/ld.script
index 751ab0299..7a225b999 100755
--- a/nuttx/configs/sam4l-xplained/scripts/ld.script
+++ b/nuttx/configs/sam4l-xplained/scripts/ld.script
@@ -33,8 +33,8 @@
*
****************************************************************************/
-/* The ATSAM4LC4C has 256Kb of FLASH beginning at address 0x0000:0000 and
- * 32Kb of SRAM beginning at address 0x2000:0000
+/* The ATSAM4LC4C has 256KB of FLASH beginning at address 0x0000:0000 and
+ * 32KB of SRAM beginning at address 0x2000:0000
*/
MEMORY
@@ -63,7 +63,21 @@ SECTIONS
_etext = ABSOLUTE(.);
} > flash
- _eronly = ABSOLUTE(.);
+ .init_section : {
+ _sinit = ABSOLUTE(.);
+ *(.init_array .init_array.*)
+ _einit = ABSOLUTE(.);
+ } > flash
+
+ .ARM.extab : {
+ *(.ARM.extab*)
+ } >flash
+
+ __exidx_start = ABSOLUTE(.);
+ .ARM.exidx : {
+ *(.ARM.exidx*)
+ } >flash
+ __exidx_end = ABSOLUTE(.);
.data : {
_sdata = ABSOLUTE(.);
@@ -73,15 +87,15 @@ SECTIONS
_edata = ABSOLUTE(.);
} > sram AT > flash
- .ARM.extab : {
- *(.ARM.extab*)
- } >sram
+ _eronly = LOADADDR(.data);
- .ARM.exidx : {
- __exidx_start = ABSOLUTE(.);
- *(.ARM.exidx*)
- __exidx_end = ABSOLUTE(.);
- } >sram
+ .ramfunc ALIGN(4): {
+ _sramfuncs = ABSOLUTE(.);
+ *(.ramfunc .ramfunc.*)
+ _eramfuncs = ABSOLUTE(.);
+ } > sram AT > flash
+
+ _framfuncs = LOADADDR(.ramfunc);
.bss : {
_sbss = ABSOLUTE(.);
diff --git a/nuttx/configs/sam4l-xplained/src/Makefile b/nuttx/configs/sam4l-xplained/src/Makefile
index 15b5ff67e..01813faf4 100644
--- a/nuttx/configs/sam4l-xplained/src/Makefile
+++ b/nuttx/configs/sam4l-xplained/src/Makefile
@@ -42,6 +42,10 @@ AOBJS = $(ASRCS:.S=$(OBJEXT))
CSRCS = sam_boot.c sam_spi.c
+ifeq ($(CONFIG_HAVE_CXX),y)
+CSRCS += sam_cxxinitialize.c
+endif
+
ifeq ($(CONFIG_ARCH_LEDS),y)
CSRCS += sam_autoleds.c
else
diff --git a/nuttx/configs/sam4l-xplained/src/sam4l-xplained.h b/nuttx/configs/sam4l-xplained/src/sam4l-xplained.h
index e9efe88fe..ba6978a82 100644
--- a/nuttx/configs/sam4l-xplained/src/sam4l-xplained.h
+++ b/nuttx/configs/sam4l-xplained/src/sam4l-xplained.h
@@ -1,7 +1,7 @@
/************************************************************************************
- * configs/sam3uek_eval/src/sam4l-xplained.h
+ * configs/sam4l-xplained/src/sam4l-xplained.h
*
- * Copyright (C) 2009-2011, 2013 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -80,8 +80,8 @@
* 2Hz, then a fatal error has been detected and the system has halted.
*/
-#define GPIO_LED0 (GPIO_OUTPUT | GPIO_PULL_NONE | GPIO_PORTC | \
- GPIO_OUTPUT_SET | GPIO_PIN7)
+#define GPIO_LED0 (GPIO_OUTPUT | GPIO_PULL_NONE | GPIO_OUTPUT_SET | \
+ GPIO_PORTC | GPIO_PIN7)
/* QTouch button: The SAM4L Xplained Pro kit has one QTouch button. The connection
* to the SAM4L is:
@@ -99,8 +99,8 @@
* PC24 SW0
*/
-#define GPIO_SW0 (GPIO_INPUT | GPIO_PULL_UP | GPIO_GLITCH_FILTER | GPIO_PORTC | \
- GPIO_PIN24)
+#define GPIO_SW0 (GPIO_INPUT | GPIO_PULL_UP | GPIO_GLITCH_FILTER | \
+ GPIO_PORTC | GPIO_PIN24)
#define IRQ_SW0 SAM_IRQ_PC24
/************************************************************************************
diff --git a/nuttx/configs/sam4l-xplained/src/sam_autoleds.c b/nuttx/configs/sam4l-xplained/src/sam_autoleds.c
index 09b673a96..06d647b63 100644
--- a/nuttx/configs/sam4l-xplained/src/sam_autoleds.c
+++ b/nuttx/configs/sam4l-xplained/src/sam_autoleds.c
@@ -123,19 +123,19 @@ void up_ledon(int led)
switch (led)
{
- case LED_STARTED : /* NuttX has been started LED0=OFF */
- case LED_HEAPALLOCATE: /* Heap has been allocated LED0=OFF */
- case LED_IRQSENABLED: /* Interrupts enabled LED0=OFF */
+ case 0: /* LED_STARTED: NuttX has been started LED0=OFF */
+ /* LED_HEAPALLOCATE: Heap has been allocated LED0=OFF */
+ /* LED_IRQSENABLED: Interrupts enabled LED0=OFF */
break; /* Leave ledstate == true to turn OFF */
default:
- case LED_INIRQ: /* In an interrupt LED0=N/C */
- case LED_SIGNAL: /* In a signal handler LED0=N/C */
- case LED_ASSERTION: /* An assertion failed LED0=N/C */
- return;
+ case 2: /* LED_INIRQ: In an interrupt LED0=N/C */
+ /* LED_SIGNAL: In a signal handler LED0=N/C */
+ /* LED_ASSERTION: An assertion failed LED0=N/C */
+ return; /* Return to leave LED0 unchanged */
- case LED_PANIC: /* The system has crashed LED0=FLASH */
- case LED_STACKCREATED: /* Idle stack created LED0=ON */
+ case 3: /* LED_PANIC: The system has crashed LED0=FLASH */
+ case 1: /* LED_STACKCREATED: Idle stack created LED0=ON */
ledstate = false; /* Set ledstate == false to turn ON */
break;
}
@@ -154,21 +154,21 @@ void up_ledoff(int led)
/* These should not happen and are ignored */
default:
- case LED_STARTED : /* NuttX has been started LED0=OFF */
- case LED_HEAPALLOCATE: /* Heap has been allocated LED0=OFF */
- case LED_IRQSENABLED: /* Interrupts enabled LED0=OFF */
- case LED_STACKCREATED: /* Idle stack created LED0=ON */
+ case 0: /* LED_STARTED: NuttX has been started LED0=OFF */
+ /* LED_HEAPALLOCATE: Heap has been allocated LED0=OFF */
+ /* LED_IRQSENABLED: Interrupts enabled LED0=OFF */
+ case 1: /* LED_STACKCREATED: Idle stack created LED0=ON */
/* These result in no-change */
- case LED_INIRQ: /* In an interrupt LED0=N/C */
- case LED_SIGNAL: /* In a signal handler LED0=N/C */
- case LED_ASSERTION: /* An assertion failed LED0=N/C */
- return;
+ case 2: /* LED_INIRQ: In an interrupt LED0=N/C */
+ /* LED_SIGNAL: In a signal handler LED0=N/C */
+ /* LED_ASSERTION: An assertion failed LED0=N/C */
+ return; /* Return to leave LED0 unchanged */
/* Turn LED0 off set driving the output high */
- case LED_PANIC: /* The system has crashed LED0=FLASH */
+ case 3: /* LED_PANIC: The system has crashed LED0=FLASH */
sam_gpiowrite(GPIO_LED0, true);
break;
}
diff --git a/nuttx/configs/sam4l-xplained/src/sam_cxxinitialize.c b/nuttx/configs/sam4l-xplained/src/sam_cxxinitialize.c
new file mode 100644
index 000000000..1958e0918
--- /dev/null
+++ b/nuttx/configs/sam4l-xplained/src/sam_cxxinitialize.c
@@ -0,0 +1,154 @@
+/************************************************************************************
+ * configs/sam4l-xplained/src/sam_cxxinitialize.c
+ *
+ * Copyright (C) 2013 Gregory Nutt. All rights reserved.
+ * 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
+ * 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 <debug.h>
+
+#include <nuttx/arch.h>
+
+#include <arch/sam34/chip.h>
+#include "chip.h"
+
+#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE)
+
+/************************************************************************************
+ * Definitions
+ ************************************************************************************/
+/* Debug ****************************************************************************/
+/* Non-standard debug that may be enabled just for testing the static constructors */
+
+#ifndef CONFIG_DEBUG
+# undef CONFIG_DEBUG_CXX
+#endif
+
+#ifdef CONFIG_DEBUG_CXX
+# define cxxdbg dbg
+# define cxxlldbg lldbg
+# ifdef CONFIG_DEBUG_VERBOSE
+# define cxxvdbg vdbg
+# define cxxllvdbg llvdbg
+# else
+# define cxxvdbg(x...)
+# define cxxllvdbg(x...)
+# endif
+#else
+# define cxxdbg(x...)
+# define cxxlldbg(x...)
+# define cxxvdbg(x...)
+# define cxxllvdbg(x...)
+#endif
+
+/************************************************************************************
+ * Private Types
+ ************************************************************************************/
+/* This type defines one entry in initialization array */
+
+typedef void (*initializer_t)(void);
+
+/************************************************************************************
+ * External references
+ ************************************************************************************/
+/* _sinit and _einit are symbols exported by the linker script that mark the
+ * beginning and the end of the C++ initialization section.
+ */
+
+extern initializer_t _sinit;
+extern initializer_t _einit;
+
+/* _stext and _etext are symbols exported by the linker script that mark the
+ * beginning and the end of text.
+ */
+
+extern uint32_t _stext;
+extern uint32_t _etext;
+
+/************************************************************************************
+ * Private Functions
+ ************************************************************************************/
+
+/************************************************************************************
+ * Public Functions
+ ************************************************************************************/
+
+/****************************************************************************
+ * Name: up_cxxinitialize
+ *
+ * Description:
+ * If C++ and C++ static constructors are supported, then this function
+ * must be provided by board-specific logic in order to perform
+ * initialization of the static C++ class instances.
+ *
+ * This function should then be called in the application-specific
+ * user_start logic in order to perform the C++ initialization. NOTE
+ * that no component of the core NuttX RTOS logic is involved; This
+ * function defintion only provides the 'contract' between application
+ * specific C++ code and platform-specific toolchain support
+ *
+ ***************************************************************************/
+
+void up_cxxinitialize(void)
+{
+ initializer_t *initp;
+
+ cxxdbg("_sinit: %p _einit: %p _stext: %p _etext: %p\n",
+ &_sinit, &_einit, &_stext, &_etext);
+
+ /* Visit each entry in the initialzation table */
+
+ for (initp = &_sinit; initp != &_einit; initp++)
+ {
+ initializer_t initializer = *initp;
+ cxxdbg("initp: %p initializer: %p\n", initp, initializer);
+
+ /* Make sure that the address is non-NULL and lies in the text region
+ * defined by the linker script. Some toolchains may put NULL values
+ * or counts in the initialization table
+ */
+
+ if ((void*)initializer > (void*)&_stext && (void*)initializer < (void*)&_etext)
+ {
+ cxxdbg("Calling %p\n", initializer);
+ initializer();
+ }
+ }
+}
+
+#endif /* CONFIG_HAVE_CXX && CONFIG_HAVE_CXXINITIALIZE */
+
diff --git a/nuttx/configs/sam4s-xplained/Kconfig b/nuttx/configs/sam4s-xplained/Kconfig
new file mode 100644
index 000000000..76aa30c14
--- /dev/null
+++ b/nuttx/configs/sam4s-xplained/Kconfig
@@ -0,0 +1,7 @@
+#
+# For a description of the syntax of this configuration file,
+# see misc/tools/kconfig-language.txt.
+#
+
+if ARCH_BOARD_SAM4S_XPLAINED
+endif
diff --git a/nuttx/configs/sam4s-xplained/README.txt b/nuttx/configs/sam4s-xplained/README.txt
new file mode 100644
index 000000000..536189ac0
--- /dev/null
+++ b/nuttx/configs/sam4s-xplained/README.txt
@@ -0,0 +1,599 @@
+README
+^^^^^^
+
+ This README discusses issues unique to NuttX configurations for the
+ Atmel SAM4S Xplained development board. This board features the
+ ATSAM4S16C MCU with 1MB FLASH and 128KB.
+
+ The SAM4S Xplained features:
+
+ - 120 MHz Cortex-M4 with MPU
+ - 12MHz crystal (no 32.768KHz crystal)
+ - Segger J-Link JTAG emulator on-board for program and debug
+ - MICRO USB A/B connector for USB connectivity
+ - IS66WV51216DBLL ISSI SRAM 8Mb 512K x 16 55ns PSRAM 2.5v-3.6v
+ - Four Atmel QTouch buttons
+ - External voltage input
+ - Four LEDs, two controllable from software
+ - Xplained expansion headers
+ - Footprint for external serial Flash (not fitted)
+
+Contents
+^^^^^^^^
+
+ - PIO Muxing
+ - Development Environment
+ - GNU Toolchain Options
+ - IDEs
+ - NuttX EABI "buildroot" Toolchain
+ - NuttX OABI "buildroot" Toolchain
+ - NXFLAT Toolchain
+ - Buttons and LEDs
+ - Serial Consoles
+ - SAM4S Xplained-specific Configuration Options
+ - Configurations
+
+PIO Muxing
+^^^^^^^^^^
+
+ PA0 SMC_A17 PB0 J2.3 default PC0 SMC_D0
+ PA1 SMC_A18 PB1 J2.4 PC1 SMC_D1
+ PA2 J3.7 default PB2 J1.3 & J4.3 PC2 SMC_D2
+ PA3 J1.1 & J4.1 PB3 J1.4 & J4.4 PC3 SMC_D3
+ PA4 J1.2 & J4.2 PB4 JTAG PC4 SMC_D4
+ PA5 User_button BP2 PB5 JTAG PC5 SMC_D5
+ PA6 J3.7 optional PB6 JTAG PC6 SMC_D6
+ PA7 CLK_32K PB7 JTAG PC7 SMC_D7
+ PA8 CLK_32K PB8 CLK_12M PC8 SMC_NWE
+ PA9 RX_UART0 PB9 CLK_12M PC9 Power on detect
+ PA10 TX_UART0 PB10 USB_DDM PC10 User LED D9
+ PA11 J3.2 default PB11 USB_DDP PC11 SMC_NRD
+ PA12 MISO PB12 ERASE PC12 J2.2
+ PA13 MOSI PB13 J2.3 optional PC13 J2.7
+ PA14 SPCK PB14 N/A PC14 SMC_NCS0
+ PA15 J3.5 PC15 SMC_NSC1
+ PA16 J3.6 PC16 N/A
+ PA17 J2.5 PC17 User LED D10
+ PA18 J3.4 & SMC_A14 PC18 SMC_A0
+ PA19 J3.4 optional & SMC_A15 PC19 SMC_A1
+ PA20 J3.1 & SMC_A16 PC20 SMC_A2
+ PA21 J2.6 PC21 SMC_A3
+ PA22 J2.1 PC22 SMC_A4
+ PA23 J3.3 PC23 SMC_A5
+ PA24 TSLIDR_SL_SN PC24 SMC_A6
+ PA25 TSLIDR_SL_SNSK PC25 SMC_A7
+ PA26 TSLIDR_SM_SNS PC26 SMC_A8
+ PA27 TSLIDR_SM_SNSK PC27 SMC_A9
+ PA28 TSLIDR_SR_SNS PC28 SMC_A10
+ PA29 TSLIDR_SR_SNSK PC29 SMC_A11
+ PA30 J4.5 PC30 SMC_A12
+ PA31 J1.5 PC31 SMC_A13
+
+Development Environment
+^^^^^^^^^^^^^^^^^^^^^^^
+
+ Either Linux or Cygwin on Windows can be used for the development environment.
+ The source has been built only using the GNU toolchain (see below). Other
+ toolchains will likely cause problems. Testing was performed using the Cygwin
+ environment.
+
+GNU Toolchain Options
+^^^^^^^^^^^^^^^^^^^^^
+
+ The NuttX make system has been modified to support the following different
+ toolchain options.
+
+ 1. The CodeSourcery GNU toolchain,
+ 2. The devkitARM GNU toolchain, ok
+ 4. The NuttX buildroot Toolchain (see below).
+
+ All testing has been conducted using the NuttX buildroot toolchain. However,
+ the make system is setup to default to use the devkitARM toolchain. To use
+ the CodeSourcery, devkitARM or Raisonance GNU toolchain, you simply need to
+ add one of the following configuration options to your .config (or defconfig)
+ file:
+
+ CONFIG_SAM34_CODESOURCERYW=y : CodeSourcery under Windows
+ CONFIG_SAM34_CODESOURCERYL=y : CodeSourcery under Linux
+ CONFIG_SAM34_DEVKITARM=y : devkitARM under Windows
+ CONFIG_SAM34_BUILDROOT=y : NuttX buildroot under Linux or Cygwin (default)
+
+ If you are not using CONFIG_SAM34_BUILDROOT, then you may also have to modify
+ the PATH in the setenv.h file if your make cannot find the tools.
+
+ NOTE: the CodeSourcery (for Windows), devkitARM, and Raisonance toolchains are
+ Windows native toolchains. The CodeSourcey (for Linux) and NuttX buildroot
+ toolchains are Cygwin and/or Linux native toolchains. There are several limitations
+ to using a Windows based toolchain in a Cygwin environment. The three biggest are:
+
+ 1. The Windows toolchain cannot follow Cygwin paths. Path conversions are
+ performed automatically in the Cygwin makefiles using the 'cygpath' utility
+ but you might easily find some new path problems. If so, check out 'cygpath -w'
+
+ 2. Windows toolchains cannot follow Cygwin symbolic links. Many symbolic links
+ are used in Nuttx (e.g., include/arch). The make system works around these
+ problems for the Windows tools by copying directories instead of linking them.
+ But this can also cause some confusion for you: For example, you may edit
+ a file in a "linked" directory and find that your changes had no effect.
+ That is because you are building the copy of the file in the "fake" symbolic
+ directory. If you use a Windows toolchain, you should get in the habit of
+ making like this:
+
+ make clean_context all
+
+ An alias in your .bashrc file might make that less painful.
+
+ 3. Dependencies are not made when using Windows versions of the GCC. This is
+ because the dependencies are generated using Windows pathes which do not
+ work with the Cygwin make.
+
+ MKDEP = $(TOPDIR)/tools/mknulldeps.sh
+
+ NOTE 1: The CodeSourcery toolchain (2009q1) does not work with default optimization
+ level of -Os (See Make.defs). It will work with -O0, -O1, or -O2, but not with
+ -Os.
+
+ NOTE 2: The devkitARM toolchain includes a version of MSYS make. Make sure that
+ the paths to Cygwin's /bin and /usr/bin directories appear BEFORE the devkitARM
+ path or will get the wrong version of make.
+
+IDEs
+^^^^
+
+ NuttX is built using command-line make. It can be used with an IDE, but some
+ effort will be required to create the project (There is a simple RIDE project
+ in the RIDE subdirectory).
+
+ Makefile Build
+ --------------
+ Under Eclipse, it is pretty easy to set up an "empty makefile project" and
+ simply use the NuttX makefile to build the system. That is almost for free
+ under Linux. Under Windows, you will need to set up the "Cygwin GCC" empty
+ makefile project in order to work with Windows (Google for "Eclipse Cygwin" -
+ there is a lot of help on the internet).
+
+ Native Build
+ ------------
+ Here are a few tips before you start that effort:
+
+ 1) Select the toolchain that you will be using in your .config file
+ 2) Start the NuttX build at least one time from the Cygwin command line
+ before trying to create your project. This is necessary to create
+ certain auto-generated files and directories that will be needed.
+ 3) Set up include pathes: You will need include/, arch/arm/src/sam34,
+ arch/arm/src/common, arch/arm/src/armv7-m, and sched/.
+ 4) All assembly files need to have the definition option -D __ASSEMBLY__
+ on the command line.
+
+ Startup files will probably cause you some headaches. The NuttX startup file
+ is arch/arm/src/sam34/sam_vectors.S. You may need to build NuttX
+ one time from the Cygwin command line in order to obtain the pre-built
+ startup object needed by RIDE.
+
+NuttX EABI "buildroot" Toolchain
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+ A GNU GCC-based toolchain is assumed. The files */setenv.sh should
+ be modified to point to the correct path to the Cortex-M3 GCC toolchain (if
+ different from the default in your PATH variable).
+
+ If you have no Cortex-M3 toolchain, one can be downloaded from the NuttX
+ SourceForge download site (https://sourceforge.net/projects/nuttx/files/buildroot/).
+ This GNU toolchain builds and executes in the Linux or Cygwin environment.
+
+ 1. You must have already configured Nuttx in <some-dir>/nuttx.
+
+ cd tools
+ ./configure.shsam4s-xplained/<sub-dir>
+
+ 2. Download the latest buildroot package into <some-dir>
+
+ 3. unpack the buildroot tarball. The resulting directory may
+ have versioning information on it like buildroot-x.y.z. If so,
+ rename <some-dir>/buildroot-x.y.z to <some-dir>/buildroot.
+
+ 4. cd <some-dir>/buildroot
+
+ 5. cp configs/cortexm3-eabi-defconfig-4.6.3 .config
+
+ 6. make oldconfig
+
+ 7. make
+
+ 8. Edit setenv.h, if necessary, so that the PATH variable includes
+ the path to the newly built binaries.
+
+ See the file configs/README.txt in the buildroot source tree. That has more
+ details PLUS some special instructions that you will need to follow if you are
+ building a Cortex-M3 toolchain for Cygwin under Windows.
+
+ NOTE: Unfortunately, the 4.6.3 EABI toolchain is not compatible with the
+ the NXFLAT tools. See the top-level TODO file (under "Binary loaders") for
+ more information about this problem. If you plan to use NXFLAT, please do not
+ use the GCC 4.6.3 EABI toochain; instead use the GCC 4.3.3 OABI toolchain.
+ See instructions below.
+
+NuttX OABI "buildroot" Toolchain
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+ The older, OABI buildroot toolchain is also available. To use the OABI
+ toolchain:
+
+ 1. When building the buildroot toolchain, either (1) modify the cortexm3-eabi-defconfig-4.6.3
+ configuration to use EABI (using 'make menuconfig'), or (2) use an exising OABI
+ configuration such as cortexm3-defconfig-4.3.3
+
+ 2. Modify the Make.defs file to use the OABI conventions:
+
+ +CROSSDEV = arm-nuttx-elf-
+ +ARCHCPUFLAGS = -mtune=cortex-m3 -march=armv7-m -mfloat-abi=soft
+ +NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) -T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat-gotoff.ld -no-check-sections
+ -CROSSDEV = arm-nuttx-eabi-
+ -ARCHCPUFLAGS = -mcpu=cortex-m3 -mthumb -mfloat-abi=soft
+ -NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) -T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat-pcrel.ld -no-check-sections
+
+NXFLAT Toolchain
+^^^^^^^^^^^^^^^^
+
+ If you are *not* using the NuttX buildroot toolchain and you want to use
+ the NXFLAT tools, then you will still have to build a portion of the buildroot
+ tools -- just the NXFLAT tools. The buildroot with the NXFLAT tools can
+ be downloaded from the NuttX SourceForge download site
+ (https://sourceforge.net/projects/nuttx/files/).
+
+ This GNU toolchain builds and executes in the Linux or Cygwin environment.
+
+ 1. You must have already configured Nuttx in <some-dir>/nuttx.
+
+ cd tools
+ ./configure.sh lpcxpresso-lpc1768/<sub-dir>
+
+ 2. Download the latest buildroot package into <some-dir>
+
+ 3. unpack the buildroot tarball. The resulting directory may
+ have versioning information on it like buildroot-x.y.z. If so,
+ rename <some-dir>/buildroot-x.y.z to <some-dir>/buildroot.
+
+ 4. cd <some-dir>/buildroot
+
+ 5. cp configs/cortexm3-defconfig-nxflat .config
+
+ 6. make oldconfig
+
+ 7. make
+
+ 8. Edit setenv.h, if necessary, so that the PATH variable includes
+ the path to the newly builtNXFLAT binaries.
+
+Buttons and LEDs
+^^^^^^^^^^^^^^^^
+
+ Buttons
+ -------
+
+ The SAM4S Xplained has two mechanical buttons. One button is the RESET button
+ connected to the SAM4S reset line and the other is a generic user configurable
+ button labeled BP2 and connected to GPIO PA5. When a button is pressed it
+ will drive the I/O line to GND.
+
+ LEDs
+ ----
+
+ There are four LEDs on board the SAM4X Xplained board, two of these can be
+ controlled by software in the SAM4S:
+
+ LED GPIO
+ ---------------- -----
+ D9 Yellow LED PC10
+ D10 Yellow LED PC17
+
+ Both can be illuminated by driving the GPIO output to ground (low).
+
+ These LEDs are not used by the board port unless CONFIG_ARCH_LEDS is
+ defined. In that case, the usage by the board port is defined in
+ include/board.h and src/up_leds.c. The LEDs are used to encode OS-related
+ events as follows:
+
+ SYMBOL Meaning LED state
+ D9 D10
+ ------------------- ----------------------- -------- --------
+ LED_STARTED NuttX has been started OFF OFF
+ LED_HEAPALLOCATE Heap has been allocated OFF OFF
+ LED_IRQSENABLED Interrupts enabled OFF OFF
+ LED_STACKCREATED Idle stack created ON OFF
+ LED_INIRQ In an interrupt No change
+ LED_SIGNAL In a signal handler No change
+ LED_ASSERTION An assertion failed No change
+ LED_PANIC The system has crashed OFF Blinking
+ LED_IDLE MCU is is sleep mode Not used
+
+ Thus if D9 is statically on, NuttX has successfully booted and is,
+ apparently, running normmally. If D10 is flashing at approximately
+ 2Hz, then a fatal error has been detected and the system has halted.
+
+Serial Consoles
+^^^^^^^^^^^^^^^
+
+ USART0
+ ------
+
+ If you have a TTL to RS-232 convertor then this is the most convenient
+ serial console to use. UART1 is the default in all of these
+ configurations.
+
+ UART1 RXD PB2 J1 pin 3 J4 pin 3
+ UART1 TXD PB3 J1 pin 4 J4 pin 4
+ GND J1 pin 9 J4 pin 9
+ Vdd J1 pin 10 J4 pin 10
+
+ USART1 is another option:
+
+ USART1 RXD PA21 J2 pin 6
+ USART1 TXD PA22 J2 pin 1
+ GND J2 pin 9
+ Vdd J2 pin 10
+
+ Yet another option is to use UART0 and the virtual COM port. This
+ option may be more convenient for long term development, but was
+ painful to use during board bring-up.
+
+ Virtual COM Port
+ ----------------
+
+ The SAM4S Xplained contains an Embedded Debugger (EDBG) that can be
+ used to program and debug the ATSAM4S16C using Serial Wire Debug (SWD).
+ The Embedded debugger also include a Virtual Com port interface over
+ USART1. Virtual COM port connections:
+
+ AT91SAM4S16 ATSAM3U4CAU
+ -------------- --------------
+ PA9 RX_UART0 PA9_4S PA12
+ PA10 TX_UART0 RX_3U PA11
+
+SAM4S Xplained-specific Configuration Options
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+ CONFIG_ARCH - Identifies the arch/ subdirectory. This should
+ be set to:
+
+ CONFIG_ARCH=arm
+
+ CONFIG_ARCH_family - For use in C code:
+
+ CONFIG_ARCH_ARM=y
+
+ CONFIG_ARCH_architecture - For use in C code:
+
+ CONFIG_ARCH_CORTEXM4=y
+
+ CONFIG_ARCH_CHIP - Identifies the arch/*/chip subdirectory
+
+ CONFIG_ARCH_CHIP="sam34"
+
+ CONFIG_ARCH_CHIP_name - For use in C code to identify the exact
+ chip:
+
+ CONFIG_ARCH_CHIP_SAM34
+ CONFIG_ARCH_CHIP_SAM4S
+ CONFIG_ARCH_CHIP_ATSAM4S16C
+
+ CONFIG_ARCH_BOARD - Identifies the configs subdirectory and
+ hence, the board that supports the particular chip or SoC.
+
+ CONFIG_ARCH_BOARD=sam4s-xplained (for the SAM4S Xplained development board)
+
+ CONFIG_ARCH_BOARD_name - For use in C code
+
+ CONFIG_ARCH_BOARD_SAM4S_XPLAINED=y
+
+ CONFIG_ARCH_LOOPSPERMSEC - Must be calibrated for correct operation
+ of delay loops
+
+ CONFIG_ENDIAN_BIG - define if big endian (default is little
+ endian)
+
+ CONFIG_DRAM_SIZE - Describes the installed DRAM (SRAM in this case):
+
+ CONFIG_DRAM_SIZE=0x00008000 (32Kb)
+
+ CONFIG_DRAM_START - The start address of installed DRAM
+
+ CONFIG_DRAM_START=0x20000000
+
+ CONFIG_ARCH_IRQPRIO - The SAM3UF103Z supports interrupt prioritization
+
+ CONFIG_ARCH_IRQPRIO=y
+
+ CONFIG_ARCH_LEDS - Use LEDs to show state. Unique to boards that
+ have LEDs
+
+ CONFIG_ARCH_INTERRUPTSTACK - 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.
+
+ CONFIG_ARCH_STACKDUMP - Do stack dumps after assertions
+
+ CONFIG_ARCH_LEDS - Use LEDs to show state. Unique to board architecture.
+
+ CONFIG_ARCH_CALIBRATION - Enables some build in instrumentation that
+ cause a 100 second delay during boot-up. This 100 second delay
+ serves no purpose other than it allows you to calibratre
+ CONFIG_ARCH_LOOPSPERMSEC. You simply use a stop watch to measure
+ the 100 second delay then adjust CONFIG_ARCH_LOOPSPERMSEC until
+ the delay actually is 100 seconds.
+
+ Individual subsystems can be enabled:
+
+ CONFIG_SAM34_RTC - Real Time Clock
+ CONFIG_SAM34_RTT - Real Time Timer
+ CONFIG_SAM34_WDT - Watchdog Timer
+ CONFIG_SAM34_UART0 - UART 0
+ CONFIG_SAM34_UART1 - UART 1
+ CONFIG_SAM34_SMC - Static Memory Controller
+ CONFIG_SAM34_USART0 - USART 0
+ CONFIG_SAM34_USART1 - USART 1
+ CONFIG_SAM34_HSMCI - High Speed Multimedia Card Interface
+ CONFIG_SAM34_TWI0 - Two-Wire Interface 0
+ CONFIG_SAM34_TWI1 - Two-Wire Interface 1
+ CONFIG_SAM34_SPI - Serial Peripheral Interface
+ CONFIG_SAM34_SSC - Synchronous Serial Controller
+ CONFIG_SAM34_TC0 - Timer Counter 0
+ CONFIG_SAM34_TC1 - Timer Counter 1
+ CONFIG_SAM34_TC2 - Timer Counter 2
+ CONFIG_SAM34_TC3 - Timer Counter 3
+ CONFIG_SAM34_TC4 - Timer Counter 4
+ CONFIG_SAM34_TC5 - Timer Counter 5
+ CONFIG_SAM34_ADC12B - 12-bit Analog To Digital Converter
+ CONFIG_SAM34_DACC - Digital To Analog Converter
+ CONFIG_SAM34_PWM - Pulse Width Modulation
+ CONFIG_SAM34_CRCCU - CRC Calculation Unit
+ CONFIG_SAM34_ACC - Analog Comparator
+ CONFIG_SAM34_UDP - USB Device Port
+
+ Some subsystems can be configured to operate in different ways. The drivers
+ need to know how to configure the subsystem.
+
+ CONFIG_GPIOA_IRQ
+ CONFIG_GPIOB_IRQ
+ CONFIG_GPIOC_IRQ
+ CONFIG_USART0_ISUART
+ CONFIG_USART1_ISUART
+ CONFIG_USART2_ISUART
+ CONFIG_USART3_ISUART
+
+ ST91SAM4S specific device driver settings
+
+ CONFIG_U[S]ARTn_SERIAL_CONSOLE - selects the USARTn (n=0,1,2,3) or UART
+ m (m=4,5) for the console and ttys0 (default is the USART1).
+ CONFIG_U[S]ARTn_RXBUFSIZE - Characters are buffered as received.
+ This specific the size of the receive buffer
+ CONFIG_U[S]ARTn_TXBUFSIZE - Characters are buffered before
+ being sent. This specific the size of the transmit buffer
+ CONFIG_U[S]ARTn_BAUD - The configure BAUD of the UART. Must be
+ CONFIG_U[S]ARTn_BITS - The number of bits. Must be either 7 or 8.
+ CONFIG_U[S]ARTn_PARTIY - 0=no parity, 1=odd parity, 2=even parity
+ CONFIG_U[S]ARTn_2STOP - Two stop bits
+
+Configurations
+^^^^^^^^^^^^^^
+
+ Each SAM4S Xplained configuration is maintained in a sub-directory and
+ can be selected as follow:
+
+ cd tools
+ ./configure.shsam4s-xplained/<subdir>
+ cd -
+ . ./setenv.sh
+
+ Before sourcing the setenv.sh file above, you should examine it and perform
+ edits as necessary so that BUILDROOT_BIN is the correct path to the directory
+ than holds your toolchain binaries.
+
+ And then build NuttX by simply typing the following. At the conclusion of
+ the make, the nuttx binary will reside in an ELF file called, simply, nuttx.
+
+ make
+
+ The <subdir> that is provided above as an argument to the tools/configure.sh
+ must be is one of the following.
+
+ NOTE: These configurations use the mconf-based configuration tool. To
+ change any of these configurations using that tool, you should:
+
+ a. Build and install the kconfig-mconf tool. See nuttx/README.txt
+ and misc/tools/
+
+ b. Execute 'make menuconfig' in nuttx/ in order to start the
+ reconfiguration process.
+
+Configuration sub-directories
+-----------------------------
+
+ ostest:
+ This configuration directory performs a simple OS test using
+ examples/ostest.
+
+ NOTES:
+
+ 1. This configuration provides test output on USART0 which is available
+ on EXT1 or EXT4 (see the section "Serial Consoles" above). The
+ virtual COM port could be used, instead, by reconfiguring to use
+ USART1 instead of USART0:
+
+ System Type -> AT91SAM3/4 Peripheral Support
+ CONFIG_SAM_USART0=y
+ CONFIG_SAM_USART1=n
+
+ Device Drivers -> Serial Driver Support -> Serial Console
+ CONFIG_USART0_SERIAL_CONSOLE=y
+
+ Device Drivers -> Serial Driver Support -> USART0 Configuration
+ CONFIG_USART0_2STOP=0
+ CONFIG_USART0_BAUD=115200
+ CONFIG_USART0_BITS=8
+ CONFIG_USART0_PARITY=0
+ CONFIG_USART0_RXBUFSIZE=256
+ CONFIG_USART0_TXBUFSIZE=256
+
+ 2. This configuration is set up to use the NuttX OABI toolchain (see
+ above). Of course this can be reconfigured if you prefer a different
+ toolchain.
+
+ nsh:
+ This configuration directory will built the NuttShell.
+
+ NOTES:
+
+ 1. This configuration provides test output on UART1 which is available
+ on J3 or J4 (see the section "Serial Consoles" above). The
+ virtual COM port could be used, instead, by reconfiguring to use
+ UART0 instead of UART1:
+
+ System Type -> AT91SAM3/4 Peripheral Support
+ CONFIG_SAM_UART0=y
+ CONFIG_SAM_UART1=n
+
+ Device Drivers -> Serial Driver Support -> Serial Console
+ CONFIG_UART0_SERIAL_CONSOLE=y
+
+ Device Drivers -> Serial Driver Support -> USART0 Configuration
+ CONFIG_UART0_2STOP=0
+ CONFIG_UART0_BAUD=115200
+ CONFIG_UART0_BITS=8
+ CONFIG_UART0_PARITY=0
+ CONFIG_UART0_RXBUFSIZE=256
+ CONFIG_UART0_TXBUFSIZE=256
+
+ 2. This configuration is set up to use the NuttX OABI toolchain (see
+ above). Of course this can be reconfigured if you prefer a different
+ toolchain.
+
+ nsh:
+ This configuration directory will built the NuttShell.
+
+ NOTES:
+
+ 1. This configuration provides test output on UART1 which is available
+ on J3 or J4 (see the section "Serial Consoles" above). The
+ virtual COM port could be used, instead, by reconfiguring to use
+ UART0 instead of UART1:
+
+ System Type -> AT91SAM3/4 Peripheral Support
+ CONFIG_SAM_UART0=y
+ CONFIG_SAM_UART1=n
+
+ Device Drivers -> Serial Driver Support -> Serial Console
+ CONFIG_UART0_SERIAL_CONSOLE=y
+
+ Device Drivers -> Serial Driver Support -> USART0 Configuration
+ CONFIG_UART0_2STOP=0
+ CONFIG_UART0_BAUD=115200
+ CONFIG_UART0_BITS=8
+ CONFIG_UART0_PARITY=0
+ CONFIG_UART0_RXBUFSIZE=256
+ CONFIG_UART0_TXBUFSIZE=256
+
+ 2. This configuration is set up to use the NuttX OABI toolchain (see
+ above). Of course this can be reconfigured if you prefer a different
+ toolchain.
diff --git a/nuttx/configs/sam4s-xplained/include/board.h b/nuttx/configs/sam4s-xplained/include/board.h
new file mode 100644
index 000000000..7f29380a0
--- /dev/null
+++ b/nuttx/configs/sam4s-xplained/include/board.h
@@ -0,0 +1,323 @@
+/************************************************************************************
+ * configs/sam4s-xplained/include/board.h
+ *
+ * Copyright (C) 2013 Gregory Nutt. All rights reserved.
+ * 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
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ * 3. Neither the name NuttX nor the names of its contributors may be
+ * used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ ************************************************************************************/
+
+#ifndef __CONFIGS_SAM4L_XPLAINED_INCLUDE_BOARD_H
+#define __CONFIGS_SAM4L_XPLAINED_INCLUDE_BOARD_H
+
+/************************************************************************************
+ * Included Files
+ ************************************************************************************/
+
+#include <nuttx/config.h>
+
+#ifndef __ASSEMBLY__
+# include <stdint.h>
+# ifdef CONFIG_GPIO_IRQ
+# include <arch/irq.h>
+# endif
+#endif
+
+/************************************************************************************
+ * Definitions
+ ************************************************************************************/
+
+/************************************************************************************
+ * Included Files
+ ************************************************************************************/
+
+#include <nuttx/config.h>
+
+#ifndef __ASSEMBLY__
+# include <stdint.h>
+# ifdef CONFIG_GPIO_IRQ
+# include <arch/irq.h>
+# endif
+#endif
+
+/************************************************************************************
+ * Definitions
+ ************************************************************************************/
+
+/* Clocking *************************************************************************/
+/* After power-on reset, the sam3u device is running on a 4MHz internal RC. These
+ * definitions will configure clocking with MCK = 48MHz, PLLA = 96, and CPU=120MHz.
+ */
+
+/* Main oscillator register settings */
+
+#define BOARD_CKGR_MOR_MOSCXTST (63 << PMC_CKGR_MOR_MOSCXTST_SHIFT) /* Start-up Time */
+
+/* PLLA configuration:
+ *
+ * Source: 12MHz crystall at 12MHz
+ * PLLdiv: 10
+ * PLLmul: 1 (bypassed)
+ * Fpll: (12MHz * 10) / 1 = 120MHz
+ */
+
+#define BOARD_MAINOSC_FREQUENCY (12000000)
+#define BOARD_CKGR_PLLAR_MUL (9 << PMC_CKGR_PLLAR_MUL_SHIFT)
+#define BOARD_CKGR_PLLAR_DIV PMC_CKGR_PLLAR_DIV_BYPASS
+#define BOARD_CKGR_PLLAR_COUNT (63 << PMC_CKGR_PLLAR_COUNT_SHIFT)
+#define BOARD_PLLA_FREQUENCY (10*BOARD_MAINOSC_FREQUENCY)
+
+/* PMC master clock register settings */
+
+#define BOARD_PMC_MCKR_CSS PMC_MCKR_CSS_PLLA
+#define BOARD_PMC_MCKR_PRES PMC_MCKR_PRES_DIV1
+#define BOARD_MCK_FREQUENCY (BOARD_PLLA_FREQUENCY/1)
+#define BOARD_CPU_FREQUENCY (BOARD_PLLA_FREQUENCY/1)
+
+/* USB UTMI PLL start-up time */
+
+#define BOARD_CKGR_UCKR_UPLLCOUNT (3 << PMC_CKGR_UCKR_UPLLCOUNT_SHIFT)
+
+/* HSMCI clocking
+ *
+ * Multimedia Card Interface clock (MCCK or MCI_CK) is Master Clock (MCK)
+ * divided by (2*(CLKDIV+1)).
+ *
+ * MCI_SPEED = MCK / (2*(CLKDIV+1))
+ * CLKDIV = MCI / MCI_SPEED / 2 - 1
+ */
+
+/* MCK = 48MHz, CLKDIV = 59, MCI_SPEED = 48MHz / 2 * (59+1) = 400 KHz */
+
+#define HSMCI_INIT_CLKDIV (59 << HSMCI_MR_CLKDIV_SHIFT)
+
+/* MCK = 48MHz, CLKDIV = 1, MCI_SPEED = 48MHz / 2 * (1+1) = 12 MHz */
+
+#define HSMCI_MMCXFR_CLKDIV (3 << HSMCI_MR_CLKDIV_SHIFT)
+
+/* MCK = 48MHz, CLKDIV = 0, MCI_SPEED = 48MHz / 2 * (0+1) = 24 MHz */
+
+#define HSMCI_SDXFR_CLKDIV (0 << HSMCI_MR_CLKDIV_SHIFT)
+#define HSMCI_SDWIDEXFR_CLKDIV HSMCI_SDXFR_CLKDIV
+
+/* FLASH wait states:
+ *
+ * DC Characteristics
+ *
+ * Parameter Min Typ Max
+ * ---------------------- ----- ----- ----
+ * Vddcore DC Supply Core 1.08V 1.2V 1.32V
+ * Vvddio DC Supply I/Os 1.62V 3.3V 3.6V
+ *
+ * Wait Maximum
+ * Vddcore Vvddio States Frequency (MHz)
+ * ------- ---------- ------ ---------------
+ * 1.08V 1.62-3.6V 0 16
+ * " " " "-" " 1 33
+ * " " " "-" " 2 50
+ * " " " "-" " 3 67
+ * " " " "-" " 4 84
+ * " " " "-" " 5 100
+ * 1.08V 2.7-3.6V 0 20
+ * " " " "-" " 1 40
+ * " " " "-" " 2 60
+ * " " " "-" " 3 80
+ * " " " "-" " 4 100
+ * 1.2V 1.62-3.6V 0 17
+ * " " " "-" " 1 34
+ * " " " "-" " 2 52
+ * " " " "-" " 3 69
+ * " " " "-" " 4 87
+ * " " " "-" " 5 104
+ * " " " "-" " 6 121
+ * 1.2V 2.7-3.6V 0 21
+ * " " " "-" " 1 42
+ * " " " "-" " 2 63
+ * " " " "-" " 3 84
+ * " " " "-" " 4 105
+ * " " " "-" " 5 123 << SELECTION
+ */
+
+#define BOARD_FWS 5
+
+/* LED definitions ******************************************************************/
+/* There are four LEDs on board the SAM4S Xplained board, two of these can be
+ * controlled by software in the SAM4S:
+ *
+ * LED GPIO
+ * ---------------- -----
+ * D9 Yellow LED PC10
+ * D10 Yellow LED PC17
+ *
+ * Both can be illuminated by driving the GPIO output to ground (low).
+ */
+
+/* LED index values for use with sam_setled() */
+
+#define BOARD_D9 0
+#define BOARD_D10 1
+#define BOARD_NLEDS 2
+
+/* LED bits for use with sam_setleds() */
+
+#define BOARD_D9_BIT (1 << BOARD_D9)
+#define BOARD_D10_BIT (1 << BOARD_D10)
+
+/* These LEDs are not used by the board port unless CONFIG_ARCH_LEDS is
+ * defined. In that case, the usage by the board port is defined in
+ * include/board.h and src/up_leds.c. The LEDs are used to encode OS-related
+ * events as follows:
+ *
+ * SYMBOL Val Meaning LED state
+ * D9 D10
+ * ----------------------- --- ----------------------- -------- -------- */
+#define LED_STARTED 0 /* NuttX has been started OFF OFF */
+#define LED_HEAPALLOCATE 0 /* Heap has been allocated OFF OFF */
+#define LED_IRQSENABLED 0 /* Interrupts enabled OFF OFF */
+#define LED_STACKCREATED 0 /* Idle stack created ON OFF */
+#define LED_INIRQ 0 /* In an interrupt No change */
+#define LED_SIGNAL 0 /* In a signal handler No change */
+#define LED_ASSERTION 0 /* An assertion failed No change */
+#define LED_PANIC 0 /* The system has crashed OFF Blinking */
+#define LED_IDLE 0 /* MCU is is sleep mode Not used */
+
+/* Thus if D9 is statically on, NuttX has successfully booted and is,
+ * apparently, running normmally. If D10 is flashing at approximately
+ * 2Hz, then a fatal error has been detected and the system has halted.
+ */
+
+/* Button definitions ***************************************************************/
+/* Mechanical buttons:
+ *
+ * The SAM4S Xplained has two mechanical buttons. One button is the RESET button
+ * connected to the SAM4S reset line and the other is a generic user configurable
+ * button labeled BP2. When a button is pressed it will drive the I/O line to GND.
+ *
+ * PA5 BP2
+ */
+
+#define BUTTON_BP2 0
+#define NUM_BUTTONS 1
+
+#define BUTTON_BP2_BIT (1 << BUTTON_BP2)
+
+/************************************************************************************
+ * Public Data
+ ************************************************************************************/
+
+#ifndef __ASSEMBLY__
+
+#undef EXTERN
+#if defined(__cplusplus)
+#define EXTERN extern "C"
+extern "C" {
+#else
+#define EXTERN extern
+#endif
+
+/************************************************************************************
+ * Public Function Prototypes
+ ************************************************************************************/
+/************************************************************************************
+ * Name: sam_boardinitialize
+ *
+ * Description:
+ * All SAM3U architectures must provide the following entry point. This entry point
+ * is called early in the intitialization -- after all memory has been configured
+ * and mapped but before any devices have been initialized.
+ *
+ ************************************************************************************/
+
+void sam_boardinitialize(void);
+
+/************************************************************************************
+ * Name: sam_ledinit, sam_setled, and sam_setleds
+ *
+ * Description:
+ * If CONFIG_ARCH_LEDS is defined, then NuttX will control the on-board LEDs. If
+ * CONFIG_ARCH_LEDS is not defined, then the following interfaces are available to
+ * control the LEDs from user applications.
+ *
+ ************************************************************************************/
+
+#ifndef CONFIG_ARCH_LEDS
+void sam_ledinit(void);
+void sam_setled(int led, bool ledon);
+void sam_setleds(uint8_t ledset);
+#endif
+
+/************************************************************************************
+ * Name: up_buttoninit
+ *
+ * Description:
+ * up_buttoninit() must be called to initialize button resources. After that,
+ * up_buttons() may be called to collect the current state of all buttons or
+ * up_irqbutton() may be called to register button interrupt handlers.
+ *
+ ************************************************************************************/
+
+#ifdef CONFIG_ARCH_BUTTONS
+void up_buttoninit(void);
+
+/************************************************************************************
+ * Name: up_buttons
+ *
+ * Description:
+ * After up_buttoninit() has been called, up_buttons() may be called to collect
+ * the state of all buttons. up_buttons() returns an 8-bit bit set with each bit
+ * associated with a button. See the BUTTON* definitions above for the meaning of
+ * each bit in the returned value.
+ *
+ ************************************************************************************/
+
+uint8_t up_buttons(void);
+
+/************************************************************************************
+ * Name: up_irqbutton
+ *
+ * Description:
+ * This function may be called to register an interrupt handler that will be
+ * called when a button is depressed or released. The ID value is one of the
+ * BUTTON* definitions provided above. The previous interrupt handler address is
+ * returned (so that it may restored, if so desired).
+ *
+ ************************************************************************************/
+
+#ifdef CONFIG_GPIOA_IRQ
+xcpt_t up_irqbutton(int id, xcpt_t irqhandler);
+#endif
+#endif /* CONFIG_ARCH_BUTTONS */
+
+#undef EXTERN
+#if defined(__cplusplus)
+}
+#endif
+
+#endif /* __ASSEMBLY__ */
+#endif /* __CONFIGS_SAM4L_XPLAINED_INCLUDE_BOARD_H */
diff --git a/nuttx/configs/sam4s-xplained/nsh/Make.defs b/nuttx/configs/sam4s-xplained/nsh/Make.defs
new file mode 100644
index 000000000..5d7798abc
--- /dev/null
+++ b/nuttx/configs/sam4s-xplained/nsh/Make.defs
@@ -0,0 +1,109 @@
+############################################################################
+# configs/sam4s-xplained/nsh/Make.defs
+#
+# Copyright (C) 2013 Gregory Nutt. All rights reserved.
+# 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
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+# 3. Neither the name NuttX nor the names of its contributors may be
+# used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+#
+############################################################################
+
+include ${TOPDIR}/.config
+include ${TOPDIR}/tools/Config.mk
+include ${TOPDIR}/arch/arm/src/armv7-m/Toolchain.defs
+
+ifeq ($(WINTOOL),y)
+ # Windows-native toolchains
+ DIRLINK = $(TOPDIR)/tools/copydir.sh
+ DIRUNLINK = $(TOPDIR)/tools/unlink.sh
+ MKDEP = $(TOPDIR)/tools/mknulldeps.sh
+ ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}"
+ ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}"
+ ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script}"
+ MAXOPTIMIZATION = -O2
+else
+ # Linux/Cygwin-native toolchain
+ MKDEP = $(TOPDIR)/tools/mkdeps.sh
+ ARCHINCLUDES = -I. -isystem $(TOPDIR)/include
+ ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
+ ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script
+endif
+
+CC = $(CROSSDEV)gcc
+CXX = $(CROSSDEV)g++
+CPP = $(CROSSDEV)gcc -E
+LD = $(CROSSDEV)ld
+AR = $(CROSSDEV)ar rcs
+NM = $(CROSSDEV)nm
+OBJCOPY = $(CROSSDEV)objcopy
+OBJDUMP = $(CROSSDEV)objdump
+
+ARCHCCVERSION = ${shell $(CC) -v 2>&1 | sed -n '/^gcc version/p' | sed -e 's/^gcc version \([0-9\.]\)/\1/g' -e 's/[-\ ].*//g' -e '1q'}
+ARCHCCMAJOR = ${shell echo $(ARCHCCVERSION) | cut -d'.' -f1}
+
+ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
+ ARCHOPTIMIZATION = -g
+else
+ ARCHOPTIMIZATION = $(MAXOPTIMIZATION) -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer
+endif
+
+ARCHCFLAGS = -fno-builtin
+ARCHCXXFLAGS = -fno-builtin -fno-exceptions
+ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow
+ARCHWARNINGSXX = -Wall -Wshadow
+ARCHDEFINES =
+ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10
+
+CFLAGS = $(ARCHCFLAGS) $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe
+CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS)
+CXXFLAGS = $(ARCHCXXFLAGS) $(ARCHWARNINGSXX) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe
+CXXPICFLAGS = $(ARCHPICFLAGS) $(CXXFLAGS)
+CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
+AFLAGS = $(CFLAGS) -D__ASSEMBLY__
+
+NXFLATLDFLAGS1 = -r -d -warn-common
+NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) -T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat-pcrel.ld -no-check-sections
+LDNXFLATFLAGS = -e main -s 2048
+
+OBJEXT = .o
+LIBEXT = .a
+EXEEXT =
+
+ifneq ($(CROSSDEV),arm-nuttx-elf-)
+ LDFLAGS += -nostartfiles -nodefaultlibs
+endif
+ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
+ LDFLAGS += -g
+endif
+
+
+HOSTCC = gcc
+HOSTINCLUDES = -I.
+HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -g -pipe
+HOSTLDFLAGS =
+
diff --git a/nuttx/configs/sam4s-xplained/nsh/defconfig b/nuttx/configs/sam4s-xplained/nsh/defconfig
new file mode 100644
index 000000000..2a5f3f15a
--- /dev/null
+++ b/nuttx/configs/sam4s-xplained/nsh/defconfig
@@ -0,0 +1,676 @@
+#
+# Automatically generated file; DO NOT EDIT.
+# Nuttx/ Configuration
+#
+CONFIG_NUTTX_NEWCONFIG=y
+
+#
+# Build Setup
+#
+# CONFIG_EXPERIMENTAL is not set
+CONFIG_HOST_LINUX=y
+# CONFIG_HOST_OSX is not set
+# CONFIG_HOST_WINDOWS is not set
+# CONFIG_HOST_OTHER is not set
+
+#
+# Build Configuration
+#
+# CONFIG_APPS_DIR="../apps"
+# CONFIG_BUILD_2PASS is not set
+
+#
+# Binary Output Formats
+#
+# CONFIG_RRLOAD_BINARY is not set
+# CONFIG_INTELHEX_BINARY is not set
+# CONFIG_MOTOROLA_SREC is not set
+CONFIG_RAW_BINARY=y
+
+#
+# Customize Header Files
+#
+# CONFIG_ARCH_STDBOOL_H is not set
+# CONFIG_ARCH_MATH_H is not set
+# CONFIG_ARCH_FLOAT_H is not set
+# CONFIG_ARCH_STDARG_H is not set
+
+#
+# Debug Options
+#
+# CONFIG_DEBUG is not set
+# CONFIG_DEBUG_SYMBOLS is not set
+
+#
+# System Type
+#
+# CONFIG_ARCH_8051 is not set
+CONFIG_ARCH_ARM=y
+# CONFIG_ARCH_AVR is not set
+# CONFIG_ARCH_HC is not set
+# CONFIG_ARCH_MIPS is not set
+# CONFIG_ARCH_RGMP is not set
+# CONFIG_ARCH_SH is not set
+# CONFIG_ARCH_SIM is not set
+# CONFIG_ARCH_X86 is not set
+# CONFIG_ARCH_Z16 is not set
+# CONFIG_ARCH_Z80 is not set
+CONFIG_ARCH="arm"
+
+#
+# ARM Options
+#
+# CONFIG_ARCH_CHIP_C5471 is not set
+# CONFIG_ARCH_CHIP_CALYPSO is not set
+# CONFIG_ARCH_CHIP_DM320 is not set
+# CONFIG_ARCH_CHIP_IMX is not set
+# CONFIG_ARCH_CHIP_KINETIS is not set
+# CONFIG_ARCH_CHIP_KL is not set
+# CONFIG_ARCH_CHIP_LM is not set
+# CONFIG_ARCH_CHIP_LPC17XX is not set
+# CONFIG_ARCH_CHIP_LPC214X is not set
+# CONFIG_ARCH_CHIP_LPC2378 is not set
+# CONFIG_ARCH_CHIP_LPC31XX is not set
+# CONFIG_ARCH_CHIP_LPC43XX is not set
+# CONFIG_ARCH_CHIP_NUC1XX is not set
+CONFIG_ARCH_CHIP_SAM34=y
+# CONFIG_ARCH_CHIP_STM32 is not set
+# CONFIG_ARCH_CHIP_STR71X is not set
+CONFIG_ARCH_CORTEXM4=y
+CONFIG_ARCH_FAMILY="armv7-m"
+CONFIG_ARCH_CHIP="sam34"
+# CONFIG_ARMV7M_USEBASEPRI is not set
+# CONFIG_ARCH_HAVE_FPU is not set
+CONFIG_ARCH_HAVE_MPU=y
+# CONFIG_ARMV7M_MPU is not set
+
+#
+# ARMV7M Configuration Options
+#
+CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT=y
+# CONFIG_ARMV7M_TOOLCHAIN_CODEREDL is not set
+# CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL is not set
+# CONFIG_ARMV7M_TOOLCHAIN_GNU_EABI is not set
+CONFIG_ARMV7M_OABI_TOOLCHAIN=y
+
+#
+# AT91SAM3/4 Configuration Options
+#
+# CONFIG_ARCH_CHIP_AT91SAM3U4E is not set
+# CONFIG_ARCH_CHIP_SAM34_NDMACHANC2C is not set
+# CONFIG_ARCH_CHIP_ATSAM4LC2B is not set
+# CONFIG_ARCH_CHIP_ATSAM4LC2A is not set
+# CONFIG_ARCH_CHIP_ATSAM4LC4C is not set
+# CONFIG_ARCH_CHIP_ATSAM4LC4B is not set
+# CONFIG_ARCH_CHIP_ATSAM4LC4A is not set
+# CONFIG_ARCH_CHIP_ATSAM4LS2C is not set
+# CONFIG_ARCH_CHIP_ATSAM4LS2B is not set
+# CONFIG_ARCH_CHIP_ATSAM4LS2A is not set
+# CONFIG_ARCH_CHIP_ATSAM4LS4C is not set
+# CONFIG_ARCH_CHIP_ATSAM4LS4B is not set
+# CONFIG_ARCH_CHIP_ATSAM4LS4A is not set
+# CONFIG_ARCH_CHIP_ATSAM4SD32C is not set
+# CONFIG_ARCH_CHIP_ATSAM4SD32B is not set
+# CONFIG_ARCH_CHIP_ATSAM4SD16C is not set
+# CONFIG_ARCH_CHIP_ATSAM4SD16B is not set
+# CONFIG_ARCH_CHIP_ATSAM4SA16C is not set
+# CONFIG_ARCH_CHIP_ATSAM4SA16B is not set
+CONFIG_ARCH_CHIP_ATSAM4S16C=y
+# CONFIG_ARCH_CHIP_ATSAM4S16B is not set
+# CONFIG_ARCH_CHIP_ATSAM4S8C is not set
+# CONFIG_ARCH_CHIP_ATSAM4S8B is not set
+# CONFIG_ARCH_CHIP_SAM3U is not set
+# CONFIG_ARCH_CHIP_SAM4L is not set
+CONFIG_ARCH_CHIP_SAM4S=y
+
+#
+# AT91SAM3/4 Peripheral Support
+#
+# CONFIG_SAM34_SPI is not set
+# CONFIG_SAM34_SSC is not set
+# CONFIG_SAM34_TC0 is not set
+# CONFIG_SAM34_TC1 is not set
+# CONFIG_SAM34_TC2 is not set
+# CONFIG_SAM34_TC3 is not set
+# CONFIG_SAM34_TC4 is not set
+# CONFIG_SAM34_TC5 is not set
+# CONFIG_SAM34_PWM is not set
+# CONFIG_SAM34_TWIM0 is not set
+# CONFIG_SAM34_TWIS0 is not set
+# CONFIG_SAM34_TWIM1 is not set
+# CONFIG_SAM34_TWIS1 is not set
+# CONFIG_SAM34_UART0 is not set
+CONFIG_SAM34_UART1=y
+# CONFIG_SAM34_USART0 is not set
+# CONFIG_SAM34_USART1 is not set
+# CONFIG_SAM34_ADC12B is not set
+# CONFIG_SAM34_DACC is not set
+# CONFIG_SAM34_ACC is not set
+# CONFIG_SAM34_SMC is not set
+# CONFIG_SAM34_PDCA is not set
+# CONFIG_SAM34_CRCCU is not set
+# CONFIG_SAM34_UDP is not set
+# CONFIG_SAM34_RTC is not set
+# CONFIG_SAM34_RTT is not set
+# CONFIG_SAM34_WDT is not set
+# CONFIG_SAM34_HSMCI is not set
+
+#
+# AT91SAM3/4 USART Configuration
+#
+
+#
+# AT91SAM3/4 GPIO Interrupt Configuration
+#
+# CONFIG_GPIOA_IRQ is not set
+# CONFIG_GPIOB_IRQ is not set
+# CONFIG_GPIOC_IRQ is not set
+
+#
+# External Memory Configuration
+#
+
+#
+# Architecture Options
+#
+# CONFIG_ARCH_NOINTC is not set
+# CONFIG_ARCH_VECNOTIRQ is not set
+# CONFIG_ARCH_DMA is not set
+CONFIG_ARCH_IRQPRIO=y
+# CONFIG_CUSTOM_STACK is not set
+# CONFIG_ADDRENV is not set
+CONFIG_ARCH_HAVE_VFORK=y
+CONFIG_ARCH_STACKDUMP=y
+# CONFIG_ENDIAN_BIG is not set
+CONFIG_ARCH_HAVE_RAMFUNCS=y
+CONFIG_ARCH_RAMFUNCS=y
+CONFIG_ARCH_HAVE_RAMVECTORS=y
+# CONFIG_ARCH_RAMVECTORS is not set
+
+#
+# Board Settings
+#
+CONFIG_BOARD_LOOPSPERMSEC=9186
+# CONFIG_ARCH_CALIBRATION is not set
+CONFIG_DRAM_START=0x20000000
+CONFIG_DRAM_SIZE=131072
+CONFIG_ARCH_HAVE_INTERRUPTSTACK=y
+CONFIG_ARCH_INTERRUPTSTACK=0
+
+#
+# Boot options
+#
+# CONFIG_BOOT_RUNFROMEXTSRAM is not set
+CONFIG_BOOT_RUNFROMFLASH=y
+# CONFIG_BOOT_RUNFROMISRAM is not set
+# CONFIG_BOOT_RUNFROMSDRAM is not set
+# CONFIG_BOOT_COPYTORAM is not set
+
+#
+# Board Selection
+#
+CONFIG_ARCH_BOARD_SAM4S_XPLAINED=y
+# CONFIG_ARCH_BOARD_CUSTOM is not set
+CONFIG_ARCH_BOARD="sam4s-xplained"
+
+#
+# Common Board Options
+#
+CONFIG_ARCH_HAVE_LEDS=y
+CONFIG_ARCH_LEDS=y
+CONFIG_ARCH_HAVE_BUTTONS=y
+CONFIG_ARCH_BUTTONS=y
+CONFIG_ARCH_HAVE_IRQBUTTONS=y
+# CONFIG_ARCH_IRQBUTTONS is not set
+CONFIG_NSH_MMCSDMINOR=0
+
+#
+# Board-Specific Options
+#
+
+#
+# RTOS Features
+#
+# CONFIG_BOARD_INITIALIZE is not set
+CONFIG_MSEC_PER_TICK=10
+CONFIG_RR_INTERVAL=200
+# CONFIG_SCHED_INSTRUMENTATION is not set
+CONFIG_TASK_NAME_SIZE=0
+# CONFIG_SCHED_HAVE_PARENT is not set
+# CONFIG_JULIAN_TIME is not set
+CONFIG_START_YEAR=2013
+CONFIG_START_MONTH=6
+CONFIG_START_DAY=12
+CONFIG_DEV_CONSOLE=y
+# CONFIG_MUTEX_TYPES is not set
+# CONFIG_PRIORITY_INHERITANCE is not set
+# CONFIG_FDCLONE_DISABLE is not set
+# CONFIG_FDCLONE_STDIO is not set
+CONFIG_SDCLONE_DISABLE=y
+# CONFIG_SCHED_WAITPID is not set
+# CONFIG_SCHED_STARTHOOK is not set
+# CONFIG_SCHED_ATEXIT is not set
+# CONFIG_SCHED_ONEXIT is not set
+CONFIG_USER_ENTRYPOINT="nsh_main"
+CONFIG_DISABLE_OS_API=y
+# CONFIG_DISABLE_CLOCK is not set
+# CONFIG_DISABLE_POSIX_TIMERS is not set
+# CONFIG_DISABLE_PTHREAD is not set
+# CONFIG_DISABLE_SIGNALS is not set
+# CONFIG_DISABLE_MQUEUE is not set
+CONFIG_DISABLE_ENVIRON=y
+
+#
+# Signal Numbers
+#
+CONFIG_SIG_SIGUSR1=1
+CONFIG_SIG_SIGUSR2=2
+CONFIG_SIG_SIGALARM=3
+CONFIG_SIG_SIGCONDTIMEDOUT=16
+
+#
+# Sizes of configurable things (0 disables)
+#
+CONFIG_MAX_TASKS=16
+CONFIG_MAX_TASK_ARGS=4
+CONFIG_NPTHREAD_KEYS=4
+CONFIG_NFILE_DESCRIPTORS=8
+CONFIG_NFILE_STREAMS=8
+CONFIG_NAME_MAX=32
+CONFIG_PREALLOC_MQ_MSGS=4
+CONFIG_MQ_MAXMSGSIZE=32
+CONFIG_MAX_WDOGPARMS=2
+CONFIG_PREALLOC_WDOGS=4
+CONFIG_PREALLOC_TIMERS=4
+
+#
+# Stack and heap information
+#
+CONFIG_IDLETHREAD_STACKSIZE=1024
+CONFIG_USERMAIN_STACKSIZE=2048
+CONFIG_PTHREAD_STACK_MIN=256
+CONFIG_PTHREAD_STACK_DEFAULT=2048
+
+#
+# Device Drivers
+#
+CONFIG_DISABLE_POLL=y
+CONFIG_DEV_NULL=y
+# CONFIG_DEV_ZERO is not set
+# CONFIG_LOOP is not set
+# CONFIG_RAMDISK is not set
+# CONFIG_CAN is not set
+# CONFIG_PWM is not set
+# CONFIG_I2C is not set
+# CONFIG_SPI is not set
+# CONFIG_RTC is not set
+# CONFIG_WATCHDOG is not set
+# CONFIG_ANALOG is not set
+# CONFIG_AUDIO_DEVICES is not set
+# CONFIG_BCH is not set
+# CONFIG_INPUT is not set
+# CONFIG_LCD is not set
+# CONFIG_MMCSD is not set
+# CONFIG_MTD is not set
+# CONFIG_PIPES is not set
+# CONFIG_PM is not set
+# CONFIG_POWER is not set
+# CONFIG_SENSORS is not set
+CONFIG_SERIAL=y
+# CONFIG_DEV_LOWCONSOLE is not set
+# CONFIG_16550_UART is not set
+CONFIG_ARCH_HAVE_UART1=y
+CONFIG_MCU_SERIAL=y
+CONFIG_STANDARD_SERIAL=y
+CONFIG_UART1_SERIAL_CONSOLE=y
+# CONFIG_NO_SERIAL_CONSOLE is not set
+
+#
+# UART1 Configuration
+#
+CONFIG_UART1_RXBUFSIZE=256
+CONFIG_UART1_TXBUFSIZE=256
+CONFIG_UART1_BAUD=115200
+CONFIG_UART1_BITS=8
+CONFIG_UART1_PARITY=0
+CONFIG_UART1_2STOP=0
+# CONFIG_UART1_IFLOWCONTROL is not set
+# CONFIG_UART1_OFLOWCONTROL is not set
+# CONFIG_SERIAL_IFLOWCONTROL is not set
+# CONFIG_SERIAL_OFLOWCONTROL is not set
+# CONFIG_USBDEV is not set
+# CONFIG_USBHOST is not set
+# CONFIG_WIRELESS is not set
+
+#
+# System Logging Device Options
+#
+
+#
+# System Logging
+#
+# CONFIG_RAMLOG is not set
+
+#
+# Networking Support
+#
+# CONFIG_NET is not set
+
+#
+# File Systems
+#
+
+#
+# File system configuration
+#
+CONFIG_DISABLE_MOUNTPOINT=y
+# CONFIG_FS_RAMMAP is not set
+# CONFIG_FS_BINFS is not set
+
+#
+# System Logging
+#
+# CONFIG_SYSLOG_ENABLE is not set
+# CONFIG_SYSLOG is not set
+
+#
+# Graphics Support
+#
+# CONFIG_NX is not set
+
+#
+# Memory Management
+#
+# CONFIG_MM_MULTIHEAP is not set
+# CONFIG_MM_SMALL is not set
+CONFIG_MM_REGIONS=3
+# CONFIG_GRAN is not set
+
+#
+# Audio Support
+#
+# CONFIG_AUDIO is not set
+
+#
+# Binary Formats
+#
+# CONFIG_BINFMT_DISABLE is not set
+# CONFIG_NXFLAT is not set
+# CONFIG_ELF is not set
+CONFIG_BUILTIN=y
+# CONFIG_PIC is not set
+# CONFIG_SYMTAB_ORDEREDBYNAME is not set
+
+#
+# Library Routines
+#
+
+#
+# Standard C Library Options
+#
+CONFIG_STDIO_BUFFER_SIZE=64
+CONFIG_STDIO_LINEBUFFER=y
+CONFIG_NUNGET_CHARS=2
+# CONFIG_LIBM is not set
+# CONFIG_NOPRINTF_FIELDWIDTH is not set
+# CONFIG_LIBC_FLOATINGPOINT is not set
+CONFIG_LIB_RAND_ORDER=1
+# CONFIG_EOL_IS_CR is not set
+# CONFIG_EOL_IS_LF is not set
+# CONFIG_EOL_IS_BOTH_CRLF is not set
+CONFIG_EOL_IS_EITHER_CRLF=y
+# CONFIG_LIBC_EXECFUNCS is not set
+CONFIG_POSIX_SPAWN_PROXY_STACKSIZE=1024
+CONFIG_TASK_SPAWN_DEFAULT_STACKSIZE=2048
+# CONFIG_LIBC_STRERROR is not set
+# CONFIG_LIBC_PERROR_STDOUT is not set
+CONFIG_ARCH_LOWPUTC=y
+CONFIG_LIB_SENDFILE_BUFSIZE=512
+# CONFIG_ARCH_ROMGETC is not set
+# CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set
+
+#
+# Non-standard Library Support
+#
+# CONFIG_SCHED_WORKQUEUE is not set
+# CONFIG_LIB_KBDCODEC is not set
+# CONFIG_LIB_SLCDCODEC is not set
+
+#
+# Basic CXX Support
+#
+# CONFIG_C99_BOOL8 is not set
+CONFIG_HAVE_CXX=y
+CONFIG_HAVE_CXXINITIALIZE=y
+CONFIG_CXX_NEWLONG=y
+
+#
+# uClibc++ Standard C++ Library
+#
+# CONFIG_UCLIBCXX is not set
+
+#
+# Application Configuration
+#
+
+#
+# Built-In Applications
+#
+CONFIG_BUILTIN_PROXY_STACKSIZE=1024
+
+#
+# Examples
+#
+# CONFIG_EXAMPLES_BUTTONS is not set
+# CONFIG_EXAMPLES_CAN is not set
+# CONFIG_EXAMPLES_COMPOSITE is not set
+# CONFIG_EXAMPLES_CXXTEST is not set
+# CONFIG_EXAMPLES_DHCPD is not set
+# CONFIG_EXAMPLES_ELF is not set
+# CONFIG_EXAMPLES_FTPC is not set
+# CONFIG_EXAMPLES_FTPD is not set
+# CONFIG_EXAMPLES_HELLO is not set
+# CONFIG_EXAMPLES_HELLOXX is not set
+# CONFIG_EXAMPLES_JSON is not set
+# CONFIG_EXAMPLES_HIDKBD is not set
+# CONFIG_EXAMPLES_KEYPADTEST is not set
+# CONFIG_EXAMPLES_IGMP is not set
+# CONFIG_EXAMPLES_LCDRW is not set
+# CONFIG_EXAMPLES_MM is not set
+# CONFIG_EXAMPLES_MODBUS is not set
+# CONFIG_EXAMPLES_MOUNT is not set
+# CONFIG_EXAMPLES_NRF24L01TERM is not set
+CONFIG_EXAMPLES_NSH=y
+# CONFIG_EXAMPLES_NULL is not set
+# CONFIG_EXAMPLES_NX is not set
+# CONFIG_EXAMPLES_NXCONSOLE is not set
+# CONFIG_EXAMPLES_NXFFS is not set
+# CONFIG_EXAMPLES_NXFLAT is not set
+# CONFIG_EXAMPLES_NXHELLO is not set
+# CONFIG_EXAMPLES_NXIMAGE is not set
+# CONFIG_EXAMPLES_NXLINES is not set
+# CONFIG_EXAMPLES_NXTEXT is not set
+# CONFIG_EXAMPLES_OSTEST is not set
+# CONFIG_EXAMPLES_PASHELLO is not set
+# CONFIG_EXAMPLES_PIPE is not set
+# CONFIG_EXAMPLES_POSIXSPAWN is not set
+# CONFIG_EXAMPLES_QENCODER is not set
+# CONFIG_EXAMPLES_RGMP is not set
+# CONFIG_EXAMPLES_ROMFS is not set
+# CONFIG_EXAMPLES_SENDMAIL is not set
+# CONFIG_EXAMPLES_SERLOOP is not set
+# CONFIG_EXAMPLES_SLCD is not set
+# CONFIG_EXAMPLES_SMART_TEST is not set
+# CONFIG_EXAMPLES_SMART is not set
+# CONFIG_EXAMPLES_TCPECHO is not set
+# CONFIG_EXAMPLES_TELNETD is not set
+# CONFIG_EXAMPLES_THTTPD is not set
+# CONFIG_EXAMPLES_TIFF is not set
+# CONFIG_EXAMPLES_TOUCHSCREEN is not set
+# CONFIG_EXAMPLES_UDP is not set
+# CONFIG_EXAMPLES_UIP is not set
+# CONFIG_EXAMPLES_USBSERIAL is not set
+# CONFIG_EXAMPLES_USBMSC is not set
+# CONFIG_EXAMPLES_USBTERM is not set
+# CONFIG_EXAMPLES_WATCHDOG is not set
+
+#
+# Graphics Support
+#
+# CONFIG_TIFF is not set
+
+#
+# Interpreters
+#
+# CONFIG_INTERPRETERS_FICL is not set
+# CONFIG_INTERPRETERS_PCODE is not set
+
+#
+# Network Utilities
+#
+
+#
+# Networking Utilities
+#
+# CONFIG_NETUTILS_CODECS is not set
+# CONFIG_NETUTILS_DHCPC is not set
+# CONFIG_NETUTILS_DHCPD is not set
+# CONFIG_NETUTILS_FTPC is not set
+# CONFIG_NETUTILS_FTPD is not set
+# CONFIG_NETUTILS_JSON is not set
+# CONFIG_NETUTILS_RESOLV is not set
+# CONFIG_NETUTILS_SMTP is not set
+# CONFIG_NETUTILS_TELNETD is not set
+# CONFIG_NETUTILS_TFTPC is not set
+# CONFIG_NETUTILS_THTTPD is not set
+# CONFIG_NETUTILS_UIPLIB is not set
+# CONFIG_NETUTILS_WEBCLIENT is not set
+
+#
+# FreeModBus
+#
+# CONFIG_MODBUS is not set
+
+#
+# NSH Library
+#
+CONFIG_NSH_LIBRARY=y
+CONFIG_NSH_BUILTIN_APPS=y
+
+#
+# Disable Individual commands
+#
+# CONFIG_NSH_DISABLE_CAT is not set
+# CONFIG_NSH_DISABLE_CD is not set
+# CONFIG_NSH_DISABLE_CP is not set
+# CONFIG_NSH_DISABLE_DD is not set
+# CONFIG_NSH_DISABLE_ECHO is not set
+# CONFIG_NSH_DISABLE_EXEC is not set
+# CONFIG_NSH_DISABLE_EXIT is not set
+# CONFIG_NSH_DISABLE_FREE is not set
+# CONFIG_NSH_DISABLE_GET is not set
+# CONFIG_NSH_DISABLE_HELP is not set
+# CONFIG_NSH_DISABLE_HEXDUMP is not set
+# CONFIG_NSH_DISABLE_IFCONFIG is not set
+# CONFIG_NSH_DISABLE_KILL is not set
+# CONFIG_NSH_DISABLE_LOSETUP is not set
+# CONFIG_NSH_DISABLE_LS is not set
+# CONFIG_NSH_DISABLE_MB is not set
+# CONFIG_NSH_DISABLE_MKDIR is not set
+# CONFIG_NSH_DISABLE_MKFATFS is not set
+# CONFIG_NSH_DISABLE_MKFIFO is not set
+# CONFIG_NSH_DISABLE_MKRD is not set
+# CONFIG_NSH_DISABLE_MH is not set
+# CONFIG_NSH_DISABLE_MOUNT is not set
+# CONFIG_NSH_DISABLE_MW is not set
+# CONFIG_NSH_DISABLE_NSFMOUNT is not set
+# CONFIG_NSH_DISABLE_PS is not set
+# CONFIG_NSH_DISABLE_PING is not set
+# CONFIG_NSH_DISABLE_PUT is not set
+# CONFIG_NSH_DISABLE_PWD is not set
+# CONFIG_NSH_DISABLE_RM is not set
+# CONFIG_NSH_DISABLE_RMDIR is not set
+# CONFIG_NSH_DISABLE_SET is not set
+# CONFIG_NSH_DISABLE_SH is not set
+# CONFIG_NSH_DISABLE_SLEEP is not set
+# CONFIG_NSH_DISABLE_TEST is not set
+# CONFIG_NSH_DISABLE_UMOUNT is not set
+# CONFIG_NSH_DISABLE_UNSET is not set
+# CONFIG_NSH_DISABLE_USLEEP is not set
+# CONFIG_NSH_DISABLE_WGET is not set
+# CONFIG_NSH_DISABLE_XD is not set
+
+#
+# Configure Command Options
+#
+# CONFIG_NSH_CMDOPT_DF_H is not set
+CONFIG_NSH_CODECS_BUFSIZE=128
+CONFIG_NSH_FILEIOSIZE=512
+CONFIG_NSH_LINELEN=80
+CONFIG_NSH_MAXARGUMENTS=6
+CONFIG_NSH_NESTDEPTH=3
+# CONFIG_NSH_DISABLESCRIPT is not set
+# CONFIG_NSH_DISABLEBG is not set
+CONFIG_NSH_CONSOLE=y
+
+#
+# USB Trace Support
+#
+# CONFIG_NSH_CONDEV is not set
+# CONFIG_NSH_ARCHINIT is not set
+
+#
+# NxWidgets/NxWM
+#
+
+#
+# System NSH Add-Ons
+#
+
+#
+# Custom Free Memory Command
+#
+# CONFIG_SYSTEM_FREE is not set
+
+#
+# I2C tool
+#
+
+#
+# FLASH Program Installation
+#
+# CONFIG_SYSTEM_INSTALL is not set
+
+#
+# FLASH Erase-all Command
+#
+
+#
+# readline()
+#
+CONFIG_SYSTEM_READLINE=y
+CONFIG_READLINE_ECHO=y
+
+#
+# Power Off
+#
+# CONFIG_SYSTEM_POWEROFF is not set
+
+#
+# RAMTRON
+#
+# CONFIG_SYSTEM_RAMTRON is not set
+
+#
+# SD Card
+#
+# CONFIG_SYSTEM_SDCARD is not set
+
+#
+# Sysinfo
+#
+# CONFIG_SYSTEM_SYSINFO is not set
+
+#
+# USB Monitor
+#
diff --git a/nuttx/configs/sam4s-xplained/nsh/setenv.sh b/nuttx/configs/sam4s-xplained/nsh/setenv.sh
new file mode 100755
index 000000000..cf9df57ed
--- /dev/null
+++ b/nuttx/configs/sam4s-xplained/nsh/setenv.sh
@@ -0,0 +1,63 @@
+#!/bin/bash
+# configs/sam4s-xplained/nsh/setenv.sh
+#
+# Copyright (C) 2013 Gregory Nutt. All rights reserved.
+# 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
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+# 3. Neither the name NuttX nor the names of its contributors may be
+# used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+#
+
+
+if [ "$_" = "$0" ] ; then
+ echo "You must source this script, not run it!" 1>&2
+ exit 1
+fi
+
+WD=`pwd`
+if [ ! -x "setenv.sh" ]; then
+ echo "This script must be executed from the top-level NuttX build directory"
+ exit 1
+fi
+
+if [ -z "${PATH_ORIG}" ]; then
+ export PATH_ORIG="${PATH}"
+fi
+
+# This is the Cygwin path to the location where I installed the CodeSourcery
+# toolchain under windows. You will also have to edit this if you install
+# the CodeSourcery toolchain in any other location
+#export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/CodeSourcery/Sourcery G++ Lite/bin"
+
+# This is the Cygwin path to the location where I build the buildroot
+# toolchain.
+export TOOLCHAIN_BIN="${WD}/../misc/buildroot/build_arm_nofpu/staging_dir/bin"
+
+# Add the path to the toolchain to the PATH varialble
+export PATH="${TOOLCHAIN_BIN}:/sbin:/usr/sbin:${PATH_ORIG}"
+
+echo "PATH : ${PATH}"
diff --git a/nuttx/configs/sam4s-xplained/ostest/Make.defs b/nuttx/configs/sam4s-xplained/ostest/Make.defs
new file mode 100644
index 000000000..742260e29
--- /dev/null
+++ b/nuttx/configs/sam4s-xplained/ostest/Make.defs
@@ -0,0 +1,109 @@
+############################################################################
+# configs/sam4s-xplained/ostest/Make.defs
+#
+# Copyright (C) 2013 Gregory Nutt. All rights reserved.
+# 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
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+# 3. Neither the name NuttX nor the names of its contributors may be
+# used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+#
+############################################################################
+
+include ${TOPDIR}/.config
+include ${TOPDIR}/tools/Config.mk
+include ${TOPDIR}/arch/arm/src/armv7-m/Toolchain.defs
+
+ifeq ($(WINTOOL),y)
+ # Windows-native toolchains
+ DIRLINK = $(TOPDIR)/tools/copydir.sh
+ DIRUNLINK = $(TOPDIR)/tools/unlink.sh
+ MKDEP = $(TOPDIR)/tools/mknulldeps.sh
+ ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}"
+ ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}"
+ ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script}"
+ MAXOPTIMIZATION = -O2
+else
+ # Linux/Cygwin-native toolchain
+ MKDEP = $(TOPDIR)/tools/mkdeps.sh
+ ARCHINCLUDES = -I. -isystem $(TOPDIR)/include
+ ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
+ ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script
+endif
+
+CC = $(CROSSDEV)gcc
+CXX = $(CROSSDEV)g++
+CPP = $(CROSSDEV)gcc -E
+LD = $(CROSSDEV)ld
+AR = $(CROSSDEV)ar rcs
+NM = $(CROSSDEV)nm
+OBJCOPY = $(CROSSDEV)objcopy
+OBJDUMP = $(CROSSDEV)objdump
+
+ARCHCCVERSION = ${shell $(CC) -v 2>&1 | sed -n '/^gcc version/p' | sed -e 's/^gcc version \([0-9\.]\)/\1/g' -e 's/[-\ ].*//g' -e '1q'}
+ARCHCCMAJOR = ${shell echo $(ARCHCCVERSION) | cut -d'.' -f1}
+
+ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
+ ARCHOPTIMIZATION = -g
+else
+ ARCHOPTIMIZATION = $(MAXOPTIMIZATION) -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer
+endif
+
+ARCHCFLAGS = -fno-builtin
+ARCHCXXFLAGS = -fno-builtin -fno-exceptions
+ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow
+ARCHWARNINGSXX = -Wall -Wshadow
+ARCHDEFINES =
+ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10
+
+CFLAGS = $(ARCHCFLAGS) $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe
+CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS)
+CXXFLAGS = $(ARCHCXXFLAGS) $(ARCHWARNINGSXX) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe
+CXXPICFLAGS = $(ARCHPICFLAGS) $(CXXFLAGS)
+CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
+AFLAGS = $(CFLAGS) -D__ASSEMBLY__
+
+NXFLATLDFLAGS1 = -r -d -warn-common
+NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) -T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat-pcrel.ld -no-check-sections
+LDNXFLATFLAGS = -e main -s 2048
+
+OBJEXT = .o
+LIBEXT = .a
+EXEEXT =
+
+ifneq ($(CROSSDEV),arm-nuttx-elf-)
+ LDFLAGS += -nostartfiles -nodefaultlibs
+endif
+ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
+ LDFLAGS += -g
+endif
+
+
+HOSTCC = gcc
+HOSTINCLUDES = -I.
+HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -g -pipe
+HOSTLDFLAGS =
+
diff --git a/nuttx/configs/sam4s-xplained/ostest/defconfig b/nuttx/configs/sam4s-xplained/ostest/defconfig
new file mode 100644
index 000000000..c6f77f38f
--- /dev/null
+++ b/nuttx/configs/sam4s-xplained/ostest/defconfig
@@ -0,0 +1,604 @@
+#
+# Automatically generated file; DO NOT EDIT.
+# Nuttx/ Configuration
+#
+CONFIG_NUTTX_NEWCONFIG=y
+
+#
+# Build Setup
+#
+# CONFIG_EXPERIMENTAL is not set
+CONFIG_HOST_LINUX=y
+# CONFIG_HOST_OSX is not set
+# CONFIG_HOST_WINDOWS is not set
+# CONFIG_HOST_OTHER is not set
+
+#
+# Build Configuration
+#
+# CONFIG_APPS_DIR="../apps"
+# CONFIG_BUILD_2PASS is not set
+
+#
+# Binary Output Formats
+#
+# CONFIG_RRLOAD_BINARY is not set
+# CONFIG_INTELHEX_BINARY is not set
+# CONFIG_MOTOROLA_SREC is not set
+CONFIG_RAW_BINARY=y
+
+#
+# Customize Header Files
+#
+# CONFIG_ARCH_STDBOOL_H is not set
+# CONFIG_ARCH_MATH_H is not set
+# CONFIG_ARCH_FLOAT_H is not set
+# CONFIG_ARCH_STDARG_H is not set
+
+#
+# Debug Options
+#
+# CONFIG_DEBUG is not set
+# CONFIG_DEBUG_SYMBOLS is not set
+
+#
+# System Type
+#
+# CONFIG_ARCH_8051 is not set
+CONFIG_ARCH_ARM=y
+# CONFIG_ARCH_AVR is not set
+# CONFIG_ARCH_HC is not set
+# CONFIG_ARCH_MIPS is not set
+# CONFIG_ARCH_RGMP is not set
+# CONFIG_ARCH_SH is not set
+# CONFIG_ARCH_SIM is not set
+# CONFIG_ARCH_X86 is not set
+# CONFIG_ARCH_Z16 is not set
+# CONFIG_ARCH_Z80 is not set
+CONFIG_ARCH="arm"
+
+#
+# ARM Options
+#
+# CONFIG_ARCH_CHIP_C5471 is not set
+# CONFIG_ARCH_CHIP_CALYPSO is not set
+# CONFIG_ARCH_CHIP_DM320 is not set
+# CONFIG_ARCH_CHIP_IMX is not set
+# CONFIG_ARCH_CHIP_KINETIS is not set
+# CONFIG_ARCH_CHIP_KL is not set
+# CONFIG_ARCH_CHIP_LM is not set
+# CONFIG_ARCH_CHIP_LPC17XX is not set
+# CONFIG_ARCH_CHIP_LPC214X is not set
+# CONFIG_ARCH_CHIP_LPC2378 is not set
+# CONFIG_ARCH_CHIP_LPC31XX is not set
+# CONFIG_ARCH_CHIP_LPC43XX is not set
+# CONFIG_ARCH_CHIP_NUC1XX is not set
+CONFIG_ARCH_CHIP_SAM34=y
+# CONFIG_ARCH_CHIP_STM32 is not set
+# CONFIG_ARCH_CHIP_STR71X is not set
+CONFIG_ARCH_CORTEXM4=y
+CONFIG_ARCH_FAMILY="armv7-m"
+CONFIG_ARCH_CHIP="sam34"
+# CONFIG_ARMV7M_USEBASEPRI is not set
+# CONFIG_ARCH_HAVE_FPU is not set
+CONFIG_ARCH_HAVE_MPU=y
+# CONFIG_ARMV7M_MPU is not set
+
+#
+# ARMV7M Configuration Options
+#
+CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT=y
+# CONFIG_ARMV7M_TOOLCHAIN_CODEREDL is not set
+# CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL is not set
+# CONFIG_ARMV7M_TOOLCHAIN_GNU_EABI is not set
+CONFIG_ARMV7M_OABI_TOOLCHAIN=y
+
+#
+# AT91SAM3/4 Configuration Options
+#
+# CONFIG_ARCH_CHIP_AT91SAM3U4E is not set
+# CONFIG_ARCH_CHIP_SAM34_NDMACHANC2C is not set
+# CONFIG_ARCH_CHIP_ATSAM4LC2B is not set
+# CONFIG_ARCH_CHIP_ATSAM4LC2A is not set
+# CONFIG_ARCH_CHIP_ATSAM4LC4C is not set
+# CONFIG_ARCH_CHIP_ATSAM4LC4B is not set
+# CONFIG_ARCH_CHIP_ATSAM4LC4A is not set
+# CONFIG_ARCH_CHIP_ATSAM4LS2C is not set
+# CONFIG_ARCH_CHIP_ATSAM4LS2B is not set
+# CONFIG_ARCH_CHIP_ATSAM4LS2A is not set
+# CONFIG_ARCH_CHIP_ATSAM4LS4C is not set
+# CONFIG_ARCH_CHIP_ATSAM4LS4B is not set
+# CONFIG_ARCH_CHIP_ATSAM4LS4A is not set
+# CONFIG_ARCH_CHIP_ATSAM4SD32C is not set
+# CONFIG_ARCH_CHIP_ATSAM4SD32B is not set
+# CONFIG_ARCH_CHIP_ATSAM4SD16C is not set
+# CONFIG_ARCH_CHIP_ATSAM4SD16B is not set
+# CONFIG_ARCH_CHIP_ATSAM4SA16C is not set
+# CONFIG_ARCH_CHIP_ATSAM4SA16B is not set
+CONFIG_ARCH_CHIP_ATSAM4S16C=y
+# CONFIG_ARCH_CHIP_ATSAM4S16B is not set
+# CONFIG_ARCH_CHIP_ATSAM4S8C is not set
+# CONFIG_ARCH_CHIP_ATSAM4S8B is not set
+# CONFIG_ARCH_CHIP_SAM3U is not set
+# CONFIG_ARCH_CHIP_SAM4L is not set
+CONFIG_ARCH_CHIP_SAM4S=y
+
+#
+# AT91SAM3/4 Peripheral Support
+#
+# CONFIG_SAM34_SSC is not set
+# CONFIG_SAM34_TC0 is not set
+# CONFIG_SAM34_TC1 is not set
+# CONFIG_SAM34_TC2 is not set
+# CONFIG_SAM34_TC3 is not set
+# CONFIG_SAM34_TC4 is not set
+# CONFIG_SAM34_TC5 is not set
+# CONFIG_SAM34_PWM is not set
+# CONFIG_SAM34_TWIM0 is not set
+# CONFIG_SAM34_TWIS0 is not set
+# CONFIG_SAM34_TWIM1 is not set
+# CONFIG_SAM34_TWIS1 is not set
+# CONFIG_SAM34_UART0 is not set
+CONFIG_SAM34_UART1=y
+# CONFIG_SAM34_USART0 is not set
+# CONFIG_SAM34_USART1 is not set
+# CONFIG_SAM34_ADC12B is not set
+# CONFIG_SAM34_DACC is not set
+# CONFIG_SAM34_ACC is not set
+# CONFIG_SAM34_SMC is not set
+# CONFIG_SAM34_PDCA is not set
+# CONFIG_SAM34_CRCCU is not set
+# CONFIG_SAM34_UDP is not set
+# CONFIG_SAM34_RTC is not set
+# CONFIG_SAM34_RTT is not set
+# CONFIG_SAM34_WDT is not set
+# CONFIG_SAM34_HSMCI is not set
+
+#
+# AT91SAM3/4 USART Configuration
+#
+
+#
+# AT91SAM3/4 GPIO Interrupt Configuration
+#
+# CONFIG_GPIOA_IRQ is not set
+# CONFIG_GPIOB_IRQ is not set
+# CONFIG_GPIOC_IRQ is not set
+
+#
+# External Memory Configuration
+#
+
+#
+# Architecture Options
+#
+# CONFIG_ARCH_NOINTC is not set
+# CONFIG_ARCH_VECNOTIRQ is not set
+# CONFIG_ARCH_DMA is not set
+CONFIG_ARCH_IRQPRIO=y
+# CONFIG_CUSTOM_STACK is not set
+# CONFIG_ADDRENV is not set
+CONFIG_ARCH_HAVE_VFORK=y
+CONFIG_ARCH_STACKDUMP=y
+# CONFIG_ENDIAN_BIG is not set
+CONFIG_ARCH_HAVE_RAMFUNCS=y
+CONFIG_ARCH_RAMFUNCS=y
+CONFIG_ARCH_HAVE_RAMVECTORS=y
+# CONFIG_ARCH_RAMVECTORS is not set
+
+#
+# Board Settings
+#
+CONFIG_BOARD_LOOPSPERMSEC=9186
+# CONFIG_ARCH_CALIBRATION is not set
+CONFIG_DRAM_START=0x20000000
+CONFIG_DRAM_SIZE=131072
+CONFIG_ARCH_HAVE_INTERRUPTSTACK=y
+CONFIG_ARCH_INTERRUPTSTACK=0
+
+#
+# Boot options
+#
+# CONFIG_BOOT_RUNFROMEXTSRAM is not set
+CONFIG_BOOT_RUNFROMFLASH=y
+# CONFIG_BOOT_RUNFROMISRAM is not set
+# CONFIG_BOOT_RUNFROMSDRAM is not set
+# CONFIG_BOOT_COPYTORAM is not set
+
+#
+# Board Selection
+#
+CONFIG_ARCH_BOARD_SAM4S_XPLAINED=y
+# CONFIG_ARCH_BOARD_CUSTOM is not set
+CONFIG_ARCH_BOARD="sam4s-xplained"
+
+#
+# Common Board Options
+#
+CONFIG_ARCH_HAVE_LEDS=y
+CONFIG_ARCH_LEDS=y
+CONFIG_ARCH_HAVE_BUTTONS=y
+CONFIG_ARCH_BUTTONS=y
+CONFIG_ARCH_HAVE_IRQBUTTONS=y
+# CONFIG_ARCH_IRQBUTTONS is not set
+
+#
+# Board-Specific Options
+#
+
+#
+# RTOS Features
+#
+# CONFIG_BOARD_INITIALIZE is not set
+CONFIG_MSEC_PER_TICK=10
+CONFIG_RR_INTERVAL=200
+# CONFIG_SCHED_INSTRUMENTATION is not set
+CONFIG_TASK_NAME_SIZE=0
+# CONFIG_SCHED_HAVE_PARENT is not set
+# CONFIG_JULIAN_TIME is not set
+CONFIG_START_YEAR=2013
+CONFIG_START_MONTH=6
+CONFIG_START_DAY=3
+CONFIG_DEV_CONSOLE=y
+# CONFIG_MUTEX_TYPES is not set
+# CONFIG_PRIORITY_INHERITANCE is not set
+# CONFIG_FDCLONE_DISABLE is not set
+# CONFIG_FDCLONE_STDIO is not set
+CONFIG_SDCLONE_DISABLE=y
+# CONFIG_SCHED_WAITPID is not set
+# CONFIG_SCHED_STARTHOOK is not set
+# CONFIG_SCHED_ATEXIT is not set
+# CONFIG_SCHED_ONEXIT is not set
+CONFIG_USER_ENTRYPOINT="ostest_main"
+CONFIG_DISABLE_OS_API=y
+# CONFIG_DISABLE_CLOCK is not set
+# CONFIG_DISABLE_POSIX_TIMERS is not set
+# CONFIG_DISABLE_PTHREAD is not set
+# CONFIG_DISABLE_SIGNALS is not set
+# CONFIG_DISABLE_MQUEUE is not set
+CONFIG_DISABLE_ENVIRON=y
+
+#
+# Signal Numbers
+#
+CONFIG_SIG_SIGUSR1=1
+CONFIG_SIG_SIGUSR2=2
+CONFIG_SIG_SIGALARM=3
+CONFIG_SIG_SIGCONDTIMEDOUT=16
+
+#
+# Sizes of configurable things (0 disables)
+#
+CONFIG_MAX_TASKS=16
+CONFIG_MAX_TASK_ARGS=4
+CONFIG_NPTHREAD_KEYS=4
+CONFIG_NFILE_DESCRIPTORS=8
+CONFIG_NFILE_STREAMS=8
+CONFIG_NAME_MAX=32
+CONFIG_PREALLOC_MQ_MSGS=4
+CONFIG_MQ_MAXMSGSIZE=32
+CONFIG_MAX_WDOGPARMS=2
+CONFIG_PREALLOC_WDOGS=4
+CONFIG_PREALLOC_TIMERS=4
+
+#
+# Stack and heap information
+#
+CONFIG_IDLETHREAD_STACKSIZE=1024
+CONFIG_USERMAIN_STACKSIZE=2048
+CONFIG_PTHREAD_STACK_MIN=256
+CONFIG_PTHREAD_STACK_DEFAULT=2048
+
+#
+# Device Drivers
+#
+CONFIG_DISABLE_POLL=y
+CONFIG_DEV_NULL=y
+# CONFIG_DEV_ZERO is not set
+# CONFIG_LOOP is not set
+# CONFIG_RAMDISK is not set
+# CONFIG_CAN is not set
+# CONFIG_PWM is not set
+# CONFIG_I2C is not set
+# CONFIG_SPI is not set
+# CONFIG_RTC is not set
+# CONFIG_WATCHDOG is not set
+# CONFIG_ANALOG is not set
+# CONFIG_AUDIO_DEVICES is not set
+# CONFIG_BCH is not set
+# CONFIG_INPUT is not set
+# CONFIG_LCD is not set
+# CONFIG_MMCSD is not set
+# CONFIG_MTD is not set
+# CONFIG_PIPES is not set
+# CONFIG_PM is not set
+# CONFIG_POWER is not set
+# CONFIG_SENSORS is not set
+CONFIG_SERIAL=y
+CONFIG_DEV_LOWCONSOLE=y
+# CONFIG_16550_UART is not set
+CONFIG_ARCH_HAVE_UART1=y
+CONFIG_MCU_SERIAL=y
+CONFIG_UART1_SERIAL_CONSOLE=y
+# CONFIG_NO_SERIAL_CONSOLE is not set
+
+#
+# UART1 Configuration
+#
+CONFIG_UART1_RXBUFSIZE=256
+CONFIG_UART1_TXBUFSIZE=256
+CONFIG_UART1_BAUD=115200
+CONFIG_UART1_BITS=8
+CONFIG_UART1_PARITY=0
+CONFIG_UART1_2STOP=0
+# CONFIG_UART1_IFLOWCONTROL is not set
+# CONFIG_UART1_OFLOWCONTROL is not set
+# CONFIG_SERIAL_IFLOWCONTROL is not set
+# CONFIG_SERIAL_OFLOWCONTROL is not set
+# CONFIG_USBDEV is not set
+# CONFIG_USBHOST is not set
+# CONFIG_WIRELESS is not set
+
+#
+# System Logging Device Options
+#
+
+#
+# System Logging
+#
+# CONFIG_RAMLOG is not set
+
+#
+# Networking Support
+#
+# CONFIG_NET is not set
+
+#
+# File Systems
+#
+
+#
+# File system configuration
+#
+CONFIG_DISABLE_MOUNTPOINT=y
+# CONFIG_FS_RAMMAP is not set
+
+#
+# System Logging
+#
+# CONFIG_SYSLOG_ENABLE is not set
+# CONFIG_SYSLOG is not set
+
+#
+# Graphics Support
+#
+# CONFIG_NX is not set
+
+#
+# Memory Management
+#
+# CONFIG_MM_MULTIHEAP is not set
+# CONFIG_MM_SMALL is not set
+CONFIG_MM_REGIONS=3
+# CONFIG_GRAN is not set
+
+#
+# Audio Support
+#
+# CONFIG_AUDIO is not set
+
+#
+# Binary Formats
+#
+# CONFIG_BINFMT_DISABLE is not set
+# CONFIG_NXFLAT is not set
+# CONFIG_ELF is not set
+# CONFIG_BUILTIN is not set
+# CONFIG_PIC is not set
+# CONFIG_SYMTAB_ORDEREDBYNAME is not set
+
+#
+# Library Routines
+#
+
+#
+# Standard C Library Options
+#
+CONFIG_STDIO_BUFFER_SIZE=64
+CONFIG_STDIO_LINEBUFFER=y
+CONFIG_NUNGET_CHARS=2
+# CONFIG_LIBM is not set
+# CONFIG_NOPRINTF_FIELDWIDTH is not set
+# CONFIG_LIBC_FLOATINGPOINT is not set
+CONFIG_LIB_RAND_ORDER=1
+# CONFIG_EOL_IS_CR is not set
+# CONFIG_EOL_IS_LF is not set
+# CONFIG_EOL_IS_BOTH_CRLF is not set
+CONFIG_EOL_IS_EITHER_CRLF=y
+# CONFIG_LIBC_EXECFUNCS is not set
+CONFIG_POSIX_SPAWN_PROXY_STACKSIZE=1024
+CONFIG_TASK_SPAWN_DEFAULT_STACKSIZE=2048
+# CONFIG_LIBC_STRERROR is not set
+# CONFIG_LIBC_PERROR_STDOUT is not set
+CONFIG_ARCH_LOWPUTC=y
+CONFIG_LIB_SENDFILE_BUFSIZE=512
+# CONFIG_ARCH_ROMGETC is not set
+# CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set
+
+#
+# Non-standard Library Support
+#
+# CONFIG_SCHED_WORKQUEUE is not set
+# CONFIG_LIB_KBDCODEC is not set
+# CONFIG_LIB_SLCDCODEC is not set
+
+#
+# Basic CXX Support
+#
+# CONFIG_C99_BOOL8 is not set
+# CONFIG_HAVE_CXX is not set
+
+#
+# Application Configuration
+#
+
+#
+# Built-In Applications
+#
+
+#
+# Examples
+#
+# CONFIG_EXAMPLES_BUTTONS is not set
+# CONFIG_EXAMPLES_CAN is not set
+# CONFIG_EXAMPLES_COMPOSITE is not set
+# CONFIG_EXAMPLES_DHCPD is not set
+# CONFIG_EXAMPLES_ELF is not set
+# CONFIG_EXAMPLES_FTPC is not set
+# CONFIG_EXAMPLES_FTPD is not set
+# CONFIG_EXAMPLES_HELLO is not set
+# CONFIG_EXAMPLES_HELLOXX is not set
+# CONFIG_EXAMPLES_JSON is not set
+# CONFIG_EXAMPLES_HIDKBD is not set
+# CONFIG_EXAMPLES_KEYPADTEST is not set
+# CONFIG_EXAMPLES_IGMP is not set
+# CONFIG_EXAMPLES_LCDRW is not set
+# CONFIG_EXAMPLES_MM is not set
+# CONFIG_EXAMPLES_MODBUS is not set
+# CONFIG_EXAMPLES_MOUNT is not set
+# CONFIG_EXAMPLES_NRF24L01TERM is not set
+# CONFIG_EXAMPLES_NSH is not set
+# CONFIG_EXAMPLES_NULL is not set
+# CONFIG_EXAMPLES_NX is not set
+# CONFIG_EXAMPLES_NXCONSOLE is not set
+# CONFIG_EXAMPLES_NXFFS is not set
+# CONFIG_EXAMPLES_NXFLAT is not set
+# CONFIG_EXAMPLES_NXHELLO is not set
+# CONFIG_EXAMPLES_NXIMAGE is not set
+# CONFIG_EXAMPLES_NXLINES is not set
+# CONFIG_EXAMPLES_NXTEXT is not set
+CONFIG_EXAMPLES_OSTEST=y
+CONFIG_EXAMPLES_OSTEST_LOOPS=1
+CONFIG_EXAMPLES_OSTEST_STACKSIZE=2048
+CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=3
+CONFIG_EXAMPLES_OSTEST_RR_RANGE=10000
+CONFIG_EXAMPLES_OSTEST_RR_RUNS=10
+# CONFIG_EXAMPLES_PASHELLO is not set
+# CONFIG_EXAMPLES_PIPE is not set
+# CONFIG_EXAMPLES_POLL is not set
+# CONFIG_EXAMPLES_POSIXSPAWN is not set
+# CONFIG_EXAMPLES_QENCODER is not set
+# CONFIG_EXAMPLES_RGMP is not set
+# CONFIG_EXAMPLES_ROMFS is not set
+# CONFIG_EXAMPLES_SENDMAIL is not set
+# CONFIG_EXAMPLES_SERLOOP is not set
+# CONFIG_EXAMPLES_SLCD is not set
+# CONFIG_EXAMPLES_SMART is not set
+# CONFIG_EXAMPLES_TCPECHO is not set
+# CONFIG_EXAMPLES_TELNETD is not set
+# CONFIG_EXAMPLES_THTTPD is not set
+# CONFIG_EXAMPLES_TIFF is not set
+# CONFIG_EXAMPLES_TOUCHSCREEN is not set
+# CONFIG_EXAMPLES_UDP is not set
+# CONFIG_EXAMPLES_UIP is not set
+# CONFIG_EXAMPLES_USBSERIAL is not set
+# CONFIG_EXAMPLES_USBMSC is not set
+# CONFIG_EXAMPLES_USBTERM is not set
+# CONFIG_EXAMPLES_WATCHDOG is not set
+
+#
+# Graphics Support
+#
+# CONFIG_TIFF is not set
+
+#
+# Interpreters
+#
+# CONFIG_INTERPRETERS_FICL is not set
+# CONFIG_INTERPRETERS_PCODE is not set
+
+#
+# Network Utilities
+#
+
+#
+# Networking Utilities
+#
+# CONFIG_NETUTILS_CODECS is not set
+# CONFIG_NETUTILS_DHCPC is not set
+# CONFIG_NETUTILS_DHCPD is not set
+# CONFIG_NETUTILS_FTPC is not set
+# CONFIG_NETUTILS_FTPD is not set
+# CONFIG_NETUTILS_JSON is not set
+# CONFIG_NETUTILS_RESOLV is not set
+# CONFIG_NETUTILS_SMTP is not set
+# CONFIG_NETUTILS_TELNETD is not set
+# CONFIG_NETUTILS_TFTPC is not set
+# CONFIG_NETUTILS_THTTPD is not set
+# CONFIG_NETUTILS_UIPLIB is not set
+# CONFIG_NETUTILS_WEBCLIENT is not set
+
+#
+# FreeModBus
+#
+# CONFIG_MODBUS is not set
+
+#
+# NSH Library
+#
+# CONFIG_NSH_LIBRARY is not set
+
+#
+# NxWidgets/NxWM
+#
+
+#
+# System NSH Add-Ons
+#
+
+#
+# Custom Free Memory Command
+#
+# CONFIG_SYSTEM_FREE is not set
+
+#
+# I2C tool
+#
+
+#
+# FLASH Program Installation
+#
+# CONFIG_SYSTEM_INSTALL is not set
+
+#
+# FLASH Erase-all Command
+#
+
+#
+# readline()
+#
+# CONFIG_SYSTEM_READLINE is not set
+
+#
+# Power Off
+#
+# CONFIG_SYSTEM_POWEROFF is not set
+
+#
+# RAMTRON
+#
+# CONFIG_SYSTEM_RAMTRON is not set
+
+#
+# SD Card
+#
+# CONFIG_SYSTEM_SDCARD is not set
+
+#
+# Sysinfo
+#
+# CONFIG_SYSTEM_SYSINFO is not set
+
+#
+# USB Monitor
+#
diff --git a/nuttx/configs/sam4s-xplained/ostest/setenv.sh b/nuttx/configs/sam4s-xplained/ostest/setenv.sh
new file mode 100755
index 000000000..f6ddcb085
--- /dev/null
+++ b/nuttx/configs/sam4s-xplained/ostest/setenv.sh
@@ -0,0 +1,63 @@
+#!/bin/bash
+# configs/sam4s-xplained/ostest/setenv.sh
+#
+# Copyright (C) 2013 Gregory Nutt. All rights reserved.
+# 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
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+# 3. Neither the name NuttX nor the names of its contributors may be
+# used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+#
+
+
+if [ "$_" = "$0" ] ; then
+ echo "You must source this script, not run it!" 1>&2
+ exit 1
+fi
+
+WD=`pwd`
+if [ ! -x "setenv.sh" ]; then
+ echo "This script must be executed from the top-level NuttX build directory"
+ exit 1
+fi
+
+if [ -z "${PATH_ORIG}" ]; then
+ export PATH_ORIG="${PATH}"
+fi
+
+# This is the Cygwin path to the location where I installed the CodeSourcery
+# toolchain under windows. You will also have to edit this if you install
+# the CodeSourcery toolchain in any other location
+#export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/CodeSourcery/Sourcery G++ Lite/bin"
+
+# This is the Cygwin path to the location where I build the buildroot
+# toolchain.
+export TOOLCHAIN_BIN="${WD}/../misc/buildroot/build_arm_nofpu/staging_dir/bin"
+
+# Add the path to the toolchain to the PATH varialble
+export PATH="${TOOLCHAIN_BIN}:/sbin:/usr/sbin:${PATH_ORIG}"
+
+echo "PATH : ${PATH}"
diff --git a/nuttx/configs/sam4s-xplained/scripts/ld.script b/nuttx/configs/sam4s-xplained/scripts/ld.script
new file mode 100755
index 000000000..8e4c874df
--- /dev/null
+++ b/nuttx/configs/sam4s-xplained/scripts/ld.script
@@ -0,0 +1,121 @@
+/****************************************************************************
+ * configs/sam4s-xplained/scripts/ld.script
+ *
+ * Copyright (C) 2013 Gregory Nutt. All rights reserved.
+ * 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
+ * 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.
+ *
+ ****************************************************************************/
+
+/* The ATSAM4S16C has 1MB of FLASH beginning at address 0x0040:0000 and
+ * 128KB of SRAM beginning at address 0x2000:0000
+ */
+
+MEMORY
+{
+ flash (rx) : ORIGIN = 0x00400000, LENGTH = 1024K
+ sram (rwx) : ORIGIN = 0x20000000, LENGTH = 128K
+}
+
+OUTPUT_ARCH(arm)
+ENTRY(_stext)
+SECTIONS
+{
+ .text : {
+ _stext = ABSOLUTE(.);
+ *(.vectors)
+ *(.text .text.*)
+ *(.fixup)
+ *(.gnu.warning)
+ *(.rodata .rodata.*)
+ *(.gnu.linkonce.t.*)
+ *(.glue_7)
+ *(.glue_7t)
+ *(.got)
+ *(.gcc_except_table)
+ *(.gnu.linkonce.r.*)
+ _etext = ABSOLUTE(.);
+ } > flash
+
+ .init_section : {
+ _sinit = ABSOLUTE(.);
+ *(.init_array .init_array.*)
+ _einit = ABSOLUTE(.);
+ } > flash
+
+ .ARM.extab : {
+ *(.ARM.extab*)
+ } >flash
+
+ __exidx_start = ABSOLUTE(.);
+ .ARM.exidx : {
+ *(.ARM.exidx*)
+ } >flash
+ __exidx_end = ABSOLUTE(.);
+
+ .data : {
+ _sdata = ABSOLUTE(.);
+ *(.data .data.*)
+ *(.gnu.linkonce.d.*)
+ CONSTRUCTORS
+ _edata = ABSOLUTE(.);
+ } > sram AT > flash
+
+ _eronly = LOADADDR(.data);
+
+ .ramfunc ALIGN(4): {
+ _sramfuncs = ABSOLUTE(.);
+ *(.ramfunc .ramfunc.*)
+ _eramfuncs = ABSOLUTE(.);
+ } > sram AT > flash
+
+ _framfuncs = LOADADDR(.ramfunc);
+
+ .bss : {
+ _sbss = ABSOLUTE(.);
+ *(.bss .bss.*)
+ *(.gnu.linkonce.b.*)
+ *(COMMON)
+ _ebss = ABSOLUTE(.);
+ } > sram
+
+ /* Stabs debugging sections. */
+ .stab 0 : { *(.stab) }
+ .stabstr 0 : { *(.stabstr) }
+ .stab.excl 0 : { *(.stab.excl) }
+ .stab.exclstr 0 : { *(.stab.exclstr) }
+ .stab.index 0 : { *(.stab.index) }
+ .stab.indexstr 0 : { *(.stab.indexstr) }
+ .comment 0 : { *(.comment) }
+ .debug_abbrev 0 : { *(.debug_abbrev) }
+ .debug_info 0 : { *(.debug_info) }
+ .debug_line 0 : { *(.debug_line) }
+ .debug_pubnames 0 : { *(.debug_pubnames) }
+ .debug_aranges 0 : { *(.debug_aranges) }
+}
diff --git a/nuttx/configs/sam4s-xplained/src/Makefile b/nuttx/configs/sam4s-xplained/src/Makefile
new file mode 100644
index 000000000..80d8f4719
--- /dev/null
+++ b/nuttx/configs/sam4s-xplained/src/Makefile
@@ -0,0 +1,100 @@
+############################################################################
+# configs/sam4s-xplained/src/Makefile
+#
+# Copyright (C) 2013 Gregory Nutt. All rights reserved.
+# 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
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+# 3. Neither the name NuttX nor the names of its contributors may be
+# used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+#
+############################################################################
+
+-include $(TOPDIR)/Make.defs
+
+CFLAGS += -I$(TOPDIR)/sched
+
+ASRCS =
+AOBJS = $(ASRCS:.S=$(OBJEXT))
+
+CSRCS = sam_boot.c
+
+ifeq ($(CONFIG_HAVE_CXX),y)
+CSRCS += sam_cxxinitialize.c
+endif
+
+ifeq ($(CONFIG_ARCH_LEDS),y)
+CSRCS += sam_autoleds.c
+else
+CSRCS += sam_userleds.c
+endif
+
+ifeq ($(CONFIG_ARCH_BUTTONS),y)
+CSRCS += sam_buttons.c
+endif
+
+COBJS = $(CSRCS:.c=$(OBJEXT))
+
+SRCS = $(ASRCS) $(CSRCS)
+OBJS = $(AOBJS) $(COBJS)
+
+ARCH_SRCDIR = $(TOPDIR)/arch/$(CONFIG_ARCH)/src
+ifeq ($(WINTOOL),y)
+ CFLAGS += -I "${shell cygpath -w $(ARCH_SRCDIR)/chip}"
+ CFLAGS += -I "${shell cygpath -w $(ARCH_SRCDIR)/common}"
+ CFLAGS += -I "${shell cygpath -w $(ARCH_SRCDIR)/armv7-m}"
+else
+ CFLAGS += -I$(ARCH_SRCDIR)/chip
+ CFLAGS += -I$(ARCH_SRCDIR)/common
+ CFLAGS += -I$(ARCH_SRCDIR)/armv7-m
+endif
+
+all: libboard$(LIBEXT)
+
+$(AOBJS): %$(OBJEXT): %.S
+ $(call ASSEMBLE, $<, $@)
+
+$(COBJS) $(LINKOBJS): %$(OBJEXT): %.c
+ $(call COMPILE, $<, $@)
+
+libboard$(LIBEXT): $(OBJS)
+ $(call ARCHIVE, $@, $(OBJS))
+
+.depend: Makefile $(SRCS)
+ $(Q) $(MKDEP) $(CC) -- $(CFLAGS) -- $(SRCS) >Make.dep
+ $(Q) touch $@
+
+depend: .depend
+
+clean:
+ $(call DELFILE, libboard$(LIBEXT))
+ $(call CLEAN)
+
+distclean: clean
+ $(call DELFILE, Make.dep)
+ $(call DELFILE, .depend)
+
+-include Make.dep
diff --git a/nuttx/configs/sam4s-xplained/src/sam4s-xplained.h b/nuttx/configs/sam4s-xplained/src/sam4s-xplained.h
new file mode 100644
index 000000000..f9ea61858
--- /dev/null
+++ b/nuttx/configs/sam4s-xplained/src/sam4s-xplained.h
@@ -0,0 +1,132 @@
+/************************************************************************************
+ * configs/sam3uek_eval/src/sam4s-xplained.h
+ *
+ * Copyright (C) 2009-2011, 2013 Gregory Nutt. All rights reserved.
+ * 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
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ * 3. Neither the name NuttX nor the names of its contributors may be
+ * used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ ************************************************************************************/
+
+#ifndef __CONFIGS_SAM4S_XPLAINED_SRC_SAM4S_XPLAINED_H
+#define __CONFIGS_SAM4S_XPLAINED_SRC_SAM4S_XPLAINED_H
+
+/************************************************************************************
+ * Included Files
+ ************************************************************************************/
+
+#include <nuttx/config.h>
+#include <nuttx/compiler.h>
+
+#include <stdint.h>
+
+#include <arch/irq.h>
+#include <nuttx/irq.h>
+
+#include "chip/sam_pinmap.h"
+
+/************************************************************************************
+ * Pre-processor Definitions
+ ************************************************************************************/
+/* There are four LEDs on board the SAM4S Xplained board, two of these can be
+ * controlled by software in the SAM4S:
+ *
+ * LED GPIO
+ * ---------------- -----
+ * D9 Yellow LED PC10
+ * D10 Yellow LED PC17
+ *
+ * Both can be illuminated by driving the GPIO output to ground (low).
+ *
+ * These LEDs are not used by the board port unless CONFIG_ARCH_LEDS is
+ * defined. In that case, the usage by the board port is defined in
+ * include/board.h and src/up_leds.c. The LEDs are used to encode OS-related
+ * events as follows:
+ *
+ * SYMBOL Meaning LED state
+ * D9 D10
+ * ------------------- ----------------------- -------- --------
+ * LED_STARTED NuttX has been started OFF OFF
+ * LED_HEAPALLOCATE Heap has been allocated OFF OFF
+ * LED_IRQSENABLED Interrupts enabled OFF OFF
+ * LED_STACKCREATED Idle stack created ON OFF
+ * LED_INIRQ In an interrupt No change
+ * LED_SIGNAL In a signal handler No change
+ * LED_ASSERTION An assertion failed No change
+ * LED_PANIC The system has crashed OFF Blinking
+ * LED_IDLE MCU is is sleep mode Not used
+ *
+ * Thus if D9 is statically on, NuttX has successfully booted and is,
+ * apparently, running normmally. If D10 is flashing at approximately
+ * 2Hz, then a fatal error has been detected and the system has halted.
+ */
+
+
+#define GPIO_D9 (GPIO_OUTPUT | GPIO_CFG_PULLUP | GPIO_OUTPUT_SET | \
+ GPIO_PORT_PIOC | GPIO_PIN10)
+#define GPIO_D10 (GPIO_OUTPUT | GPIO_CFG_PULLUP | GPIO_OUTPUT_SET | \
+ GPIO_PORT_PIOC | GPIO_PIN17)
+
+/* Mechanical buttons:
+ *
+ * The SAM4S Xplained has two mechanical buttons. One button is the RESET button
+ * connected to the SAM4S reset line and the other is a generic user configurable
+ * button labeled BP2. When a button is pressed it will drive the I/O line to GND.
+ *
+ * PA5 BP2
+ */
+
+#define GPIO_BP2 (GPIO_INPUT | GPIO_CFG_PULLUP | GPIO_CFG_DEGLITCH | \
+ GPIO_PORT_PIOA | GPIO_PIN5)
+#define IRQ_BP2 SAM_IRQ_PA5
+
+/************************************************************************************
+ * Public Types
+ ************************************************************************************/
+
+/************************************************************************************
+ * Public data
+ ************************************************************************************/
+
+#ifndef __ASSEMBLY__
+
+/************************************************************************************
+ * Public Functions
+ ************************************************************************************/
+
+/****************************************************************************
+ * Name: up_ledinit
+ ****************************************************************************/
+
+#ifdef CONFIG_ARCH_LEDS
+void up_ledinit(void);
+#endif
+
+#endif /* __ASSEMBLY__ */
+#endif /* __CONFIGS_SAM4S_XPLAINED_SRC_SAM4S_XPLAINED_H */
+
diff --git a/nuttx/configs/sam4s-xplained/src/sam_autoleds.c b/nuttx/configs/sam4s-xplained/src/sam_autoleds.c
new file mode 100644
index 000000000..9b912e4ff
--- /dev/null
+++ b/nuttx/configs/sam4s-xplained/src/sam_autoleds.c
@@ -0,0 +1,155 @@
+/****************************************************************************
+ * configs/sam4s-xplained/src/sam_autoleds.c
+ *
+ * Copyright (C) 2013 Gregory Nutt. All rights reserved.
+ * 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
+ * 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 <stdint.h>
+#include <stdbool.h>
+#include <debug.h>
+
+#include <arch/board/board.h>
+
+#include "chip.h"
+#include "sam_gpio.h"
+#include "sam4s-xplained.h"
+
+#ifdef CONFIG_ARCH_LEDS
+
+/****************************************************************************
+ * Definitions
+ ****************************************************************************/
+/* If CONFIG_ARCH_LEDs is defined, then NuttX will control the two LEDs on
+ * board the SAM4S Xplained. The following definitions describe how NuttX
+ * controls the LEDs:
+ *
+ * SYMBOL Meaning LED state
+ * D9 D10
+ * ------------------- ----------------------- -------- --------
+ * LED_STARTED NuttX has been started OFF OFF
+ * LED_HEAPALLOCATE Heap has been allocated OFF OFF
+ * LED_IRQSENABLED Interrupts enabled OFF OFF
+ * LED_STACKCREATED Idle stack created ON OFF
+ * LED_INIRQ In an interrupt No change
+ * LED_SIGNAL In a signal handler No change
+ * LED_ASSERTION An assertion failed No change
+ * LED_PANIC The system has crashed OFF Blinking
+ * LED_IDLE MCU is is sleep mode Not used
+ */
+
+/* CONFIG_DEBUG_LEDS enables debug output from this file (needs CONFIG_DEBUG
+ * with CONFIG_DEBUG_VERBOSE too)
+ */
+
+#ifdef CONFIG_DEBUG_LEDS
+# define leddbg lldbg
+# define ledvdbg llvdbg
+#else
+# define leddbg(x...)
+# define ledvdbg(x...)
+#endif
+
+/****************************************************************************
+ * Private Data
+ ****************************************************************************/
+
+/****************************************************************************
+ * Private Functions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Public Functions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Name: up_ledinit
+ ****************************************************************************/
+
+void up_ledinit(void)
+{
+ /* Configure LED1-2 GPIOs for output */
+
+ sam_configgpio(GPIO_D9);
+ sam_configgpio(GPIO_D10);
+}
+
+/****************************************************************************
+ * Name: up_ledon
+ ****************************************************************************/
+
+void up_ledon(int led)
+{
+ bool led1on = false;
+ bool led2on = false;
+
+ switch (led)
+ {
+ case 0: /* LED_STARTED, LED_HEAPALLOCATE, LED_IRQSENABLED */
+ break;
+
+ case 1: /* LED_STACKCREATED */
+ led1on = true;
+ break;
+
+ default:
+ case 2: /* LED_INIRQ, LED_SIGNAL, LED_ASSERTION */
+ return;
+
+ case 3: /* LED_PANIC */
+ led2on = true;
+ break;
+ }
+
+ sam_gpiowrite(GPIO_D9, led1on);
+ sam_gpiowrite(GPIO_D10, led2on);
+}
+
+/****************************************************************************
+ * Name: up_ledoff
+ ****************************************************************************/
+
+void up_ledoff(int led)
+{
+ if (led != 2)
+ {
+ sam_gpiowrite(GPIO_D9, false);
+ sam_gpiowrite(GPIO_D10, false);
+ }
+}
+
+#endif /* CONFIG_ARCH_LEDS */
diff --git a/nuttx/configs/sam4s-xplained/src/sam_boot.c b/nuttx/configs/sam4s-xplained/src/sam_boot.c
new file mode 100644
index 000000000..54d29053e
--- /dev/null
+++ b/nuttx/configs/sam4s-xplained/src/sam_boot.c
@@ -0,0 +1,75 @@
+/************************************************************************************
+ * configs/sam4s-xplained/src/sam_boot.c
+ *
+ * Copyright (C) 2013 Gregory Nutt. All rights reserved.
+ * 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
+ * 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 <debug.h>
+
+#include "sam4s-xplained.h"
+
+/************************************************************************************
+ * Definitions
+ ************************************************************************************/
+
+/************************************************************************************
+ * Private Functions
+ ************************************************************************************/
+
+/************************************************************************************
+ * Public Functions
+ ************************************************************************************/
+
+/************************************************************************************
+ * Name: sam_boardinitialize
+ *
+ * Description:
+ * All SAM3U architectures must provide the following entry point. This entry point
+ * is called early in the intitialization -- after all memory has been configured
+ * and mapped but before any devices have been initialized.
+ *
+ ************************************************************************************/
+
+void sam_boardinitialize(void)
+{
+ /* Configure on-board LEDs if LED support has been selected. */
+
+#ifdef CONFIG_ARCH_LEDS
+ up_ledinit();
+#endif
+}
diff --git a/nuttx/configs/sam4s-xplained/src/sam_buttons.c b/nuttx/configs/sam4s-xplained/src/sam_buttons.c
new file mode 100644
index 000000000..fe5c0b776
--- /dev/null
+++ b/nuttx/configs/sam4s-xplained/src/sam_buttons.c
@@ -0,0 +1,155 @@
+/****************************************************************************
+ * configs/sam4s-xplained/src/sam_buttons.c
+ *
+ * Copyright (C) 2013 Gregory Nutt. All rights reserved.
+ * 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
+ * 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 <stdint.h>
+
+#include <nuttx/irq.h>
+
+#include <arch/irq.h>
+#include <arch/board/board.h>
+
+#include "sam_gpio.h"
+#include "sam4s-xplained.h"
+
+#ifdef CONFIG_ARCH_BUTTONS
+
+/****************************************************************************
+ * Definitions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Private Data
+ ****************************************************************************/
+
+static xcpt_t g_irqbp2;
+
+/****************************************************************************
+ * Private Functions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Public Functions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Name: up_buttoninit
+ *
+ * Description:
+ * up_buttoninit() must be called to initialize button resources. After
+ * that, up_buttons() may be called to collect the current state of all
+ * buttons or up_irqbutton() may be called to register button interrupt
+ * handlers.
+ *
+ ****************************************************************************/
+
+void up_buttoninit(void)
+{
+ (void)sam_configgpio(GPIO_BP2);
+}
+
+/************************************************************************************
+ * Name: up_buttons
+ *
+ * Description:
+ * After up_buttoninit() has been called, up_buttons() may be called to collect
+ * the state of all buttons. up_buttons() returns an 8-bit bit set with each bit
+ * associated with a button. See the BUTTON* definitions above for the meaning of
+ * each bit in the returned value.
+ *
+ ************************************************************************************/
+
+uint8_t up_buttons(void)
+{
+ return sam_gpioread(GPIO_BP2) ? 0 : BUTTON_BP2_BIT;
+}
+
+/****************************************************************************
+ * Name: up_irqbutton
+ *
+ * Description:
+ * This function may be called to register an interrupt handler that will
+ * be called when a button is depressed or released. The ID value is one
+ * of the BUTTON* definitions provided above. The previous interrupt
+ * handler address isreturned (so that it may restored, if so desired).
+ *
+ * Configuration Notes:
+ * Configuration CONFIG_AVR32_GPIOIRQ must be selected to enable the
+ * overall GPIO IRQ feature and CONFIG_AVR32_GPIOIRQSETA and/or
+ * CONFIG_AVR32_GPIOIRQSETB must be enabled to select GPIOs to support
+ * interrupts on. For button support, bits 2 and 3 must be set in
+ * CONFIG_AVR32_GPIOIRQSETB (PB2 and PB3).
+ *
+ ****************************************************************************/
+
+#if defined(CONFIG_GPIOA_IRQ) && defined(CONFIG_ARCH_IRQBUTTONS)
+xcpt_t up_irqbutton(int id, xcpt_t irqhandler)
+{
+ xcpt_t oldhandler = NULL;
+
+ if (id == BUTTON_BP2)
+ {
+ irqstate_t flags;
+
+ /* Disable interrupts until we are done. This guarantees that the
+ * following operations are atomic.
+ */
+
+ flags = irqsave();
+
+ /* Get the old button interrupt handler and save the new one */
+
+ oldhandler = *g_irqbp2;
+ *g_irqbp2 = irqhandler;
+
+ /* Configure the interrupt */
+
+ sam_gpioirq(IRQ_BP2);
+ (void)irq_attach(IRQ_BP2, irqhandler);
+ sam_gpioirqenable(IRQ_BP2);
+ }
+
+ /* Return the old button handler (so that it can be restored) */
+
+ return oldhandler;
+}
+#endif
+
+#endif /* CONFIG_ARCH_BUTTONS */
diff --git a/nuttx/configs/sam4s-xplained/src/sam_cxxinitialize.c b/nuttx/configs/sam4s-xplained/src/sam_cxxinitialize.c
new file mode 100644
index 000000000..0fd845488
--- /dev/null
+++ b/nuttx/configs/sam4s-xplained/src/sam_cxxinitialize.c
@@ -0,0 +1,154 @@
+/************************************************************************************
+ * configs/sam4s-xplained/src/sam_cxxinitialize.c
+ *
+ * Copyright (C) 2013 Gregory Nutt. All rights reserved.
+ * 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
+ * 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 <debug.h>
+
+#include <nuttx/arch.h>
+
+#include <arch/sam34/chip.h>
+#include "chip.h"
+
+#if defined(CONFIG_HAVE_CXX) && defined(CONFIG_HAVE_CXXINITIALIZE)
+
+/************************************************************************************
+ * Definitions
+ ************************************************************************************/
+/* Debug ****************************************************************************/
+/* Non-standard debug that may be enabled just for testing the static constructors */
+
+#ifndef CONFIG_DEBUG
+# undef CONFIG_DEBUG_CXX
+#endif
+
+#ifdef CONFIG_DEBUG_CXX
+# define cxxdbg dbg
+# define cxxlldbg lldbg
+# ifdef CONFIG_DEBUG_VERBOSE
+# define cxxvdbg vdbg
+# define cxxllvdbg llvdbg
+# else
+# define cxxvdbg(x...)
+# define cxxllvdbg(x...)
+# endif
+#else
+# define cxxdbg(x...)
+# define cxxlldbg(x...)
+# define cxxvdbg(x...)
+# define cxxllvdbg(x...)
+#endif
+
+/************************************************************************************
+ * Private Types
+ ************************************************************************************/
+/* This type defines one entry in initialization array */
+
+typedef void (*initializer_t)(void);
+
+/************************************************************************************
+ * External references
+ ************************************************************************************/
+/* _sinit and _einit are symbols exported by the linker script that mark the
+ * beginning and the end of the C++ initialization section.
+ */
+
+extern initializer_t _sinit;
+extern initializer_t _einit;
+
+/* _stext and _etext are symbols exported by the linker script that mark the
+ * beginning and the end of text.
+ */
+
+extern uint32_t _stext;
+extern uint32_t _etext;
+
+/************************************************************************************
+ * Private Functions
+ ************************************************************************************/
+
+/************************************************************************************
+ * Public Functions
+ ************************************************************************************/
+
+/****************************************************************************
+ * Name: up_cxxinitialize
+ *
+ * Description:
+ * If C++ and C++ static constructors are supported, then this function
+ * must be provided by board-specific logic in order to perform
+ * initialization of the static C++ class instances.
+ *
+ * This function should then be called in the application-specific
+ * user_start logic in order to perform the C++ initialization. NOTE
+ * that no component of the core NuttX RTOS logic is involved; This
+ * function defintion only provides the 'contract' between application
+ * specific C++ code and platform-specific toolchain support
+ *
+ ***************************************************************************/
+
+void up_cxxinitialize(void)
+{
+ initializer_t *initp;
+
+ cxxdbg("_sinit: %p _einit: %p _stext: %p _etext: %p\n",
+ &_sinit, &_einit, &_stext, &_etext);
+
+ /* Visit each entry in the initialzation table */
+
+ for (initp = &_sinit; initp != &_einit; initp++)
+ {
+ initializer_t initializer = *initp;
+ cxxdbg("initp: %p initializer: %p\n", initp, initializer);
+
+ /* Make sure that the address is non-NULL and lies in the text region
+ * defined by the linker script. Some toolchains may put NULL values
+ * or counts in the initialization table
+ */
+
+ if ((void*)initializer > (void*)&_stext && (void*)initializer < (void*)&_etext)
+ {
+ cxxdbg("Calling %p\n", initializer);
+ initializer();
+ }
+ }
+}
+
+#endif /* CONFIG_HAVE_CXX && CONFIG_HAVE_CXXINITIALIZE */
+
diff --git a/nuttx/configs/sam4s-xplained/src/sam_userleds.c b/nuttx/configs/sam4s-xplained/src/sam_userleds.c
new file mode 100644
index 000000000..21b0e2486
--- /dev/null
+++ b/nuttx/configs/sam4s-xplained/src/sam_userleds.c
@@ -0,0 +1,141 @@
+/****************************************************************************
+ * configs/sam4s-xplained/src/sam_userleds.c
+ *
+ * Copyright (C) 2013 Gregory Nutt. All rights reserved.
+ * 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
+ * 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 <stdint.h>
+#include <stdbool.h>
+#include <debug.h>
+
+#include <arch/board/board.h>
+
+#include "chip.h"
+#include "sam_gpio.h"
+#include "sam4s-xplained.h"
+
+#ifndef CONFIG_ARCH_LEDS
+
+/****************************************************************************
+ * Definitions
+ ****************************************************************************/
+
+/* CONFIG_DEBUG_LEDS enables debug output from this file (needs CONFIG_DEBUG
+ * with CONFIG_DEBUG_VERBOSE too)
+ */
+
+#ifdef CONFIG_DEBUG_LEDS
+# define leddbg lldbg
+# define ledvdbg llvdbg
+#else
+# define leddbg(x...)
+# define ledvdbg(x...)
+#endif
+
+/****************************************************************************
+ * Private Data
+ ****************************************************************************/
+
+/****************************************************************************
+ * Private Function Protototypes
+ ****************************************************************************/
+
+/****************************************************************************
+ * Private Data
+ ****************************************************************************/
+
+/****************************************************************************
+ * Private Functions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Public Functions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Name: sam_ledinit
+ ****************************************************************************/
+
+void sam_ledinit(void)
+{
+ /* Configure LED1-2 GPIOs for output */
+
+ sam_configgpio(GPIO_D9);
+ sam_configgpio(GPIO_D10);
+}
+
+/****************************************************************************
+ * Name: sam_setled
+ ****************************************************************************/
+
+void sam_setled(int led, bool ledon)
+{
+ uint32_t ledcfg;
+
+ if (led == BOARD_LED1)
+ {
+ ledcfg = GPIO_D9;
+ }
+ else if (led == BOARD_LED2)
+ {
+ ledcfg = GPIO_D10;
+ }
+ else
+ {
+ return;
+ }
+
+ sam_gpiowrite(ledcfg, ledon);
+}
+
+/****************************************************************************
+ * Name: sam_setleds
+ ****************************************************************************/
+
+void sam_setleds(uint8_t ledset)
+{
+ bool ledon;
+
+ ledon = ((ledset & BOARD_LED1_BIT) != 0);
+ sam_gpiowrite(GPIO_D9, ledon);
+
+ ledon = ((ledset & BOARD_LED2_BIT) != 0);
+ sam_gpiowrite(GPIO_D10, ledon);
+}
+
+#endif /* !CONFIG_ARCH_LEDS */
diff --git a/nuttx/configs/shenzhou/src/up_usbmsc.c b/nuttx/configs/shenzhou/src/up_usbmsc.c
index d957b76da..e2ca462d1 100644
--- a/nuttx/configs/shenzhou/src/up_usbmsc.c
+++ b/nuttx/configs/shenzhou/src/up_usbmsc.c
@@ -1,7 +1,7 @@
/****************************************************************************
* configs/shenzhou/src/up_usbmsc.c
*
- * Copyright (C) 2012 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2012, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Configure and register the STM32 SPI-based MMC/SD block driver.
@@ -95,7 +95,7 @@ int usbmsc_archinitialize(void)
* this case, there is nothing further to be done here.
*/
-#ifndef CONFIG_EXAMPLES_USBMSC_BUILTIN
+#ifndef CONFIG_NSH_BUILTIN_APPS
return stm32_sdinitialize(CONFIG_EXAMPLES_USBMSC_DEVMINOR1);
#else
return OK;
diff --git a/nuttx/configs/sim/nsh2/defconfig b/nuttx/configs/sim/nsh2/defconfig
index 50c7adc5a..1a2cde403 100644
--- a/nuttx/configs/sim/nsh2/defconfig
+++ b/nuttx/configs/sim/nsh2/defconfig
@@ -304,7 +304,6 @@ CONFIG_NSH_FATMOUNTPT="/tmp"
#
# Settings for examples/nx
#
-CONFIG_EXAMPLES_NX_BUILTIN=y
CONFIG_EXAMPLES_NX_VPLANE=0
#CONFIG_EXAMPLES_NX_BGCOLOR
#CONFIG_EXAMPLES_NX_COLOR1
@@ -321,7 +320,6 @@ CONFIG_EXAMPLES_NX_NOTIFYSIGNO=4
#
# Settings for examples/nxhello
#
-CONFIG_EXAMPLES_NXHELLO_BUILTIN=y
CONFIG_EXAMPLES_NXHELLO_VPLANE=0
#CONFIG_EXAMPLES_NXHELLO_BGCOLOR
CONFIG_EXAMPLES_NXHELLO_FONTID=6
@@ -345,7 +343,6 @@ CONFIG_EXAMPLES_NXLINES_EXTERNINIT=n
#
# Settings for examples/touchscreen
#
-CONFIG_EXAMPLES_TOUCHSCREEN_BUILTIN=y
CONFIG_EXAMPLES_TOUCHSCREEN_MINOR=0
CONFIG_EXAMPLES_TOUCHSCREEN_DEVPATH="/dev/input0"
CONFIG_EXAMPLES_TOUCHSCREEN_NSAMPLES=25
diff --git a/nuttx/configs/sim/ostest/defconfig b/nuttx/configs/sim/ostest/defconfig
index bcfadabd7..ce052c2e7 100644
--- a/nuttx/configs/sim/ostest/defconfig
+++ b/nuttx/configs/sim/ostest/defconfig
@@ -364,7 +364,6 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512
# CONFIG_EXAMPLES_NXLINES is not set
# CONFIG_EXAMPLES_NXTEXT is not set
CONFIG_EXAMPLES_OSTEST=y
-# CONFIG_EXAMPLES_OSTEST_BUILTIN is not set
CONFIG_EXAMPLES_OSTEST_LOOPS=100
CONFIG_EXAMPLES_OSTEST_STACKSIZE=8192
CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=8
diff --git a/nuttx/configs/sim/touchscreen/defconfig b/nuttx/configs/sim/touchscreen/defconfig
index bfa9bcbad..35059c06e 100644
--- a/nuttx/configs/sim/touchscreen/defconfig
+++ b/nuttx/configs/sim/touchscreen/defconfig
@@ -296,7 +296,6 @@ CONFIG_EXAMPLES_MOUNT_DEVNAME="/dev/ram0"
#
# Settings for examples/touchscreen
#
-CONFIG_EXAMPLES_TOUCHSCREEN_BUILTIN=n
CONFIG_EXAMPLES_TOUCHSCREEN_MINOR=0
CONFIG_EXAMPLES_TOUCHSCREEN_DEVPATH="/dev/input0"
CONFIG_EXAMPLES_TOUCHSCREEN_NSAMPLES=25
diff --git a/nuttx/configs/stm3210e-eval/README.txt b/nuttx/configs/stm3210e-eval/README.txt
index 789a599d1..b6c2cfc58 100644
--- a/nuttx/configs/stm3210e-eval/README.txt
+++ b/nuttx/configs/stm3210e-eval/README.txt
@@ -754,7 +754,7 @@ Where <subdir> is one of the following:
long file names in the FAT file system. Please refer to the
details in the top-level COPYING file. Please do not use FAT
long file name unless you are familiar with these patent issues.
- (5) When built as an NSH add-on command (CONFIG_EXAMPLES_USBMSC_BUILTIN=y),
+ (5) When built as an NSH add-on command (CONFIG_NSH_BUILTIN_APPS=y),
Caution should be used to assure that the SD drive is not in use when
the USB storage device is configured. Specifically, the SD driver
should be unmounted like:
diff --git a/nuttx/configs/stm3210e-eval/composite/defconfig b/nuttx/configs/stm3210e-eval/composite/defconfig
index 6ead077f4..4d48576b7 100755
--- a/nuttx/configs/stm3210e-eval/composite/defconfig
+++ b/nuttx/configs/stm3210e-eval/composite/defconfig
@@ -522,7 +522,6 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n
#
# Settings for examples/usbstorage
#
-CONFIG_EXAMPLES_USBMSC_BUILTIN=n
CONFIG_EXAMPLES_USBMSC_NLUNS=1
CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0
CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0"
diff --git a/nuttx/configs/stm3210e-eval/nsh2/defconfig b/nuttx/configs/stm3210e-eval/nsh2/defconfig
index d5e19733f..7bda1d45b 100644
--- a/nuttx/configs/stm3210e-eval/nsh2/defconfig
+++ b/nuttx/configs/stm3210e-eval/nsh2/defconfig
@@ -610,7 +610,6 @@ CONFIG_NSH_MMCSDMINOR=0
#
# I2C tool settings
#
-CONFIG_I2CTOOL_BUILTIN=y
CONFIG_I2CTOOL_MINBUS=1
CONFIG_I2CTOOL_MAXBUS=2
#CONFIG_I2CTOOL_MINADDR
@@ -638,7 +637,6 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n
#
# Settings for examples/nx
#
-CONFIG_EXAMPLES_NX_BUILTIN=y
CONFIG_EXAMPLES_NX_VPLANE=0
CONFIG_EXAMPLES_NX_DEVNO=0
CONFIG_EXAMPLES_NX_BGCOLOR=0x0011
@@ -658,7 +656,6 @@ CONFIG_EXAMPLES_NX_EXTERNINIT=n
#
# Settings for examples/nxhello
#
-CONFIG_EXAMPLES_NXHELLO_BUILTIN=y
CONFIG_EXAMPLES_NXHELLO_VPLANE=0
CONFIG_EXAMPLES_NXHELLO_DEVNO=0
CONFIG_EXAMPLES_NXHELLO_BGCOLOR=0x0011
@@ -670,7 +667,6 @@ CONFIG_EXAMPLES_NXHELLO_EXTERNINIT=n
#
# Settings for examples/nximage
#
-CONFIG_EXAMPLES_NXIMAGE_BUILTIN=y
CONFIG_EXAMPLES_NXIMAGE_VPLANE=0
CONFIG_EXAMPLES_NXIMAGE_DEVNO=0
CONFIG_EXAMPLES_NXIMAGE_BPP=16
@@ -699,7 +695,6 @@ CONFIG_EXAMPLES_NXLINES_EXTERNINIT=n
#
# Settings for examples/usbstorage
#
-CONFIG_EXAMPLES_USBMSC_BUILTIN=y
CONFIG_EXAMPLES_USBMSC_NLUNS=1
CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0
CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0"
diff --git a/nuttx/configs/stm3210e-eval/nx/defconfig b/nuttx/configs/stm3210e-eval/nx/defconfig
index f4a3cb4e3..90dd053d0 100644
--- a/nuttx/configs/stm3210e-eval/nx/defconfig
+++ b/nuttx/configs/stm3210e-eval/nx/defconfig
@@ -545,7 +545,6 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n
#
# Settings for examples/nx
#
-CONFIG_EXAMPLES_NX_BUILTIN=n
CONFIG_EXAMPLES_NX_VPLANE=0
CONFIG_EXAMPLES_NX_DEVNO=0
CONFIG_EXAMPLES_NX_BGCOLOR=0x0011
@@ -565,7 +564,6 @@ CONFIG_EXAMPLES_NX_EXTERNINIT=n
#
# Settings for examples/nximage
#
-CONFIG_EXAMPLES_NXIMAGE_BUILTIN=n
CONFIG_EXAMPLES_NXIMAGE_VPLANE=0
CONFIG_EXAMPLES_NXIMAGE_DEVNO=0
CONFIG_EXAMPLES_NXIMAGE_BPP=16
diff --git a/nuttx/configs/stm3210e-eval/nxconsole/defconfig b/nuttx/configs/stm3210e-eval/nxconsole/defconfig
index ccfea526e..b5edf7c57 100644
--- a/nuttx/configs/stm3210e-eval/nxconsole/defconfig
+++ b/nuttx/configs/stm3210e-eval/nxconsole/defconfig
@@ -548,7 +548,6 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n
#
# Settings for examples/nx
#
-CONFIG_EXAMPLES_NX_BUILTIN=n
CONFIG_EXAMPLES_NX_VPLANE=0
CONFIG_EXAMPLES_NX_DEVNO=0
CONFIG_EXAMPLES_NX_BGCOLOR=0x0011
@@ -568,7 +567,6 @@ CONFIG_EXAMPLES_NX_EXTERNINIT=n
#
# Settings for examples/nxtext
#
-CONFIG_EXAMPLES_NXTEXT_BUILTIN=n
CONFIG_EXAMPLES_NXTEXT_VPLANE=0
CONFIG_EXAMPLES_NXTEXT_DEVNO=0
CONFIG_EXAMPLES_NXTEXT_BGCOLOR=0x0011
@@ -590,7 +588,6 @@ CONFIG_EXAMPLES_NXTEXT_NOTIFYSIGNO=4
#
# Settings for examples/nximage
#
-CONFIG_EXAMPLES_NXIMAGE_BUILTIN=n
CONFIG_EXAMPLES_NXIMAGE_VPLANE=0
CONFIG_EXAMPLES_NXIMAGE_DEVNO=0
CONFIG_EXAMPLES_NXIMAGE_BPP=16
diff --git a/nuttx/configs/stm3210e-eval/nxlines/defconfig b/nuttx/configs/stm3210e-eval/nxlines/defconfig
index 580b28019..a9dc3d7aa 100644
--- a/nuttx/configs/stm3210e-eval/nxlines/defconfig
+++ b/nuttx/configs/stm3210e-eval/nxlines/defconfig
@@ -544,7 +544,6 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n
#
# Settings for examples/nx
#
-CONFIG_EXAMPLES_NX_BUILTIN=n
CONFIG_EXAMPLES_NX_VPLANE=0
CONFIG_EXAMPLES_NX_DEVNO=0
CONFIG_EXAMPLES_NX_BGCOLOR=0x0011
@@ -564,7 +563,6 @@ CONFIG_EXAMPLES_NX_EXTERNINIT=n
#
# Settings for examples/nxtext
#
-CONFIG_EXAMPLES_NXTEXT_BUILTIN=n
CONFIG_EXAMPLES_NXTEXT_VPLANE=0
CONFIG_EXAMPLES_NXTEXT_DEVNO=0
CONFIG_EXAMPLES_NXTEXT_BGCOLOR=0x0011
@@ -586,7 +584,6 @@ CONFIG_EXAMPLES_NXTEXT_NOTIFYSIGNO=4
#
# Settings for examples/nximage
#
-CONFIG_EXAMPLES_NXIMAGE_BUILTIN=n
CONFIG_EXAMPLES_NXIMAGE_VPLANE=0
CONFIG_EXAMPLES_NXIMAGE_DEVNO=0
CONFIG_EXAMPLES_NXIMAGE_BPP=16
diff --git a/nuttx/configs/stm3210e-eval/nxtext/defconfig b/nuttx/configs/stm3210e-eval/nxtext/defconfig
index 46a25103e..453b0282b 100644
--- a/nuttx/configs/stm3210e-eval/nxtext/defconfig
+++ b/nuttx/configs/stm3210e-eval/nxtext/defconfig
@@ -544,7 +544,6 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n
#
# Settings for examples/nx
#
-CONFIG_EXAMPLES_NX_BUILTIN=n
CONFIG_EXAMPLES_NX_VPLANE=0
CONFIG_EXAMPLES_NX_DEVNO=0
CONFIG_EXAMPLES_NX_BGCOLOR=0x0011
@@ -564,7 +563,6 @@ CONFIG_EXAMPLES_NX_EXTERNINIT=n
#
# Settings for examples/nxtext
#
-CONFIG_EXAMPLES_NXTEXT_BUILTIN=n
CONFIG_EXAMPLES_NXTEXT_VPLANE=0
CONFIG_EXAMPLES_NXTEXT_DEVNO=0
CONFIG_EXAMPLES_NXTEXT_BGCOLOR=0x0011
@@ -586,7 +584,6 @@ CONFIG_EXAMPLES_NXTEXT_NOTIFYSIGNO=4
#
# Settings for examples/nximage
#
-CONFIG_EXAMPLES_NXIMAGE_BUILTIN=n
CONFIG_EXAMPLES_NXIMAGE_VPLANE=0
CONFIG_EXAMPLES_NXIMAGE_DEVNO=0
CONFIG_EXAMPLES_NXIMAGE_BPP=16
diff --git a/nuttx/configs/stm3210e-eval/pm/defconfig b/nuttx/configs/stm3210e-eval/pm/defconfig
index be0b25194..512cf826c 100644
--- a/nuttx/configs/stm3210e-eval/pm/defconfig
+++ b/nuttx/configs/stm3210e-eval/pm/defconfig
@@ -655,7 +655,6 @@ CONFIG_NSH_MMCSDMINOR=0
#
# I2C tool settings
#
-CONFIG_I2CTOOL_BUILTIN=y
CONFIG_I2CTOOL_MINBUS=1
CONFIG_I2CTOOL_MAXBUS=2
#CONFIG_I2CTOOL_MINADDR
@@ -683,7 +682,6 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n
#
# Settings for examples/nx
#
-CONFIG_EXAMPLES_NX_BUILTIN=y
CONFIG_EXAMPLES_NX_VPLANE=0
CONFIG_EXAMPLES_NX_DEVNO=0
CONFIG_EXAMPLES_NX_BGCOLOR=0x0011
@@ -703,7 +701,6 @@ CONFIG_EXAMPLES_NX_EXTERNINIT=n
#
# Settings for examples/nxhello
#
-CONFIG_EXAMPLES_NXHELLO_BUILTIN=y
CONFIG_EXAMPLES_NXHELLO_VPLANE=0
CONFIG_EXAMPLES_NXHELLO_DEVNO=0
CONFIG_EXAMPLES_NXHELLO_BGCOLOR=0x0011
@@ -715,7 +712,6 @@ CONFIG_EXAMPLES_NXHELLO_EXTERNINIT=n
#
# Settings for examples/nximage
#
-CONFIG_EXAMPLES_NXIMAGE_BUILTIN=y
CONFIG_EXAMPLES_NXIMAGE_VPLANE=0
CONFIG_EXAMPLES_NXIMAGE_DEVNO=0
CONFIG_EXAMPLES_NXIMAGE_BPP=16
@@ -744,7 +740,6 @@ CONFIG_EXAMPLES_NXLINES_EXTERNINIT=n
#
# Settings for examples/usbstorage
#
-CONFIG_EXAMPLES_USBMSC_BUILTIN=n
CONFIG_EXAMPLES_USBMSC_NLUNS=1
CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0
CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0"
diff --git a/nuttx/configs/stm3210e-eval/src/up_usbmsc.c b/nuttx/configs/stm3210e-eval/src/up_usbmsc.c
index 185f50bb0..5bca7bf1b 100644
--- a/nuttx/configs/stm3210e-eval/src/up_usbmsc.c
+++ b/nuttx/configs/stm3210e-eval/src/up_usbmsc.c
@@ -1,7 +1,7 @@
/****************************************************************************
* configs/stm3210e-eval/src/up_usbmsc.c
*
- * Copyright (C) 2009, 2011 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2009, 2011, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Configure and register the STM32 MMC/SD SDIO block driver.
@@ -114,7 +114,7 @@ int usbmsc_archinitialize(void)
* this case, there is nothing further to be done here.
*/
-#ifndef CONFIG_EXAMPLES_USBMSC_BUILTIN
+#ifndef CONFIG_NSH_BUILTIN_APPS
FAR struct sdio_dev_s *sdio;
int ret;
@@ -156,7 +156,7 @@ int usbmsc_archinitialize(void)
sdio_mediachange(sdio, true);
-#endif /* CONFIG_EXAMPLES_USBMSC_BUILTIN */
+#endif /* CONFIG_NSH_BUILTIN_APPS */
return OK;
}
diff --git a/nuttx/configs/stm3210e-eval/usbstorage/defconfig b/nuttx/configs/stm3210e-eval/usbstorage/defconfig
index 0d3034495..4051790b3 100755
--- a/nuttx/configs/stm3210e-eval/usbstorage/defconfig
+++ b/nuttx/configs/stm3210e-eval/usbstorage/defconfig
@@ -479,7 +479,6 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n
#
# Settings for examples/usbstorage
#
-CONFIG_EXAMPLES_USBMSC_BUILTIN=n
CONFIG_EXAMPLES_USBMSC_NLUNS=1
CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0
CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0"
diff --git a/nuttx/configs/stm3220g-eval/dhcpd/defconfig b/nuttx/configs/stm3220g-eval/dhcpd/defconfig
index fecf193d6..0e1473d8e 100644
--- a/nuttx/configs/stm3220g-eval/dhcpd/defconfig
+++ b/nuttx/configs/stm3220g-eval/dhcpd/defconfig
@@ -600,7 +600,6 @@ CONFIG_NSH_MMCSDMINOR=0
#
# I2C tool settings
#
-CONFIG_I2CTOOL_BUILTIN=y
CONFIG_I2CTOOL_MINBUS=1
CONFIG_I2CTOOL_MAXBUS=3
#CONFIG_I2CTOOL_MINADDR
diff --git a/nuttx/configs/stm3220g-eval/nettest/defconfig b/nuttx/configs/stm3220g-eval/nettest/defconfig
index 7df818c88..d5f85cc60 100644
--- a/nuttx/configs/stm3220g-eval/nettest/defconfig
+++ b/nuttx/configs/stm3220g-eval/nettest/defconfig
@@ -593,7 +593,6 @@ CONFIG_NSH_MMCSDMINOR=0
#
# I2C tool settings
#
-CONFIG_I2CTOOL_BUILTIN=y
CONFIG_I2CTOOL_MINBUS=1
CONFIG_I2CTOOL_MAXBUS=3
#CONFIG_I2CTOOL_MINADDR
diff --git a/nuttx/configs/stm3220g-eval/nsh/defconfig b/nuttx/configs/stm3220g-eval/nsh/defconfig
index fab3bfd16..a9aab627c 100644
--- a/nuttx/configs/stm3220g-eval/nsh/defconfig
+++ b/nuttx/configs/stm3220g-eval/nsh/defconfig
@@ -709,7 +709,6 @@ CONFIG_NSH_MMCSDMINOR=0
#
# I2C tool settings
#
-CONFIG_I2CTOOL_BUILTIN=y
CONFIG_I2CTOOL_MINBUS=1
CONFIG_I2CTOOL_MAXBUS=3
#CONFIG_I2CTOOL_MINADDR
@@ -742,7 +741,6 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n
#
# Settings for examples/nx
#
-CONFIG_EXAMPLES_NX_BUILTIN=y
CONFIG_EXAMPLES_NX_VPLANE=0
CONFIG_EXAMPLES_NX_DEVNO=0
CONFIG_EXAMPLES_NX_BGCOLOR=0x0011
@@ -762,7 +760,6 @@ CONFIG_EXAMPLES_NX_EXTERNINIT=n
#
# Settings for examples/nxhello
#
-CONFIG_EXAMPLES_NXHELLO_BUILTIN=y
CONFIG_EXAMPLES_NXHELLO_VPLANE=0
CONFIG_EXAMPLES_NXHELLO_DEVNO=0
CONFIG_EXAMPLES_NXHELLO_BGCOLOR=0x0011
@@ -774,7 +771,6 @@ CONFIG_EXAMPLES_NXHELLO_EXTERNINIT=n
#
# Settings for examples/nximage
#
-CONFIG_EXAMPLES_NXIMAGE_BUILTIN=y
CONFIG_EXAMPLES_NXIMAGE_VPLANE=0
CONFIG_EXAMPLES_NXIMAGE_DEVNO=0
CONFIG_EXAMPLES_NXIMAGE_BPP=16
@@ -803,7 +799,6 @@ CONFIG_EXAMPLES_NXLINES_EXTERNINIT=n
#
# Settings for examples/touchscreen
#
-CONFIG_EXAMPLES_TOUCHSCREEN_BUILTIN=y
CONFIG_EXAMPLES_TOUCHSCREEN_MINOR=0
CONFIG_EXAMPLES_TOUCHSCREEN_DEVPATH="/dev/input0"
CONFIG_EXAMPLES_TOUCHSCREEN_NSAMPLES=25
@@ -811,7 +806,6 @@ CONFIG_EXAMPLES_TOUCHSCREEN_NSAMPLES=25
#
# Settings for examples/usbstorage
#
-CONFIG_EXAMPLES_USBMSC_BUILTIN=y
CONFIG_EXAMPLES_USBMSC_NLUNS=1
CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0
CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0"
diff --git a/nuttx/configs/stm3220g-eval/nsh2/defconfig b/nuttx/configs/stm3220g-eval/nsh2/defconfig
index d14e7664e..670c0840c 100644
--- a/nuttx/configs/stm3220g-eval/nsh2/defconfig
+++ b/nuttx/configs/stm3220g-eval/nsh2/defconfig
@@ -696,7 +696,6 @@ CONFIG_NSH_MMCSDMINOR=0
#
# I2C tool settings
#
-CONFIG_I2CTOOL_BUILTIN=y
CONFIG_I2CTOOL_MINBUS=1
CONFIG_I2CTOOL_MAXBUS=3
#CONFIG_I2CTOOL_MINADDR
@@ -729,7 +728,6 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n
#
# Settings for examples/nx
#
-CONFIG_EXAMPLES_NX_BUILTIN=y
CONFIG_EXAMPLES_NX_VPLANE=0
CONFIG_EXAMPLES_NX_DEVNO=0
CONFIG_EXAMPLES_NX_BGCOLOR=0x0011
@@ -749,7 +747,6 @@ CONFIG_EXAMPLES_NX_EXTERNINIT=n
#
# Settings for examples/nxhello
#
-CONFIG_EXAMPLES_NXHELLO_BUILTIN=y
CONFIG_EXAMPLES_NXHELLO_VPLANE=0
CONFIG_EXAMPLES_NXHELLO_DEVNO=0
CONFIG_EXAMPLES_NXHELLO_BGCOLOR=0x0011
@@ -761,7 +758,6 @@ CONFIG_EXAMPLES_NXHELLO_EXTERNINIT=n
#
# Settings for examples/nximage
#
-CONFIG_EXAMPLES_NXIMAGE_BUILTIN=y
CONFIG_EXAMPLES_NXIMAGE_VPLANE=0
CONFIG_EXAMPLES_NXIMAGE_DEVNO=0
CONFIG_EXAMPLES_NXIMAGE_BPP=16
@@ -790,7 +786,6 @@ CONFIG_EXAMPLES_NXLINES_EXTERNINIT=n
#
# Settings for examples/touchscreen
#
-CONFIG_EXAMPLES_TOUCHSCREEN_BUILTIN=y
CONFIG_EXAMPLES_TOUCHSCREEN_MINOR=0
CONFIG_EXAMPLES_TOUCHSCREEN_DEVPATH="/dev/input0"
CONFIG_EXAMPLES_TOUCHSCREEN_NSAMPLES=25
@@ -798,7 +793,6 @@ CONFIG_EXAMPLES_TOUCHSCREEN_NSAMPLES=25
#
# Settings for examples/usbstorage
#
-CONFIG_EXAMPLES_USBMSC_BUILTIN=y
CONFIG_EXAMPLES_USBMSC_NLUNS=1
CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0
CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0"
diff --git a/nuttx/configs/stm3220g-eval/ostest/defconfig b/nuttx/configs/stm3220g-eval/ostest/defconfig
index dc23e0ab5..7bdf36849 100644
--- a/nuttx/configs/stm3220g-eval/ostest/defconfig
+++ b/nuttx/configs/stm3220g-eval/ostest/defconfig
@@ -599,7 +599,6 @@ CONFIG_NSH_MMCSDMINOR=0
#
# Settings for examples/nx
#
-CONFIG_EXAMPLES_NX_BUILTIN=y
CONFIG_EXAMPLES_NX_VPLANE=0
CONFIG_EXAMPLES_NX_DEVNO=0
CONFIG_EXAMPLES_NX_BGCOLOR=0x0011
@@ -619,7 +618,6 @@ CONFIG_EXAMPLES_NX_EXTERNINIT=n
#
# Settings for examples/nxhello
#
-CONFIG_EXAMPLES_NXHELLO_BUILTIN=y
CONFIG_EXAMPLES_NXHELLO_VPLANE=0
CONFIG_EXAMPLES_NXHELLO_DEVNO=0
CONFIG_EXAMPLES_NXHELLO_BGCOLOR=0x0011
@@ -631,7 +629,6 @@ CONFIG_EXAMPLES_NXHELLO_EXTERNINIT=n
#
# Settings for examples/nximage
#
-CONFIG_EXAMPLES_NXIMAGE_BUILTIN=y
CONFIG_EXAMPLES_NXIMAGE_VPLANE=0
CONFIG_EXAMPLES_NXIMAGE_DEVNO=0
CONFIG_EXAMPLES_NXIMAGE_BPP=16
@@ -660,7 +657,6 @@ CONFIG_EXAMPLES_NXLINES_EXTERNINIT=n
#
# Settings for examples/touchscreen
#
-CONFIG_EXAMPLES_TOUCHSCREEN_BUILTIN=y
CONFIG_EXAMPLES_TOUCHSCREEN_MINOR=0
CONFIG_EXAMPLES_TOUCHSCREEN_DEVPATH="/dev/input0"
CONFIG_EXAMPLES_TOUCHSCREEN_NSAMPLES=25
@@ -679,7 +675,6 @@ CONFIG_EXAMPLES_BUTTONS_NAME2="Up/Down"
#
# I2C tool settings
#
-CONFIG_I2CTOOL_BUILTIN=y
CONFIG_I2CTOOL_MINBUS=1
CONFIG_I2CTOOL_MAXBUS=3
#CONFIG_I2CTOOL_MINADDR
@@ -704,7 +699,6 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n
#
# Settings for examples/usbstorage
#
-CONFIG_EXAMPLES_USBMSC_BUILTIN=y
CONFIG_EXAMPLES_USBMSC_NLUNS=1
CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0
CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0"
diff --git a/nuttx/configs/stm3220g-eval/telnetd/defconfig b/nuttx/configs/stm3220g-eval/telnetd/defconfig
index 5a0d96c6b..18da96da3 100644
--- a/nuttx/configs/stm3220g-eval/telnetd/defconfig
+++ b/nuttx/configs/stm3220g-eval/telnetd/defconfig
@@ -605,7 +605,6 @@ CONFIG_NSH_MMCSDMINOR=0
#
# I2C tool settings
#
-CONFIG_I2CTOOL_BUILTIN=y
CONFIG_I2CTOOL_MINBUS=1
CONFIG_I2CTOOL_MAXBUS=3
#CONFIG_I2CTOOL_MINADDR
diff --git a/nuttx/configs/stm3240g-eval/dhcpd/defconfig b/nuttx/configs/stm3240g-eval/dhcpd/defconfig
index a49e94ea3..3075e373b 100644
--- a/nuttx/configs/stm3240g-eval/dhcpd/defconfig
+++ b/nuttx/configs/stm3240g-eval/dhcpd/defconfig
@@ -613,7 +613,6 @@ CONFIG_NSH_MMCSDMINOR=0
#
# I2C tool settings
#
-CONFIG_I2CTOOL_BUILTIN=y
CONFIG_I2CTOOL_MINBUS=1
CONFIG_I2CTOOL_MAXBUS=3
#CONFIG_I2CTOOL_MINADDR
diff --git a/nuttx/configs/stm3240g-eval/nettest/defconfig b/nuttx/configs/stm3240g-eval/nettest/defconfig
index 0fdb75229..9891d3770 100644
--- a/nuttx/configs/stm3240g-eval/nettest/defconfig
+++ b/nuttx/configs/stm3240g-eval/nettest/defconfig
@@ -606,7 +606,6 @@ CONFIG_NSH_MMCSDMINOR=0
#
# I2C tool settings
#
-CONFIG_I2CTOOL_BUILTIN=y
CONFIG_I2CTOOL_MINBUS=1
CONFIG_I2CTOOL_MAXBUS=3
#CONFIG_I2CTOOL_MINADDR
diff --git a/nuttx/configs/stm3240g-eval/nsh/defconfig b/nuttx/configs/stm3240g-eval/nsh/defconfig
index 47f1a4b4c..a53a736c5 100644
--- a/nuttx/configs/stm3240g-eval/nsh/defconfig
+++ b/nuttx/configs/stm3240g-eval/nsh/defconfig
@@ -709,7 +709,6 @@ CONFIG_NSH_MMCSDMINOR=0
#
# I2C tool settings
#
-CONFIG_I2CTOOL_BUILTIN=y
CONFIG_I2CTOOL_MINBUS=1
CONFIG_I2CTOOL_MAXBUS=3
#CONFIG_I2CTOOL_MINADDR
@@ -742,7 +741,6 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n
#
# Settings for examples/nx
#
-CONFIG_EXAMPLES_NX_BUILTIN=y
CONFIG_EXAMPLES_NX_VPLANE=0
CONFIG_EXAMPLES_NX_DEVNO=0
CONFIG_EXAMPLES_NX_BGCOLOR=0x0011
@@ -762,7 +760,6 @@ CONFIG_EXAMPLES_NX_EXTERNINIT=n
#
# Settings for examples/nxhello
#
-CONFIG_EXAMPLES_NXHELLO_BUILTIN=y
CONFIG_EXAMPLES_NXHELLO_VPLANE=0
CONFIG_EXAMPLES_NXHELLO_DEVNO=0
CONFIG_EXAMPLES_NXHELLO_BGCOLOR=0x0011
@@ -774,7 +771,6 @@ CONFIG_EXAMPLES_NXHELLO_EXTERNINIT=n
#
# Settings for examples/nximage
#
-CONFIG_EXAMPLES_NXIMAGE_BUILTIN=y
CONFIG_EXAMPLES_NXIMAGE_VPLANE=0
CONFIG_EXAMPLES_NXIMAGE_DEVNO=0
CONFIG_EXAMPLES_NXIMAGE_BPP=16
@@ -803,7 +799,6 @@ CONFIG_EXAMPLES_NXLINES_EXTERNINIT=n
#
# Settings for examples/touchscreen
#
-CONFIG_EXAMPLES_TOUCHSCREEN_BUILTIN=y
CONFIG_EXAMPLES_TOUCHSCREEN_MINOR=0
CONFIG_EXAMPLES_TOUCHSCREEN_DEVPATH="/dev/input0"
CONFIG_EXAMPLES_TOUCHSCREEN_NSAMPLES=25
@@ -811,7 +806,6 @@ CONFIG_EXAMPLES_TOUCHSCREEN_NSAMPLES=25
#
# Settings for examples/usbstorage
#
-CONFIG_EXAMPLES_USBMSC_BUILTIN=y
CONFIG_EXAMPLES_USBMSC_NLUNS=1
CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0
CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0"
diff --git a/nuttx/configs/stm3240g-eval/nsh2/defconfig b/nuttx/configs/stm3240g-eval/nsh2/defconfig
index d62098eba..2b32ee16b 100644
--- a/nuttx/configs/stm3240g-eval/nsh2/defconfig
+++ b/nuttx/configs/stm3240g-eval/nsh2/defconfig
@@ -656,7 +656,6 @@ CONFIG_NSH_MMCSDMINOR=0
#
# I2C tool settings
#
-CONFIG_I2CTOOL_BUILTIN=y
CONFIG_I2CTOOL_MINBUS=1
CONFIG_I2CTOOL_MAXBUS=3
#CONFIG_I2CTOOL_MINADDR
diff --git a/nuttx/configs/stm3240g-eval/nxconsole/defconfig b/nuttx/configs/stm3240g-eval/nxconsole/defconfig
index bc9161d30..f3e085426 100644
--- a/nuttx/configs/stm3240g-eval/nxconsole/defconfig
+++ b/nuttx/configs/stm3240g-eval/nxconsole/defconfig
@@ -680,7 +680,6 @@ CONFIG_NSH_MMCSDMINOR=0
#
# I2C tool settings
#
-CONFIG_I2CTOOL_BUILTIN=y
CONFIG_I2CTOOL_MINBUS=1
CONFIG_I2CTOOL_MAXBUS=3
#CONFIG_I2CTOOL_MINADDR
@@ -713,7 +712,6 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n
#
# Settings for examples/nx
#
-CONFIG_EXAMPLES_NX_BUILTIN=y
CONFIG_EXAMPLES_NX_VPLANE=0
CONFIG_EXAMPLES_NX_DEVNO=0
CONFIG_EXAMPLES_NX_BGCOLOR=0x0011
@@ -733,7 +731,6 @@ CONFIG_EXAMPLES_NX_EXTERNINIT=n
#
# Settings for examples/nxhello
#
-CONFIG_EXAMPLES_NXHELLO_BUILTIN=y
CONFIG_EXAMPLES_NXHELLO_VPLANE=0
CONFIG_EXAMPLES_NXHELLO_DEVNO=0
CONFIG_EXAMPLES_NXHELLO_BGCOLOR=0x0011
@@ -745,7 +742,6 @@ CONFIG_EXAMPLES_NXHELLO_EXTERNINIT=n
#
# Settings for examples/nximage
#
-CONFIG_EXAMPLES_NXIMAGE_BUILTIN=y
CONFIG_EXAMPLES_NXIMAGE_VPLANE=0
CONFIG_EXAMPLES_NXIMAGE_DEVNO=0
CONFIG_EXAMPLES_NXIMAGE_BPP=16
@@ -774,7 +770,6 @@ CONFIG_EXAMPLES_NXLINES_EXTERNINIT=n
#
# Settings for examples/usbstorage
#
-CONFIG_EXAMPLES_USBMSC_BUILTIN=y
CONFIG_EXAMPLES_USBMSC_NLUNS=1
CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0
CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0"
diff --git a/nuttx/configs/stm3240g-eval/nxwm/defconfig b/nuttx/configs/stm3240g-eval/nxwm/defconfig
index a7ac5e38c..80e9f867b 100644
--- a/nuttx/configs/stm3240g-eval/nxwm/defconfig
+++ b/nuttx/configs/stm3240g-eval/nxwm/defconfig
@@ -741,7 +741,6 @@ CONFIG_NSH_MMCSDMINOR=0
#
# I2C tool settings
#
-CONFIG_I2CTOOL_BUILTIN=y
CONFIG_I2CTOOL_MINBUS=1
CONFIG_I2CTOOL_MAXBUS=3
#CONFIG_I2CTOOL_MINADDR
@@ -774,7 +773,6 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n
#
# Settings for examples/nx
#
-CONFIG_EXAMPLES_NX_BUILTIN=y
CONFIG_EXAMPLES_NX_VPLANE=0
CONFIG_EXAMPLES_NX_DEVNO=0
CONFIG_EXAMPLES_NX_BGCOLOR=0x0011
@@ -794,7 +792,6 @@ CONFIG_EXAMPLES_NX_EXTERNINIT=n
#
# Settings for examples/nxhello
#
-CONFIG_EXAMPLES_NXHELLO_BUILTIN=y
CONFIG_EXAMPLES_NXHELLO_VPLANE=0
CONFIG_EXAMPLES_NXHELLO_DEVNO=0
CONFIG_EXAMPLES_NXHELLO_BGCOLOR=0x0011
@@ -806,7 +803,6 @@ CONFIG_EXAMPLES_NXHELLO_EXTERNINIT=n
#
# Settings for examples/nximage
#
-CONFIG_EXAMPLES_NXIMAGE_BUILTIN=y
CONFIG_EXAMPLES_NXIMAGE_VPLANE=0
CONFIG_EXAMPLES_NXIMAGE_DEVNO=0
CONFIG_EXAMPLES_NXIMAGE_BPP=16
@@ -835,7 +831,6 @@ CONFIG_EXAMPLES_NXLINES_EXTERNINIT=n
#
# Settings for examples/touchscreen
#
-CONFIG_EXAMPLES_TOUCHSCREEN_BUILTIN=n
CONFIG_EXAMPLES_TOUCHSCREEN_MINOR=0
CONFIG_EXAMPLES_TOUCHSCREEN_DEVPATH="/dev/input0"
CONFIG_EXAMPLES_TOUCHSCREEN_NSAMPLES=25
@@ -843,7 +838,6 @@ CONFIG_EXAMPLES_TOUCHSCREEN_NSAMPLES=25
#
# Settings for examples/usbstorage
#
-CONFIG_EXAMPLES_USBMSC_BUILTIN=y
CONFIG_EXAMPLES_USBMSC_NLUNS=1
CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0
CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0"
diff --git a/nuttx/configs/stm3240g-eval/ostest/defconfig b/nuttx/configs/stm3240g-eval/ostest/defconfig
index 4052adafc..89b1b755c 100644
--- a/nuttx/configs/stm3240g-eval/ostest/defconfig
+++ b/nuttx/configs/stm3240g-eval/ostest/defconfig
@@ -533,7 +533,6 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512
# CONFIG_EXAMPLES_NXLINES is not set
# CONFIG_EXAMPLES_NXTEXT is not set
CONFIG_EXAMPLES_OSTEST=y
-# CONFIG_EXAMPLES_OSTEST_BUILTIN is not set
CONFIG_EXAMPLES_OSTEST_LOOPS=1
CONFIG_EXAMPLES_OSTEST_STACKSIZE=2048
CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=3
diff --git a/nuttx/configs/stm3240g-eval/telnetd/defconfig b/nuttx/configs/stm3240g-eval/telnetd/defconfig
index efc548d0b..6a91ff13e 100644
--- a/nuttx/configs/stm3240g-eval/telnetd/defconfig
+++ b/nuttx/configs/stm3240g-eval/telnetd/defconfig
@@ -618,7 +618,6 @@ CONFIG_NSH_MMCSDMINOR=0
#
# I2C tool settings
#
-CONFIG_I2CTOOL_BUILTIN=y
CONFIG_I2CTOOL_MINBUS=1
CONFIG_I2CTOOL_MAXBUS=3
#CONFIG_I2CTOOL_MINADDR
diff --git a/nuttx/configs/stm3240g-eval/webserver/defconfig b/nuttx/configs/stm3240g-eval/webserver/defconfig
index 85274ad4f..c87234fd7 100644
--- a/nuttx/configs/stm3240g-eval/webserver/defconfig
+++ b/nuttx/configs/stm3240g-eval/webserver/defconfig
@@ -709,7 +709,6 @@ CONFIG_NSH_MMCSDMINOR=0
#
# I2C tool settings
#
-CONFIG_I2CTOOL_BUILTIN=y
CONFIG_I2CTOOL_MINBUS=1
CONFIG_I2CTOOL_MAXBUS=3
#CONFIG_I2CTOOL_MINADDR
@@ -742,7 +741,6 @@ CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n
#
# Settings for examples/nx
#
-CONFIG_EXAMPLES_NX_BUILTIN=y
CONFIG_EXAMPLES_NX_VPLANE=0
CONFIG_EXAMPLES_NX_DEVNO=0
CONFIG_EXAMPLES_NX_BGCOLOR=0x0011
@@ -762,7 +760,6 @@ CONFIG_EXAMPLES_NX_EXTERNINIT=n
#
# Settings for examples/nxhello
#
-CONFIG_EXAMPLES_NXHELLO_BUILTIN=y
CONFIG_EXAMPLES_NXHELLO_VPLANE=0
CONFIG_EXAMPLES_NXHELLO_DEVNO=0
CONFIG_EXAMPLES_NXHELLO_BGCOLOR=0x0011
@@ -774,7 +771,6 @@ CONFIG_EXAMPLES_NXHELLO_EXTERNINIT=n
#
# Settings for examples/nximage
#
-CONFIG_EXAMPLES_NXIMAGE_BUILTIN=y
CONFIG_EXAMPLES_NXIMAGE_VPLANE=0
CONFIG_EXAMPLES_NXIMAGE_DEVNO=0
CONFIG_EXAMPLES_NXIMAGE_BPP=16
@@ -803,7 +799,6 @@ CONFIG_EXAMPLES_NXLINES_EXTERNINIT=n
#
# Settings for examples/touchscreen
#
-CONFIG_EXAMPLES_TOUCHSCREEN_BUILTIN=y
CONFIG_EXAMPLES_TOUCHSCREEN_MINOR=0
CONFIG_EXAMPLES_TOUCHSCREEN_DEVPATH="/dev/input0"
CONFIG_EXAMPLES_TOUCHSCREEN_NSAMPLES=25
@@ -811,7 +806,6 @@ CONFIG_EXAMPLES_TOUCHSCREEN_NSAMPLES=25
#
# Settings for examples/usbstorage
#
-CONFIG_EXAMPLES_USBMSC_BUILTIN=y
CONFIG_EXAMPLES_USBMSC_NLUNS=1
CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0
CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0"
diff --git a/nuttx/configs/stm32f100rc_generic/ostest/defconfig b/nuttx/configs/stm32f100rc_generic/ostest/defconfig
index 907a9b800..16f56e333 100644
--- a/nuttx/configs/stm32f100rc_generic/ostest/defconfig
+++ b/nuttx/configs/stm32f100rc_generic/ostest/defconfig
@@ -444,7 +444,6 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512
# CONFIG_EXAMPLES_NXLINES is not set
# CONFIG_EXAMPLES_NXTEXT is not set
CONFIG_EXAMPLES_OSTEST=y
-# CONFIG_EXAMPLES_OSTEST_BUILTIN is not set
CONFIG_EXAMPLES_OSTEST_LOOPS=1
CONFIG_EXAMPLES_OSTEST_STACKSIZE=2048
CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=3
diff --git a/nuttx/configs/stm32f3discovery/ostest/defconfig b/nuttx/configs/stm32f3discovery/ostest/defconfig
index 3db001546..997f9681c 100644
--- a/nuttx/configs/stm32f3discovery/ostest/defconfig
+++ b/nuttx/configs/stm32f3discovery/ostest/defconfig
@@ -504,7 +504,6 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512
# CONFIG_EXAMPLES_NXLINES is not set
# CONFIG_EXAMPLES_NXTEXT is not set
CONFIG_EXAMPLES_OSTEST=y
-# CONFIG_EXAMPLES_OSTEST_BUILTIN is not set
CONFIG_EXAMPLES_OSTEST_LOOPS=1
CONFIG_EXAMPLES_OSTEST_STACKSIZE=2048
CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=3
diff --git a/nuttx/configs/stm32f4discovery/kostest/defconfig b/nuttx/configs/stm32f4discovery/kostest/defconfig
index 316ba3f80..96a2490a4 100644
--- a/nuttx/configs/stm32f4discovery/kostest/defconfig
+++ b/nuttx/configs/stm32f4discovery/kostest/defconfig
@@ -543,7 +543,6 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512
# CONFIG_EXAMPLES_NXLINES is not set
# CONFIG_EXAMPLES_NXTEXT is not set
CONFIG_EXAMPLES_OSTEST=y
-# CONFIG_EXAMPLES_OSTEST_BUILTIN is not set
CONFIG_EXAMPLES_OSTEST_LOOPS=1
CONFIG_EXAMPLES_OSTEST_STACKSIZE=2048
CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=3
diff --git a/nuttx/configs/stm32f4discovery/ostest/defconfig b/nuttx/configs/stm32f4discovery/ostest/defconfig
index ae2af1656..46e8161e4 100644
--- a/nuttx/configs/stm32f4discovery/ostest/defconfig
+++ b/nuttx/configs/stm32f4discovery/ostest/defconfig
@@ -533,7 +533,6 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512
# CONFIG_EXAMPLES_NXLINES is not set
# CONFIG_EXAMPLES_NXTEXT is not set
CONFIG_EXAMPLES_OSTEST=y
-# CONFIG_EXAMPLES_OSTEST_BUILTIN is not set
CONFIG_EXAMPLES_OSTEST_LOOPS=1
CONFIG_EXAMPLES_OSTEST_STACKSIZE=2048
CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=3
diff --git a/nuttx/configs/stm32f4discovery/winbuild/defconfig b/nuttx/configs/stm32f4discovery/winbuild/defconfig
index 30f6a225c..07940af88 100644
--- a/nuttx/configs/stm32f4discovery/winbuild/defconfig
+++ b/nuttx/configs/stm32f4discovery/winbuild/defconfig
@@ -464,7 +464,6 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512
# CONFIG_EXAMPLES_NXLINES is not set
# CONFIG_EXAMPLES_NXTEXT is not set
CONFIG_EXAMPLES_OSTEST=y
-# CONFIG_EXAMPLES_OSTEST_BUILTIN is not set
CONFIG_EXAMPLES_OSTEST_LOOPS=1
CONFIG_EXAMPLES_OSTEST_STACKSIZE=2048
CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=3
diff --git a/nuttx/configs/stm32ldiscovery/src/stm32_autoleds.c b/nuttx/configs/stm32ldiscovery/src/stm32_autoleds.c
index b03a61266..6fcdbcc21 100644
--- a/nuttx/configs/stm32ldiscovery/src/stm32_autoleds.c
+++ b/nuttx/configs/stm32ldiscovery/src/stm32_autoleds.c
@@ -1,6 +1,5 @@
/****************************************************************************
- * configs/stm32ldiscovery/src/up_autoleds.c
- * arch/arm/src/board/up_autoleds.c
+ * configs/stm32ldiscovery/src/stm32_autoleds.c
*
* Copyright (C) 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
@@ -55,7 +54,7 @@
/****************************************************************************
* Definitions
****************************************************************************/
-/* If CONFIG_ARCH_LEDs is defined, then NuttX will control the 8 LEDs on
+/* If CONFIG_ARCH_LEDs is defined, then NuttX will control the 2 LEDs on
* board the STM32L-Discovery. The following definitions describe how NuttX
* controls the LEDs:
*
diff --git a/nuttx/configs/stm32ldiscovery/src/stm32_userleds.c b/nuttx/configs/stm32ldiscovery/src/stm32_userleds.c
index e556f4f23..1e3094c6d 100644
--- a/nuttx/configs/stm32ldiscovery/src/stm32_userleds.c
+++ b/nuttx/configs/stm32ldiscovery/src/stm32_userleds.c
@@ -1,6 +1,5 @@
/****************************************************************************
- * configs/stm32ldiscovery/src/up_leds.c
- * arch/arm/src/board/up_leds.c
+ * configs/stm32ldiscovery/src/stm32_userleds.c
*
* Copyright (C) 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
diff --git a/nuttx/configs/sure-pic32mx/ostest/defconfig b/nuttx/configs/sure-pic32mx/ostest/defconfig
index e01c9f380..b053374fc 100644
--- a/nuttx/configs/sure-pic32mx/ostest/defconfig
+++ b/nuttx/configs/sure-pic32mx/ostest/defconfig
@@ -539,7 +539,6 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512
# CONFIG_EXAMPLES_NXLINES is not set
# CONFIG_EXAMPLES_NXTEXT is not set
CONFIG_EXAMPLES_OSTEST=y
-# CONFIG_EXAMPLES_OSTEST_BUILTIN is not set
CONFIG_EXAMPLES_OSTEST_LOOPS=1
CONFIG_EXAMPLES_OSTEST_STACKSIZE=2048
CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=3
diff --git a/nuttx/configs/sure-pic32mx/src/pic32mx_usbterm.c b/nuttx/configs/sure-pic32mx/src/pic32mx_usbterm.c
index 6905951b8..16fa4f1ee 100644
--- a/nuttx/configs/sure-pic32mx/src/pic32mx_usbterm.c
+++ b/nuttx/configs/sure-pic32mx/src/pic32mx_usbterm.c
@@ -82,7 +82,7 @@ int usbterm_devinit(void)
* pic32mx_usbattach() will be called in nsh_archinitialize().
*/
-#ifndef CONFIG_EXAMPLES_USBTERM_BUILTIN
+#ifndef CONFIG_NSH_BUILTIN_APPS
pic32mx_usbattach();
#endif
return OK;
diff --git a/nuttx/configs/twr-k60n512/ostest/defconfig b/nuttx/configs/twr-k60n512/ostest/defconfig
index db6b2cc6f..f7dbf5315 100644
--- a/nuttx/configs/twr-k60n512/ostest/defconfig
+++ b/nuttx/configs/twr-k60n512/ostest/defconfig
@@ -464,7 +464,6 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512
# CONFIG_EXAMPLES_NXLINES is not set
# CONFIG_EXAMPLES_NXTEXT is not set
CONFIG_EXAMPLES_OSTEST=y
-# CONFIG_EXAMPLES_OSTEST_BUILTIN is not set
CONFIG_EXAMPLES_OSTEST_LOOPS=1
CONFIG_EXAMPLES_OSTEST_STACKSIZE=2048
CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=3
diff --git a/nuttx/configs/twr-k60n512/src/up_usbmsc.c b/nuttx/configs/twr-k60n512/src/up_usbmsc.c
index c893551ca..41a21beaa 100644
--- a/nuttx/configs/twr-k60n512/src/up_usbmsc.c
+++ b/nuttx/configs/twr-k60n512/src/up_usbmsc.c
@@ -1,7 +1,7 @@
/****************************************************************************
* configs/twr-k60n512/src/up_usbmsc.c
*
- * Copyright (C) 2011 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2011, 2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Configure and register the Kinetis MMC/SD block driver.
@@ -110,9 +110,9 @@ int usbmsc_archinitialize(void)
* this case, there is nothing further to be done here.
*/
-#ifndef CONFIG_EXAMPLES_USBMSC_BUILTIN
+#ifndef CONFIG_NSH_BUILTIN_APPS
# warning "Missing logic"
-#endif /* CONFIG_EXAMPLES_USBMSC_BUILTIN */
+#endif /* CONFIG_NSH_BUILTIN_APPS */
return OK;
}
diff --git a/nuttx/configs/ubw32/ostest/defconfig b/nuttx/configs/ubw32/ostest/defconfig
index e183b7526..42ec764d6 100644
--- a/nuttx/configs/ubw32/ostest/defconfig
+++ b/nuttx/configs/ubw32/ostest/defconfig
@@ -522,7 +522,6 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512
# CONFIG_EXAMPLES_NXLINES is not set
# CONFIG_EXAMPLES_NXTEXT is not set
CONFIG_EXAMPLES_OSTEST=y
-# CONFIG_EXAMPLES_OSTEST_BUILTIN is not set
CONFIG_EXAMPLES_OSTEST_LOOPS=1
CONFIG_EXAMPLES_OSTEST_STACKSIZE=2048
CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=3
diff --git a/nuttx/configs/ubw32/src/up_usbterm.c b/nuttx/configs/ubw32/src/up_usbterm.c
index 401d17026..9fe84b548 100644
--- a/nuttx/configs/ubw32/src/up_usbterm.c
+++ b/nuttx/configs/ubw32/src/up_usbterm.c
@@ -2,7 +2,7 @@
* configs/ubw32/src/up_usbterm.c
* arch/arm/src/board/up_usbterm.c
*
- * Copyright (C) 2012 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2012-2013 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@@ -80,7 +80,7 @@ int usbterm_devinit(void)
* pic32mx_usbattach() will be called in nsh_archinitialize().
*/
-#ifndef CONFIG_EXAMPLES_USBTERM_BUILTIN
+#ifndef CONFIG_NSH_BUILTIN_APPS
pic32mx_usbattach();
#endif
return OK;
diff --git a/nuttx/configs/xtrs/ostest/defconfig b/nuttx/configs/xtrs/ostest/defconfig
index 74a0199df..162036143 100644
--- a/nuttx/configs/xtrs/ostest/defconfig
+++ b/nuttx/configs/xtrs/ostest/defconfig
@@ -337,7 +337,6 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512
# CONFIG_EXAMPLES_NXLINES is not set
# CONFIG_EXAMPLES_NXTEXT is not set
CONFIG_EXAMPLES_OSTEST=y
-# CONFIG_EXAMPLES_OSTEST_BUILTIN is not set
CONFIG_EXAMPLES_OSTEST_LOOPS=1
CONFIG_EXAMPLES_OSTEST_STACKSIZE=1024
CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=4
diff --git a/nuttx/configs/z16f2800100zcog/ostest/defconfig b/nuttx/configs/z16f2800100zcog/ostest/defconfig
index d94a52124..3e420b75f 100644
--- a/nuttx/configs/z16f2800100zcog/ostest/defconfig
+++ b/nuttx/configs/z16f2800100zcog/ostest/defconfig
@@ -376,7 +376,6 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512
# CONFIG_EXAMPLES_NXLINES is not set
# CONFIG_EXAMPLES_NXTEXT is not set
CONFIG_EXAMPLES_OSTEST=y
-# CONFIG_EXAMPLES_OSTEST_BUILTIN is not set
CONFIG_EXAMPLES_OSTEST_LOOPS=1
CONFIG_EXAMPLES_OSTEST_STACKSIZE=8192
CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=8
diff --git a/nuttx/configs/z80sim/ostest/defconfig b/nuttx/configs/z80sim/ostest/defconfig
index bd4144821..3c317cfa0 100644
--- a/nuttx/configs/z80sim/ostest/defconfig
+++ b/nuttx/configs/z80sim/ostest/defconfig
@@ -337,7 +337,6 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512
# CONFIG_EXAMPLES_NXLINES is not set
# CONFIG_EXAMPLES_NXTEXT is not set
CONFIG_EXAMPLES_OSTEST=y
-# CONFIG_EXAMPLES_OSTEST_BUILTIN is not set
CONFIG_EXAMPLES_OSTEST_LOOPS=1
CONFIG_EXAMPLES_OSTEST_STACKSIZE=1024
CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=4
diff --git a/nuttx/configs/z8encore000zco/ostest/defconfig b/nuttx/configs/z8encore000zco/ostest/defconfig
index 605bec669..89b278e0c 100644
--- a/nuttx/configs/z8encore000zco/ostest/defconfig
+++ b/nuttx/configs/z8encore000zco/ostest/defconfig
@@ -363,7 +363,6 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512
# CONFIG_EXAMPLES_NXLINES is not set
# CONFIG_EXAMPLES_NXTEXT is not set
CONFIG_EXAMPLES_OSTEST=y
-# CONFIG_EXAMPLES_OSTEST_BUILTIN is not set
CONFIG_EXAMPLES_OSTEST_LOOPS=1
CONFIG_EXAMPLES_OSTEST_STACKSIZE=256
CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=8
diff --git a/nuttx/configs/z8f64200100kit/ostest/defconfig b/nuttx/configs/z8f64200100kit/ostest/defconfig
index aabfc6ee4..35be6d316 100644
--- a/nuttx/configs/z8f64200100kit/ostest/defconfig
+++ b/nuttx/configs/z8f64200100kit/ostest/defconfig
@@ -363,7 +363,6 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512
# CONFIG_EXAMPLES_NXLINES is not set
# CONFIG_EXAMPLES_NXTEXT is not set
CONFIG_EXAMPLES_OSTEST=y
-# CONFIG_EXAMPLES_OSTEST_BUILTIN is not set
CONFIG_EXAMPLES_OSTEST_LOOPS=1
CONFIG_EXAMPLES_OSTEST_STACKSIZE=256
CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=8