From c67fdb87f7f731d13050f752acf1c35e51766c05 Mon Sep 17 00:00:00 2001
From: patacongo
Date: Fri, 21 Dec 2012 20:09:32 +0000
Subject: [PATCH 001/118] Patches from Petteri Aimonen (plus a few other
things)
git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5448 42af7a65-404d-4744-a932-0658087f49c3
---
NxWidgets/ChangeLog.txt | 32 +
NxWidgets/Kconfig | 265 ++-
NxWidgets/ReleaseNotes.txt | 2 +-
NxWidgets/UnitTests/CButton/Makefile | 2 +-
NxWidgets/UnitTests/CButtonArray/Makefile | 2 +-
NxWidgets/UnitTests/CCheckBox/Makefile | 2 +-
NxWidgets/UnitTests/CGlyphButton/Makefile | 2 +-
NxWidgets/UnitTests/CImage/Makefile | 2 +-
NxWidgets/UnitTests/CKeypad/Makefile | 2 +-
NxWidgets/UnitTests/CLabel/Makefile | 2 +-
NxWidgets/UnitTests/CLatchButton/Makefile | 2 +-
.../UnitTests/CLatchButtonArray/Makefile | 2 +-
NxWidgets/UnitTests/CListBox/Makefile | 2 +-
NxWidgets/UnitTests/CProgressBar/Makefile | 2 +-
NxWidgets/UnitTests/CRadioButton/Makefile | 2 +-
.../UnitTests/CScrollbarHorizontal/Makefile | 2 +-
.../UnitTests/CScrollbarVertical/Makefile | 2 +-
NxWidgets/UnitTests/CSliderHorizonal/Makefile | 2 +-
NxWidgets/UnitTests/CSliderVertical/Makefile | 2 +-
NxWidgets/UnitTests/CTextBox/Makefile | 2 +-
NxWidgets/UnitTests/nxwm/Makefile | 2 +-
.../libnxwidgets/include/cgraphicsport.hxx | 34 +
.../libnxwidgets/include/cscrollingpanel.hxx | 3 +-
NxWidgets/libnxwidgets/src/ccyclebutton.cxx | 19 -
NxWidgets/libnxwidgets/src/cgraphicsport.cxx | 110 +-
NxWidgets/libnxwidgets/src/clabel.cxx | 23 +-
.../libnxwidgets/src/cscrollingpanel.cxx | 40 +-
apps/NxWidgets/Kconfig | 265 ++-
nuttx/ChangeLog | 7 +
nuttx/Documentation/NuttX.html | 2 +-
nuttx/TODO | 13 +-
nuttx/configs/shenzhou/nxwm/defconfig | 412 ++---
nuttx/configs/stm3220g-eval/README.txt | 15 +
nuttx/configs/stm3220g-eval/nxwm/appconfig | 53 -
nuttx/configs/stm3220g-eval/nxwm/defconfig | 1526 +++++++++--------
nuttx/configs/stm3220g-eval/nxwm/setenv.sh | 2 +-
nuttx/drivers/input/Kconfig | 19 +
nuttx/graphics/Makefile | 3 +
nuttx/graphics/nxfonts/Make.defs | 6 +
nuttx/graphics/nxfonts/Makefile.sources | 7 +
nuttx/graphics/nxfonts/nxfonts_bitmaps.c | 2 +
nuttx/graphics/nxfonts/nxfonts_getfont.c | 12 +
nuttx/graphics/nxfonts/nxfonts_mono5x8.h | 815 +++++++++
nuttx/include/nuttx/nx/nxfonts.h | 6 +
nuttx/include/pthread.h | 4 +-
nuttx/include/stdbool.h | 4 +-
nuttx/tools/bdf-converter.c | 1 +
47 files changed, 2554 insertions(+), 1184 deletions(-)
delete mode 100644 nuttx/configs/stm3220g-eval/nxwm/appconfig
create mode 100644 nuttx/graphics/nxfonts/nxfonts_mono5x8.h
diff --git a/NxWidgets/ChangeLog.txt b/NxWidgets/ChangeLog.txt
index df9fb2d418..744584ed46 100644
--- a/NxWidgets/ChangeLog.txt
+++ b/NxWidgets/ChangeLog.txt
@@ -220,3 +220,35 @@
classing easier (from Petteri Aimonen).
1.5 2013-xx-xx Gregory Nutt
+
+* NxWidgets::CGraphicsPort::move(): Fix typo bug in bounding rectangle
+ calculation (from Petteri Aimonen).
+* NxWM::CScrollingPanel::scrollChildren(): Avoid unnecessary redraws in
+ CScrollingPanel (contributed by Petteri Aimonen).
+* NxWM::CCycleButton: Remove the separator from CCycleButton. It draws in
+ wrong place, and doesnt look very good in the correct place either.
+ (from Petteri Aimonen).
+* NxWidgets::CGraphicsPort: Many times we only want a constant background.
+ In that case the old code fills the background, reads it back, renders
+ the text and then writes it back. When used with LCD's (instead of
+ framebuffers) this causes unnecessary delay and screen flicker.
+ This commit adds a variant of drawText that takes background color,
+ so that the background and text can both be rendered at one go.
+ The old functions still function as before (Petteri Aimonen).
+* NxWidgets::CLabel: The label was drawn as a single rectangular region,
+ then a text was added to the on top of this. The result is that the
+ text would flicker when the CLabel was updated. With this change, the
+ two step update is replaced with a five step update: The background
+ is updated as four rectangulear regions (leaving the previous text in
+ place), then the new text is updated. This eliminates the flicker
+ (Petteri Aimonen).
+* Kconfig: Many NxWidgets/NxWM settings do not have meaningful, generic
+ default values. Colors, for example, depend on pixel depth. Some
+ geometry settings depending on other geometry settings. Font IDs are
+ not know-able by the configuration system. etc. In these cases, it
+ is best if the settings are just not undefined so that the system can
+ calculate a reasonable default. however, if no default is provided
+ in the .config file, mconf will complain and generate errors. So work
+ around this, I added several "enabling" settings to override the
+ default setting. This is awkward and I preferred the configuration as
+ it was before, but this avoids the mconf errors and warnings.
diff --git a/NxWidgets/Kconfig b/NxWidgets/Kconfig
index 59d8856bce..656399199e 100644
--- a/NxWidgets/Kconfig
+++ b/NxWidgets/Kconfig
@@ -13,6 +13,18 @@ config NXWIDGETS
if NXWIDGETS
comment "NX Server/Device Configuration"
+config NXWIDGETS_FLICKERFREE
+ bool "Enable Flicker Reduction Logic"
+ default y if NX_LCDDRIVER
+ default n if !NX_LCDDRIVER
+ ---help---
+ Because of their performance an in the manner in which they are
+ updated, LCDs may be prone to "flicker" in the displays when Widgets
+ are updated. Often more complex (and slower) options are availble
+ to reduce the flicker. Enabling this option will enabled those
+ lower-performance flicker-reductions measures where-ever thay may
+ be available.
+
config NXWIDGETS_DEVNO
int "LCD Device Number"
default 0
@@ -96,10 +108,20 @@ config NXWIDGETS_SIZEOFCHAR
comment "NXWidget Default Values"
+config NXWIDGETS_SYSTEM_CUSTOM_FONTID
+ bool "Use a Custom Default Font"
+ default n
+ ---help---
+ Set to override the system default font id (NXFONT_DEFAULT).
+
+if NXWIDGETS_SYSTEM_CUSTOM_FONTID
config NXWIDGETS_DEFAULT_FONTID
int "Default Font ID"
+ default 0
---help---
- Default font ID. Default: NXFONT_DEFAULT
+ Use this default NxWidgets font ID instead of the system font ID
+ (NXFONT_DEFAULT). Default: 0
+endif
config NXWIDGETS_TNXARRAY_INITIALSIZE
int "Initial Size of Dynamic Arrays"
@@ -113,53 +135,88 @@ config NXWIDGETS_TNXARRAY_SIZEINCREMENT
---help---
Default dynamic array realloctino increment (in entries). Default: 8
+config NXWIDGETS_CUSTOM_FILLCOLORS
+ bool "Custom Default Fill Colors"
+ default n
+ ---help---
+ Select custom default colors for the widget background. If defined,
+ the hexadecimal values for all filled colors must be provided
+ (there are no default colors because the hexadecimal representation
+ of the default colors depend on the pixel depth). Default: n
+
+if NXWIDGETS_CUSTOM_FILLCOLORS
config NXWIDGETS_DEFAULT_BACKGROUNDCOLOR
- hex "Normal Background Color"
+ hex "Default Normal Background Color"
---help---
Normal background color. Default: RGB(148,189,215)
config NXWIDGETS_DEFAULT_SELECTEDBACKGROUNDCOLOR
- hex "Selected Background Color"
+ hex "Default Selected Background Color"
---help---
Default selected background color. Default: RGB(206,227,241)
+config NXWIDGETS_DEFAULT_HIGHLIGHTCOLOR
+ hex "Default Highlight Color"
+ ---help---
+ Highlight color. Currently this color is only used in clist
+ boxes, progress bars, and slider grips. Default: RGB(192,192,192)
+endif
+
+config NXWIDGETS_CUSTOM_EDGECOLORS
+ bool "Custom Default Edge Colors"
+ default n
+ ---help---
+ Select custom default colors for the widget edges. If defined,
+ then hexadecimal values for all edge colors must be provided
+ (there are no default colors because the hexadecimal representation
+ of the default colors depend on the pixel depth). Default: n.
+
+if NXWIDGETS_CUSTOM_EDGECOLORS
config NXWIDGETS_DEFAULT_SHINEEDGECOLOR
- hex "Shiny Edge Color"
+ hex "Default Shiny Edge Color"
---help---
Shiny side boarder color. Default: RGB(248,248,248)
config NXWIDGETS_DEFAULT_SHADOWEDGECOLOR
- hex "Shadow Edge Color"
+ hex "Default Shadow Edge Color"
---help---
Shadowed side border color. Default: RGB(35,58,73)
+endif
-config NXWIDGETS_DEFAULT_HIGHLIGHTCOLOR
- hex "Highlight Color"
+config NXWIDGETS_CUSTOM_TEXTCOLORS
+ bool "Custom Default Text colors"
+ default n
---help---
- Highlight color. Default: RGB(192,192,192)
+ Select custom colors for the widget text. If defined, then
+ hexadecimal values for all text colors must be provided
+ (there are no default colors because the hexadecimal representation
+ of the default colors depend on the pixel depth). Default: n.
+if NXWIDGETS_CUSTOM_TEXTCOLORS
config NXWIDGETS_DEFAULT_DISABLEDTEXTCOLOR
- hex "Disabled Text Color"
+ hex "Default Disabled Text Color"
---help---
Text color on a disabled widget: Default: RGB(192,192,192)
config NXWIDGETS_DEFAULT_ENABLEDTEXTCOLOR
- hex "Enabled Text Color"
+ hex "Default Enabled Text Color"
---help---
Text color on a enabled widget. Default: RGB(248,248,248)
config NXWIDGETS_DEFAULT_SELECTEDTEXTCOLOR
- hex "Selected Text Color"
+ hex "Default Selected Text Color"
---help---
Text color on a selected widget. Default: RGB(0,0,0)
config NXWIDGETS_DEFAULT_FONTCOLOR
- hex "Default Font Color"
+ hex "Default Default Font Color"
---help---
Default font color. Default: RGB(255,255,255)
+endif
config NXWIDGETS_TRANSPARENT_COLOR
hex "Transparent Color"
+ default 0x0
---help---
Transparent color. Default: RGB(0,0,0)
@@ -220,10 +277,20 @@ config NXWM
if NXWM
comment "General settings"
+config NXWM_SYSTEM_CUSTOM_FONTID
+ bool "Use Custom Default Font"
+ default n
+ ---help---
+ Set to override the system default font id (NXFONT_DEFAULT).
+
+if NXWM_SYSTEM_CUSTOM_FONTID
config NXWM_DEFAULT_FONTID
int "Font ID"
+ default 0
---help---
- The NxWM default font ID. Default: NXFONT_DEFAULT
+ Use this NxWM default font ID instead of the system font ID
+ (NXFONT_DEFAULT). Default: 0
+endif
config NXWM_UNITTEST
bool "NxWM Unit Test"
@@ -233,6 +300,16 @@ config NXWM_UNITTEST
comment "Color configuration"
+config NXWM_CUSTOM_FILLCOLORS
+ bool "Custom Default Fill Colors"
+ default n
+ ---help---
+ Select custom default colors for the widget background. If defined,
+ the hexadecimal values for all filled colors must be provided
+ (there are no default colors because the hexadecimal representation
+ of the default colors depend on the pixel depth). Default: n
+
+if NXWM_CUSTOM_FILLCOLORS
config NXWM_DEFAULT_BACKGROUNDCOLOR
hex "Background Color"
---help---
@@ -242,7 +319,18 @@ config NXWM_DEFAULT_SELECTEDBACKGROUNDCOLOR
hex "Normal Background Color"
---help---
Select background color. Default: RGB(206,227,241)
+endif
+config NXWM_CUSTOM_EDGECOLORS
+ bool "Custom Default Edge Colors"
+ default n
+ ---help---
+ Select custom default colors for the widget edges. If defined,
+ then hexadecimal values for all edge colors must be provided
+ (there are no default colors because the hexadecimal representation
+ of the default colors depend on the pixel depth). Default: n.
+
+if NXWM_CUSTOM_EDGECOLORS
config NXWM_DEFAULT_SHINEEDGECOLOR
hex "Shiny Edge Color"
---help---
@@ -252,7 +340,18 @@ config NXWM_DEFAULT_SHADOWEDGECOLOR
hex "Shadow Edge Color"
---help---
Color of the shadowed edge of a border. Default: RGB(0,0,0)
+endif
+config NXWM_CUSTOM_TEXTCOLORS
+ bool "Custom Default Text colors"
+ default n
+ ---help---
+ Select custom colors for the widget text. If defined, then
+ hexadecimal values for all text colors must be provided
+ (there are no default colors because the hexadecimal representation
+ of the default colors depend on the pixel depth). Default: n.
+
+if NXWM_CUSTOM_TEXTCOLORS
config NXWM_DEFAULT_FONTCOLOR
hex "Default Font Color"
---help---
@@ -260,8 +359,10 @@ config NXWM_DEFAULT_FONTCOLOR
config NXWM_TRANSPARENT_COLOR
hex "Transparent Color"
+ default 0x0
---help---
The "transparent" color. Default: RGB(0,0,0)
+endif
comment "Horizontal and vertical spacing of icons in the task bar"
@@ -303,27 +404,48 @@ config NXWM_TASKBAR_RIGHT
endchoice
+config NXWM_CUSTOM_TASKBAR_WIDTH
+ bool "Use Custom Taskbar width"
+ default n
+ ---help---
+ Set to override the default taskbar thickness (either vertical or
+ horizontal). The default depends on the selected horizontal or
+ vertical spacing. Default: 25 + 2*spacing
+
+if NXWM_CUSTOM_TASKBAR_WIDTH
config NXWM_TASKBAR_WIDTH
int "Taskbar Width"
+ default 29
---help---
- Task bar thickness (either vertical or horizontal). Default: 25 + 2*spacing
+ Task bar thickness (either vertical or horizontal). Default: 25 + 2*2
+endif
config NXWM_DISABLE_MINIMIZE
bool "Disable Minimize Button"
default n
---help---
- If the "desktop" is empty, users have no need to minimize any windows. If the buttons
- are small, it's easy to hit minimize button accidentally when trying to close an
- application.
+ If the "desktop" is empty, users have no need to minimize any
+ windows. If the buttons are small, it's easy to hit minimize
+ button accidentally when trying to close an application.
comment "Tool Bar Configuration"
+config NXWM_CUSTOM_TOOLBAR_HEIGHT
+ bool "Use Custom Toolbar Height"
+ default n
+ ---help---
+ Set to override the default tooldar height The default depends on
+ the selected horizontal or vertical spacing. Default: 21 + 2*spacing
+
+if NXWM_CUSTOM_TOOLBAR_HEIGHT
config NXWM_TOOLBAR_HEIGHT
int "Toolbar Height"
+ default 25
---help---
The height of the tool bar in each application window. At present,
all icons are 21 pixels in height and, hence, require a task bar of
- at least that size.
+ at least that size. Default: 21 + 2*2
+endif
comment "Background Image"
@@ -357,10 +479,19 @@ config NXWM_STARTWINDOW_HSPACING
---help---
Horizontal spacing. Default: 4 rows
+config NXWM_CUSTOM_STARTWINDOW_ICON
+ bool "Custom Start Window Icon"
+ default n
+ ---help---
+ Select to override the default Start Window Icon: NxWM::g_playBitmap
+
+if NXWM_CUSTOM_STARTWINDOW_ICON
config NXWM_STARTWINDOW_ICON
string "StartWindow Icon"
+ default "NxWM::g_playBitmap"
---help---
The glyph to use as the start window icon. Default: NxWM::g_playBitmap
+endif
config NXWM_STARTWINDOW_MQNAME
string "Message Queue Name"
@@ -417,6 +548,16 @@ config NXWM_NXCONSOLE_STACKSIZE
The stack size to use when starting the NxConsole task. Default:
2048 bytes.
+config NXWM_NXCONSOLE_CUSTOM_COLORS
+ bool "Custom NxConsole Colors"
+ default n
+ ---help---
+ Select custom default colors for the NxConsole window. If defined,
+ the hexadecimal values for all NxConsole colors must be provided
+ (there are no default colors because the hexadecimal representation
+ of the default colors depend on the pixel depth). Default: n
+
+if NXWM_NXCONSOLE_CUSTOM_COLORS
config NXWM_NXCONSOLE_WCOLOR
hex "NxConsole Background Color"
---help---
@@ -428,17 +569,36 @@ config NXWM_NXCONSOLE_FONTCOLOR
---help---
The color of the fonts to use in the NxConsole window.
Default: RGB(0,0,0)
+endif
+config NXWM_NXCONSOLE_CUSTOM_FONTID
+ bool "Use Custom Default Font"
+ default n
+ ---help---
+ Set to override the system default font id (NXWM_DEFAULT_FONTID).
+
+if NXWM_NXCONSOLE_CUSTOM_FONTID
config NXWM_NXCONSOLE_FONTID
int "NxConsole Font ID"
+ default 0
---help---
- The ID of the font to use in the NxConsole window. Default:
- NXWM_DEFAULT_FONTID
+ Use this default font ID in the NxConsole window instead of the
+ NxWM font ID (NXWM_DEFAULT_FONTID). Default: 0
+endif
+config NXWM_CUSTOM_NXCONSOLE_ICON
+ bool "Custom NxConsole Icon"
+ default n
+ ---help---
+ Select to override the default NxConsole Window Icon: NxWM::g_cmdBitmap
+
+if NXWM_CUSTOM_NXCONSOLE_ICON
config NXWM_NXCONSOLE_ICON
string "NxConsole Icon"
+ default "NxWM::g_cmdBitmap"
---help---
The glyph to use as the NxConsole icon. Default: NxWM::g_cmdBitmap
+endif
config NXWM_TOUCHSCREEN
bool "Touchscreen Support"
@@ -478,6 +638,7 @@ config NXWM_TOUCHSCREEN_LISTENERPRIO
config NXWM_TOUCHSCREEN_LISTENERSTACK
int "Touchscreen Listener Task Stack Size"
+ default 1024
---help---
Touchscreen listener thread stack size. Default 1024
@@ -527,6 +688,17 @@ endif
comment "Calibration display settings"
+config NXWM_CALIBRATION_CUSTOM_COLORS
+ bool "Custom Calibration Colors"
+ default n
+ ---help---
+ Select custom default colors for the calibration window. If
+ defined, the hexadecimal values for all calibration window
+ colors must be provided (there are no default colors because
+ the hexadecimal representation of the default colors depend
+ on the pixel depth). Default: n
+
+if NXWM_CALIBRATION_CUSTOM_COLORS
config NXWM_CALIBRATION_BACKGROUNDCOLOR
hex "Background Color"
---help---
@@ -550,12 +722,23 @@ config NXWM_CALIBRATION_TOUCHEDCOLOR
---help---
The color of the circle in the touchscreen calibration display after
the touch is recorder. Default: RGB(255, 255, 96) (very light yellow)
+endif
+config NXWM_CUSTOM_CALIBRATION_ICON
+ bool "Custom Calibration Icon"
+ default n
+ ---help---
+ Select to override the default Calibration Window Icon:
+ NxWM::g_calibrationBitmap
+
+if NXWM_CUSTOM_CALIBRATION_ICON
config NXWM_CALIBRATION_ICON
string "Callibration Icon"
+ default "NxWM::g_calibrationBitmap"
---help---
The ICON to use for the touchscreen calibration application. Default:
NxWM::g_calibrationBitmap
+endif
config NXWM_CALIBRATION_SIGNO
int "Calibration Signal Number"
@@ -576,23 +759,55 @@ config NXWM_CALIBRATION_LISTENERSTACK
---help---
Calibration listener thread stack size. Default 2048
-comment "Calibration display settings"
+comment "Hex Calculator display settings"
+config NXWM_HEXCALCULATOR_CUSTOM_COLORS
+ bool "Custom Hex Calculator Colors"
+ default n
+ ---help---
+ Select custom default colors for the Hex Calcualtor window. If
+ defined, the hexadecimal values for all hex calculator colors
+ must be provided (there are no default colors because the
+ hexadecimal representation of the default colors depend on the
+ pixel depth). Default: n
+
+if NXWM_HEXCALCULATOR_CUSTOM_COLORS
config NXWM_HEXCALCULATOR_BACKGROUNDCOLOR
hex "Calculator Background Color"
---help---
The background color of the calculator display. Default: Same
as NXWM_DEFAULT_BACKGROUNDCOLOR
+endif
-config NXWM_HEXCALCULATOR_ICON
- string "Calculator Icon"
+config NXWM_CUSTOM_HEXCALCULATOR_ICON
+ bool "Custom Hex Calculator Icon"
+ default n
---help---
- The ICON to use for the hex calculator application. Default:
+ Select to override the default Hex Calculator Window Icon:
NxWM::g_calculatorBitmap
+if NXWM_CUSTOM_HEXCALCULATOR_ICON
+config NXWM_HEXCALCULATOR_ICON
+ string "Calculator Icon"
+ default "NxWM::g_calculatorBitmap"
+ ---help---
+ The ICON to use for the hex calculator application. Default:
+ "NxWM::g_calculatorBitmap"
+endif
+
+config NXWM_HEXCALCULATOR_CUSTOM_FONTID
+ bool "Use Custom Default Font"
+ default n
+ ---help---
+ Set to override the system default font id (NXWM_DEFAULT_FONTID).
+
+if NXWM_HEXCALCULATOR_CUSTOM_FONTID
config NXWM_HEXCALCULATOR_FONTID
int "Calculator Font ID"
+ default 0
---help---
- The font used with the calculator. Default: NXWM_DEFAULT_FONTID
+ Use this default font ID in the calculator window instead of the
+ NxWM font ID (NXWM_DEFAULT_FONTID). Default: 0
+endif
endif
diff --git a/NxWidgets/ReleaseNotes.txt b/NxWidgets/ReleaseNotes.txt
index 4b155c50ea..aaaefe6ebb 100644
--- a/NxWidgets/ReleaseNotes.txt
+++ b/NxWidgets/ReleaseNotes.txt
@@ -116,7 +116,7 @@ NxWidgets-1.4
=============
The 5th release of the NxWidgets package was made on December 20, 2012. This
-release depends on NuttX-6.22 or above and should not be used with older
+release depends on NuttX-6.24 or above and should not be used with older
NuttX releases. This release corresponds to SVN revision r5447.
Note: Nearly all changes between 1.3 and 1.4 were the result of the efforts
diff --git a/NxWidgets/UnitTests/CButton/Makefile b/NxWidgets/UnitTests/CButton/Makefile
index d80ef3c760..ea7b5cf25a 100644
--- a/NxWidgets/UnitTests/CButton/Makefile
+++ b/NxWidgets/UnitTests/CButton/Makefile
@@ -134,7 +134,7 @@ chklib:
$(NXWIDGETS_LIB): # Just to keep make happy. chklib does the work.
.built: chkcxx chklib $(OBJS) $(NXWIDGETS_LIB)
- $(call ARCHIVE, $@, $(OBJS))
+ $(call ARCHIVE, $(BIN), $(OBJS))
ifeq ($(WINTOOL),y)
$(Q) $(ARCHIVER) -w -p "$(CROSSDEV)" $(BIN) $(NXWIDGETS_DIR)
else
diff --git a/NxWidgets/UnitTests/CButtonArray/Makefile b/NxWidgets/UnitTests/CButtonArray/Makefile
index b4a3b0571d..6bb490e349 100644
--- a/NxWidgets/UnitTests/CButtonArray/Makefile
+++ b/NxWidgets/UnitTests/CButtonArray/Makefile
@@ -134,7 +134,7 @@ chklib:
$(NXWIDGETS_LIB): # Just to keep make happy. chklib does the work.
.built: chkcxx chklib $(OBJS) $(NXWIDGETS_LIB)
- $(call ARCHIVE, $@, $(OBJS))
+ $(call ARCHIVE, $(BIN), $(OBJS))
ifeq ($(WINTOOL),y)
$(Q) $(ARCHIVER) -w -p "$(CROSSDEV)" $(BIN) $(NXWIDGETS_DIR)
else
diff --git a/NxWidgets/UnitTests/CCheckBox/Makefile b/NxWidgets/UnitTests/CCheckBox/Makefile
index 21e007b3d8..bd8293983c 100644
--- a/NxWidgets/UnitTests/CCheckBox/Makefile
+++ b/NxWidgets/UnitTests/CCheckBox/Makefile
@@ -134,7 +134,7 @@ chklib:
$(NXWIDGETS_LIB): # Just to keep make happy. chklib does the work.
.built: chkcxx chklib $(OBJS) $(NXWIDGETS_LIB)
- $(call ARCHIVE, $@, $(OBJS))
+ $(call ARCHIVE, $(BIN), $(OBJS))
ifeq ($(WINTOOL),y)
$(Q) $(ARCHIVER) -w -p "$(CROSSDEV)" $(BIN) $(NXWIDGETS_DIR)
else
diff --git a/NxWidgets/UnitTests/CGlyphButton/Makefile b/NxWidgets/UnitTests/CGlyphButton/Makefile
index 1e7faf0262..b693821333 100644
--- a/NxWidgets/UnitTests/CGlyphButton/Makefile
+++ b/NxWidgets/UnitTests/CGlyphButton/Makefile
@@ -134,7 +134,7 @@ chklib:
$(NXWIDGETS_LIB): # Just to keep make happy. chklib does the work.
.built: chkcxx chklib $(OBJS) $(NXWIDGETS_LIB)
- $(call ARCHIVE, $@, $(OBJS))
+ $(call ARCHIVE, $(BIN), $(OBJS))
ifeq ($(WINTOOL),y)
$(Q) $(ARCHIVER) -w -p "$(CROSSDEV)" $(BIN) $(NXWIDGETS_DIR)
else
diff --git a/NxWidgets/UnitTests/CImage/Makefile b/NxWidgets/UnitTests/CImage/Makefile
index 61978147e2..08e22772f7 100644
--- a/NxWidgets/UnitTests/CImage/Makefile
+++ b/NxWidgets/UnitTests/CImage/Makefile
@@ -134,7 +134,7 @@ chklib:
$(NXWIDGETS_LIB): # Just to keep make happy. chklib does the work.
.built: chkcxx chklib $(OBJS) $(NXWIDGETS_LIB)
- $(call ARCHIVE, $@, $(OBJS))
+ $(call ARCHIVE, $(BIN), $(OBJS))
ifeq ($(WINTOOL),y)
$(Q) $(ARCHIVER) -w -p "$(CROSSDEV)" $(BIN) $(NXWIDGETS_DIR)
else
diff --git a/NxWidgets/UnitTests/CKeypad/Makefile b/NxWidgets/UnitTests/CKeypad/Makefile
index d27b90192e..0bbf837d8b 100644
--- a/NxWidgets/UnitTests/CKeypad/Makefile
+++ b/NxWidgets/UnitTests/CKeypad/Makefile
@@ -134,7 +134,7 @@ chklib:
$(NXWIDGETS_LIB): # Just to keep make happy. chklib does the work.
.built: chkcxx chklib $(OBJS) $(NXWIDGETS_LIB)
- $(call ARCHIVE, $@, $(OBJS))
+ $(call ARCHIVE, $(BIN), $(OBJS))
ifeq ($(WINTOOL),y)
$(Q) $(ARCHIVER) -w -p "$(CROSSDEV)" $(BIN) $(NXWIDGETS_DIR)
else
diff --git a/NxWidgets/UnitTests/CLabel/Makefile b/NxWidgets/UnitTests/CLabel/Makefile
index 14e8897d22..4cd3d05d8d 100644
--- a/NxWidgets/UnitTests/CLabel/Makefile
+++ b/NxWidgets/UnitTests/CLabel/Makefile
@@ -134,7 +134,7 @@ chklib:
$(NXWIDGETS_LIB): # Just to keep make happy. chklib does the work.
.built: chkcxx chklib $(OBJS) $(NXWIDGETS_LIB)
- $(call ARCHIVE, $@, $(OBJS))
+ $(call ARCHIVE, $(BIN), $(OBJS))
ifeq ($(WINTOOL),y)
$(Q) $(ARCHIVER) -w -p "$(CROSSDEV)" $(BIN) $(NXWIDGETS_DIR)
else
diff --git a/NxWidgets/UnitTests/CLatchButton/Makefile b/NxWidgets/UnitTests/CLatchButton/Makefile
index 435a4c3cdd..92909ab62f 100644
--- a/NxWidgets/UnitTests/CLatchButton/Makefile
+++ b/NxWidgets/UnitTests/CLatchButton/Makefile
@@ -134,7 +134,7 @@ chklib:
$(NXWIDGETS_LIB): # Just to keep make happy. chklib does the work.
.built: chkcxx chklib $(OBJS) $(NXWIDGETS_LIB)
- $(call ARCHIVE, $@, $(OBJS))
+ $(call ARCHIVE, $(BIN), $(OBJS))
ifeq ($(WINTOOL),y)
$(Q) $(ARCHIVER) -w -p "$(CROSSDEV)" $(BIN) $(NXWIDGETS_DIR)
else
diff --git a/NxWidgets/UnitTests/CLatchButtonArray/Makefile b/NxWidgets/UnitTests/CLatchButtonArray/Makefile
index 0f6fe639f6..412174ea2a 100644
--- a/NxWidgets/UnitTests/CLatchButtonArray/Makefile
+++ b/NxWidgets/UnitTests/CLatchButtonArray/Makefile
@@ -134,7 +134,7 @@ chklib:
$(NXWIDGETS_LIB): # Just to keep make happy. chklib does the work.
.built: chkcxx chklib $(OBJS) $(NXWIDGETS_LIB)
- $(call ARCHIVE, $@, $(OBJS))
+ $(call ARCHIVE, $(BIN), $(OBJS))
ifeq ($(WINTOOL),y)
$(Q) $(ARCHIVER) -w -p "$(CROSSDEV)" $(BIN) $(NXWIDGETS_DIR)
else
diff --git a/NxWidgets/UnitTests/CListBox/Makefile b/NxWidgets/UnitTests/CListBox/Makefile
index 301424c479..58d313b4f6 100644
--- a/NxWidgets/UnitTests/CListBox/Makefile
+++ b/NxWidgets/UnitTests/CListBox/Makefile
@@ -134,7 +134,7 @@ chklib:
$(NXWIDGETS_LIB): # Just to keep make happy. chklib does the work.
.built: chkcxx chklib $(OBJS) $(NXWIDGETS_LIB)
- $(call ARCHIVE, $@, $(OBJS))
+ $(call ARCHIVE, $(BIN), $(OBJS))
ifeq ($(WINTOOL),y)
$(Q) $(ARCHIVER) -w -p "$(CROSSDEV)" $(BIN) $(NXWIDGETS_DIR)
else
diff --git a/NxWidgets/UnitTests/CProgressBar/Makefile b/NxWidgets/UnitTests/CProgressBar/Makefile
index d50d3ed055..c57b0cf6ee 100644
--- a/NxWidgets/UnitTests/CProgressBar/Makefile
+++ b/NxWidgets/UnitTests/CProgressBar/Makefile
@@ -134,7 +134,7 @@ chklib:
$(NXWIDGETS_LIB): # Just to keep make happy. chklib does the work.
.built: chkcxx chklib $(OBJS) $(NXWIDGETS_LIB)
- $(call ARCHIVE, $@, $(OBJS))
+ $(call ARCHIVE, $(BIN), $(OBJS))
ifeq ($(WINTOOL),y)
$(Q) $(ARCHIVER) -w -p "$(CROSSDEV)" $(BIN) $(NXWIDGETS_DIR)
else
diff --git a/NxWidgets/UnitTests/CRadioButton/Makefile b/NxWidgets/UnitTests/CRadioButton/Makefile
index ff6c2d2472..1278c8f539 100644
--- a/NxWidgets/UnitTests/CRadioButton/Makefile
+++ b/NxWidgets/UnitTests/CRadioButton/Makefile
@@ -134,7 +134,7 @@ chklib:
$(NXWIDGETS_LIB): # Just to keep make happy. chklib does the work.
.built: chkcxx chklib $(OBJS) $(NXWIDGETS_LIB)
- $(call ARCHIVE, $@, $(OBJS))
+ $(call ARCHIVE, $(BIN), $(OBJS))
ifeq ($(WINTOOL),y)
$(Q) $(ARCHIVER) -w -p "$(CROSSDEV)" $(BIN) $(NXWIDGETS_DIR)
else
diff --git a/NxWidgets/UnitTests/CScrollbarHorizontal/Makefile b/NxWidgets/UnitTests/CScrollbarHorizontal/Makefile
index a5fab0dda8..c1edc89362 100644
--- a/NxWidgets/UnitTests/CScrollbarHorizontal/Makefile
+++ b/NxWidgets/UnitTests/CScrollbarHorizontal/Makefile
@@ -134,7 +134,7 @@ chklib:
$(NXWIDGETS_LIB): # Just to keep make happy. chklib does the work.
.built: chkcxx chklib $(OBJS) $(NXWIDGETS_LIB)
- $(call ARCHIVE, $@, $(OBJS))
+ $(call ARCHIVE, $(BIN), $(OBJS))
ifeq ($(WINTOOL),y)
$(Q) $(ARCHIVER) -w -p "$(CROSSDEV)" $(BIN) $(NXWIDGETS_DIR)
else
diff --git a/NxWidgets/UnitTests/CScrollbarVertical/Makefile b/NxWidgets/UnitTests/CScrollbarVertical/Makefile
index 204b90a52c..e3367e1674 100644
--- a/NxWidgets/UnitTests/CScrollbarVertical/Makefile
+++ b/NxWidgets/UnitTests/CScrollbarVertical/Makefile
@@ -134,7 +134,7 @@ chklib:
$(NXWIDGETS_LIB): # Just to keep make happy. chklib does the work.
.built: chkcxx chklib $(OBJS) $(NXWIDGETS_LIB)
- $(call ARCHIVE, $@, $(OBJS))
+ $(call ARCHIVE, $(BIN), $(OBJS))
ifeq ($(WINTOOL),y)
$(Q) $(ARCHIVER) -w -p "$(CROSSDEV)" $(BIN) $(NXWIDGETS_DIR)
else
diff --git a/NxWidgets/UnitTests/CSliderHorizonal/Makefile b/NxWidgets/UnitTests/CSliderHorizonal/Makefile
index 67f00f6220..c739fef96e 100644
--- a/NxWidgets/UnitTests/CSliderHorizonal/Makefile
+++ b/NxWidgets/UnitTests/CSliderHorizonal/Makefile
@@ -134,7 +134,7 @@ chklib:
$(NXWIDGETS_LIB): # Just to keep make happy. chklib does the work.
.built: chkcxx chklib $(OBJS) $(NXWIDGETS_LIB)
- $(call ARCHIVE, $@, $(OBJS))
+ $(call ARCHIVE, $(BIN), $(OBJS))
ifeq ($(WINTOOL),y)
$(Q) $(ARCHIVER) -w -p "$(CROSSDEV)" $(BIN) $(NXWIDGETS_DIR)
else
diff --git a/NxWidgets/UnitTests/CSliderVertical/Makefile b/NxWidgets/UnitTests/CSliderVertical/Makefile
index 409f361fd1..82f9c6fc6e 100644
--- a/NxWidgets/UnitTests/CSliderVertical/Makefile
+++ b/NxWidgets/UnitTests/CSliderVertical/Makefile
@@ -134,7 +134,7 @@ chklib:
$(NXWIDGETS_LIB): # Just to keep make happy. chklib does the work.
.built: chkcxx chklib $(OBJS) $(NXWIDGETS_LIB)
- $(call ARCHIVE, $@, $(OBJS))
+ $(call ARCHIVE, $(BIN), $(OBJS))
ifeq ($(WINTOOL),y)
$(Q) $(ARCHIVER) -w -p "$(CROSSDEV)" $(BIN) $(NXWIDGETS_DIR)
else
diff --git a/NxWidgets/UnitTests/CTextBox/Makefile b/NxWidgets/UnitTests/CTextBox/Makefile
index a4c752e6c0..ddd16e95a0 100644
--- a/NxWidgets/UnitTests/CTextBox/Makefile
+++ b/NxWidgets/UnitTests/CTextBox/Makefile
@@ -134,7 +134,7 @@ chklib:
$(NXWIDGETS_LIB): # Just to keep make happy. chklib does the work.
.built: chkcxx chklib $(OBJS) $(NXWIDGETS_LIB)
- $(call ARCHIVE, $@, $(OBJS))
+ $(call ARCHIVE, $(BIN), $(OBJS))
ifeq ($(WINTOOL),y)
$(Q) $(ARCHIVER) -w -p "$(CROSSDEV)" $(BIN) $(NXWIDGETS_DIR)
else
diff --git a/NxWidgets/UnitTests/nxwm/Makefile b/NxWidgets/UnitTests/nxwm/Makefile
index 338b83e548..76007da1cf 100644
--- a/NxWidgets/UnitTests/nxwm/Makefile
+++ b/NxWidgets/UnitTests/nxwm/Makefile
@@ -162,7 +162,7 @@ $(NXWIDGETS_LIB): # Just to keep make happy. chklibnxwidgets does the work.
$(NXWM_LIB): # Just to keep make happy. chklibnxwm does the work.
.built: $(OBJS) $(NXWIDGETS_LIB)
- $(call ARCHIVE, $@, $(OBJS))
+ $(call ARCHIVE, $(BIN), $(OBJS))
ifeq ($(WINTOOL),y)
$(Q) $(ARCHIVER) -w -p "$(CROSSDEV)" $(BIN) $(NXWIDGETS_DIR)
$(Q) $(ARCHIVER) -w -p "$(CROSSDEV)" $(BIN) $(NXWM_DIR)
diff --git a/NxWidgets/libnxwidgets/include/cgraphicsport.hxx b/NxWidgets/libnxwidgets/include/cgraphicsport.hxx
index b9fbc4d413..d3d9e61145 100644
--- a/NxWidgets/libnxwidgets/include/cgraphicsport.hxx
+++ b/NxWidgets/libnxwidgets/include/cgraphicsport.hxx
@@ -111,6 +111,22 @@ namespace NXWidgets
nxgl_mxpixel_t m_backColor; /**< The background color to use */
#endif
+ /**
+ * The underlying implementation for drawText functions
+ * @param pos The window-relative x/y coordinate of the string.
+ * @param bound The window-relative bounds of the string.
+ * @param font The font to draw with.
+ * @param string The string to output.
+ * @param startIndex The start index within the string from which
+ * drawing will commence.
+ * @param length The number of characters to draw.
+ * @param background Color to use for background if transparent is false.
+ * @param transparent Whether to fill the background.
+ */
+ void drawText(struct nxgl_point_s *pos, CRect *bound, CNxFont *font,
+ const CNxString &string, int startIndex, int length,
+ nxgl_mxpixel_t background, bool transparent);
+
public:
/**
* Constructor.
@@ -329,6 +345,24 @@ namespace NXWidgets
void drawText(struct nxgl_point_s *pos, CRect *bound, CNxFont *font,
const CNxString &string, int startIndex, int length);
+ /**
+ * Draw a portion of a string to the window and fill the background
+ * in one go.
+ * @param pos The window-relative x/y coordinate of the string.
+ * @param bound The window-relative bounds of the string.
+ * @param font The font to draw with.
+ * @param string The string to output.
+ * @param startIndex The start index within the string from which
+ * drawing will commence.
+ * @param length The number of characters to draw.
+ * @param color Foreground color
+ * @param background Background color
+ */
+
+ void drawText(struct nxgl_point_s *pos, CRect *bound, CNxFont *font,
+ const CNxString &string, int startIndex, int length,
+ nxgl_mxpixel_t color, nxgl_mxpixel_t background);
+
/**
* Draw an opaque bitmap to the window.
*
diff --git a/NxWidgets/libnxwidgets/include/cscrollingpanel.hxx b/NxWidgets/libnxwidgets/include/cscrollingpanel.hxx
index 90dcc1ac9a..b27176e2f5 100644
--- a/NxWidgets/libnxwidgets/include/cscrollingpanel.hxx
+++ b/NxWidgets/libnxwidgets/include/cscrollingpanel.hxx
@@ -168,9 +168,10 @@ namespace NXWidgets
*
* @param dx The horizontal distance to scroll.
* @param dy The vertical distance to scroll.
+ * @param do_redraw Redraw widgets after moving.
*/
- void scrollChildren(int32_t dx, int32_t dy);
+ void scrollChildren(int32_t dx, int32_t dy, bool do_redraw);
/**
* Destructor.
diff --git a/NxWidgets/libnxwidgets/src/ccyclebutton.cxx b/NxWidgets/libnxwidgets/src/ccyclebutton.cxx
index b5f96683da..0fdbba73c3 100644
--- a/NxWidgets/libnxwidgets/src/ccyclebutton.cxx
+++ b/NxWidgets/libnxwidgets/src/ccyclebutton.cxx
@@ -309,30 +309,21 @@ void CCycleButton::drawContents(CGraphicsPort *port)
CRect rect;
getRect(rect);
- nxgl_coord_t glyphSpace = m_borderSize.left - 1;
nxgl_coord_t glyphYOffset = (rect.getHeight() - g_cycle.height) >> 1;
nxwidget_pixel_t textColor;
- nxwidget_pixel_t separatorLeftColor;
- nxwidget_pixel_t separatorRightColor;
if (!isEnabled())
{
textColor = getDisabledTextColor();
- separatorLeftColor = getShadowEdgeColor();
- separatorRightColor = getShineEdgeColor();
}
else if (!isClicked())
{
textColor = getEnabledTextColor();
- separatorLeftColor = getShadowEdgeColor();
- separatorRightColor = getShineEdgeColor();
}
else
{
textColor = getSelectedTextColor();
- separatorLeftColor = getShineEdgeColor();
- separatorRightColor = getShadowEdgeColor();
}
// Draw cycle glyph
@@ -341,16 +332,6 @@ void CCycleButton::drawContents(CGraphicsPort *port)
g_cycle.width, g_cycle.height, &g_cycle,
0, 0, CONFIG_NXWIDGETS_TRANSPARENT_COLOR);
- // Draw separator
-
- nxgl_coord_t x = getX() + glyphSpace + g_cycle.width;
- nxgl_coord_t y = getY();
- nxgl_coord_t w = glyphSpace + g_cycle.width;
- nxgl_coord_t h = rect.getHeight() - 1;
-
- port->drawLine(x, y, w, h, separatorLeftColor);
- port->drawLine(x+1, y, w+1, h, separatorRightColor);
-
// Only draw text if option is selected
if (m_options.getSelectedItem() != NULL)
diff --git a/NxWidgets/libnxwidgets/src/cgraphicsport.cxx b/NxWidgets/libnxwidgets/src/cgraphicsport.cxx
index d43f3bdfac..73f2352eb3 100644
--- a/NxWidgets/libnxwidgets/src/cgraphicsport.cxx
+++ b/NxWidgets/libnxwidgets/src/cgraphicsport.cxx
@@ -653,6 +653,55 @@ void CGraphicsPort::drawText(struct nxgl_point_s *pos, CRect *bound,
void CGraphicsPort::drawText(struct nxgl_point_s *pos, CRect *bound,
CNxFont *font, const CNxString &string,
int startIndex, int length)
+{
+ drawText(pos, bound, font, string, startIndex, length, 0, true);
+}
+
+/**
+ * Draw a portion of a string to the window and fill the background
+ * in one go.
+ * @param pos The window-relative x/y coordinate of the string.
+ * @param bound The window-relative bounds of the string.
+ * @param font The font to draw with.
+ * @param string The string to output.
+ * @param startIndex The start index within the string from which
+ * drawing will commence.
+ * @param length The number of characters to draw.
+ * @param color Foreground color
+ * @param background Background color
+ */
+
+void CGraphicsPort::drawText(struct nxgl_point_s *pos, CRect *bound,
+ CNxFont *font, const CNxString &string,
+ int startIndex, int length,
+ nxgl_mxpixel_t color,
+ nxgl_mxpixel_t background)
+{
+ nxgl_mxpixel_t savedColor = font->getColor();
+ font->setColor(color);
+
+ drawText(pos, bound, font, string, startIndex, length, background, false);
+
+ font->setColor(savedColor);
+}
+
+/**
+ * The underlying implementation for drawText functions
+ * @param pos The window-relative x/y coordinate of the string.
+ * @param bound The window-relative bounds of the string.
+ * @param font The font to draw with.
+ * @param string The string to output.
+ * @param startIndex The start index within the string from which
+ * drawing will commence.
+ * @param length The number of characters to draw.
+ * @param background Color to use for background if transparent is false.
+ * @param transparent Whether to fill the background.
+ */
+void CGraphicsPort::drawText(struct nxgl_point_s *pos, CRect *bound,
+ CNxFont *font, const CNxString &string,
+ int startIndex, int length,
+ nxgl_mxpixel_t background,
+ bool transparent)
{
// Verify index and length
@@ -668,6 +717,16 @@ void CGraphicsPort::drawText(struct nxgl_point_s *pos, CRect *bound,
endIndex = stringLength;
}
+#ifdef CONFIG_NX_WRITEONLY
+ if (transparent)
+ {
+ // Can't render transparently without reading memory.
+
+ transparent = false;
+ background = m_backColor;
+ }
+#endif
+
// Allocate a bit of memory to hold the largest rendered font
unsigned int bmWidth = ((unsigned int)font->getMaxWidth() * CONFIG_NXWIDGETS_BPP + 7) >> 3;
@@ -680,7 +739,7 @@ void CGraphicsPort::drawText(struct nxgl_point_s *pos, CRect *bound,
struct nxgl_rect_s boundingBox;
bound->getNxRect(&boundingBox);
-
+
// Loop setup
struct SBitmap bitmap;
@@ -707,16 +766,12 @@ void CGraphicsPort::drawText(struct nxgl_point_s *pos, CRect *bound,
// Does the letter have height? Spaces have width, but no height
- if (metrics.height > 0)
+ if (metrics.height > 0 || !transparent)
{
- // Get the height of the font
-
- nxgl_coord_t fontHeight = (nxgl_coord_t)(metrics.height + metrics.yoffset);
-
// Set the current, effective size of the bitmap
bitmap.width = fontWidth;
- bitmap.height = fontHeight;
+ bitmap.height = bmHeight;
bitmap.stride = (fontWidth * bitmap.bpp + 7) >> 3;
// Describe the destination of the font as a bounding box
@@ -725,7 +780,7 @@ void CGraphicsPort::drawText(struct nxgl_point_s *pos, CRect *bound,
dest.pt1.x = pos->x;
dest.pt1.y = pos->y;
dest.pt2.x = pos->x + fontWidth - 1;
- dest.pt2.y = pos->y + fontHeight - 1;
+ dest.pt2.y = pos->y + bmHeight - 1;
// Get the interection of the font box and the bounding box
@@ -737,25 +792,28 @@ void CGraphicsPort::drawText(struct nxgl_point_s *pos, CRect *bound,
if (!nxgl_nullrect(&intersection))
{
- // Initialize the bitmap memory by reading from the display. The
- // font renderer always renders the fonts on a transparent background.
- // Sometimes a solid background works, sometimes not. But reading
- // from graphics memory always works.
-
-#ifdef CONFIG_NX_WRITEONLY
- // Set the glyph memory to the background color
-
- nxwidget_pixel_t *bmPtr = (nxwidget_pixel_t *)bitmap.data;
- unsigned int npixels = fontWidth * fontHeight;
- for (unsigned int j = 0; j < npixels; j++)
+ // If we have been given a background color, use it to fill the array.
+ // Otherwise initialize the bitmap memory by reading from the display.
+ // The font renderer always renders the fonts on a transparent background.
+
+ if (!transparent)
{
- *bmPtr++ = m_backColor;
- }
-#else
- // Read the current contents of the destination into the glyph memory
+ // Set the glyph memory to the background color
+
+ nxwidget_pixel_t *bmPtr = (nxwidget_pixel_t *)bitmap.data;
+ unsigned int npixels = fontWidth * bmHeight;
+ for (unsigned int j = 0; j < npixels; j++)
+ {
+ *bmPtr++ = background;
+ }
+ }
+ else
+ {
+ // Read the current contents of the destination into the glyph memory
+
+ m_pNxWnd->getRectangle(&dest, &bitmap);
+ }
- m_pNxWnd->getRectangle(&dest, &bitmap);
-#endif
// Render the font into the initialized bitmap
font->drawChar(&bitmap, letter);
@@ -827,7 +885,7 @@ void CGraphicsPort::move(nxgl_coord_t x, nxgl_coord_t y,
rect.pt1.x = x;
rect.pt1.y = y;
rect.pt2.x = x + width - 1;
- rect.pt2.y = y = height -1;
+ rect.pt2.y = y + height - 1;
struct nxgl_point_s offset;
offset.x = deltaX;
diff --git a/NxWidgets/libnxwidgets/src/clabel.cxx b/NxWidgets/libnxwidgets/src/clabel.cxx
index 4c7ea3554f..be4fe902de 100644
--- a/NxWidgets/libnxwidgets/src/clabel.cxx
+++ b/NxWidgets/libnxwidgets/src/clabel.cxx
@@ -303,8 +303,10 @@ void CLabel::drawContents(CGraphicsPort *port)
// Draw the background (excluding the border)
+#ifdef CONFIG_NXWIDGETS_FLICKERFREE
port->drawFilledRect(rect.getX(), rect.getY(),
rect.getWidth(), rect.getHeight(), backColor);
+#endif
// Get the X/Y position of the text within the Label
@@ -312,10 +314,27 @@ void CLabel::drawContents(CGraphicsPort *port)
pos.x = rect.getX() + m_align.x;
pos.y = rect.getY() + m_align.y;
- // Add the text using the selected color
+#ifdef CONFIG_NXWIDGETS_FLICKERFREE
+ CNxFont* font = getFont();
+ int height = font->getHeight();
+ int width = font->getStringWidth(m_text);
+
+ // Draw the background (excluding the border and the text area)
+
+ port->drawFilledRect(rect.getX(), rect.getY(),
+ pos.x - rect.getX(), rect.getHeight(), backColor); // Left
+ port->drawFilledRect(pos.x + width, rect.getY(),
+ rect.getX2() - (pos.x + width) + 1, rect.getHeight(), backColor); // Right
+ port->drawFilledRect(pos.x, rect.getY(),
+ width, pos.y - rect.getY(), backColor); // Top
+ port->drawFilledRect(pos.x, pos.y + height,
+ width, rect.getY2() - (pos.y + height) + 1, backColor); // Bottom
+#endif
+
+ // Add the text using the selected color and background color
port->drawText(&pos, &rect, getFont(), m_text, 0, m_text.getLength(),
- textColor);
+ textColor, backColor);
}
/**
diff --git a/NxWidgets/libnxwidgets/src/cscrollingpanel.cxx b/NxWidgets/libnxwidgets/src/cscrollingpanel.cxx
index b7c507bb25..2541bb5721 100644
--- a/NxWidgets/libnxwidgets/src/cscrollingpanel.cxx
+++ b/NxWidgets/libnxwidgets/src/cscrollingpanel.cxx
@@ -215,10 +215,13 @@ void CScrollingPanel::scroll(int32_t dx, int32_t dy)
m_canvasY += dy;
m_canvasX += dx;
+ // Move children but do not redraw.
+
+ scrollChildren(dx, dy, false);
+
if (revealedRects.size() > 0)
{
// Draw background to revealed sections
- // Children will redraw themselves in moveTo.
for (int i = 0; i < revealedRects.size(); ++i)
{
@@ -231,6 +234,18 @@ void CScrollingPanel::scroll(int32_t dx, int32_t dy)
port->drawFilledRect(rrect.getX(), rrect.getY(),
rrect.getWidth(), rrect.getHeight(),
getBackgroundColor());
+
+ // Check if any children intersect this region.
+ // If it does, it should be redrawn.
+
+ for (int j = 0; j < m_children.size(); ++j)
+ {
+ CRect crect = m_children[j]->getBoundingBox();
+ if (crect.intersects(rrect))
+ {
+ m_children[j]->redraw();
+ }
+ }
}
}
}
@@ -240,12 +255,12 @@ void CScrollingPanel::scroll(int32_t dx, int32_t dy)
m_canvasY += dy;
m_canvasX += dx;
+
+ // Scroll all child widgets and redraw them
+
+ scrollChildren(dx, dy, true);
}
- // Scroll all child widgets
-
- scrollChildren(dx, dy);
-
// Notify event handlers
m_widgetEventHandlers->raiseScrollEvent(dx, dy);
@@ -332,9 +347,10 @@ void CScrollingPanel::onClick(nxgl_coord_t x, nxgl_coord_t y)
*
* @param dx The horizontal distance to scroll.
* @param dy The vertical distance to scroll.
+ * @param do_redraw Redraw widgets after moving.
*/
-void CScrollingPanel::scrollChildren(int32_t dx, int32_t dy)
+void CScrollingPanel::scrollChildren(int32_t dx, int32_t dy, bool do_redraw)
{
nxgl_coord_t widgetX = 0;
nxgl_coord_t widgetY = 0;
@@ -345,8 +361,20 @@ void CScrollingPanel::scrollChildren(int32_t dx, int32_t dy)
for (int32_t i = 0; i < m_children.size(); i++)
{
widget = m_children[i];
+ bool oldstate = widget->isDrawingEnabled();
+
+ if (!do_redraw)
+ {
+ widget->disableDrawing();
+ }
+
widgetX = (widget->getX() - thisX) + dx;
widgetY = (widget->getY() - thisY) + dy;
widget->moveTo(widgetX, widgetY);
+
+ if (!do_redraw && oldstate)
+ {
+ widget->enableDrawing();
+ }
}
}
diff --git a/apps/NxWidgets/Kconfig b/apps/NxWidgets/Kconfig
index 59d8856bce..656399199e 100644
--- a/apps/NxWidgets/Kconfig
+++ b/apps/NxWidgets/Kconfig
@@ -13,6 +13,18 @@ config NXWIDGETS
if NXWIDGETS
comment "NX Server/Device Configuration"
+config NXWIDGETS_FLICKERFREE
+ bool "Enable Flicker Reduction Logic"
+ default y if NX_LCDDRIVER
+ default n if !NX_LCDDRIVER
+ ---help---
+ Because of their performance an in the manner in which they are
+ updated, LCDs may be prone to "flicker" in the displays when Widgets
+ are updated. Often more complex (and slower) options are availble
+ to reduce the flicker. Enabling this option will enabled those
+ lower-performance flicker-reductions measures where-ever thay may
+ be available.
+
config NXWIDGETS_DEVNO
int "LCD Device Number"
default 0
@@ -96,10 +108,20 @@ config NXWIDGETS_SIZEOFCHAR
comment "NXWidget Default Values"
+config NXWIDGETS_SYSTEM_CUSTOM_FONTID
+ bool "Use a Custom Default Font"
+ default n
+ ---help---
+ Set to override the system default font id (NXFONT_DEFAULT).
+
+if NXWIDGETS_SYSTEM_CUSTOM_FONTID
config NXWIDGETS_DEFAULT_FONTID
int "Default Font ID"
+ default 0
---help---
- Default font ID. Default: NXFONT_DEFAULT
+ Use this default NxWidgets font ID instead of the system font ID
+ (NXFONT_DEFAULT). Default: 0
+endif
config NXWIDGETS_TNXARRAY_INITIALSIZE
int "Initial Size of Dynamic Arrays"
@@ -113,53 +135,88 @@ config NXWIDGETS_TNXARRAY_SIZEINCREMENT
---help---
Default dynamic array realloctino increment (in entries). Default: 8
+config NXWIDGETS_CUSTOM_FILLCOLORS
+ bool "Custom Default Fill Colors"
+ default n
+ ---help---
+ Select custom default colors for the widget background. If defined,
+ the hexadecimal values for all filled colors must be provided
+ (there are no default colors because the hexadecimal representation
+ of the default colors depend on the pixel depth). Default: n
+
+if NXWIDGETS_CUSTOM_FILLCOLORS
config NXWIDGETS_DEFAULT_BACKGROUNDCOLOR
- hex "Normal Background Color"
+ hex "Default Normal Background Color"
---help---
Normal background color. Default: RGB(148,189,215)
config NXWIDGETS_DEFAULT_SELECTEDBACKGROUNDCOLOR
- hex "Selected Background Color"
+ hex "Default Selected Background Color"
---help---
Default selected background color. Default: RGB(206,227,241)
+config NXWIDGETS_DEFAULT_HIGHLIGHTCOLOR
+ hex "Default Highlight Color"
+ ---help---
+ Highlight color. Currently this color is only used in clist
+ boxes, progress bars, and slider grips. Default: RGB(192,192,192)
+endif
+
+config NXWIDGETS_CUSTOM_EDGECOLORS
+ bool "Custom Default Edge Colors"
+ default n
+ ---help---
+ Select custom default colors for the widget edges. If defined,
+ then hexadecimal values for all edge colors must be provided
+ (there are no default colors because the hexadecimal representation
+ of the default colors depend on the pixel depth). Default: n.
+
+if NXWIDGETS_CUSTOM_EDGECOLORS
config NXWIDGETS_DEFAULT_SHINEEDGECOLOR
- hex "Shiny Edge Color"
+ hex "Default Shiny Edge Color"
---help---
Shiny side boarder color. Default: RGB(248,248,248)
config NXWIDGETS_DEFAULT_SHADOWEDGECOLOR
- hex "Shadow Edge Color"
+ hex "Default Shadow Edge Color"
---help---
Shadowed side border color. Default: RGB(35,58,73)
+endif
-config NXWIDGETS_DEFAULT_HIGHLIGHTCOLOR
- hex "Highlight Color"
+config NXWIDGETS_CUSTOM_TEXTCOLORS
+ bool "Custom Default Text colors"
+ default n
---help---
- Highlight color. Default: RGB(192,192,192)
+ Select custom colors for the widget text. If defined, then
+ hexadecimal values for all text colors must be provided
+ (there are no default colors because the hexadecimal representation
+ of the default colors depend on the pixel depth). Default: n.
+if NXWIDGETS_CUSTOM_TEXTCOLORS
config NXWIDGETS_DEFAULT_DISABLEDTEXTCOLOR
- hex "Disabled Text Color"
+ hex "Default Disabled Text Color"
---help---
Text color on a disabled widget: Default: RGB(192,192,192)
config NXWIDGETS_DEFAULT_ENABLEDTEXTCOLOR
- hex "Enabled Text Color"
+ hex "Default Enabled Text Color"
---help---
Text color on a enabled widget. Default: RGB(248,248,248)
config NXWIDGETS_DEFAULT_SELECTEDTEXTCOLOR
- hex "Selected Text Color"
+ hex "Default Selected Text Color"
---help---
Text color on a selected widget. Default: RGB(0,0,0)
config NXWIDGETS_DEFAULT_FONTCOLOR
- hex "Default Font Color"
+ hex "Default Default Font Color"
---help---
Default font color. Default: RGB(255,255,255)
+endif
config NXWIDGETS_TRANSPARENT_COLOR
hex "Transparent Color"
+ default 0x0
---help---
Transparent color. Default: RGB(0,0,0)
@@ -220,10 +277,20 @@ config NXWM
if NXWM
comment "General settings"
+config NXWM_SYSTEM_CUSTOM_FONTID
+ bool "Use Custom Default Font"
+ default n
+ ---help---
+ Set to override the system default font id (NXFONT_DEFAULT).
+
+if NXWM_SYSTEM_CUSTOM_FONTID
config NXWM_DEFAULT_FONTID
int "Font ID"
+ default 0
---help---
- The NxWM default font ID. Default: NXFONT_DEFAULT
+ Use this NxWM default font ID instead of the system font ID
+ (NXFONT_DEFAULT). Default: 0
+endif
config NXWM_UNITTEST
bool "NxWM Unit Test"
@@ -233,6 +300,16 @@ config NXWM_UNITTEST
comment "Color configuration"
+config NXWM_CUSTOM_FILLCOLORS
+ bool "Custom Default Fill Colors"
+ default n
+ ---help---
+ Select custom default colors for the widget background. If defined,
+ the hexadecimal values for all filled colors must be provided
+ (there are no default colors because the hexadecimal representation
+ of the default colors depend on the pixel depth). Default: n
+
+if NXWM_CUSTOM_FILLCOLORS
config NXWM_DEFAULT_BACKGROUNDCOLOR
hex "Background Color"
---help---
@@ -242,7 +319,18 @@ config NXWM_DEFAULT_SELECTEDBACKGROUNDCOLOR
hex "Normal Background Color"
---help---
Select background color. Default: RGB(206,227,241)
+endif
+config NXWM_CUSTOM_EDGECOLORS
+ bool "Custom Default Edge Colors"
+ default n
+ ---help---
+ Select custom default colors for the widget edges. If defined,
+ then hexadecimal values for all edge colors must be provided
+ (there are no default colors because the hexadecimal representation
+ of the default colors depend on the pixel depth). Default: n.
+
+if NXWM_CUSTOM_EDGECOLORS
config NXWM_DEFAULT_SHINEEDGECOLOR
hex "Shiny Edge Color"
---help---
@@ -252,7 +340,18 @@ config NXWM_DEFAULT_SHADOWEDGECOLOR
hex "Shadow Edge Color"
---help---
Color of the shadowed edge of a border. Default: RGB(0,0,0)
+endif
+config NXWM_CUSTOM_TEXTCOLORS
+ bool "Custom Default Text colors"
+ default n
+ ---help---
+ Select custom colors for the widget text. If defined, then
+ hexadecimal values for all text colors must be provided
+ (there are no default colors because the hexadecimal representation
+ of the default colors depend on the pixel depth). Default: n.
+
+if NXWM_CUSTOM_TEXTCOLORS
config NXWM_DEFAULT_FONTCOLOR
hex "Default Font Color"
---help---
@@ -260,8 +359,10 @@ config NXWM_DEFAULT_FONTCOLOR
config NXWM_TRANSPARENT_COLOR
hex "Transparent Color"
+ default 0x0
---help---
The "transparent" color. Default: RGB(0,0,0)
+endif
comment "Horizontal and vertical spacing of icons in the task bar"
@@ -303,27 +404,48 @@ config NXWM_TASKBAR_RIGHT
endchoice
+config NXWM_CUSTOM_TASKBAR_WIDTH
+ bool "Use Custom Taskbar width"
+ default n
+ ---help---
+ Set to override the default taskbar thickness (either vertical or
+ horizontal). The default depends on the selected horizontal or
+ vertical spacing. Default: 25 + 2*spacing
+
+if NXWM_CUSTOM_TASKBAR_WIDTH
config NXWM_TASKBAR_WIDTH
int "Taskbar Width"
+ default 29
---help---
- Task bar thickness (either vertical or horizontal). Default: 25 + 2*spacing
+ Task bar thickness (either vertical or horizontal). Default: 25 + 2*2
+endif
config NXWM_DISABLE_MINIMIZE
bool "Disable Minimize Button"
default n
---help---
- If the "desktop" is empty, users have no need to minimize any windows. If the buttons
- are small, it's easy to hit minimize button accidentally when trying to close an
- application.
+ If the "desktop" is empty, users have no need to minimize any
+ windows. If the buttons are small, it's easy to hit minimize
+ button accidentally when trying to close an application.
comment "Tool Bar Configuration"
+config NXWM_CUSTOM_TOOLBAR_HEIGHT
+ bool "Use Custom Toolbar Height"
+ default n
+ ---help---
+ Set to override the default tooldar height The default depends on
+ the selected horizontal or vertical spacing. Default: 21 + 2*spacing
+
+if NXWM_CUSTOM_TOOLBAR_HEIGHT
config NXWM_TOOLBAR_HEIGHT
int "Toolbar Height"
+ default 25
---help---
The height of the tool bar in each application window. At present,
all icons are 21 pixels in height and, hence, require a task bar of
- at least that size.
+ at least that size. Default: 21 + 2*2
+endif
comment "Background Image"
@@ -357,10 +479,19 @@ config NXWM_STARTWINDOW_HSPACING
---help---
Horizontal spacing. Default: 4 rows
+config NXWM_CUSTOM_STARTWINDOW_ICON
+ bool "Custom Start Window Icon"
+ default n
+ ---help---
+ Select to override the default Start Window Icon: NxWM::g_playBitmap
+
+if NXWM_CUSTOM_STARTWINDOW_ICON
config NXWM_STARTWINDOW_ICON
string "StartWindow Icon"
+ default "NxWM::g_playBitmap"
---help---
The glyph to use as the start window icon. Default: NxWM::g_playBitmap
+endif
config NXWM_STARTWINDOW_MQNAME
string "Message Queue Name"
@@ -417,6 +548,16 @@ config NXWM_NXCONSOLE_STACKSIZE
The stack size to use when starting the NxConsole task. Default:
2048 bytes.
+config NXWM_NXCONSOLE_CUSTOM_COLORS
+ bool "Custom NxConsole Colors"
+ default n
+ ---help---
+ Select custom default colors for the NxConsole window. If defined,
+ the hexadecimal values for all NxConsole colors must be provided
+ (there are no default colors because the hexadecimal representation
+ of the default colors depend on the pixel depth). Default: n
+
+if NXWM_NXCONSOLE_CUSTOM_COLORS
config NXWM_NXCONSOLE_WCOLOR
hex "NxConsole Background Color"
---help---
@@ -428,17 +569,36 @@ config NXWM_NXCONSOLE_FONTCOLOR
---help---
The color of the fonts to use in the NxConsole window.
Default: RGB(0,0,0)
+endif
+config NXWM_NXCONSOLE_CUSTOM_FONTID
+ bool "Use Custom Default Font"
+ default n
+ ---help---
+ Set to override the system default font id (NXWM_DEFAULT_FONTID).
+
+if NXWM_NXCONSOLE_CUSTOM_FONTID
config NXWM_NXCONSOLE_FONTID
int "NxConsole Font ID"
+ default 0
---help---
- The ID of the font to use in the NxConsole window. Default:
- NXWM_DEFAULT_FONTID
+ Use this default font ID in the NxConsole window instead of the
+ NxWM font ID (NXWM_DEFAULT_FONTID). Default: 0
+endif
+config NXWM_CUSTOM_NXCONSOLE_ICON
+ bool "Custom NxConsole Icon"
+ default n
+ ---help---
+ Select to override the default NxConsole Window Icon: NxWM::g_cmdBitmap
+
+if NXWM_CUSTOM_NXCONSOLE_ICON
config NXWM_NXCONSOLE_ICON
string "NxConsole Icon"
+ default "NxWM::g_cmdBitmap"
---help---
The glyph to use as the NxConsole icon. Default: NxWM::g_cmdBitmap
+endif
config NXWM_TOUCHSCREEN
bool "Touchscreen Support"
@@ -478,6 +638,7 @@ config NXWM_TOUCHSCREEN_LISTENERPRIO
config NXWM_TOUCHSCREEN_LISTENERSTACK
int "Touchscreen Listener Task Stack Size"
+ default 1024
---help---
Touchscreen listener thread stack size. Default 1024
@@ -527,6 +688,17 @@ endif
comment "Calibration display settings"
+config NXWM_CALIBRATION_CUSTOM_COLORS
+ bool "Custom Calibration Colors"
+ default n
+ ---help---
+ Select custom default colors for the calibration window. If
+ defined, the hexadecimal values for all calibration window
+ colors must be provided (there are no default colors because
+ the hexadecimal representation of the default colors depend
+ on the pixel depth). Default: n
+
+if NXWM_CALIBRATION_CUSTOM_COLORS
config NXWM_CALIBRATION_BACKGROUNDCOLOR
hex "Background Color"
---help---
@@ -550,12 +722,23 @@ config NXWM_CALIBRATION_TOUCHEDCOLOR
---help---
The color of the circle in the touchscreen calibration display after
the touch is recorder. Default: RGB(255, 255, 96) (very light yellow)
+endif
+config NXWM_CUSTOM_CALIBRATION_ICON
+ bool "Custom Calibration Icon"
+ default n
+ ---help---
+ Select to override the default Calibration Window Icon:
+ NxWM::g_calibrationBitmap
+
+if NXWM_CUSTOM_CALIBRATION_ICON
config NXWM_CALIBRATION_ICON
string "Callibration Icon"
+ default "NxWM::g_calibrationBitmap"
---help---
The ICON to use for the touchscreen calibration application. Default:
NxWM::g_calibrationBitmap
+endif
config NXWM_CALIBRATION_SIGNO
int "Calibration Signal Number"
@@ -576,23 +759,55 @@ config NXWM_CALIBRATION_LISTENERSTACK
---help---
Calibration listener thread stack size. Default 2048
-comment "Calibration display settings"
+comment "Hex Calculator display settings"
+config NXWM_HEXCALCULATOR_CUSTOM_COLORS
+ bool "Custom Hex Calculator Colors"
+ default n
+ ---help---
+ Select custom default colors for the Hex Calcualtor window. If
+ defined, the hexadecimal values for all hex calculator colors
+ must be provided (there are no default colors because the
+ hexadecimal representation of the default colors depend on the
+ pixel depth). Default: n
+
+if NXWM_HEXCALCULATOR_CUSTOM_COLORS
config NXWM_HEXCALCULATOR_BACKGROUNDCOLOR
hex "Calculator Background Color"
---help---
The background color of the calculator display. Default: Same
as NXWM_DEFAULT_BACKGROUNDCOLOR
+endif
-config NXWM_HEXCALCULATOR_ICON
- string "Calculator Icon"
+config NXWM_CUSTOM_HEXCALCULATOR_ICON
+ bool "Custom Hex Calculator Icon"
+ default n
---help---
- The ICON to use for the hex calculator application. Default:
+ Select to override the default Hex Calculator Window Icon:
NxWM::g_calculatorBitmap
+if NXWM_CUSTOM_HEXCALCULATOR_ICON
+config NXWM_HEXCALCULATOR_ICON
+ string "Calculator Icon"
+ default "NxWM::g_calculatorBitmap"
+ ---help---
+ The ICON to use for the hex calculator application. Default:
+ "NxWM::g_calculatorBitmap"
+endif
+
+config NXWM_HEXCALCULATOR_CUSTOM_FONTID
+ bool "Use Custom Default Font"
+ default n
+ ---help---
+ Set to override the system default font id (NXWM_DEFAULT_FONTID).
+
+if NXWM_HEXCALCULATOR_CUSTOM_FONTID
config NXWM_HEXCALCULATOR_FONTID
int "Calculator Font ID"
+ default 0
---help---
- The font used with the calculator. Default: NXWM_DEFAULT_FONTID
+ Use this default font ID in the calculator window instead of the
+ NxWM font ID (NXWM_DEFAULT_FONTID). Default: 0
+endif
endif
diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog
index ed1cf39dc6..c4a06af5e9 100644
--- a/nuttx/ChangeLog
+++ b/nuttx/ChangeLog
@@ -3801,3 +3801,10 @@
to find executables using a relative path.
6.25 2013-xx-xx Gregory Nutt
+
+ * graphics/: Adds 5x8 monospace font. This tiny font is useful for graph
+ labels and for small bitmapped display. Contributed by Petteri
+ Aimonen.
+ * configs/stm3220g-eval/nxwm: Converted to use the kconfig-fronteds
+ configuration tool.
+
diff --git a/nuttx/Documentation/NuttX.html b/nuttx/Documentation/NuttX.html
index 5d9d3af3ba..f48994babd 100644
--- a/nuttx/Documentation/NuttX.html
+++ b/nuttx/Documentation/NuttX.html
@@ -373,7 +373,7 @@
|
- May be built either as an open, flat embedded RTOS or as a separtely built, secure micro-kernel with a system call interface.
+ May be built either as an open, flat embedded RTOS or as a separately built, secure micro-kernel with a system call interface.
diff --git a/nuttx/TODO b/nuttx/TODO
index 6c28bfd434..6162431dc9 100644
--- a/nuttx/TODO
+++ b/nuttx/TODO
@@ -1,4 +1,4 @@
-NuttX TODO List (Last updated November 25, 2012)
+NuttX TODO List (Last updated December 20, 2012)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This file summarizes known NuttX bugs, limitations, inconsistencies with
@@ -15,7 +15,7 @@ nuttx/
(6) Binary loaders (binfmt/)
(17) Network (net/, drivers/net)
(4) USB (drivers/usbdev, drivers/usbhost)
- (11) Libraries (libc/, )
+ (12) Libraries (libc/, )
(9) File system/Generic drivers (fs/, drivers/)
(5) Graphics subystem (graphics/)
(1) Pascal add-on (pcode/)
@@ -637,6 +637,15 @@ o USB (drivers/usbdev, drivers/usbhost)
o Libraries (libc/)
^^^^^^^^^^^^^^^^^
+ Title: SIGNED time_t
+ Description: The NuttX time_t is type uint32_t. I think this is consistent
+ with all standards and with normal usage of time_t. However,
+ according to Wikipedia, time_t is usually implemented as a
+ signed 32-bit value.
+ Status: Open
+ Priority: Very low unless there is some compelling issue that I do not
+ know about.
+
Title: ENVIRON
Description: The definition of environ in stdlib.h is bogus and will not
work as it should. This is because the underlying
diff --git a/nuttx/configs/shenzhou/nxwm/defconfig b/nuttx/configs/shenzhou/nxwm/defconfig
index 86d17c3eed..0f100ed5e5 100644
--- a/nuttx/configs/shenzhou/nxwm/defconfig
+++ b/nuttx/configs/shenzhou/nxwm/defconfig
@@ -8,6 +8,14 @@ CONFIG_NUTTX_NEWCONFIG=y
# Build Setup
#
# CONFIG_EXPERIMENTAL is not set
+# CONFIG_HOST_LINUX is not set
+# CONFIG_HOST_OSX is not set
+CONFIG_HOST_WINDOWS=y
+# CONFIG_HOST_OTHER is not set
+# CONFIG_WINDOWS_NATIVE is not set
+CONFIG_WINDOWS_CYGWIN=y
+# CONFIG_WINDOWS_MSYS is not set
+# CONFIG_WINDOWS_OTHER is not set
#
# Build Configuration
@@ -28,6 +36,7 @@ CONFIG_INTELHEX_BINARY=y
#
# 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
#
@@ -51,6 +60,10 @@ CONFIG_ARCH_ARM=y
# 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
@@ -68,11 +81,23 @@ CONFIG_ARCH_CHIP_STM32=y
CONFIG_ARCH_CORTEXM3=y
CONFIG_ARCH_FAMILY="armv7-m"
CONFIG_ARCH_CHIP="stm32"
+CONFIG_ARCH_HAVE_CMNVECTOR=y
+# CONFIG_ARMV7M_CMNVECTOR is not set
CONFIG_ARCH_HAVE_MPU=y
# CONFIG_ARMV7M_MPU is not set
-CONFIG_ARCH_IRQPRIO=y
CONFIG_BOARD_LOOPSPERMSEC=5483
# CONFIG_ARCH_CALIBRATION is not set
+
+#
+# ARMV7M Configuration Options
+#
+# CONFIG_ARMV7M_TOOLCHAIN_ATOLLIC is not set
+# CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set
+# CONFIG_ARMV7M_TOOLCHAIN_CODEREDW is not set
+CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYW=y
+# CONFIG_ARMV7M_TOOLCHAIN_DEVKITARM is not set
+# CONFIG_ARMV7M_TOOLCHAIN_GNU_EABI is not set
+# CONFIG_ARMV7M_TOOLCHAIN_RAISONANCE is not set
# CONFIG_SERIAL_TERMIOS is not set
# CONFIG_NET_MULTICAST is not set
@@ -83,8 +108,14 @@ CONFIG_BOARD_LOOPSPERMSEC=5483
# CONFIG_ARCH_CHIP_STM32F100CB is not set
# CONFIG_ARCH_CHIP_STM32F100R8 is not set
# CONFIG_ARCH_CHIP_STM32F100RB is not set
+# CONFIG_ARCH_CHIP_STM32F100RC is not set
+# CONFIG_ARCH_CHIP_STM32F100RD is not set
+# CONFIG_ARCH_CHIP_STM32F100RE is not set
# CONFIG_ARCH_CHIP_STM32F100V8 is not set
# CONFIG_ARCH_CHIP_STM32F100VB is not set
+# CONFIG_ARCH_CHIP_STM32F100VC is not set
+# CONFIG_ARCH_CHIP_STM32F100VD is not set
+# CONFIG_ARCH_CHIP_STM32F100VE is not set
# CONFIG_ARCH_CHIP_STM32F103RET6 is not set
# CONFIG_ARCH_CHIP_STM32F103VCT6 is not set
# CONFIG_ARCH_CHIP_STM32F103VET6 is not set
@@ -103,13 +134,6 @@ CONFIG_ARCH_CHIP_STM32F107VC=y
# CONFIG_ARCH_CHIP_STM32F407IG is not set
CONFIG_STM32_STM32F10XX=y
CONFIG_STM32_CONNECTIVITYLINE=y
-CONFIG_STM32_CODESOURCERYW=y
-# CONFIG_STM32_CODESOURCERYL is not set
-# CONFIG_STM32_ATOLLIC_LITE is not set
-# CONFIG_STM32_ATOLLIC_PRO is not set
-# CONFIG_STM32_DEVKITARM is not set
-# CONFIG_STM32_RAISONANCE is not set
-# CONFIG_STM32_BUILDROOT is not set
# CONFIG_STM32_DFU is not set
#
@@ -118,11 +142,11 @@ CONFIG_STM32_CODESOURCERYW=y
# CONFIG_STM32_ADC1 is not set
# CONFIG_STM32_ADC2 is not set
# CONFIG_STM32_ADC3 is not set
+# CONFIG_STM32_BKP is not set
+# CONFIG_STM32_CAN1 is not set
# CONFIG_STM32_CRC is not set
# CONFIG_STM32_DMA1 is not set
# CONFIG_STM32_DMA2 is not set
-# CONFIG_STM32_BKP is not set
-# CONFIG_STM32_CAN1 is not set
# CONFIG_STM32_DAC1 is not set
# CONFIG_STM32_DAC2 is not set
CONFIG_STM32_ETHMAC=y
@@ -153,9 +177,9 @@ CONFIG_STM32_SPI=y
#
# Alternate Pin Mapping
#
-CONFIG_STM32_USART2_REMAP=y
-CONFIG_STM32_SPI3_REMAP=y
CONFIG_STM32_ETH_REMAP=y
+CONFIG_STM32_SPI3_REMAP=y
+CONFIG_STM32_USART2_REMAP=y
# CONFIG_STM32_JTAG_DISABLE is not set
CONFIG_STM32_JTAG_FULL_ENABLE=y
# CONFIG_STM32_JTAG_NOJNTRST_ENABLE is not set
@@ -163,6 +187,11 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y
# CONFIG_STM32_FORCEPOWER is not set
# CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is not set
+#
+# U[S]ART Configuration
+#
+# CONFIG_USART2_RS485 is not set
+
#
# SPI Configuration
#
@@ -173,6 +202,7 @@ CONFIG_STM32_JTAG_FULL_ENABLE=y
# Ethernet MAC configuration
#
CONFIG_STM32_PHYADDR=0
+# CONFIG_STM32_PHYINIT is not set
# CONFIG_STM32_MII is not set
CONFIG_STM32_AUTONEG=y
CONFIG_STM32_PHYSR=17
@@ -196,7 +226,11 @@ CONFIG_STM32_RMII_MCO=y
#
# CONFIG_ARCH_NOINTC 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_STACKDUMP=y
+# CONFIG_ENDIAN_BIG is not set
#
# Board Settings
@@ -218,6 +252,7 @@ CONFIG_BOOT_RUNFROMFLASH=y
#
# Board Selection
#
+# CONFIG_ARCH_BOARD_CLOUDCTRL is not set
# CONFIG_ARCH_BOARD_OLIMEX_STM32P107 is not set
CONFIG_ARCH_BOARD_SHENZHOU=y
# CONFIG_ARCH_BOARD_CUSTOM is not set
@@ -309,7 +344,6 @@ CONFIG_PREALLOC_TIMERS=4
#
# Stack and heap information
#
-# CONFIG_CUSTOM_STACK is not set
CONFIG_IDLETHREAD_STACKSIZE=1024
CONFIG_USERMAIN_STACKSIZE=1024
CONFIG_PTHREAD_STACK_MIN=256
@@ -351,6 +385,7 @@ CONFIG_LCD_MAXPOWER=1
# CONFIG_LCD_P14201 is not set
# CONFIG_LCD_NOKIA6100 is not set
# CONFIG_LCD_UG9664HSWAG01 is not set
+# CONFIG_LCD_UG2864AMBAG01 is not set
CONFIG_LCD_SSD1289=y
CONFIG_SSD1289_PROFILE1=y
# CONFIG_SSD1289_PROFILE2 is not set
@@ -544,6 +579,16 @@ CONFIG_NX_MXCLIENTMSGS=16
CONFIG_MM_REGIONS=1
# CONFIG_GRAN is not set
+#
+# 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_PIC is not set
+# CONFIG_SYMTAB_ORDEREDBYNAME is not set
+
#
# Library Routines
#
@@ -551,6 +596,7 @@ 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
# CONFIG_EOL_IS_CR is not set
@@ -563,10 +609,20 @@ CONFIG_ARCH_LOWPUTC=y
CONFIG_LIB_SENDFILE_BUFSIZE=512
# CONFIG_ARCH_ROMGETC is not set
# CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set
+
+#
+# Basic CXX Support
+#
+# CONFIG_C99_BOOL8 is not set
CONFIG_HAVE_CXX=y
CONFIG_HAVE_CXXINITIALIZE=y
# CONFIG_CXX_NEWLONG is not set
+#
+# uClibc++ Standard C++ Library
+#
+# CONFIG_UCLIBCXX is not set
+
#
# Application Configuration
#
@@ -579,260 +635,59 @@ CONFIG_NAMEDAPP=y
#
# Examples
#
-
-#
-# ADC Example
-#
-# CONFIG_EXAMPLES_ADC is not set
-
-#
-# Buttons Example
-#
# CONFIG_EXAMPLES_BUTTONS is not set
-
-#
-# CAN Example
-#
# CONFIG_EXAMPLES_CAN is not set
-
-#
-# USB CDC/ACM Class Driver Example
-#
# CONFIG_EXAMPLES_CDCACM is not set
-
-#
-# USB composite Class Driver Example
-#
# CONFIG_EXAMPLES_COMPOSITE is not set
-
-#
-# DHCP Server Example
-#
+# CONFIG_EXAMPLES_CXXTEST is not set
# CONFIG_EXAMPLES_DHCPD is not set
-
-#
-# FTP Client Example
-#
+# CONFIG_EXAMPLES_ELF is not set
# CONFIG_EXAMPLES_FTPC is not set
-
-#
-# FTP Server Example
-#
# CONFIG_EXAMPLES_FTPD is not set
-
-#
-# "Hello, World!" Example
-#
# CONFIG_EXAMPLES_HELLO is not set
-
-#
-# "Hello, World!" C++ Example
-#
# CONFIG_EXAMPLES_HELLOXX is not set
-
-#
-# USB HID Keyboard Example
-#
+# CONFIG_EXAMPLES_JSON is not set
# CONFIG_EXAMPLES_HIDKBD is not set
-
-#
-# IGMP Example
-#
+# CONFIG_EXAMPLES_KEYPADTEST is not set
# CONFIG_EXAMPLES_IGMP is not set
-
-#
-# LCD Read/Write Example
-#
# CONFIG_EXAMPLES_LCDRW is not set
-
-#
-# Memory Management Example
-#
# CONFIG_EXAMPLES_MM is not set
-
-#
-# File System Mount Example
-#
# CONFIG_EXAMPLES_MOUNT is not set
-
-#
-# FreeModBus Example
-#
# CONFIG_EXAMPLES_MODBUS is not set
-
-#
-# Network Test Example
-#
# CONFIG_EXAMPLES_NETTEST is not set
-
-#
-# NuttShell (NSH) Example
-#
# CONFIG_EXAMPLES_NSH is not set
-
-#
-# NULL Example
-#
# CONFIG_EXAMPLES_NULL is not set
-
-#
-# NX Graphics Example
-#
# CONFIG_EXAMPLES_NX is not set
-
-#
-# NxConsole Example
-#
# CONFIG_EXAMPLES_NXCONSOLE is not set
-
-#
-# NXFFS File System Example
-#
# CONFIG_EXAMPLES_NXFFS is not set
-
-#
-# NXFLAT Example
-#
# CONFIG_EXAMPLES_NXFLAT is not set
-
-#
-# NX Graphics "Hello, World!" Example
-#
# CONFIG_EXAMPLES_NXHELLO is not set
-
-#
-# NX Graphics image Example
-#
# CONFIG_EXAMPLES_NXIMAGE is not set
-
-#
-# NX Graphics lines Example
-#
# CONFIG_EXAMPLES_NXLINES is not set
-
-#
-# NX Graphics Text Example
-#
# CONFIG_EXAMPLES_NXTEXT is not set
-
-#
-# OS Test Example
-#
# CONFIG_EXAMPLES_OSTEST is not set
-
-#
-# Pascal "Hello, World!"example
-#
# CONFIG_EXAMPLES_PASHELLO is not set
-
-#
-# Pipe Example
-#
# CONFIG_EXAMPLES_PIPE is not set
-
-#
-# Poll Example
-#
# CONFIG_EXAMPLES_POLL is not set
-
-#
-# Pulse Width Modulation (PWM) Example
-#
-
-#
-# Quadrature Encoder Example
-#
# CONFIG_EXAMPLES_QENCODER is not set
-
-#
-# RGMP Example
-#
# CONFIG_EXAMPLES_RGMP is not set
-
-#
-# ROMFS Example
-#
# CONFIG_EXAMPLES_ROMFS is not set
-
-#
-# sendmail Example
-#
# CONFIG_EXAMPLES_SENDMAIL is not set
-
-#
-# Serial Loopback Example
-#
# CONFIG_EXAMPLES_SERLOOP is not set
-
-#
-# Telnet Daemon Example
-#
# CONFIG_EXAMPLES_TELNETD is not set
-
-#
-# THTTPD Web Server Example
-#
# CONFIG_EXAMPLES_THTTPD is not set
-
-#
-# TIFF Generation Example
-#
# CONFIG_EXAMPLES_TIFF is not set
-
-#
-# Touchscreen Example
-#
# CONFIG_EXAMPLES_TOUCHSCREEN is not set
-
-#
-# UDP Example
-#
# CONFIG_EXAMPLES_UDP is not set
-
-#
-# UDP Discovery Daemon Example
-#
# CONFIG_EXAMPLES_DISCOVER is not set
-
-#
-# uIP Web Server Example
-#
# CONFIG_EXAMPLES_UIP is not set
-
-#
-# USB Serial Test Example
-#
# CONFIG_EXAMPLES_USBSERIAL is not set
-
-#
-# USB Mass Storage Class Example
-#
# CONFIG_EXAMPLES_USBMSC is not set
-
-#
-# USB Serial Terminal Example
-#
# CONFIG_EXAMPLES_USBTERM is not set
-
-#
-# Watchdog timer Example
-#
# CONFIG_EXAMPLES_WATCHDOG is not set
-
-#
-# wget Example
-#
# CONFIG_EXAMPLES_WGET is not set
-
-#
-# WLAN Example
-#
# CONFIG_EXAMPLES_WLAN is not set
-#
-# XML RPC Example
-#
-
#
# Interpreters
#
@@ -850,76 +705,24 @@ CONFIG_NAMEDAPP=y
#
# Networking Utilities
#
-
-#
-# DHCP client
-#
+# CONFIG_NETUTILS_CODECS is not set
# CONFIG_NETUTILS_DHCPC is not set
-
-#
-# DHCP server
-#
# CONFIG_NETUTILS_DHCPD is not set
-
-#
-# FTP client
-#
# CONFIG_NETUTILS_FTPC is not set
-
-#
-# FTP server
-#
# CONFIG_NETUTILS_FTPD is not set
-
-#
-# Name resolution
-#
+# CONFIG_NETUTILS_JSON is not set
CONFIG_NETUTILS_RESOLV=y
CONFIG_NET_RESOLV_ENTRIES=4
-
-#
-# SMTP
-#
+CONFIG_NET_RESOLV_MAXRESPONSE=96
# CONFIG_NETUTILS_SMTP is not set
-
-#
-# TFTP client
-#
CONFIG_NETUTILS_TELNETD=y
-
-#
-# TFTP client
-#
CONFIG_NETUTILS_TFTPC=y
-
-#
-# THTTPD web server
-#
# CONFIG_NETUTILS_THTTPD is not set
-
-#
-# uIP support library
-#
CONFIG_NETUTILS_UIPLIB=y
-
-#
-# uIP web client
-#
CONFIG_NETUTILS_WEBCLIENT=y
-
-#
-# uIP web server
-#
+CONFIG_NSH_WGET_USERAGENT="NuttX/6.xx.x (; http://www.nuttx.org/)"
# CONFIG_NETUTILS_WEBSERVER is not set
-
-#
-# UDP Discovery Utility
-#
# CONFIG_NETUTILS_DISCOVER is not set
-
-#
-# XML-RPC library
-#
# CONFIG_NETUTILS_XMLRPC is not set
#
@@ -950,6 +753,7 @@ CONFIG_NSH_LIBRARY=y
# 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
@@ -978,6 +782,7 @@ CONFIG_NSH_LIBRARY=y
# CONFIG_NSH_DISABLE_USLEEP is not set
# CONFIG_NSH_DISABLE_WGET is not set
# CONFIG_NSH_DISABLE_XD is not set
+CONFIG_NSH_CODECS_BUFSIZE=128
CONFIG_NSH_FILEIOSIZE=512
CONFIG_NSH_LINELEN=64
CONFIG_NSH_NESTDEPTH=3
@@ -993,10 +798,12 @@ CONFIG_NSH_TELNETD_DAEMONSTACKSIZE=1596
CONFIG_NSH_TELNETD_CLIENTPRIO=100
CONFIG_NSH_TELNETD_CLIENTSTACKSIZE=1596
CONFIG_NSH_IOBUFFER_SIZE=512
+# CONFIG_NSH_TELNET_LOGIN is not set
CONFIG_NSH_IPADDR=0x0a000002
CONFIG_NSH_DRIPADDR=0x0a000001
CONFIG_NSH_NETMASK=0xffffff00
CONFIG_NSH_NOMAC=y
+CONFIG_NSH_MAX_ROUNDTRIP=20
#
# NxWidgets/NxWM
@@ -1006,6 +813,7 @@ CONFIG_NXWIDGETS=y
#
# NX Server/Device Configuration
#
+CONFIG_NXWIDGETS_FLICKERFREE=y
CONFIG_NXWIDGETS_DEVNO=0
CONFIG_NXWIDGETS_VPLANE=0
CONFIG_NXWIDGETS_SERVERPRIO=51
@@ -1025,19 +833,13 @@ CONFIG_NXWIDGETS_SIZEOFCHAR=1
#
# NXWidget Default Values
#
-CONFIG_NXWIDGETS_DEFAULT_FONTID=
+# CONFIG_NXWIDGETS_SYSTEM_CUSTOM_FONTID is not set
CONFIG_NXWIDGETS_TNXARRAY_INITIALSIZE=16
CONFIG_NXWIDGETS_TNXARRAY_SIZEINCREMENT=8
-CONFIG_NXWIDGETS_DEFAULT_BACKGROUNDCOLOR=
-CONFIG_NXWIDGETS_DEFAULT_SELECTEDBACKGROUNDCOLOR=
-CONFIG_NXWIDGETS_DEFAULT_SHINEEDGECOLOR=
-CONFIG_NXWIDGETS_DEFAULT_SHADOWEDGECOLOR=
-CONFIG_NXWIDGETS_DEFAULT_HIGHLIGHTCOLOR=
-CONFIG_NXWIDGETS_DEFAULT_DISABLEDTEXTCOLOR=
-CONFIG_NXWIDGETS_DEFAULT_ENABLEDTEXTCOLOR=
-CONFIG_NXWIDGETS_DEFAULT_SELECTEDTEXTCOLOR=
-CONFIG_NXWIDGETS_DEFAULT_FONTCOLOR=
-CONFIG_NXWIDGETS_TRANSPARENT_COLOR=
+# CONFIG_NXWIDGETS_CUSTOM_FILLCOLORS is not set
+# CONFIG_NXWIDGETS_CUSTOM_EDGECOLORS is not set
+# CONFIG_NXWIDGETS_CUSTOM_TEXTCOLORS is not set
+CONFIG_NXWIDGETS_TRANSPARENT_COLOR=0x0
#
# Keypad behavior
@@ -1053,18 +855,15 @@ CONFIG_NXWM=y
#
# General settings
#
-CONFIG_NXWM_DEFAULT_FONTID=
+# CONFIG_NXWM_SYSTEM_CUSTOM_FONTID is not set
CONFIG_NXWM_UNITTEST=y
#
# Color configuration
#
-CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR=
-CONFIG_NXWM_DEFAULT_SELECTEDBACKGROUNDCOLOR=
-CONFIG_NXWM_DEFAULT_SHINEEDGECOLOR=
-CONFIG_NXWM_DEFAULT_SHADOWEDGECOLOR=
-CONFIG_NXWM_DEFAULT_FONTCOLOR=
-CONFIG_NXWM_TRANSPARENT_COLOR=
+# CONFIG_NXWM_CUSTOM_FILLCOLORS is not set
+# CONFIG_NXWM_CUSTOM_EDGECOLORS is not set
+# CONFIG_NXWM_CUSTOM_TEXTCOLORS is not set
#
# Horizontal and vertical spacing of icons in the task bar
@@ -1075,16 +874,18 @@ CONFIG_NXWM_TASKBAR_HSPACING=2
# CONFIG_NXWM_TASKBAR_BOTTOM is not set
CONFIG_NXWM_TASKBAR_LEFT=y
# CONFIG_NXWM_TASKBAR_RIGHT is not set
-CONFIG_NXWM_TASKBAR_WIDTH=
+# CONFIG_NXWM_CUSTOM_TASKBAR_WIDTH is not set
+# CONFIG_NXWM_DISABLE_MINIMIZE is not set
#
# Tool Bar Configuration
#
-CONFIG_NXWM_TOOLBAR_HEIGHT=
+# CONFIG_NXWM_CUSTOM_TOOLBAR_HEIGHT is not set
#
# Background Image
#
+# CONFIG_NXWM_DISABLE_BACKGROUND_IMAGE is not set
CONFIG_NXWM_BACKGROUND_IMAGE=""
#
@@ -1096,7 +897,7 @@ CONFIG_NXWM_BACKGROUND_IMAGE=""
#
CONFIG_NXWM_STARTWINDOW_VSPACING=4
CONFIG_NXWM_STARTWINDOW_HSPACING=4
-CONFIG_NXWM_STARTWINDOW_ICON=""
+# CONFIG_NXWM_CUSTOM_STARTWINDOW_ICON is not set
CONFIG_NXWM_STARTWINDOW_MQNAME="/dev/nxwm"
CONFIG_NXWM_STARTWINDOW_MXMSGS=32
CONFIG_NXWM_STARTWINDOW_MXMPRIO=42
@@ -1108,10 +909,9 @@ CONFIG_NXWM_STARTWINDOW_STACKSIZE=1596
#
CONFIG_NXWM_NXCONSOLE_PRIO=50
CONFIG_NXWM_NXCONSOLE_STACKSIZE=1596
-CONFIG_NXWM_NXCONSOLE_WCOLOR=
-CONFIG_NXWM_NXCONSOLE_FONTCOLOR=
-CONFIG_NXWM_NXCONSOLE_FONTID=
-CONFIG_NXWM_NXCONSOLE_ICON=""
+# CONFIG_NXWM_NXCONSOLE_CUSTOM_COLORS is not set
+# CONFIG_NXWM_NXCONSOLE_CUSTOM_FONTID is not set
+# CONFIG_NXWM_CUSTOM_NXCONSOLE_ICON is not set
CONFIG_NXWM_TOUCHSCREEN=y
#
@@ -1136,20 +936,18 @@ CONFIG_NXWM_KEYBOARD_LISTENERSTACK=1024
#
# Calibration display settings
#
-CONFIG_NXWM_CALIBRATION_BACKGROUNDCOLOR=
-CONFIG_NXWM_CALIBRATION_LINECOLOR=
-CONFIG_NXWM_CALIBRATION_CIRCLECOLOR=
-CONFIG_NXWM_CALIBRATION_TOUCHEDCOLOR=
-CONFIG_NXWM_CALIBRATION_ICON=""
+# CONFIG_NXWM_CALIBRATION_CUSTOM_COLORS is not set
+# CONFIG_NXWM_CUSTOM_CALIBRATION_ICON is not set
CONFIG_NXWM_CALIBRATION_SIGNO=5
CONFIG_NXWM_CALIBRATION_LISTENERPRIO=50
CONFIG_NXWM_CALIBRATION_LISTENERSTACK=1024
#
-# Calibration display settings
+# Hex Calculator display settings
#
-CONFIG_NXWM_HEXCALCULATOR_BACKGROUNDCOLOR=
-CONFIG_NXWM_HEXCALCULATOR_ICON=""
+# CONFIG_NXWM_HEXCALCULATOR_CUSTOM_COLORS is not set
+# CONFIG_NXWM_CUSTOM_HEXCALCULATOR_ICON is not set
+CONFIG_NXWM_HEXCALCULATOR_CUSTOM_FONTID=y
CONFIG_NXWM_HEXCALCULATOR_FONTID=5
#
diff --git a/nuttx/configs/stm3220g-eval/README.txt b/nuttx/configs/stm3220g-eval/README.txt
index 8695dbb89c..e7bdd4de08 100644
--- a/nuttx/configs/stm3220g-eval/README.txt
+++ b/nuttx/configs/stm3220g-eval/README.txt
@@ -1077,6 +1077,21 @@ Where is one of the following:
$ cd ~/nuttx-code/nuttx
$ make
+ NOTES:
+
+ 1. This configuration uses the mconf-based configuration tool. To
+ change this configuration using that tool, you should:
+
+ a. Build and install the mconf tool. See nuttx/README.txt and
+ misc/tools/
+
+ b. Execute 'make menuconfig' in nuttx/ in order to start the
+ reconfiguration process.
+
+ 2. This configuration is currently set up to build under Cygwin on
+ a Windows machine using the CodeSourcery Windows toolchain.
+ That configuration can be easy changed as described in Note 1.
+
ostest:
------
This configuration directory, performs a simple OS test using
diff --git a/nuttx/configs/stm3220g-eval/nxwm/appconfig b/nuttx/configs/stm3220g-eval/nxwm/appconfig
deleted file mode 100644
index 4ebd8137c7..0000000000
--- a/nuttx/configs/stm3220g-eval/nxwm/appconfig
+++ /dev/null
@@ -1,53 +0,0 @@
-############################################################################
-# configs/stm3220g-eval/nxwm/appconfig
-#
-# Copyright (C) 2012 Gregory Nutt. All rights reserved.
-# Author: Gregory Nutt
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in
-# the documentation and/or other materials provided with the
-# distribution.
-# 3. Neither the name NuttX nor the names of its contributors may be
-# used to endorse or promote products derived from this software
-# without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-#
-############################################################################
-
-# The NSH Library -- NOTE: The NxWM unit test must be installed at
-# apps/external in order to build this example. See
-# NxWidgets/UnitTests/README.txt for additional information
-
-CONFIGURED_APPS += system/readline
-CONFIGURED_APPS += nshlib
-
-# Networking libraries.
-
-ifeq ($(CONFIG_NET),y)
-CONFIGURED_APPS += netutils/uiplib
-CONFIGURED_APPS += netutils/resolv
-CONFIGURED_APPS += netutils/webclient
-CONFIGURED_APPS += netutils/tftpc
-ifeq ($(CONFIG_NSH_TELNET),y)
-CONFIGURED_APPS += netutils/telnetd
-endif
-endif
diff --git a/nuttx/configs/stm3220g-eval/nxwm/defconfig b/nuttx/configs/stm3220g-eval/nxwm/defconfig
index 065fbb1372..11e88f7640 100644
--- a/nuttx/configs/stm3220g-eval/nxwm/defconfig
+++ b/nuttx/configs/stm3220g-eval/nxwm/defconfig
@@ -1,371 +1,338 @@
-############################################################################
-# configs/stm3220g-eval/nxwm/defconfig
#
-# Copyright (C) 2012 Gregory Nutt. All rights reserved.
-# Author: Gregory Nutt
+# Automatically generated file; DO NOT EDIT.
+# Nuttx/ Configuration
#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
+CONFIG_NUTTX_NEWCONFIG=y
+
#
-# 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.
+# Build Setup
#
-# 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.
+# CONFIG_EXPERIMENTAL is not set
+# CONFIG_HOST_LINUX is not set
+# CONFIG_HOST_OSX is not set
+CONFIG_HOST_WINDOWS=y
+# CONFIG_HOST_OTHER is not set
+# CONFIG_WINDOWS_NATIVE is not set
+CONFIG_WINDOWS_CYGWIN=y
+# CONFIG_WINDOWS_MSYS is not set
+# CONFIG_WINDOWS_OTHER is not set
+
#
-############################################################################
+# Build Configuration
#
-# Architecture Selection
+# CONFIG_APPS_DIR="../apps"
+# CONFIG_BUILD_2PASS is not set
+
#
-CONFIG_ARCH="arm"
+# Binary Output Formats
+#
+# CONFIG_RRLOAD_BINARY is not set
+CONFIG_INTELHEX_BINARY=y
+# CONFIG_MOTOROLA_SREC is not set
+# CONFIG_RAW_BINARY is not set
+
+#
+# Customize Header Files
+#
+# CONFIG_ARCH_STDBOOL_H is not set
+# CONFIG_ARCH_MATH_H is not set
+# CONFIG_ARCH_FLOAT_H is not set
+# CONFIG_ARCH_STDARG_H is not set
+
+#
+# Debug Options
+#
+# CONFIG_DEBUG is not set
+# CONFIG_DEBUG_SYMBOLS is not set
+
+#
+# System Type
+#
+# CONFIG_ARCH_8051 is not set
CONFIG_ARCH_ARM=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_LM3S 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_SAM3U is not set
+CONFIG_ARCH_CHIP_STM32=y
+# CONFIG_ARCH_CHIP_STR71X is not set
CONFIG_ARCH_CORTEXM3=y
+CONFIG_ARCH_FAMILY="armv7-m"
CONFIG_ARCH_CHIP="stm32"
-CONFIG_ARCH_CHIP_STM32F207IG=y
-CONFIG_ARCH_BOARD="stm3220g-eval"
-CONFIG_ARCH_BOARD_STM3220G_EVAL=y
+CONFIG_ARCH_HAVE_CMNVECTOR=y
+# CONFIG_ARMV7M_CMNVECTOR is not set
+CONFIG_ARCH_HAVE_MPU=y
+# CONFIG_ARMV7M_MPU is not set
CONFIG_BOARD_LOOPSPERMSEC=10926
-CONFIG_DRAM_SIZE=196608
-CONFIG_DRAM_START=0x20000000
-CONFIG_ARCH_IRQPRIO=y
-CONFIG_ARCH_INTERRUPTSTACK=0
-CONFIG_ARCH_STACKDUMP=y
-CONFIG_ARCH_BOOTLOADER=n
-CONFIG_ARCH_LEDS=y
-CONFIG_ARCH_BUTTONS=n
-CONFIG_ARCH_CALIBRATION=n
-CONFIG_ARCH_DMA=n
+# CONFIG_ARCH_CALIBRATION is not set
#
-# Identify toolchain and linker options
+# ARMV7M Configuration Options
#
-CONFIG_STM32_CODESOURCERYW=y
-CONFIG_STM32_CODESOURCERYL=n
-CONFIG_STM32_ATOLLIC_LITE=n
-CONFIG_STM32_ATOLLIC_PRO=n
-CONFIG_STM32_DEVKITARM=n
-CONFIG_STM32_RAISONANCE=n
-CONFIG_STM32_BUILDROOT=n
+# CONFIG_ARMV7M_TOOLCHAIN_ATOLLIC is not set
+# CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set
+# CONFIG_ARMV7M_TOOLCHAIN_CODEREDW is not set
+CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYW=y
+# CONFIG_ARMV7M_TOOLCHAIN_DEVKITARM is not set
+# CONFIG_ARMV7M_TOOLCHAIN_GNU_EABI is not set
+# CONFIG_ARMV7M_TOOLCHAIN_RAISONANCE is not set
+# CONFIG_SERIAL_TERMIOS is not set
+# CONFIG_NET_MULTICAST is not set
#
-# JTAG Enable settings (by default JTAG-DP and SW-DP are disabled):
+# STM32 Configuration Options
#
+# CONFIG_ARCH_CHIP_STM32F100C8 is not set
+# CONFIG_ARCH_CHIP_STM32F100CB is not set
+# CONFIG_ARCH_CHIP_STM32F100R8 is not set
+# CONFIG_ARCH_CHIP_STM32F100RB is not set
+# CONFIG_ARCH_CHIP_STM32F100RC is not set
+# CONFIG_ARCH_CHIP_STM32F100RD is not set
+# CONFIG_ARCH_CHIP_STM32F100RE is not set
+# CONFIG_ARCH_CHIP_STM32F100V8 is not set
+# CONFIG_ARCH_CHIP_STM32F100VB is not set
+# CONFIG_ARCH_CHIP_STM32F100VC is not set
+# CONFIG_ARCH_CHIP_STM32F100VD is not set
+# CONFIG_ARCH_CHIP_STM32F100VE is not set
+# CONFIG_ARCH_CHIP_STM32F103RET6 is not set
+# CONFIG_ARCH_CHIP_STM32F103VCT6 is not set
+# CONFIG_ARCH_CHIP_STM32F103VET6 is not set
+# CONFIG_ARCH_CHIP_STM32F103ZET6 is not set
+# CONFIG_ARCH_CHIP_STM32F105VBT7 is not set
+# CONFIG_ARCH_CHIP_STM32F107VC is not set
+CONFIG_ARCH_CHIP_STM32F207IG=y
+# CONFIG_ARCH_CHIP_STM32F405RG is not set
+# CONFIG_ARCH_CHIP_STM32F405VG is not set
+# CONFIG_ARCH_CHIP_STM32F405ZG is not set
+# CONFIG_ARCH_CHIP_STM32F407VE is not set
+# CONFIG_ARCH_CHIP_STM32F407VG is not set
+# CONFIG_ARCH_CHIP_STM32F407ZE is not set
+# CONFIG_ARCH_CHIP_STM32F407ZG is not set
+# CONFIG_ARCH_CHIP_STM32F407IE is not set
+# CONFIG_ARCH_CHIP_STM32F407IG is not set
+CONFIG_STM32_STM32F20XX=y
CONFIG_STM32_DFU=y
-CONFIG_STM32_JTAG_FULL_ENABLE=y
-CONFIG_STM32_JTAG_NOJNTRST_ENABLE=n
-CONFIG_STM32_JTAG_SW_ENABLE=n
#
-# On-board FSMC SRAM configuration
+# STM32 Peripheral Support
#
-CONFIG_STM32_FSMC_SRAM=n
-CONFIG_HEAP2_BASE=0x64000000
-CONFIG_HEAP2_SIZE=2097152
-
-#
-# Individual subsystems can be enabled:
-#
-# AHB1:
-CONFIG_STM32_CRC=n
-CONFIG_STM32_BKPSRAM=n
-CONFIG_STM32_DMA1=n
-CONFIG_STM32_DMA2=n
+# CONFIG_STM32_ADC1 is not set
+# CONFIG_STM32_ADC2 is not set
+# CONFIG_STM32_ADC3 is not set
+# CONFIG_STM32_BKPSRAM is not set
+# CONFIG_STM32_CAN1 is not set
+# CONFIG_STM32_CAN2 is not set
+# CONFIG_STM32_CRC is not set
+# CONFIG_STM32_CRYP is not set
+# CONFIG_STM32_DMA1 is not set
+# CONFIG_STM32_DMA2 is not set
+# CONFIG_STM32_DAC1 is not set
+# CONFIG_STM32_DAC2 is not set
+# CONFIG_STM32_DCMI is not set
CONFIG_STM32_ETHMAC=y
-CONFIG_STM32_OTGHS=n
-# AHB2:
-CONFIG_STM32_DCMI=n
-CONFIG_STM32_CRYP=n
-CONFIG_STM32_HASH=n
-CONFIG_STM32_RNG=n
-CONFIG_STM32_OTGFS=n
-# AHB3:
CONFIG_STM32_FSMC=y
-# APB1:
-CONFIG_STM32_TIM2=n
-CONFIG_STM32_TIM3=n
-CONFIG_STM32_TIM4=n
-CONFIG_STM32_TIM5=n
-CONFIG_STM32_TIM6=n
-CONFIG_STM32_TIM7=n
-CONFIG_STM32_TIM12=n
-CONFIG_STM32_TIM13=n
-CONFIG_STM32_TIM14=n
-CONFIG_STM32_WWDG=n
-CONFIG_STM32_IWDG=n
-CONFIG_STM32_SPI2=n
-CONFIG_STM32_SPI3=n
-CONFIG_STM32_USART2=n
-CONFIG_STM32_USART3=y
-CONFIG_STM32_UART4=n
-CONFIG_STM32_UART5=n
+# CONFIG_STM32_HASH is not set
CONFIG_STM32_I2C1=y
-CONFIG_STM32_I2C2=n
-CONFIG_STM32_I2C3=n
-CONFIG_STM32_CAN1=n
-CONFIG_STM32_CAN2=n
-CONFIG_STM32_DAC=n
+# CONFIG_STM32_I2C2 is not set
+# CONFIG_STM32_I2C3 is not set
+# CONFIG_STM32_IWDG is not set
+# CONFIG_STM32_OTGFS is not set
+# CONFIG_STM32_OTGHS is not set
CONFIG_STM32_PWR=y
-# APB2:
-CONFIG_STM32_TIM1=n
-CONFIG_STM32_TIM8=n
-CONFIG_STM32_USART1=n
-CONFIG_STM32_USART6=n
-CONFIG_STM32_ADC1=n
-CONFIG_STM32_ADC2=n
-CONFIG_STM32_ADC3=n
-CONFIG_STM32_SDIO=n
-CONFIG_STM32_SPI1=n
+# CONFIG_STM32_RNG is not set
+# CONFIG_STM32_SDIO is not set
+# CONFIG_STM32_SPI1 is not set
+# CONFIG_STM32_SPI2 is not set
+# CONFIG_STM32_SPI3 is not set
CONFIG_STM32_SYSCFG=y
-CONFIG_STM32_TIM9=n
-CONFIG_STM32_TIM10=n
-CONFIG_STM32_TIM11=n
+# CONFIG_STM32_TIM1 is not set
+# CONFIG_STM32_TIM2 is not set
+# CONFIG_STM32_TIM3 is not set
+# CONFIG_STM32_TIM4 is not set
+# CONFIG_STM32_TIM5 is not set
+# CONFIG_STM32_TIM6 is not set
+# CONFIG_STM32_TIM7 is not set
+# CONFIG_STM32_TIM8 is not set
+# CONFIG_STM32_TIM9 is not set
+# CONFIG_STM32_TIM10 is not set
+# CONFIG_STM32_TIM11 is not set
+# CONFIG_STM32_TIM12 is not set
+# CONFIG_STM32_TIM13 is not set
+# CONFIG_STM32_TIM14 is not set
+# CONFIG_STM32_USART1 is not set
+# CONFIG_STM32_USART2 is not set
+CONFIG_STM32_USART3=y
+# CONFIG_STM32_UART4 is not set
+# CONFIG_STM32_UART5 is not set
+# CONFIG_STM32_USART6 is not set
+# CONFIG_STM32_WWDG is not set
+CONFIG_STM32_I2C=y
#
-# STM32F20xxx specific serial device driver settings
+# Alternate Pin Mapping
#
-CONFIG_USART1_SERIAL_CONSOLE=n
-CONFIG_USART2_SERIAL_CONSOLE=n
-CONFIG_USART3_SERIAL_CONSOLE=y
-CONFIG_UART4_SERIAL_CONSOLE=n
-CONFIG_UART5_SERIAL_CONSOLE=n
-
-CONFIG_USART1_TXBUFSIZE=128
-CONFIG_USART2_TXBUFSIZE=128
-CONFIG_USART3_TXBUFSIZE=128
-CONFIG_UART4_TXBUFSIZE=128
-CONFIG_UART5_TXBUFSIZE=128
-
-CONFIG_USART1_RXBUFSIZE=128
-CONFIG_USART2_RXBUFSIZE=128
-CONFIG_USART3_RXBUFSIZE=128
-CONFIG_UART4_RXBUFSIZE=128
-CONFIG_UART5_RXBUFSIZE=128
-
-CONFIG_USART1_BAUD=115200
-CONFIG_USART2_BAUD=115200
-CONFIG_USART3_BAUD=115200
-CONFIG_UART4_BAUD=115200
-CONFIG_UART5_BAUD=115200
-
-CONFIG_USART1_BITS=8
-CONFIG_USART2_BITS=8
-CONFIG_USART3_BITS=8
-CONFIG_UART4_BITS=8
-CONFIG_UART5_BITS=8
-
-CONFIG_USART1_PARITY=0
-CONFIG_USART2_PARITY=0
-CONFIG_USART3_PARITY=0
-CONFIG_UART4_PARITY=0
-CONFIG_UART5_PARITY=0
-
-CONFIG_USART1_2STOP=0
-CONFIG_USART2_2STOP=0
-CONFIG_USART3_2STOP=0
-CONFIG_UART4_2STOP=0
-CONFIG_UART5_2STOP=0
+# CONFIG_STM32_FLASH_PREFETCH is not set
+# CONFIG_STM32_JTAG_DISABLE is not set
+CONFIG_STM32_JTAG_FULL_ENABLE=y
+# CONFIG_STM32_JTAG_NOJNTRST_ENABLE is not set
+# CONFIG_STM32_JTAG_SW_ENABLE is not set
+# CONFIG_STM32_FORCEPOWER is not set
+# CONFIG_ARCH_BOARD_STM32_CUSTOM_CLOCKCONFIG is not set
+# CONFIG_STM32_CCMEXCLUDE is not set
+# CONFIG_STM32_FSMC_SRAM is not set
#
-# STM32F20xxx specific CAN device driver settings
+# U[S]ART Configuration
#
-CONFIG_CAN=n
-CONFIG_CAN_EXTID=n
-#CONFIG_CAN_FIFOSIZE
-#CONFIG_CAN_NPENDINGRTR
-CONFIG_CAN_LOOPBACK=n
-CONFIG_CAN1_BAUD=700000
-CONFIG_CAN2_BAUD=700000
+# CONFIG_USART3_RS485 is not set
#
-# STM32F20xxx Ethernet device driver settings
+# I2C Configuration
+#
+# CONFIG_STM32_I2C_DYNTIMEO is not set
+CONFIG_STM32_I2CTIMEOSEC=0
+CONFIG_STM32_I2CTIMEOMS=500
+CONFIG_STM32_I2CTIMEOTICKS=500
+# CONFIG_STM32_I2C_DUTY16_9 is not set
+# CONFIG_SDIO_DMA is not set
+# CONFIG_SDIO_WIDTH_D1_ONLY is not set
+
+#
+# Ethernet MAC configuration
#
CONFIG_STM32_PHYADDR=1
+# CONFIG_STM32_PHYINIT is not set
CONFIG_STM32_MII=y
CONFIG_STM32_MII_MCO1=y
-CONFIG_STM32_MII_MCO2=n
-CONFIG_STM32_RMII=n
+# CONFIG_STM32_MII_MCO2 is not set
+# CONFIG_STM32_MII_EXTCLK is not set
CONFIG_STM32_AUTONEG=y
-#CONFIG_STM32_ETHFD
-#CONFIG_STM32_ETH100MBPS
CONFIG_STM32_PHYSR=16
+# CONFIG_STM32_PHYSR_ALTCONFIG is not set
CONFIG_STM32_PHYSR_SPEED=0x0002
CONFIG_STM32_PHYSR_100MBPS=0x0000
CONFIG_STM32_PHYSR_MODE=0x0004
CONFIG_STM32_PHYSR_FULLDUPLEX=0x0004
-CONFIG_STM32_ETH_PTP=n
-CONFIG_STM32_ETHMAC_REGDEBUG=n
+# CONFIG_STM32_ETH_PTP is not set
#
-# I2C configuration
+# USB Host Configuration
#
-CONFIG_I2C=y
-CONFIG_I2C_POLLED=y
-CONFIG_I2C_TRANSFER=y
-CONFIG_I2C_TRACE=n
#
-# ADC configuration
+# Architecture Options
#
-# Enable ADC driver support. The STM3220G-EVAL has a 10 Kohm potentiometer
-# RV1 connected to PF9 of STM32F207IGH6 on the board: TIM14_CH1/ SMC_CD/ADC3_IN7
-#
-CONFIG_ADC=n
-#CONFIG_STM32_TIM1_ADC=y
-CONFIG_STM32_TIM1_ADC3=y
-CONFIG_STM32_ADC3_SAMPLE_FREQUENCY=100
+# CONFIG_ARCH_NOINTC 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_STACKDUMP=y
+# CONFIG_ENDIAN_BIG is not set
#
-# PWM configuration
+# Board Settings
#
-# The STM3220G-Eval has no real on-board PWM devices, but the board can be configured to output
-# a pulse train using several options (see board.h). Here the default setup is for TIM8, CH4.
-# Don't forget to enable CONFIG_PWM and CONFIG_STM32_TIM8.
-#
-CONFIG_PWM=n
-CONFIG_PWM_PULSECOUNT=y
-CONFIG_STM32_TIM8_PWM=y
-CONFIG_STM32_TIM8_CHANNEL=4
+CONFIG_DRAM_START=0x20000000
+CONFIG_DRAM_SIZE=196608
+CONFIG_ARCH_HAVE_INTERRUPTSTACK=y
+CONFIG_ARCH_INTERRUPTSTACK=0
#
-# General build options
+# Boot options
#
-CONFIG_RRLOAD_BINARY=n
-CONFIG_INTELHEX_BINARY=y
-CONFIG_MOTOROLA_SREC=n
-CONFIG_RAW_BINARY=n
+# CONFIG_BOOT_RUNFROMEXTSRAM is not set
+CONFIG_BOOT_RUNFROMFLASH=y
+# CONFIG_BOOT_RUNFROMISRAM is not set
+# CONFIG_BOOT_RUNFROMSDRAM is not set
+# CONFIG_BOOT_COPYTORAM is not set
#
-# General OS setup
+# Board Selection
#
-CONFIG_USER_ENTRYPOINT="nxwm_main"
-CONFIG_DEBUG=n
-CONFIG_DEBUG_VERBOSE=n
-CONFIG_DEBUG_SYMBOLS=n
-CONFIG_DEBUG_FS=n
-CONFIG_DEBUG_GRAPHICS=n
-CONFIG_DEBUG_LCD=n
-CONFIG_DEBUG_USB=n
-CONFIG_DEBUG_NET=n
-CONFIG_DEBUG_RTC=n
-CONFIG_DEBUG_ANALOG=n
-CONFIG_DEBUG_PWM=n
-CONFIG_DEBUG_CAN=n
-CONFIG_DEBUG_I2C=n
-CONFIG_DEBUG_INPUT=n
-CONFIG_DEBUG_DMA=n
+CONFIG_ARCH_BOARD_STM3220G_EVAL=y
+# CONFIG_ARCH_BOARD_CUSTOM is not set
+CONFIG_ARCH_BOARD="stm3220g-eval"
-CONFIG_HAVE_CXX=y
-CONFIG_HAVE_CXXINITIALIZE=y
-CONFIG_MM_REGIONS=1
-CONFIG_ARCH_LOWPUTC=y
+#
+# Common Board Options
+#
+CONFIG_ARCH_HAVE_LEDS=y
+CONFIG_ARCH_LEDS=y
+CONFIG_ARCH_HAVE_BUTTONS=y
+# CONFIG_ARCH_BUTTONS is not set
+CONFIG_ARCH_HAVE_IRQBUTTONS=y
+CONFIG_NSH_MMCSDMINOR=0
+CONFIG_NSH_MMCSDSLOTNO=0
+
+#
+# Board-Specific Options
+#
+CONFIG_LCD_RDSHIFT=5
+CONFIG_STM3220G_LCD=y
+# CONFIG_CONFIG_STM32_ILI9320_DISABLE is not set
+# CONFIG_CONFIG_STM32_ILI9325_DISABLE is not set
+
+#
+# RTOS Features
+#
+CONFIG_MSEC_PER_TICK=10
CONFIG_RR_INTERVAL=200
-CONFIG_SCHED_INSTRUMENTATION=n
+# CONFIG_SCHED_INSTRUMENTATION is not set
CONFIG_TASK_NAME_SIZE=0
+# CONFIG_JULIAN_TIME is not set
CONFIG_START_YEAR=2012
CONFIG_START_MONTH=5
CONFIG_START_DAY=28
-CONFIG_GREGORIAN_TIME=n
-CONFIG_JULIAN_TIME=n
CONFIG_DEV_CONSOLE=y
-CONFIG_DEV_LOWCONSOLE=n
-CONFIG_MUTEX_TYPES=n
-CONFIG_PRIORITY_INHERITANCE=n
-CONFIG_SEM_PREALLOCHOLDERS=0
-CONFIG_SEM_NNESTPRIO=0
-CONFIG_FDCLONE_DISABLE=n
-CONFIG_FDCLONE_STDIO=n
+# CONFIG_MUTEX_TYPES is not set
+# CONFIG_PRIORITY_INHERITANCE is not set
+# CONFIG_FDCLONE_DISABLE is not set
+# CONFIG_FDCLONE_STDIO is not set
CONFIG_SDCLONE_DISABLE=y
CONFIG_SCHED_WORKQUEUE=y
CONFIG_SCHED_WORKPRIORITY=192
CONFIG_SCHED_WORKPERIOD=50000
CONFIG_SCHED_WORKSTACKSIZE=2048
CONFIG_SIG_SIGWORK=4
+# CONFIG_SCHED_LPWORK is not set
CONFIG_SCHED_WAITPID=y
-CONFIG_SCHED_ATEXIT=n
+# CONFIG_SCHED_ATEXIT is not set
CONFIG_SCHED_ONEXIT=y
-
-#
-# System Logging
-#
-
-CONFIG_SYSLOG=n
-CONFIG_RAMLOG=n
-CONFIG_RAMLOG_CONSOLE=n
-CONFIG_RAMLOG_SYSLOG=n
-#CONFIG_RAMLOG_NPOLLWAITERS
-#CONFIG_RAMLOG_CONSOLE_BUFSIZE
-
-#
-# Settings for NXFLAT
-#
-CONFIG_NXFLAT=n
-CONFIG_NXFLAT_DUMPBUFFER=n
-CONFIG_SYMTAB_ORDEREDBYNAME=y
-
-#
-# The following can be used to disable categories of
-# APIs supported by the OS. If the compiler supports
-# weak functions, then it should not be necessary to
-# disable functions unless you want to restrict usage
-# of those APIs.
-#
-# There are certain dependency relationships in these
-# features.
-#
-# o mq_notify logic depends on signals to awaken tasks
-# waiting for queues to become full or empty.
-# o pthread_condtimedwait() depends on signals to wake
-# up waiting tasks.
-#
-CONFIG_DISABLE_CLOCK=n
-CONFIG_DISABLE_POSIX_TIMERS=n
-CONFIG_DISABLE_PTHREAD=n
-CONFIG_DISABLE_SIGNALS=n
-CONFIG_DISABLE_MQUEUE=n
-CONFIG_DISABLE_MOUNTPOINT=n
-CONFIG_DISABLE_ENVIRON=n
+CONFIG_SCHED_ONEXIT_MAX=1
+CONFIG_USER_ENTRYPOINT="nxwm_main"
+CONFIG_DISABLE_OS_API=y
+# CONFIG_DISABLE_CLOCK is not set
+# CONFIG_DISABLE_POSIX_TIMERS is not set
+# CONFIG_DISABLE_PTHREAD is not set
+# CONFIG_DISABLE_SIGNALS is not set
+# CONFIG_DISABLE_MQUEUE is not set
+# CONFIG_DISABLE_MOUNTPOINT is not set
+# CONFIG_DISABLE_ENVIRON is not set
CONFIG_DISABLE_POLL=y
-#
-# Misc libc settings
-#
-CONFIG_NOPRINTF_FIELDWIDTH=n
-
-#
-# Allow for architecture optimized implementations
-#
-# The architecture can provide optimized versions of the
-# following to improve system performance
-#
-CONFIG_ARCH_MEMCPY=n
-CONFIG_ARCH_MEMCMP=n
-CONFIG_ARCH_MEMMOVE=n
-CONFIG_ARCH_MEMSET=n
-CONFIG_ARCH_STRCMP=n
-CONFIG_ARCH_STRCPY=n
-CONFIG_ARCH_STRNCPY=n
-CONFIG_ARCH_STRLEN=n
-CONFIG_ARCH_STRNLEN=n
-CONFIG_ARCH_BZERO=n
-
#
# Sizes of configurable things (0 disables)
#
@@ -375,9 +342,6 @@ CONFIG_NPTHREAD_KEYS=4
CONFIG_NFILE_DESCRIPTORS=12
CONFIG_NFILE_STREAMS=12
CONFIG_NAME_MAX=32
-CONFIG_STDIO_BUFFER_SIZE=64
-CONFIG_STDIO_LINEBUFFER=y
-CONFIG_NUNGET_CHARS=2
CONFIG_PREALLOC_MQ_MSGS=32
CONFIG_MQ_MAXMSGSIZE=48
CONFIG_MAX_WDOGPARMS=2
@@ -385,505 +349,681 @@ CONFIG_PREALLOC_WDOGS=8
CONFIG_PREALLOC_TIMERS=4
#
-# Framebuffer driver options
+# Stack and heap information
#
-CONFIG_FB_CMAP=n
-CONFIG_FB_HWCURSOR=n
-CONFIG_FB_HWCURSORIMAGE=n
-#CONFIG_FB_HWCURSORSIZE
-#CONFIG_FB_TRANSPARENCY
+CONFIG_IDLETHREAD_STACKSIZE=1024
+CONFIG_USERMAIN_STACKSIZE=2048
+CONFIG_PTHREAD_STACK_MIN=256
+CONFIG_PTHREAD_STACK_DEFAULT=2048
#
-# Filesystem configuration
+# Device Drivers
+#
+CONFIG_DEV_NULL=y
+# CONFIG_DEV_ZERO is not set
+# CONFIG_LOOP is not set
+# CONFIG_RAMDISK is not set
+# CONFIG_CAN is not set
+# CONFIG_PWM is not set
+CONFIG_I2C=y
+# CONFIG_I2C_SLAVE is not set
+CONFIG_I2C_TRANSFER=y
+# CONFIG_I2C_WRITEREAD is not set
+CONFIG_I2C_POLLED=y
+# CONFIG_I2C_TRACE is not set
+CONFIG_ARCH_HAVE_I2CRESET=y
+# CONFIG_I2C_RESET is not set
+# CONFIG_SPI is not set
+CONFIG_RTC=y
+CONFIG_RTC_DATETIME=y
+# CONFIG_RTC_ALARM is not set
+# CONFIG_WATCHDOG is not set
+# CONFIG_ANALOG is not set
+# CONFIG_BCH is not set
+CONFIG_INPUT=y
+# CONFIG_INPUT_TSC2007 is not set
+# CONFIG_INPUT_ADS7843E is not set
+CONFIG_INPUT_STMPE811=y
+# CONFIG_STMPE811_SPI is not set
+CONFIG_STMPE811_I2C=y
+CONFIG_STMPE811_ACTIVELOW=y
+CONFIG_STMPE811_EDGE=y
+CONFIG_STMPE811_MULTIPLE=y
+# CONFIG_STMPE811_TSC_DISABLE is not set
+# CONFIG_STMPE811_SWAPXY is not set
+CONFIG_STMPE811_THRESHX=39
+CONFIG_STMPE811_THRESHY=51
+CONFIG_STMPE811_ADC_DISABLE=y
+CONFIG_STMPE811_GPIO_DISABLE=y
+CONFIG_STMPE811_TEMP_DISABLE=y
+CONFIG_LCD=y
+CONFIG_LCD_NOGETRUN=y
+CONFIG_LCD_MAXCONTRAST=1
+CONFIG_LCD_MAXPOWER=1
+# CONFIG_LCD_P14201 is not set
+# CONFIG_LCD_NOKIA6100 is not set
+# CONFIG_LCD_UG9664HSWAG01 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_RPORTRAIT is not set
+# CONFIG_LCD_RLANDSCAPE is not set
+CONFIG_MMCSD=y
+CONFIG_MMCSD_NSLOTS=1
+# CONFIG_MMCSD_READONLY is not set
+CONFIG_MMCSD_MULTIBLOCK_DISABLE=y
+# CONFIG_MMCSD_MMCSUPPORT is not set
+# CONFIG_MMCSD_HAVECARDDETECT is not set
+CONFIG_MMCSD_SPI=y
+CONFIG_MMCSD_SPICLOCK=12500000
+CONFIG_MMCSD_SDIO=y
+# CONFIG_SDIO_MUXBUS is not set
+# CONFIG_MTD is not set
+# CONFIG_NETDEVICES is not set
+# CONFIG_NET_SLIP is not set
+# CONFIG_PIPES is not set
+# CONFIG_PM is not set
+# CONFIG_POWER is not set
+# CONFIG_SENSORS is not set
+# CONFIG_SERCOMM_CONSOLE is not set
+CONFIG_SERIAL=y
+# CONFIG_DEV_LOWCONSOLE is not set
+# CONFIG_16550_UART is not set
+CONFIG_ARCH_HAVE_USART3=y
+CONFIG_MCU_SERIAL=y
+CONFIG_STANDARD_SERIAL=y
+CONFIG_USART3_SERIAL_CONSOLE=y
+# CONFIG_NO_SERIAL_CONSOLE is not set
+
+#
+# USART3 Configuration
+#
+CONFIG_USART3_RXBUFSIZE=128
+CONFIG_USART3_TXBUFSIZE=128
+CONFIG_USART3_BAUD=115200
+CONFIG_USART3_BITS=8
+CONFIG_USART3_PARITY=0
+CONFIG_USART3_2STOP=0
+# CONFIG_USBDEV is not set
+# CONFIG_USBHOST is not set
+# CONFIG_WIRELESS is not set
+
+#
+# System Logging Device Options
+#
+
+#
+# System Logging
+#
+# CONFIG_RAMLOG is not set
+
+#
+# Networking Support
+#
+CONFIG_NET=y
+CONFIG_ARCH_HAVE_PHY=y
+CONFIG_PHY_KS8721=y
+# CONFIG_PHY_DP83848C is not set
+# CONFIG_PHY_LAN8720 is not set
+# CONFIG_PHY_DM9161 is not set
+# CONFIG_NET_NOINTS is not set
+CONFIG_NET_MULTIBUFFER=y
+# CONFIG_NET_IPv6 is not set
+CONFIG_NSOCKET_DESCRIPTORS=10
+CONFIG_NET_NACTIVESOCKETS=16
+CONFIG_NET_SOCKOPTS=y
+CONFIG_NET_BUFSIZE=562
+# CONFIG_NET_TCPURGDATA is not set
+CONFIG_NET_TCP=y
+CONFIG_NET_TCP_CONNS=40
+CONFIG_NET_MAX_LISTENPORTS=40
+CONFIG_NET_TCP_READAHEAD_BUFSIZE=562
+CONFIG_NET_NTCP_READAHEAD_BUFFERS=16
+CONFIG_NET_TCP_RECVDELAY=0
+CONFIG_NET_TCPBACKLOG=y
+CONFIG_NET_UDP=y
+CONFIG_NET_UDP_CHECKSUMS=y
+CONFIG_NET_UDP_CONNS=8
+# CONFIG_NET_BROADCAST is not set
+CONFIG_NET_ICMP=y
+CONFIG_NET_ICMP_PING=y
+# CONFIG_NET_PINGADDRCONF is not set
+# CONFIG_NET_IGMP is not set
+CONFIG_NET_STATISTICS=y
+CONFIG_NET_RECEIVE_WINDOW=562
+CONFIG_NET_ARPTAB_SIZE=16
+# CONFIG_NET_ARP_IPIN is not set
+
+#
+# File Systems
+#
+
+#
+# File system configuration
#
CONFIG_FS_FAT=y
CONFIG_FAT_LCNAMES=y
CONFIG_FAT_LFN=y
CONFIG_FAT_MAXFNAME=32
-CONFIG_FS_NXFFS=n
-CONFIG_FS_ROMFS=n
+# CONFIG_FS_FATTIME is not set
+# CONFIG_FAT_DMAMEMORY is not set
+# CONFIG_FS_RAMMAP is not set
+# CONFIG_NFS is not set
+# CONFIG_FS_NXFFS is not set
+# CONFIG_FS_ROMFS is not set
#
-# Maintain legacy build behavior (revisit)
+# System Logging
#
-
-CONFIG_MMCSD=y
-CONFIG_MMCSD_SPI=y
-CONFIG_MMCSD_SDIO=y
+# CONFIG_SYSLOG is not set
#
-# SPI-based MMC/SD driver
-#
-CONFIG_MMCSD_NSLOTS=1
-CONFIG_MMCSD_READONLY=n
-CONFIG_MMCSD_SPICLOCK=12500000
-
-#
-# Block driver buffering
-#
-CONFIG_FS_READAHEAD=n
-CONFIG_FS_WRITEBUFFER=n
-
-#
-# STM32 SDIO-based MMC/SD driver
-#
-CONFIG_SDIO_DMA=n
-#CONFIG_SDIO_PRI=128
-#CONFIG_SDIO_DMAPRIO
-#CONFIG_SDIO_WIDTH_D1_ONLY
-CONFIG_MMCSD_MULTIBLOCK_DISABLE=y
-CONFIG_MMCSD_MMCSUPPORT=n
-CONFIG_MMCSD_HAVECARDDETECT=n
-
-#
-# TCP/IP and UDP support via uIP
-#
-CONFIG_NET=y
-CONFIG_NET_NOINTS=n
-CONFIG_NET_MULTIBUFFER=y
-CONFIG_NET_IPv6=n
-CONFIG_NSOCKET_DESCRIPTORS=10
-CONFIG_NET_SOCKOPTS=y
-CONFIG_NET_BUFSIZE=562
-CONFIG_NET_TCP=y
-CONFIG_NET_TCP_CONNS=40
-#CONFIG_NET_TCP_READAHEAD_BUFSIZE
-CONFIG_NET_NTCP_READAHEAD_BUFFERS=16
-CONFIG_NET_TCPBACKLOG=y
-CONFIG_NET_MAX_LISTENPORTS=40
-CONFIG_NET_UDP=y
-CONFIG_NET_UDP_CHECKSUMS=y
-#CONFIG_NET_UDP_CONNS=10
-CONFIG_NET_ICMP=y
-CONFIG_NET_ICMP_PING=y
-#CONFIG_NET_PINGADDRCONF=0
-CONFIG_NET_STATISTICS=y
-#CONFIG_NET_RECEIVE_WINDOW=
-CONFIG_NET_BROADCAST=n
-#CONFIG_NET_ARPTAB_SIZE=8
-CONFIG_NET_ARP_IPIN=n
-CONFIG_NET_MULTICAST=n
-
-#
-# UIP Network Utilities
-#
-CONFIG_NET_DHCP_LIGHT=n
-CONFIG_NET_RESOLV_ENTRIES=4
-
-#
-# FTP Server
-#
-CONFIG_FTPD_CMDBUFFERSIZE=2048
-
-#
-# RTC Configuration
-#
-CONFIG_RTC=y
-CONFIG_RTC_DATETIME=y
-CONFIG_RTC_HIRES=n
-CONFIG_RTC_FREQUENCY=1
-CONFIG_RTC_ALARM=n
-
-#
-# Input device configuration
-#
-CONFIG_INPUT=y
-CONFIG_INPUT_TSC2007=n
-
-#
-# STMPE811 input device configuration
-#
-# Prerequisites: CONFIG_INPUT=y
-# Other settings that effect the driver: CONFIG_DISABLE_POLL
-#
-CONFIG_INPUT_STMPE811=y
-CONFIG_STMPE811_SPI=n
-CONFIG_STMPE811_I2C=y
-CONFIG_STMPE811_MULTIPLE=y
-CONFIG_STMPE811_ACTIVELOW=y
-CONFIG_STMPE811_EDGE=y
-#CONFIG_STMPE811_NPOLLWAITERS
-CONFIG_STMPE811_TSC_DISABLE=n
-CONFIG_STMPE811_ADC_DISABLE=y
-CONFIG_STMPE811_GPIO_DISABLE=y
-CONFIG_STMPE811_GPIOINT_DISABLE=y
-CONFIG_STMPE811_SWAPXY=n
-CONFIG_STMPE811_TEMP_DISABLE=y
-CONFIG_STMPE811_REGDEBUG=n
-CONFIG_STMPE811_THRESHX=39
-CONFIG_STMPE811_THRESHY=51
-
-#
-# STM32 USB OTG FS Device Configuration
-#
-CONFIG_USBDEV=n
-CONFIG_USBDEV_ISOCHRONOUS=n
-CONFIG_USBDEV_DUALSPEED=n
-CONFIG_USBDEV_SELFPOWERED=y
-CONFIG_USBDEV_REMOTEWAKEUP=n
-CONFIG_USBDEV_MAXPOWER=100
-CONFIG_USBDEV_TRACE=n
-CONFIG_USBDEV_TRACE_NRECORDS=128
-
-#
-# STM32 USB OTG FS Host Configuration
-#
-CONFIG_USBHOST=n
-#CONFIG_STM32_OTGFS_RXFIFO_SIZE
-#CONFIG_STM32_OTGFS_NPTXFIFO_SIZE
-#CONFIG_STM32_OTGFS_PTXFIFO_SIZE
-#CONFIG_STM32_OTGFS_DESCSIZE
-CONFIG_STM32_OTGFS_SOFINTR=n
-CONFIG_STM32_USBHOST_REGDEBUG=n
-CONFIG_STM32_USBHOST_PKTDUMP=n
-
-#
-# USB Serial Device Configuration
-#
-CONFIG_PL2303=n
-CONFIG_PL2303_EPINTIN=1
-CONFIG_PL2303_EPBULKOUT=2
-CONFIG_PL2303_EPBULKIN=3
-CONFIG_PL2303_NWRREQS=4
-CONFIG_PL2303_NRDREQS=4
-CONFIG_PL2303_VENDORID=0x067b
-CONFIG_PL2303_PRODUCTID=0x2303
-CONFIG_PL2303_VENDORSTR="Nuttx"
-CONFIG_PL2303_PRODUCTSTR="USBdev Serial"
-CONFIG_PL2303_RXBUFSIZE=512
-CONFIG_PL2303_TXBUFSIZE=512
-
-#
-# USB Storage Device Configuration
-#
-CONFIG_USBMSC=n
-CONFIG_USBMSC_EP0MAXPACKET=64
-CONFIG_USBMSC_EPBULKOUT=2
-CONFIG_USBMSC_EPBULKIN=5
-CONFIG_USBMSC_NRDREQS=2
-CONFIG_USBMSC_NWRREQS=2
-CONFIG_USBMSC_BULKINREQLEN=256
-CONFIG_USBMSC_BULKOUTREQLEN=256
-CONFIG_USBMSC_VENDORID=0x584e
-CONFIG_USBMSC_VENDORSTR="NuttX"
-CONFIG_USBMSC_PRODUCTID=0x5342
-CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
-CONFIG_USBMSC_VERSIONNO=0x0399
-CONFIG_USBMSC_REMOVABLE=y
-
-#
-# Watchdog timer configuration
-#
-CONFIG_WATCHDOG=n
-
-#
-# Graphics related configuration settings
+# Graphics Support
#
CONFIG_NX=y
-CONFIG_NX_MULTIUSER=y
+CONFIG_NX_LCDDRIVER=y
CONFIG_NX_NPLANES=1
+CONFIG_NX_WRITEONLY=y
+
+#
+# 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=n
+# CONFIG_NX_DISABLE_16BPP is not set
CONFIG_NX_DISABLE_24BPP=y
CONFIG_NX_DISABLE_32BPP=y
-CONFIG_NX_PACKEDMSFIRST=n
-CONFIG_NX_LCDDRIVER=y
-CONFIG_LCD_MAXPOWER=1
-CONFIG_LCD_MAXCONTRAST=1
+# CONFIG_NX_PACKEDMSFIRST is not set
+
+#
+# Input Devices
+#
CONFIG_NX_MOUSE=y
CONFIG_NX_KBD=y
-#CONFIG_NXTK_BORDERWIDTH=4
+
+#
+# Framed Window Borders
+#
+CONFIG_NXTK_BORDERWIDTH=4
CONFIG_NXTK_BORDERCOLOR1=0x5cb7
CONFIG_NXTK_BORDERCOLOR2=0x21c9
CONFIG_NXTK_BORDERCOLOR3=0xffdf
-CONFIG_NXTK_AUTORAISE=n
-CONFIG_NXFONT_SANS17X22=n
-CONFIG_NXFONT_SANS20X26=n
-CONFIG_NXFONT_SANS22X29=n
-CONFIG_NXFONT_SANS23X27=y
-CONFIG_NXFONT_SANS28X37=n
-CONFIG_NXFONT_SANS17X23B=n
-CONFIG_NXFONT_SANS20X27B=n
-CONFIG_NXFONT_SANS22X29B=y
-CONFIG_NXFONT_SANS28X37B=n
-CONFIG_NXFONT_SANS40X49B=n
-CONFIG_NXFONT_SERIF22X29=n
-CONFIG_NXFONT_SERIF29X37=n
-CONFIG_NXFONT_SERIF38X48=n
-CONFIG_NXFONT_SERIF22X28B=n
-CONFIG_NXFONT_SERIF27X38B=n
-CONFIG_NXFONT_SERIF38X49B=n
+# CONFIG_NXTK_AUTORAISE is not set
+
+#
+# Font Selections
+#
CONFIG_NXFONTS_CHARBITS=7
+# 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=y
+# 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=y
+
+#
+# NxConsole Output Text/Graphics Options
+#
+CONFIG_NXCONSOLE_BPP=16
+CONFIG_NXCONSOLE_CURSORCHAR=137
+CONFIG_NXCONSOLE_MXCHARS=325
+CONFIG_NXCONSOLE_CACHESIZE=32
+CONFIG_NXCONSOLE_LINESEPARATION=0
+# CONFIG_NXCONSOLE_NOWRAP is not set
+
+#
+# NxConsole Input options
+#
+CONFIG_NXCONSOLE_NXKBDIN=y
+CONFIG_NXCONSOLE_KBDBUFSIZE=16
+CONFIG_NXCONSOLE_NPOLLWAITERS=4
+
+#
+# NX Multi-user only options
+#
+CONFIG_NX_MULTIUSER=y
CONFIG_NX_BLOCKING=y
CONFIG_NX_MXSERVERMSGS=32
CONFIG_NX_MXCLIENTMSGS=16
#
-# NxWidgets / NxWM
+# Memory Management
#
-# Use all defaults except
-# 1. 16 bits-per-pixel
-# 2. Make the NxWidgets background color match the NxWM back color
-# 3. Build in support for keyboard input in NxConsole
-# 4. Taskbar on the left
-# 5. We do have a touchscreen
-# 6. We do want the NxWM keybard listener
-# 7. Use a larger font with the calculator
-#
-CONFIG_NXWIDGETS_BPP=16
-CONFIG_NXWIDGETS_SERVERSTACK=2048
-CONFIG_NXWIDGETS_LISTENERSTACK=2048
-CONFIG_NXWIDGETS_DEFAULT_BACKGROUNDCOLOR=MKRGB(148,189,215)
-CONFIG_NXWIDGETS_DEFAULT_SELECTEDBACKGROUNDCOLOR=MKRGB(206,227,241)
-CONFIG_NXWIDGETS_DEFAULT_SHADOWEDGECOLOR=MKRGB(35,58,73)
-
-CONFIG_NXCONSOLE_NXKBDIN=y
-
-CONFIG_NXWM_TASKBAR_LEFT=y
-CONFIG_NXWM_NXCONSOLE_STACKSIZE=2048
-CONFIG_NXWM_TASKBAR_VSPACING=4
-CONFIG_NXWM_UNITTEST=y
-CONFIG_NXWM_TOUCHSCREEN=y
-CONFIG_NXWM_KEYBOARD=y
-CONFIG_NXWM_HEXCALCULATOR_FONTID=5
+# CONFIG_MM_SMALL is not set
+CONFIG_MM_REGIONS=1
+# CONFIG_GRAN is not set
#
-# NxConsole Configuration Settings:
+# Binary Formats
#
-CONFIG_NXCONSOLE=y
-CONFIG_NXCONSOLE_BPP=16
-CONFIG_NXCONSOLE_MXCHARS=325
-CONFIG_NXCONSOLE_CACHESIZE=32
+# CONFIG_BINFMT_DISABLE is not set
+# CONFIG_BINFMT_EXEPATH is not set
+# CONFIG_NXFLAT is not set
+# CONFIG_ELF is not set
+# CONFIG_PIC is not set
+CONFIG_SYMTAB_ORDEREDBYNAME=y
+
+#
+# Library Routines
+#
+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
+# CONFIG_EOL_IS_CR is not set
+# CONFIG_EOL_IS_LF is not set
+# CONFIG_EOL_IS_BOTH_CRLF is not set
+CONFIG_EOL_IS_EITHER_CRLF=y
+# CONFIG_LIBC_STRERROR is not set
+# CONFIG_LIBC_PERROR_STDOUT is not set
+CONFIG_ARCH_LOWPUTC=y
+CONFIG_LIB_SENDFILE_BUFSIZE=512
+# CONFIG_ARCH_ROMGETC is not set
+# CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set
+
+#
+# Basic CXX Support
+#
+# CONFIG_C99_BOOL8 is not set
+CONFIG_HAVE_CXX=y
+CONFIG_HAVE_CXXINITIALIZE=y
+# CONFIG_CXX_NEWLONG is not set
+
+#
+# uClibc++ Standard C++ Library
+#
+# CONFIG_UCLIBCXX is not set
+
+#
+# Application Configuration
#
#
-# STM3220G-EVAL LCD Hardware Configuration
+# Named Applications
#
-CONFIG_LCD_NOGETRUN=y
-CONFIG_LCD_LANDSCAPE=y
-CONFIG_LCD_RLANDSCAPE=n
-CONFIG_LCD_PORTRAIT=n
-CONFIG_LCD_RPORTRAIT=n
+# CONFIG_NAMEDAPP is not set
#
-# STM3220G-EVAL specific LCD settings
+# Examples
#
-CONFIG_STM32_ILI9320_DISABLE=n
-CONFIG_STM32_ILI9325_DISABLE=n
+# CONFIG_EXAMPLES_BUTTONS is not set
+# CONFIG_EXAMPLES_CAN is not set
+# CONFIG_EXAMPLES_CDCACM is not set
+# CONFIG_EXAMPLES_COMPOSITE is not set
+# CONFIG_EXAMPLES_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_MOUNT is not set
+# CONFIG_EXAMPLES_MODBUS is not set
+# CONFIG_EXAMPLES_NETTEST is not set
+# CONFIG_EXAMPLES_NSH is not set
+# CONFIG_EXAMPLES_NULL is not set
+# CONFIG_EXAMPLES_NX is not set
+# CONFIG_EXAMPLES_NXCONSOLE is not set
+# CONFIG_EXAMPLES_NXFFS is not set
+# CONFIG_EXAMPLES_NXFLAT is not set
+# CONFIG_EXAMPLES_NXHELLO is not set
+# CONFIG_EXAMPLES_NXIMAGE is not set
+# CONFIG_EXAMPLES_NXLINES is not set
+# CONFIG_EXAMPLES_NXTEXT is not set
+# CONFIG_EXAMPLES_OSTEST is not set
+# CONFIG_EXAMPLES_PASHELLO is not set
+# CONFIG_EXAMPLES_PIPE is not set
+# CONFIG_EXAMPLES_POLL is not set
+# CONFIG_EXAMPLES_QENCODER is not set
+# CONFIG_EXAMPLES_RGMP is not set
+# CONFIG_EXAMPLES_ROMFS is not set
+# CONFIG_EXAMPLES_SENDMAIL is not set
+# CONFIG_EXAMPLES_SERLOOP is not set
+# CONFIG_EXAMPLES_TELNETD is not set
+# CONFIG_EXAMPLES_THTTPD is not set
+# CONFIG_EXAMPLES_TIFF is not set
+# CONFIG_EXAMPLES_TOUCHSCREEN is not set
+# CONFIG_EXAMPLES_UDP is not set
+# CONFIG_EXAMPLES_DISCOVER is not set
+# CONFIG_EXAMPLES_UIP is not set
+# CONFIG_EXAMPLES_USBSERIAL is not set
+# CONFIG_EXAMPLES_USBMSC is not set
+# CONFIG_EXAMPLES_USBTERM is not set
+# CONFIG_EXAMPLES_WATCHDOG is not set
+# CONFIG_EXAMPLES_WGET is not set
+# CONFIG_EXAMPLES_WLAN is not set
#
-# Settings for examples/uip
+# Interpreters
#
-CONFIG_EXAMPLES_UIP_IPADDR=0x0a000002
-CONFIG_EXAMPLES_UIP_DRIPADDR=0x0a000001
-CONFIG_EXAMPLES_UIP_NETMASK=0xffffff00
-CONFIG_EXAMPLES_UIP_DHCPC=n
#
-# Settings for examples/nettest
-CONFIG_EXAMPLES_NETTEST_SERVER=n
-CONFIG_EXAMPLES_NETTEST_PERFORMANCE=n
-CONFIG_EXAMPLES_NETTEST_NOMAC=y
-CONFIG_EXAMPLES_NETTEST_IPADDR=0x0a000002
-CONFIG_EXAMPLES_NETTEST_DRIPADDR=0x0a000001
-CONFIG_EXAMPLES_NETTEST_NETMASK=0xffffff00
-CONFIG_EXAMPLES_NETTEST_CLIENTIP=0x0a000001
+# Interpreters
+#
+# CONFIG_INTERPRETERS_FICL is not set
+# CONFIG_INTERPRETERS_PCODE is not set
#
-# Settings for examples/ostest
+# Network Utilities
#
-CONFIG_EXAMPLES_OSTEST_LOOPS=1
-CONFIG_EXAMPLES_OSTEST_STACKSIZE=2048
-CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=3
#
-# Settings for apps/nshlib
+# Networking Utilities
#
-CONFIG_NSH_BUILTIN_APPS=n
+# 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=y
+CONFIG_NET_RESOLV_ENTRIES=4
+CONFIG_NET_RESOLV_MAXRESPONSE=96
+# CONFIG_NETUTILS_SMTP is not set
+CONFIG_NETUTILS_TELNETD=y
+CONFIG_NETUTILS_TFTPC=y
+# CONFIG_NETUTILS_THTTPD is not set
+CONFIG_NETUTILS_UIPLIB=y
+CONFIG_NETUTILS_WEBCLIENT=y
+CONFIG_NSH_WGET_USERAGENT="NuttX/6.xx.x (; http://www.nuttx.org/)"
+# CONFIG_NETUTILS_WEBSERVER is not set
+# CONFIG_NETUTILS_DISCOVER is not set
+# CONFIG_NETUTILS_XMLRPC is not set
+#
+# ModBus
+#
+
+#
+# FreeModbus
+#
+# CONFIG_MODBUS is not set
+
+#
+# NSH Library
+#
+CONFIG_NSH_LIBRARY=y
+
+#
+# Disable Individual commands
+#
+# CONFIG_NSH_DISABLE_CAT is not set
+# CONFIG_NSH_DISABLE_CD is not set
+# CONFIG_NSH_DISABLE_CP is not set
+# CONFIG_NSH_DISABLE_DD is not set
+# CONFIG_NSH_DISABLE_ECHO is not set
+# CONFIG_NSH_DISABLE_EXEC is not set
+# CONFIG_NSH_DISABLE_EXIT is not set
+# CONFIG_NSH_DISABLE_FREE is not set
+# CONFIG_NSH_DISABLE_GET is not set
+# CONFIG_NSH_DISABLE_HELP is not set
+# CONFIG_NSH_DISABLE_HEXDUMP is not set
+# CONFIG_NSH_DISABLE_IFCONFIG is not set
+# CONFIG_NSH_DISABLE_KILL is not set
+# CONFIG_NSH_DISABLE_LOSETUP is not set
+# CONFIG_NSH_DISABLE_LS is not set
+# CONFIG_NSH_DISABLE_MB is not set
+# CONFIG_NSH_DISABLE_MKDIR is not set
+# CONFIG_NSH_DISABLE_MKFATFS is not set
+# CONFIG_NSH_DISABLE_MKFIFO is not set
+# CONFIG_NSH_DISABLE_MKRD is not set
+# CONFIG_NSH_DISABLE_MH is not set
+# CONFIG_NSH_DISABLE_MOUNT is not set
+# CONFIG_NSH_DISABLE_MW is not set
+# CONFIG_NSH_DISABLE_NSFMOUNT is not set
+# CONFIG_NSH_DISABLE_PS is not set
+# CONFIG_NSH_DISABLE_PING is not set
+# CONFIG_NSH_DISABLE_PUT is not set
+# CONFIG_NSH_DISABLE_PWD is not set
+# CONFIG_NSH_DISABLE_RM is not set
+# CONFIG_NSH_DISABLE_RMDIR is not set
+# CONFIG_NSH_DISABLE_SET is not set
+# CONFIG_NSH_DISABLE_SH is not set
+# CONFIG_NSH_DISABLE_SLEEP is not set
+# CONFIG_NSH_DISABLE_TEST is not set
+# CONFIG_NSH_DISABLE_UMOUNT is not set
+# CONFIG_NSH_DISABLE_UNSET is not set
+# CONFIG_NSH_DISABLE_USLEEP is not set
+# CONFIG_NSH_DISABLE_WGET is not set
+# CONFIG_NSH_DISABLE_XD is not set
+CONFIG_NSH_CODECS_BUFSIZE=128
CONFIG_NSH_FILEIOSIZE=512
-CONFIG_NSH_STRERROR=n
CONFIG_NSH_LINELEN=64
CONFIG_NSH_NESTDEPTH=3
-CONFIG_NSH_DISABLESCRIPT=n
-CONFIG_NSH_DISABLEBG=n
-CONFIG_NSH_ROMFSETC=n
+# CONFIG_NSH_DISABLESCRIPT is not set
+# CONFIG_NSH_DISABLEBG is not set
CONFIG_NSH_CONSOLE=y
-#CONFIG_NSH_CONDEV="/dev/ttyS1"
+# CONFIG_NSH_CONDEV is not set
+# CONFIG_NSH_ARCHINIT is not set
CONFIG_NSH_TELNET=y
-CONFIG_NSH_ARCHINIT=n
+CONFIG_NSH_TELNETD_PORT=23
+CONFIG_NSH_TELNETD_DAEMONPRIO=100
+CONFIG_NSH_TELNETD_DAEMONSTACKSIZE=2048
+CONFIG_NSH_TELNETD_CLIENTPRIO=100
+CONFIG_NSH_TELNETD_CLIENTSTACKSIZE=2048
CONFIG_NSH_IOBUFFER_SIZE=512
-CONFIG_NSH_DHCPC=n
-CONFIG_NSH_NOMAC=y
+# CONFIG_NSH_TELNET_LOGIN is not set
CONFIG_NSH_IPADDR=0x0a000002
CONFIG_NSH_DRIPADDR=0x0a000001
CONFIG_NSH_NETMASK=0xffffff00
-CONFIG_NSH_ROMFSMOUNTPT="/etc"
-CONFIG_NSH_INITSCRIPT="init.d/rcS"
-CONFIG_NSH_ROMFSDEVNO=0
-CONFIG_NSH_ROMFSSECTSIZE=64
-CONFIG_NSH_FATDEVNO=1
-CONFIG_NSH_FATSECTSIZE=512
-CONFIG_NSH_FATNSECTORS=1024
-CONFIG_NSH_FATMOUNTPT="/tmp"
+CONFIG_NSH_NOMAC=y
+CONFIG_NSH_MAX_ROUNDTRIP=20
#
-# Architecture-specific NSH options
+# NxWidgets/NxWM
#
-CONFIG_NSH_MMCSDSPIPORTNO=0
-CONFIG_NSH_MMCSDSLOTNO=0
-CONFIG_NSH_MMCSDMINOR=0
+CONFIG_NXWIDGETS=y
#
-# I2C tool settings
+# NX Server/Device Configuration
#
-CONFIG_I2CTOOL_BUILTIN=y
-CONFIG_I2CTOOL_MINBUS=1
-CONFIG_I2CTOOL_MAXBUS=3
-#CONFIG_I2CTOOL_MINADDR
-#CONFIG_I2CTOOL_MAXADDR
-#CONFIG_I2CTOOL_MAXREGADDR
-CONFIG_I2CTOOL_DEFFREQ=100000
+CONFIG_NXWIDGETS_FLICKERFREE=y
+CONFIG_NXWIDGETS_DEVNO=0
+CONFIG_NXWIDGETS_VPLANE=0
+CONFIG_NXWIDGETS_SERVERPRIO=51
+CONFIG_NXWIDGETS_SERVERSTACK=2048
+CONFIG_NXWIDGETS_CLIENTPRIO=50
+CONFIG_NXWIDGETS_LISTENERPRIO=50
+CONFIG_NXWIDGETS_LISTENERSTACK=2048
+# CONFIG_NXWIDGETS_EXTERNINIT is not set
+# CONFIG_NXWIDGET_EVENTWAIT is not set
#
-# Settings for examples/usbserial
+# NXWidget Configuration
#
-CONFIG_EXAMPLES_USBSERIAL_INONLY=n
-CONFIG_EXAMPLES_USBSERIAL_OUTONLY=n
-CONFIG_EXAMPLES_USBSERIAL_ONLYSMALL=n
-CONFIG_EXAMPLES_USBSERIAL_ONLYBIG=n
-
-CONFIG_EXAMPLES_USBSERIAL_TRACEINIT=n
-CONFIG_EXAMPLES_USBSERIAL_TRACECLASS=n
-CONFIG_EXAMPLES_USBSERIAL_TRACETRANSFERS=n
-CONFIG_EXAMPLES_USBSERIAL_TRACECONTROLLER=n
-CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n
+CONFIG_NXWIDGETS_BPP=16
+CONFIG_NXWIDGETS_SIZEOFCHAR=1
#
-# Settings for examples/adc
+# NXWidget Default Values
+#
+# CONFIG_NXWIDGETS_SYSTEM_CUSTOM_FONTID is not set
+CONFIG_NXWIDGETS_TNXARRAY_INITIALSIZE=16
+CONFIG_NXWIDGETS_TNXARRAY_SIZEINCREMENT=8
+CONFIG_NXWIDGETS_CUSTOM_FILLCOLORS=y
+CONFIG_NXWIDGETS_DEFAULT_BACKGROUNDCOLOR=0x9dfb
+CONFIG_NXWIDGETS_DEFAULT_SELECTEDBACKGROUNDCOLOR=0xd73e
+CONFIG_NXWIDGETS_DEFAULT_HIGHLIGHTCOLOR=0xc618
+CONFIG_NXWIDGETS_CUSTOM_EDGECOLORS=y
+CONFIG_NXWIDGETS_DEFAULT_SHINEEDGECOLOR=0xffdf
+CONFIG_NXWIDGETS_DEFAULT_SHADOWEDGECOLOR=0x21e9
+# CONFIG_NXWIDGETS_CUSTOM_TEXTCOLORS is not set
+CONFIG_NXWIDGETS_TRANSPARENT_COLOR=0x0
+
+#
+# Keypad behavior
+#
+CONFIG_NXWIDGETS_FIRST_REPEAT_TIME=500
+CONFIG_NXWIDGETS_CONTINUE_REPEAT_TIME=200
+CONFIG_NXWIDGETS_DOUBLECLICK_TIME=350
+CONFIG_NXWIDGETS_KBDBUFFER_SIZE=16
+CONFIG_NXWIDGETS_CURSORCONTROL_SIZE=4
+# CONFIG_NXWIDGET_MEMMONITOR is not set
+CONFIG_NXWM=y
+
+#
+# General settings
+#
+# CONFIG_NXWM_SYSTEM_CUSTOM_FONTID is not set
+CONFIG_NXWM_UNITTEST=y
+
+#
+# Color configuration
+#
+# CONFIG_NXWM_CUSTOM_FILLCOLORS is not set
+# CONFIG_NXWM_CUSTOM_EDGECOLORS is not set
+# CONFIG_NXWM_CUSTOM_TEXTCOLORS is not set
+
+#
+# Horizontal and vertical spacing of icons in the task bar
+#
+CONFIG_NXWM_TASKBAR_VSPACING=4
+CONFIG_NXWM_TASKBAR_HSPACING=2
+# CONFIG_NXWM_TASKBAR_TOP is not set
+# CONFIG_NXWM_TASKBAR_BOTTOM is not set
+CONFIG_NXWM_TASKBAR_LEFT=y
+# CONFIG_NXWM_TASKBAR_RIGHT is not set
+# CONFIG_NXWM_CUSTOM_TASKBAR_WIDTH is not set
+# CONFIG_NXWM_DISABLE_MINIMIZE is not set
+
+#
+# Tool Bar Configuration
+#
+# CONFIG_NXWM_CUSTOM_TOOLBAR_HEIGHT is not set
+
+#
+# Background Image
+#
+# CONFIG_NXWM_DISABLE_BACKGROUND_IMAGE is not set
+CONFIG_NXWM_BACKGROUND_IMAGE=""
+
+#
+# Start Window Configuration
#
#
-# Settings for examples/can
+# Horizontal and vertical spacing of icons in the task bar
+#
+CONFIG_NXWM_STARTWINDOW_VSPACING=4
+CONFIG_NXWM_STARTWINDOW_HSPACING=4
+# CONFIG_NXWM_CUSTOM_STARTWINDOW_ICON is not set
+CONFIG_NXWM_STARTWINDOW_MQNAME="/dev/nxwm"
+CONFIG_NXWM_STARTWINDOW_MXMSGS=32
+CONFIG_NXWM_STARTWINDOW_MXMPRIO=42
+CONFIG_NXWM_STARTWINDOW_PRIO=50
+CONFIG_NXWM_STARTWINDOW_STACKSIZE=2048
+
+#
+# NxConsole Window Configuration
+#
+CONFIG_NXWM_NXCONSOLE_PRIO=50
+CONFIG_NXWM_NXCONSOLE_STACKSIZE=2048
+# CONFIG_NXWM_NXCONSOLE_CUSTOM_COLORS is not set
+# CONFIG_NXWM_NXCONSOLE_CUSTOM_FONTID is not set
+# CONFIG_NXWM_CUSTOM_NXCONSOLE_ICON is not set
+CONFIG_NXWM_TOUCHSCREEN=y
+
+#
+# Touchscreen device settings
+#
+CONFIG_NXWM_TOUCHSCREEN_DEVNO=0
+CONFIG_NXWM_TOUCHSCREEN_DEVPATH="/dev/input0"
+CONFIG_NXWM_TOUCHSCREEN_SIGNO=5
+CONFIG_NXWM_TOUCHSCREEN_LISTENERPRIO=50
+CONFIG_NXWM_TOUCHSCREEN_LISTENERSTACK=1024
+CONFIG_NXWM_KEYBOARD=y
+
+#
+# Keyboard device settings
+#
+CONFIG_NXWM_KEYBOARD_DEVPATH="/dev/console"
+CONFIG_NXWM_KEYBOARD_SIGNO=6
+CONFIG_NXWM_KEYBOARD_BUFSIZE=16
+CONFIG_NXWM_KEYBOARD_LISTENERPRIO=50
+CONFIG_NXWM_KEYBOARD_LISTENERSTACK=2048
+
+#
+# Calibration display settings
+#
+# CONFIG_NXWM_CALIBRATION_CUSTOM_COLORS is not set
+# CONFIG_NXWM_CUSTOM_CALIBRATION_ICON is not set
+CONFIG_NXWM_CALIBRATION_SIGNO=5
+CONFIG_NXWM_CALIBRATION_LISTENERPRIO=50
+CONFIG_NXWM_CALIBRATION_LISTENERSTACK=2048
+
+#
+# Calibration display settings
+#
+# CONFIG_NXWM_HEXCALCULATOR_CUSTOM_COLORS is not set
+# CONFIG_NXWM_CUSTOM_HEXCALCULATOR_ICON is not set
+CONFIG_NXWM_HEXCALCULATOR_CUSTOM_FONTID=y
+CONFIG_NXWM_HEXCALCULATOR_FONTID=5
+
+#
+# System NSH Add-Ons
#
#
-# Settings for examples/nx
+# Custom Free Memory Command
#
-CONFIG_EXAMPLES_NX_BUILTIN=y
-CONFIG_EXAMPLES_NX_VPLANE=0
-CONFIG_EXAMPLES_NX_DEVNO=0
-CONFIG_EXAMPLES_NX_BGCOLOR=0x0011
-CONFIG_EXAMPLES_NX_COLOR1=0xaedc
-CONFIG_EXAMPLES_NX_COLOR2=0xe7ff
-CONFIG_EXAMPLES_NX_TBCOLOR=0xd69a
-CONFIG_EXAMPLES_NX_FONTID=0
-CONFIG_EXAMPLES_NX_FONTCOLOR=0x0000
-CONFIG_EXAMPLES_NX_BPP=16
-CONFIG_EXAMPLES_NX_RAWWINDOWS=n
-CONFIG_EXAMPLES_NX_STACKSIZE=2048
-CONFIG_EXAMPLES_NX_CLIENTPRIO=80
-CONFIG_EXAMPLES_NX_SERVERPRIO=120
-CONFIG_EXAMPLES_NX_NOTIFYSIGNO=4
-CONFIG_EXAMPLES_NX_EXTERNINIT=n
+# CONFIG_SYSTEM_FREE is not set
#
-# Settings for examples/nxhello
+# I2C tool
#
-CONFIG_EXAMPLES_NXHELLO_BUILTIN=y
-CONFIG_EXAMPLES_NXHELLO_VPLANE=0
-CONFIG_EXAMPLES_NXHELLO_DEVNO=0
-CONFIG_EXAMPLES_NXHELLO_BGCOLOR=0x0011
-CONFIG_EXAMPLES_NXHELLO_FONTID=6
-CONFIG_EXAMPLES_NXHELLO_FONTCOLOR=0xffdf
-CONFIG_EXAMPLES_NXHELLO_BPP=16
-CONFIG_EXAMPLES_NXHELLO_EXTERNINIT=n
+# CONFIG_SYSTEM_I2CTOOL is not set
#
-# Settings for examples/nximage
+# FLASH Program Installation
#
-CONFIG_EXAMPLES_NXIMAGE_BUILTIN=y
-CONFIG_EXAMPLES_NXIMAGE_VPLANE=0
-CONFIG_EXAMPLES_NXIMAGE_DEVNO=0
-CONFIG_EXAMPLES_NXIMAGE_BPP=16
-CONFIG_EXAMPLES_NXIMAGE_XSCALEp5=n
-CONFIG_EXAMPLES_NXIMAGE_XSCALE1p5=y
-CONFIG_EXAMPLES_NXIMAGE_XSCALE2p0=n
-CONFIG_EXAMPLES_NXIMAGE_YSCALEp5=n
-CONFIG_EXAMPLES_NXIMAGE_YSCALE1p5=y
-CONFIG_EXAMPLES_NXIMAGE_YSCALE2p0=n
-CONFIG_EXAMPLES_NXIMAGE_EXTERNINIT=n
+# CONFIG_SYSTEM_INSTALL is not set
#
-# Settings for examples/nxlines
+# readline()
#
-CONFIG_EXAMPLES_NXLINES_VPLANE=0
-CONFIG_EXAMPLES_NXLINES_DEVNO=0
-CONFIG_EXAMPLES_NXLINES_BGCOLOR=0x0320
-CONFIG_EXAMPLES_NXLINES_LINEWIDTH=16
-CONFIG_EXAMPLES_NXLINES_LINECOLOR=0xffe0
-CONFIG_EXAMPLES_NXLINES_BORDERWIDTH=4
-CONFIG_EXAMPLES_NXLINES_BORDERCOLOR=0xffe0
-CONFIG_EXAMPLES_NXLINES_CIRCLECOLOR=0xf7bb
-CONFIG_EXAMPLES_NXLINES_BPP=16
-CONFIG_EXAMPLES_NXLINES_EXTERNINIT=n
+CONFIG_SYSTEM_READLINE=y
+CONFIG_READLINE_ECHO=y
#
-# Settings for examples/touchscreen
+# Power Off
#
-CONFIG_EXAMPLES_TOUCHSCREEN_BUILTIN=n
-CONFIG_EXAMPLES_TOUCHSCREEN_MINOR=0
-CONFIG_EXAMPLES_TOUCHSCREEN_DEVPATH="/dev/input0"
-CONFIG_EXAMPLES_TOUCHSCREEN_NSAMPLES=25
+# CONFIG_SYSTEM_POWEROFF is not set
#
-# Settings for examples/usbstorage
+# RAMTRON
#
-CONFIG_EXAMPLES_USBMSC_BUILTIN=y
-CONFIG_EXAMPLES_USBMSC_NLUNS=1
-CONFIG_EXAMPLES_USBMSC_DEVMINOR1=0
-CONFIG_EXAMPLES_USBMSC_DEVPATH1="/dev/mmcsd0"
-CONFIG_EXAMPLES_USBMSC_DEBUGMM=n
-CONFIG_EXAMPLES_USBMSC_TRACEINIT=n
-CONFIG_EXAMPLES_USBMSC_TRACECLASS=n
-CONFIG_EXAMPLES_USBMSC_TRACETRANSFERS=n
-CONFIG_EXAMPLES_USBMSC_TRACECONTROLLER=n
-CONFIG_EXAMPLES_USBMSC_TRACEINTERRUPTS=n
+# CONFIG_SYSTEM_RAMTRON is not set
#
-# Settings for examples/watchdog
-#
-# This test depends on these specific Watchdog/NSH configurations settings (your
-# specific watchdog hardware settings might require additional settings).
+# SD Card
#
+# CONFIG_SYSTEM_SDCARD is not set
#
-# Settings for examples/pwm
+# Sysinfo
#
-
-#
-# Settings for examples/ftpd
-#
-
-#
-# Settings for examples/watchdog
-#
-# This test depends on these specific Watchdog/NSH configurations settings (your
-# specific watchdog hardware settings might require additional settings).
-#
-
-#
-# Stack and heap information
-#
-CONFIG_BOOT_RUNFROMFLASH=n
-CONFIG_BOOT_COPYTORAM=n
-CONFIG_CUSTOM_STACK=n
-CONFIG_IDLETHREAD_STACKSIZE=1024
-CONFIG_USERMAIN_STACKSIZE=2048
-CONFIG_PTHREAD_STACK_MIN=256
-CONFIG_PTHREAD_STACK_DEFAULT=2048
-CONFIG_HEAP_BASE=
-CONFIG_HEAP_SIZE=
+# CONFIG_SYSTEM_SYSINFO is not set
diff --git a/nuttx/configs/stm3220g-eval/nxwm/setenv.sh b/nuttx/configs/stm3220g-eval/nxwm/setenv.sh
index 8585313914..7326fad478 100755
--- a/nuttx/configs/stm3220g-eval/nxwm/setenv.sh
+++ b/nuttx/configs/stm3220g-eval/nxwm/setenv.sh
@@ -67,7 +67,7 @@ export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/CodeSourcery/Sourcery G++
# 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"
+#export TOOLCHAIN_BIN="${WD}/../misc/buildroot/build_arm_nofpu/staging_dir/bin"
# Add the path to the toolchain to the PATH variable
export PATH="${TOOLCHAIN_BIN}:/sbin:/usr/sbin:${PATH_ORIG}"
diff --git a/nuttx/drivers/input/Kconfig b/nuttx/drivers/input/Kconfig
index 1f345ee144..6da3a9f395 100644
--- a/nuttx/drivers/input/Kconfig
+++ b/nuttx/drivers/input/Kconfig
@@ -123,6 +123,25 @@ config STMPE811_I2C
endchoice
+config STMPE811_ACTIVELOW
+ bool "Active Low Interrupt"
+ default n
+ ---help---
+ The STMPE811 interrupt is provided by a discrete input (usually a
+ GPIO interrupt on most MCU architectures). This setting determines
+ whether the interrupt is active high (or rising edge triggered) or
+ active low (or falling edge triggered). Default: Active
+ high/rising edge.
+
+config STMPE811_EDGE
+ bool "Edge triggered Interrupt"
+ default n
+ ---help---
+ The STMPE811 interrupt is provided by a discrete input (usually a
+ GPIO interrupt on most MCU architectures). This setting determines
+ whether the interrupt is edge or level triggered. Default: Level
+ triggered.
+
config STMPE811_MULTIPLE
bool "Multiple STMPE811 Devices"
default n
diff --git a/nuttx/graphics/Makefile b/nuttx/graphics/Makefile
index 238e14df42..aa402bfa4c 100644
--- a/nuttx/graphics/Makefile
+++ b/nuttx/graphics/Makefile
@@ -124,6 +124,9 @@ gen32bppsources:
$(Q) $(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_BITSPERPIXEL=32 EXTRADEFINES=$(EXTRADEFINES)
genfontsources:
+ifeq ($(CONFIG_NXFONT_MONO5X8),y)
+ @$(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_FONTID=18 EXTRADEFINES=$(EXTRADEFINES)
+endif
ifeq ($(CONFIG_NXFONT_SANS23X27),y)
$(Q) $(MAKE) -C nxfonts -f Makefile.sources TOPDIR=$(TOPDIR) NXFONTS_FONTID=1 EXTRADEFINES=$(EXTRADEFINES)
endif
diff --git a/nuttx/graphics/nxfonts/Make.defs b/nuttx/graphics/nxfonts/Make.defs
index bc65d7ad7a..def0928252 100644
--- a/nuttx/graphics/nxfonts/Make.defs
+++ b/nuttx/graphics/nxfonts/Make.defs
@@ -42,6 +42,12 @@ NXFCONV_CSRCS = nxfonts_convert_1bpp.c nxfonts_convert_2bpp.c \
NXFSET_ASRCS =
NXFSET_CSRCS =
+# Monospace fonts
+
+ifeq ($(CONFIG_NXFONT_MONO5X8),y)
+NXFSET_CSRCS += nxfonts_bitmaps_mono5x8.c
+endif
+
# Sans serif fonts
ifeq ($(CONFIG_NXFONT_SANS17X22),y)
diff --git a/nuttx/graphics/nxfonts/Makefile.sources b/nuttx/graphics/nxfonts/Makefile.sources
index 76a099dcbe..2e41fc7049 100644
--- a/nuttx/graphics/nxfonts/Makefile.sources
+++ b/nuttx/graphics/nxfonts/Makefile.sources
@@ -72,6 +72,13 @@ endif
ifdef NXFONTS_FONTID
+# MONO
+
+ifeq ($(NXFONTS_FONTID),18)
+NXFONTS_PREFIX := g_mono5x8_
+GEN_CSRC = nxfonts_bitmaps_mono5x8.c
+endif
+
# SANS
ifeq ($(NXFONTS_FONTID),14)
diff --git a/nuttx/graphics/nxfonts/nxfonts_bitmaps.c b/nuttx/graphics/nxfonts/nxfonts_bitmaps.c
index 2efc34b87f..b089ec0386 100644
--- a/nuttx/graphics/nxfonts/nxfonts_bitmaps.c
+++ b/nuttx/graphics/nxfonts/nxfonts_bitmaps.c
@@ -80,6 +80,8 @@
# include "nxfonts_sans17x23b.h"
#elif NXFONTS_FONTID == 17
# include "nxfonts_sans20x27b.h"
+#elif NXFONTS_FONTID == 18
+# include "nxfonts_mono5x8.h"
#else
# error "No font ID specified"
#endif
diff --git a/nuttx/graphics/nxfonts/nxfonts_getfont.c b/nuttx/graphics/nxfonts/nxfonts_getfont.c
index 23e5c44744..c2af977f28 100644
--- a/nuttx/graphics/nxfonts/nxfonts_getfont.c
+++ b/nuttx/graphics/nxfonts/nxfonts_getfont.c
@@ -60,6 +60,12 @@
* Private Data
****************************************************************************/
+/* MONO */
+
+#ifdef CONFIG_NXFONT_MONO5X8
+extern const struct nx_fontpackage_s g_mono5x8_package;
+#endif
+
/* SANS */
#ifdef CONFIG_NXFONT_SANS17X22
@@ -139,6 +145,12 @@ extern const struct nx_fontpackage_s g_serif38x49b_package;
static FAR const struct nx_fontpackage_s *g_fontpackages[] =
{
+/* MONO */
+
+#ifdef CONFIG_NXFONT_MONO5X8
+ &g_mono5x8_package,
+#endif
+
/* SANS */
#ifdef CONFIG_NXFONT_SANS17X22
diff --git a/nuttx/graphics/nxfonts/nxfonts_mono5x8.h b/nuttx/graphics/nxfonts/nxfonts_mono5x8.h
new file mode 100644
index 0000000000..739437e629
--- /dev/null
+++ b/nuttx/graphics/nxfonts/nxfonts_mono5x8.h
@@ -0,0 +1,815 @@
+/****************************************************************************
+ * graphics/nxfonts/nxfonts_mono5x8.h
+ *
+ * Copyright (C) 2011-2012 NX Engineering, S.A., All rights reserved.
+ * Author: Petteri Aimonen
+ *
+ * Based on 5x8.pcf.gz from xfonts-base. The file is marked as
+ * COPYRIGHT "Public domain font. Share and enjoy."
+ *
+ * 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 __GRAPHICS_NXFONTS_NXFONTS_MONO5X8_H
+#define __GRAPHICS_NXFONTS_NXFONTS_MONO5X8_H
+
+#define NXFONT_ID FONTID_MONO5X8
+
+#define NXFONT_MIN7BIT 33
+#define NXFONT_MAX7BIT 126
+
+#define NXFONT_MIN8BIT 161
+#define NXFONT_MAX8BIT 255
+
+/* Maximum height and width of any glyph in the set */
+
+#define NXFONT_MAXHEIGHT 8
+#define NXFONT_MAXWIDTH 5
+
+/* The width of a space */
+
+#define NXFONT_SPACEWIDTH 5
+
+/* exclam (33) */
+#define NXFONT_METRICS_33 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_33 {0x0, 0x20, 0x20, 0x20, 0x20, 0x0, 0x20, 0x0}
+
+/* quotedbl (34) */
+#define NXFONT_METRICS_34 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_34 {0x0, 0x50, 0x50, 0x50, 0x0, 0x0, 0x0, 0x0}
+
+/* numbersign (35) */
+#define NXFONT_METRICS_35 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_35 {0x50, 0x50, 0xf8, 0x50, 0xf8, 0x50, 0x50, 0x0}
+
+/* dollar (36) */
+#define NXFONT_METRICS_36 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_36 {0x20, 0x70, 0xa0, 0x70, 0x28, 0x70, 0x20, 0x0}
+
+/* percent (37) */
+#define NXFONT_METRICS_37 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_37 {0x0, 0x40, 0x50, 0x20, 0x50, 0x10, 0x0, 0x0}
+
+/* ampersand (38) */
+#define NXFONT_METRICS_38 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_38 {0x40, 0xa0, 0xa0, 0x40, 0xa0, 0xa0, 0x50, 0x0}
+
+/* quotesingle (39) */
+#define NXFONT_METRICS_39 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_39 {0x0, 0x20, 0x20, 0x20, 0x0, 0x0, 0x0, 0x0}
+
+/* parenleft (40) */
+#define NXFONT_METRICS_40 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_40 {0x0, 0x20, 0x40, 0x40, 0x40, 0x40, 0x20, 0x0}
+
+/* parenright (41) */
+#define NXFONT_METRICS_41 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_41 {0x0, 0x40, 0x20, 0x20, 0x20, 0x20, 0x40, 0x0}
+
+/* asterisk (42) */
+#define NXFONT_METRICS_42 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_42 {0x0, 0x0, 0x90, 0x60, 0xf0, 0x60, 0x90, 0x0}
+
+/* plus (43) */
+#define NXFONT_METRICS_43 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_43 {0x0, 0x0, 0x20, 0x20, 0xf8, 0x20, 0x20, 0x0}
+
+/* comma (44) */
+#define NXFONT_METRICS_44 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_44 {0x0, 0x0, 0x0, 0x0, 0x0, 0x30, 0x20, 0x40}
+
+/* hyphen (45) */
+#define NXFONT_METRICS_45 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_45 {0x0, 0x0, 0x0, 0x0, 0xf0, 0x0, 0x0, 0x0}
+
+/* period (46) */
+#define NXFONT_METRICS_46 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_46 {0x0, 0x0, 0x0, 0x0, 0x0, 0x20, 0x70, 0x20}
+
+/* slash (47) */
+#define NXFONT_METRICS_47 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_47 {0x0, 0x10, 0x10, 0x20, 0x40, 0x80, 0x80, 0x0}
+
+/* zero (48) */
+#define NXFONT_METRICS_48 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_48 {0x0, 0x20, 0x50, 0x50, 0x50, 0x50, 0x20, 0x0}
+
+/* one (49) */
+#define NXFONT_METRICS_49 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_49 {0x0, 0x20, 0x60, 0x20, 0x20, 0x20, 0x70, 0x0}
+
+/* two (50) */
+#define NXFONT_METRICS_50 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_50 {0x0, 0x60, 0x90, 0x10, 0x60, 0x80, 0xf0, 0x0}
+
+/* three (51) */
+#define NXFONT_METRICS_51 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_51 {0x0, 0xf0, 0x20, 0x60, 0x10, 0x90, 0x60, 0x0}
+
+/* four (52) */
+#define NXFONT_METRICS_52 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_52 {0x0, 0x20, 0x60, 0xa0, 0xf0, 0x20, 0x20, 0x0}
+
+/* five (53) */
+#define NXFONT_METRICS_53 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_53 {0x0, 0xf0, 0x80, 0xe0, 0x10, 0x90, 0x60, 0x0}
+
+/* six (54) */
+#define NXFONT_METRICS_54 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_54 {0x0, 0x60, 0x80, 0xe0, 0x90, 0x90, 0x60, 0x0}
+
+/* seven (55) */
+#define NXFONT_METRICS_55 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_55 {0x0, 0xf0, 0x10, 0x20, 0x20, 0x40, 0x40, 0x0}
+
+/* eight (56) */
+#define NXFONT_METRICS_56 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_56 {0x0, 0x60, 0x90, 0x60, 0x90, 0x90, 0x60, 0x0}
+
+/* nine (57) */
+#define NXFONT_METRICS_57 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_57 {0x0, 0x60, 0x90, 0x90, 0x70, 0x10, 0x60, 0x0}
+
+/* colon (58) */
+#define NXFONT_METRICS_58 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_58 {0x0, 0x0, 0x60, 0x60, 0x0, 0x60, 0x60, 0x0}
+
+/* semicolon (59) */
+#define NXFONT_METRICS_59 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_59 {0x0, 0x0, 0x30, 0x30, 0x0, 0x30, 0x20, 0x40}
+
+/* less (60) */
+#define NXFONT_METRICS_60 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_60 {0x0, 0x10, 0x20, 0x40, 0x40, 0x20, 0x10, 0x0}
+
+/* equal (61) */
+#define NXFONT_METRICS_61 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_61 {0x0, 0x0, 0x0, 0xf0, 0x0, 0xf0, 0x0, 0x0}
+
+/* greater (62) */
+#define NXFONT_METRICS_62 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_62 {0x0, 0x40, 0x20, 0x10, 0x10, 0x20, 0x40, 0x0}
+
+/* question (63) */
+#define NXFONT_METRICS_63 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_63 {0x0, 0x20, 0x50, 0x10, 0x20, 0x0, 0x20, 0x0}
+
+/* at (64) */
+#define NXFONT_METRICS_64 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_64 {0x30, 0x48, 0x98, 0xa8, 0xa8, 0x90, 0x40, 0x30}
+
+/* A (65) */
+#define NXFONT_METRICS_65 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_65 {0x0, 0x60, 0x90, 0x90, 0xf0, 0x90, 0x90, 0x0}
+
+/* B (66) */
+#define NXFONT_METRICS_66 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_66 {0x0, 0xe0, 0x90, 0xe0, 0x90, 0x90, 0xe0, 0x0}
+
+/* C (67) */
+#define NXFONT_METRICS_67 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_67 {0x0, 0x60, 0x90, 0x80, 0x80, 0x90, 0x60, 0x0}
+
+/* D (68) */
+#define NXFONT_METRICS_68 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_68 {0x0, 0xe0, 0x90, 0x90, 0x90, 0x90, 0xe0, 0x0}
+
+/* E (69) */
+#define NXFONT_METRICS_69 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_69 {0x0, 0xf0, 0x80, 0xe0, 0x80, 0x80, 0xf0, 0x0}
+
+/* F (70) */
+#define NXFONT_METRICS_70 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_70 {0x0, 0xf0, 0x80, 0xe0, 0x80, 0x80, 0x80, 0x0}
+
+/* G (71) */
+#define NXFONT_METRICS_71 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_71 {0x0, 0x60, 0x90, 0x80, 0xb0, 0x90, 0x60, 0x0}
+
+/* H (72) */
+#define NXFONT_METRICS_72 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_72 {0x0, 0x90, 0x90, 0xf0, 0x90, 0x90, 0x90, 0x0}
+
+/* I (73) */
+#define NXFONT_METRICS_73 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_73 {0x0, 0x70, 0x20, 0x20, 0x20, 0x20, 0x70, 0x0}
+
+/* J (74) */
+#define NXFONT_METRICS_74 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_74 {0x0, 0x70, 0x20, 0x20, 0x20, 0xa0, 0x40, 0x0}
+
+/* K (75) */
+#define NXFONT_METRICS_75 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_75 {0x0, 0x90, 0xa0, 0xc0, 0xa0, 0xa0, 0x90, 0x0}
+
+/* L (76) */
+#define NXFONT_METRICS_76 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_76 {0x0, 0x80, 0x80, 0x80, 0x80, 0x80, 0xf0, 0x0}
+
+/* M (77) */
+#define NXFONT_METRICS_77 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_77 {0x0, 0x90, 0xf0, 0xf0, 0x90, 0x90, 0x90, 0x0}
+
+/* N (78) */
+#define NXFONT_METRICS_78 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_78 {0x0, 0x90, 0xd0, 0xf0, 0xb0, 0xb0, 0x90, 0x0}
+
+/* O (79) */
+#define NXFONT_METRICS_79 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_79 {0x0, 0x60, 0x90, 0x90, 0x90, 0x90, 0x60, 0x0}
+
+/* P (80) */
+#define NXFONT_METRICS_80 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_80 {0x0, 0xe0, 0x90, 0x90, 0xe0, 0x80, 0x80, 0x0}
+
+/* Q (81) */
+#define NXFONT_METRICS_81 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_81 {0x0, 0x60, 0x90, 0x90, 0xd0, 0xb0, 0x60, 0x10}
+
+/* R (82) */
+#define NXFONT_METRICS_82 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_82 {0x0, 0xe0, 0x90, 0x90, 0xe0, 0x90, 0x90, 0x0}
+
+/* S (83) */
+#define NXFONT_METRICS_83 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_83 {0x0, 0x60, 0x90, 0x40, 0x20, 0x90, 0x60, 0x0}
+
+/* T (84) */
+#define NXFONT_METRICS_84 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_84 {0x0, 0x70, 0x20, 0x20, 0x20, 0x20, 0x20, 0x0}
+
+/* U (85) */
+#define NXFONT_METRICS_85 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_85 {0x0, 0x90, 0x90, 0x90, 0x90, 0x90, 0x60, 0x0}
+
+/* V (86) */
+#define NXFONT_METRICS_86 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_86 {0x0, 0x90, 0x90, 0x90, 0x90, 0x60, 0x60, 0x0}
+
+/* W (87) */
+#define NXFONT_METRICS_87 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_87 {0x0, 0x90, 0x90, 0x90, 0xf0, 0xf0, 0x90, 0x0}
+
+/* X (88) */
+#define NXFONT_METRICS_88 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_88 {0x0, 0x90, 0x90, 0x60, 0x60, 0x90, 0x90, 0x0}
+
+/* Y (89) */
+#define NXFONT_METRICS_89 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_89 {0x0, 0x88, 0x88, 0x50, 0x20, 0x20, 0x20, 0x0}
+
+/* Z (90) */
+#define NXFONT_METRICS_90 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_90 {0x0, 0xf0, 0x10, 0x20, 0x40, 0x80, 0xf0, 0x0}
+
+/* bracketleft (91) */
+#define NXFONT_METRICS_91 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_91 {0x0, 0x70, 0x40, 0x40, 0x40, 0x40, 0x70, 0x0}
+
+/* backslash (92) */
+#define NXFONT_METRICS_92 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_92 {0x0, 0x80, 0x80, 0x40, 0x20, 0x10, 0x10, 0x0}
+
+/* bracketright (93) */
+#define NXFONT_METRICS_93 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_93 {0x0, 0x70, 0x10, 0x10, 0x10, 0x10, 0x70, 0x0}
+
+/* asciicircum (94) */
+#define NXFONT_METRICS_94 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_94 {0x0, 0x20, 0x50, 0x0, 0x0, 0x0, 0x0, 0x0}
+
+/* underscore (95) */
+#define NXFONT_METRICS_95 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_95 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf0}
+
+/* grave (96) */
+#define NXFONT_METRICS_96 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_96 {0x0, 0x40, 0x20, 0x0, 0x0, 0x0, 0x0, 0x0}
+
+/* a (97) */
+#define NXFONT_METRICS_97 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_97 {0x0, 0x0, 0x0, 0x70, 0x90, 0x90, 0x70, 0x0}
+
+/* b (98) */
+#define NXFONT_METRICS_98 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_98 {0x0, 0x80, 0x80, 0xe0, 0x90, 0x90, 0xe0, 0x0}
+
+/* c (99) */
+#define NXFONT_METRICS_99 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_99 {0x0, 0x0, 0x0, 0x30, 0x40, 0x40, 0x30, 0x0}
+
+/* d (100) */
+#define NXFONT_METRICS_100 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_100 {0x0, 0x10, 0x10, 0x70, 0x90, 0x90, 0x70, 0x0}
+
+/* e (101) */
+#define NXFONT_METRICS_101 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_101 {0x0, 0x0, 0x0, 0x60, 0xb0, 0xc0, 0x60, 0x0}
+
+/* f (102) */
+#define NXFONT_METRICS_102 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_102 {0x0, 0x20, 0x50, 0x40, 0xe0, 0x40, 0x40, 0x0}
+
+/* g (103) */
+#define NXFONT_METRICS_103 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_103 {0x0, 0x0, 0x0, 0x60, 0x90, 0x70, 0x10, 0x60}
+
+/* h (104) */
+#define NXFONT_METRICS_104 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_104 {0x0, 0x80, 0x80, 0xe0, 0x90, 0x90, 0x90, 0x0}
+
+/* i (105) */
+#define NXFONT_METRICS_105 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_105 {0x0, 0x20, 0x0, 0x60, 0x20, 0x20, 0x70, 0x0}
+
+/* j (106) */
+#define NXFONT_METRICS_106 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_106 {0x0, 0x10, 0x0, 0x10, 0x10, 0x10, 0x50, 0x20}
+
+/* k (107) */
+#define NXFONT_METRICS_107 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_107 {0x0, 0x80, 0x80, 0x90, 0xe0, 0x90, 0x90, 0x0}
+
+/* l (108) */
+#define NXFONT_METRICS_108 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_108 {0x0, 0x60, 0x20, 0x20, 0x20, 0x20, 0x70, 0x0}
+
+/* m (109) */
+#define NXFONT_METRICS_109 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_109 {0x0, 0x0, 0x0, 0xd0, 0xa8, 0xa8, 0xa8, 0x0}
+
+/* n (110) */
+#define NXFONT_METRICS_110 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_110 {0x0, 0x0, 0x0, 0xe0, 0x90, 0x90, 0x90, 0x0}
+
+/* o (111) */
+#define NXFONT_METRICS_111 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_111 {0x0, 0x0, 0x0, 0x60, 0x90, 0x90, 0x60, 0x0}
+
+/* p (112) */
+#define NXFONT_METRICS_112 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_112 {0x0, 0x0, 0x0, 0xe0, 0x90, 0xe0, 0x80, 0x80}
+
+/* q (113) */
+#define NXFONT_METRICS_113 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_113 {0x0, 0x0, 0x0, 0x70, 0x90, 0x70, 0x10, 0x10}
+
+/* r (114) */
+#define NXFONT_METRICS_114 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_114 {0x0, 0x0, 0x0, 0xa0, 0xd0, 0x80, 0x80, 0x0}
+
+/* s (115) */
+#define NXFONT_METRICS_115 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_115 {0x0, 0x0, 0x0, 0x30, 0x60, 0x10, 0x60, 0x0}
+
+/* t (116) */
+#define NXFONT_METRICS_116 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_116 {0x0, 0x40, 0x40, 0xe0, 0x40, 0x50, 0x20, 0x0}
+
+/* u (117) */
+#define NXFONT_METRICS_117 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_117 {0x0, 0x0, 0x0, 0x90, 0x90, 0x90, 0x70, 0x0}
+
+/* v (118) */
+#define NXFONT_METRICS_118 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_118 {0x0, 0x0, 0x0, 0x50, 0x50, 0x50, 0x20, 0x0}
+
+/* w (119) */
+#define NXFONT_METRICS_119 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_119 {0x0, 0x0, 0x0, 0x88, 0xa8, 0xa8, 0x50, 0x0}
+
+/* x (120) */
+#define NXFONT_METRICS_120 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_120 {0x0, 0x0, 0x0, 0x90, 0x60, 0x60, 0x90, 0x0}
+
+/* y (121) */
+#define NXFONT_METRICS_121 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_121 {0x0, 0x0, 0x0, 0x90, 0x90, 0x70, 0x90, 0x60}
+
+/* z (122) */
+#define NXFONT_METRICS_122 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_122 {0x0, 0x0, 0x0, 0xf0, 0x20, 0x40, 0xf0, 0x0}
+
+/* braceleft (123) */
+#define NXFONT_METRICS_123 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_123 {0x30, 0x40, 0x20, 0xc0, 0x20, 0x40, 0x30, 0x0}
+
+/* bar (124) */
+#define NXFONT_METRICS_124 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_124 {0x0, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x0}
+
+/* braceright (125) */
+#define NXFONT_METRICS_125 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_125 {0xc0, 0x20, 0x40, 0x30, 0x40, 0x20, 0xc0, 0x0}
+
+/* asciitilde (126) */
+#define NXFONT_METRICS_126 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_126 {0x0, 0x50, 0xa0, 0x0, 0x0, 0x0, 0x0, 0x0}
+
+/* exclamdown (161) */
+#define NXFONT_METRICS_161 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_161 {0x0, 0x20, 0x0, 0x20, 0x20, 0x20, 0x20, 0x0}
+
+/* cent (162) */
+#define NXFONT_METRICS_162 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_162 {0x0, 0x0, 0x20, 0x70, 0xa0, 0xa0, 0x70, 0x20}
+
+/* sterling (163) */
+#define NXFONT_METRICS_163 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_163 {0x0, 0x20, 0x50, 0xe0, 0x40, 0x50, 0xa0, 0x0}
+
+/* currency (164) */
+#define NXFONT_METRICS_164 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_164 {0x0, 0x0, 0x88, 0x70, 0x50, 0x70, 0x88, 0x0}
+
+/* yen (165) */
+#define NXFONT_METRICS_165 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_165 {0x0, 0x88, 0x50, 0xf8, 0x20, 0xf8, 0x20, 0x0}
+
+/* brokenbar (166) */
+#define NXFONT_METRICS_166 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_166 {0x20, 0x20, 0x20, 0x0, 0x20, 0x20, 0x20, 0x0}
+
+/* section (167) */
+#define NXFONT_METRICS_167 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_167 {0x70, 0x80, 0xe0, 0x90, 0x70, 0x10, 0xe0, 0x0}
+
+/* dieresis (168) */
+#define NXFONT_METRICS_168 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_168 {0x0, 0x50, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}
+
+/* copyright (169) */
+#define NXFONT_METRICS_169 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_169 {0x0, 0x70, 0xa8, 0xc8, 0xc8, 0xa8, 0x70, 0x0}
+
+/* ordfeminine (170) */
+#define NXFONT_METRICS_170 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_170 {0x30, 0x50, 0x30, 0x0, 0x70, 0x0, 0x0, 0x0}
+
+/* guillemotleft (171) */
+#define NXFONT_METRICS_171 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_171 {0x0, 0x0, 0x0, 0x50, 0xa0, 0x50, 0x0, 0x0}
+
+/* logicalnot (172) */
+#define NXFONT_METRICS_172 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_172 {0x0, 0x0, 0x0, 0x0, 0x70, 0x10, 0x10, 0x0}
+
+/* hyphen (173) */
+#define NXFONT_METRICS_173 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_173 {0x0, 0x0, 0x0, 0x0, 0x70, 0x0, 0x0, 0x0}
+
+/* registered (174) */
+#define NXFONT_METRICS_174 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_174 {0x0, 0x70, 0xe8, 0xd8, 0xe8, 0xd8, 0x70, 0x0}
+
+/* macron (175) */
+#define NXFONT_METRICS_175 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_175 {0x0, 0x70, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}
+
+/* degree (176) */
+#define NXFONT_METRICS_176 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_176 {0x0, 0x20, 0x50, 0x20, 0x0, 0x0, 0x0, 0x0}
+
+/* plusminus (177) */
+#define NXFONT_METRICS_177 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_177 {0x0, 0x0, 0x20, 0x70, 0x20, 0x0, 0x70, 0x0}
+
+/* twosuperior (178) */
+#define NXFONT_METRICS_178 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_178 {0x20, 0x50, 0x10, 0x20, 0x70, 0x0, 0x0, 0x0}
+
+/* threesuperior (179) */
+#define NXFONT_METRICS_179 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_179 {0x60, 0x10, 0x60, 0x10, 0x60, 0x0, 0x0, 0x0}
+
+/* acute (180) */
+#define NXFONT_METRICS_180 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_180 {0x0, 0x20, 0x40, 0x0, 0x0, 0x0, 0x0, 0x0}
+
+/* mu (181) */
+#define NXFONT_METRICS_181 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_181 {0x0, 0x0, 0x0, 0x90, 0x90, 0x90, 0xe0, 0x80}
+
+/* paragraph (182) */
+#define NXFONT_METRICS_182 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_182 {0x0, 0x78, 0xe8, 0xe8, 0x68, 0x28, 0x28, 0x0}
+
+/* periodcentered (183) */
+#define NXFONT_METRICS_183 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_183 {0x0, 0x0, 0x0, 0x0, 0x20, 0x0, 0x0, 0x0}
+
+/* cedilla (184) */
+#define NXFONT_METRICS_184 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_184 {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x20, 0x40}
+
+/* onesuperior (185) */
+#define NXFONT_METRICS_185 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_185 {0x20, 0x60, 0x20, 0x20, 0x70, 0x0, 0x0, 0x0}
+
+/* ordmasculine (186) */
+#define NXFONT_METRICS_186 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_186 {0x20, 0x50, 0x20, 0x0, 0x70, 0x0, 0x0, 0x0}
+
+/* guillemotright (187) */
+#define NXFONT_METRICS_187 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_187 {0x0, 0x0, 0x0, 0xa0, 0x50, 0xa0, 0x0, 0x0}
+
+/* onequarter (188) */
+#define NXFONT_METRICS_188 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_188 {0x80, 0x80, 0x80, 0xa0, 0x60, 0xf0, 0x20, 0x0}
+
+/* onehalf (189) */
+#define NXFONT_METRICS_189 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_189 {0x80, 0x80, 0xa0, 0xd0, 0x10, 0x20, 0x70, 0x0}
+
+/* threequarters (190) */
+#define NXFONT_METRICS_190 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_190 {0x80, 0x40, 0x80, 0x60, 0xa0, 0xf0, 0x20, 0x0}
+
+/* questiondown (191) */
+#define NXFONT_METRICS_191 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_191 {0x0, 0x20, 0x0, 0x20, 0x40, 0x50, 0x20, 0x0}
+
+/* Agrave (192) */
+#define NXFONT_METRICS_192 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_192 {0x40, 0x20, 0x60, 0x90, 0xf0, 0x90, 0x90, 0x0}
+
+/* Aacute (193) */
+#define NXFONT_METRICS_193 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_193 {0x20, 0x40, 0x60, 0x90, 0xf0, 0x90, 0x90, 0x0}
+
+/* Acircumflex (194) */
+#define NXFONT_METRICS_194 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_194 {0x60, 0x90, 0x60, 0x90, 0xf0, 0x90, 0x90, 0x0}
+
+/* Atilde (195) */
+#define NXFONT_METRICS_195 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_195 {0x50, 0xa0, 0x60, 0x90, 0xf0, 0x90, 0x90, 0x0}
+
+/* Adieresis (196) */
+#define NXFONT_METRICS_196 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_196 {0x90, 0x0, 0x60, 0x90, 0xf0, 0x90, 0x90, 0x0}
+
+/* Aring (197) */
+#define NXFONT_METRICS_197 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_197 {0x60, 0x90, 0x60, 0x90, 0xf0, 0x90, 0x90, 0x0}
+
+/* AE (198) */
+#define NXFONT_METRICS_198 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_198 {0x0, 0x70, 0xa0, 0xa0, 0xf0, 0xa0, 0xb0, 0x0}
+
+/* Ccedilla (199) */
+#define NXFONT_METRICS_199 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_199 {0x0, 0x60, 0x90, 0x80, 0x80, 0x90, 0x60, 0x40}
+
+/* Egrave (200) */
+#define NXFONT_METRICS_200 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_200 {0x40, 0x20, 0xf0, 0x80, 0xe0, 0x80, 0xf0, 0x0}
+
+/* Eacute (201) */
+#define NXFONT_METRICS_201 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_201 {0x20, 0x40, 0xf0, 0x80, 0xe0, 0x80, 0xf0, 0x0}
+
+/* Ecircumflex (202) */
+#define NXFONT_METRICS_202 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_202 {0x60, 0x90, 0xf0, 0x80, 0xe0, 0x80, 0xf0, 0x0}
+
+/* Edieresis (203) */
+#define NXFONT_METRICS_203 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_203 {0x90, 0x0, 0xf0, 0x80, 0xe0, 0x80, 0xf0, 0x0}
+
+/* Igrave (204) */
+#define NXFONT_METRICS_204 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_204 {0x40, 0x20, 0x70, 0x20, 0x20, 0x20, 0x70, 0x0}
+
+/* Iacute (205) */
+#define NXFONT_METRICS_205 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_205 {0x10, 0x20, 0x70, 0x20, 0x20, 0x20, 0x70, 0x0}
+
+/* Icircumflex (206) */
+#define NXFONT_METRICS_206 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_206 {0x20, 0x50, 0x70, 0x20, 0x20, 0x20, 0x70, 0x0}
+
+/* Idieresis (207) */
+#define NXFONT_METRICS_207 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_207 {0x50, 0x0, 0x70, 0x20, 0x20, 0x20, 0x70, 0x0}
+
+/* Eth (208) */
+#define NXFONT_METRICS_208 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_208 {0x0, 0x70, 0x48, 0xe8, 0x48, 0x48, 0x70, 0x0}
+
+/* Ntilde (209) */
+#define NXFONT_METRICS_209 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_209 {0x50, 0xa0, 0x90, 0xd0, 0xb0, 0x90, 0x90, 0x0}
+
+/* Ograve (210) */
+#define NXFONT_METRICS_210 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_210 {0x40, 0x20, 0x60, 0x90, 0x90, 0x90, 0x60, 0x0}
+
+/* Oacute (211) */
+#define NXFONT_METRICS_211 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_211 {0x20, 0x40, 0x60, 0x90, 0x90, 0x90, 0x60, 0x0}
+
+/* Ocircumflex (212) */
+#define NXFONT_METRICS_212 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_212 {0x60, 0x90, 0x60, 0x90, 0x90, 0x90, 0x60, 0x0}
+
+/* Otilde (213) */
+#define NXFONT_METRICS_213 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_213 {0x50, 0xa0, 0x60, 0x90, 0x90, 0x90, 0x60, 0x0}
+
+/* Odieresis (214) */
+#define NXFONT_METRICS_214 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_214 {0x90, 0x0, 0x60, 0x90, 0x90, 0x90, 0x60, 0x0}
+
+/* multiply (215) */
+#define NXFONT_METRICS_215 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_215 {0x0, 0x0, 0x0, 0x0, 0x50, 0x20, 0x50, 0x0}
+
+/* Oslash (216) */
+#define NXFONT_METRICS_216 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_216 {0x0, 0x70, 0xb0, 0xb0, 0xd0, 0xd0, 0xe0, 0x0}
+
+/* Ugrave (217) */
+#define NXFONT_METRICS_217 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_217 {0x40, 0x20, 0x90, 0x90, 0x90, 0x90, 0x60, 0x0}
+
+/* Uacute (218) */
+#define NXFONT_METRICS_218 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_218 {0x20, 0x40, 0x90, 0x90, 0x90, 0x90, 0x60, 0x0}
+
+/* Ucircumflex (219) */
+#define NXFONT_METRICS_219 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_219 {0x60, 0x90, 0x90, 0x90, 0x90, 0x90, 0x60, 0x0}
+
+/* Udieresis (220) */
+#define NXFONT_METRICS_220 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_220 {0x90, 0x0, 0x90, 0x90, 0x90, 0x90, 0x60, 0x0}
+
+/* Yacute (221) */
+#define NXFONT_METRICS_221 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_221 {0x10, 0x20, 0x88, 0x50, 0x20, 0x20, 0x20, 0x0}
+
+/* Thorn (222) */
+#define NXFONT_METRICS_222 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_222 {0x0, 0x80, 0xe0, 0x90, 0x90, 0xe0, 0x80, 0x0}
+
+/* germandbls (223) */
+#define NXFONT_METRICS_223 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_223 {0x0, 0x60, 0x90, 0xa0, 0xa0, 0x90, 0xa0, 0x0}
+
+/* agrave (224) */
+#define NXFONT_METRICS_224 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_224 {0x40, 0x20, 0x0, 0x70, 0x90, 0x90, 0x70, 0x0}
+
+/* aacute (225) */
+#define NXFONT_METRICS_225 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_225 {0x20, 0x40, 0x0, 0x70, 0x90, 0x90, 0x70, 0x0}
+
+/* acircumflex (226) */
+#define NXFONT_METRICS_226 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_226 {0x20, 0x50, 0x0, 0x70, 0x90, 0x90, 0x70, 0x0}
+
+/* atilde (227) */
+#define NXFONT_METRICS_227 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_227 {0x50, 0xa0, 0x0, 0x70, 0x90, 0x90, 0x70, 0x0}
+
+/* adieresis (228) */
+#define NXFONT_METRICS_228 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_228 {0x0, 0x50, 0x0, 0x70, 0x90, 0x90, 0x70, 0x0}
+
+/* aring (229) */
+#define NXFONT_METRICS_229 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_229 {0x60, 0x90, 0x60, 0x70, 0x90, 0x90, 0x70, 0x0}
+
+/* ae (230) */
+#define NXFONT_METRICS_230 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_230 {0x0, 0x0, 0x0, 0xf0, 0x68, 0xb0, 0x78, 0x0}
+
+/* ccedilla (231) */
+#define NXFONT_METRICS_231 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_231 {0x0, 0x0, 0x0, 0x30, 0x40, 0x40, 0x30, 0x20}
+
+/* egrave (232) */
+#define NXFONT_METRICS_232 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_232 {0x40, 0x20, 0x0, 0x60, 0xb0, 0xc0, 0x60, 0x0}
+
+/* eacute (233) */
+#define NXFONT_METRICS_233 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_233 {0x20, 0x40, 0x0, 0x60, 0xb0, 0xc0, 0x60, 0x0}
+
+/* ecircumflex (234) */
+#define NXFONT_METRICS_234 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_234 {0x60, 0x90, 0x0, 0x60, 0xb0, 0xc0, 0x60, 0x0}
+
+/* edieresis (235) */
+#define NXFONT_METRICS_235 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_235 {0x0, 0x50, 0x0, 0x60, 0xb0, 0xc0, 0x60, 0x0}
+
+/* igrave (236) */
+#define NXFONT_METRICS_236 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_236 {0x40, 0x20, 0x0, 0x60, 0x20, 0x20, 0x70, 0x0}
+
+/* iacute (237) */
+#define NXFONT_METRICS_237 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_237 {0x10, 0x20, 0x0, 0x60, 0x20, 0x20, 0x70, 0x0}
+
+/* icircumflex (238) */
+#define NXFONT_METRICS_238 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_238 {0x20, 0x50, 0x0, 0x60, 0x20, 0x20, 0x70, 0x0}
+
+/* idieresis (239) */
+#define NXFONT_METRICS_239 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_239 {0x0, 0x50, 0x0, 0x60, 0x20, 0x20, 0x70, 0x0}
+
+/* eth (240) */
+#define NXFONT_METRICS_240 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_240 {0xa0, 0x40, 0xa0, 0x10, 0x70, 0x90, 0x60, 0x0}
+
+/* ntilde (241) */
+#define NXFONT_METRICS_241 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_241 {0x50, 0xa0, 0x0, 0xe0, 0x90, 0x90, 0x90, 0x0}
+
+/* ograve (242) */
+#define NXFONT_METRICS_242 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_242 {0x40, 0x20, 0x0, 0x60, 0x90, 0x90, 0x60, 0x0}
+
+/* oacute (243) */
+#define NXFONT_METRICS_243 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_243 {0x20, 0x40, 0x0, 0x60, 0x90, 0x90, 0x60, 0x0}
+
+/* ocircumflex (244) */
+#define NXFONT_METRICS_244 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_244 {0x60, 0x90, 0x0, 0x60, 0x90, 0x90, 0x60, 0x0}
+
+/* otilde (245) */
+#define NXFONT_METRICS_245 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_245 {0x50, 0xa0, 0x0, 0x60, 0x90, 0x90, 0x60, 0x0}
+
+/* odieresis (246) */
+#define NXFONT_METRICS_246 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_246 {0x0, 0x90, 0x0, 0x60, 0x90, 0x90, 0x60, 0x0}
+
+/* divide (247) */
+#define NXFONT_METRICS_247 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_247 {0x0, 0x0, 0x20, 0x0, 0x70, 0x0, 0x20, 0x0}
+
+/* oslash (248) */
+#define NXFONT_METRICS_248 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_248 {0x0, 0x0, 0x0, 0x70, 0xb0, 0xd0, 0xe0, 0x0}
+
+/* ugrave (249) */
+#define NXFONT_METRICS_249 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_249 {0x40, 0x20, 0x0, 0x90, 0x90, 0x90, 0x70, 0x0}
+
+/* uacute (250) */
+#define NXFONT_METRICS_250 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_250 {0x20, 0x40, 0x0, 0x90, 0x90, 0x90, 0x70, 0x0}
+
+/* ucircumflex (251) */
+#define NXFONT_METRICS_251 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_251 {0x60, 0x90, 0x0, 0x90, 0x90, 0x90, 0x70, 0x0}
+
+/* udieresis (252) */
+#define NXFONT_METRICS_252 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_252 {0x0, 0x90, 0x0, 0x90, 0x90, 0x90, 0x70, 0x0}
+
+/* yacute (253) */
+#define NXFONT_METRICS_253 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_253 {0x20, 0x40, 0x0, 0x90, 0x90, 0x70, 0x90, 0x60}
+
+/* thorn (254) */
+#define NXFONT_METRICS_254 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_254 {0x0, 0x80, 0x80, 0xe0, 0x90, 0xe0, 0x80, 0x80}
+
+/* ydieresis (255) */
+#define NXFONT_METRICS_255 {1, 5, 8, 0, 0, 0}
+#define NXFONT_BITMAP_255 {0x0, 0x90, 0x0, 0x90, 0x90, 0x70, 0x90, 0x60}
+
+#endif
diff --git a/nuttx/include/nuttx/nx/nxfonts.h b/nuttx/include/nuttx/nx/nxfonts.h
index f1aecb9e5a..8e7289b2a6 100644
--- a/nuttx/include/nuttx/nx/nxfonts.h
+++ b/nuttx/include/nuttx/nx/nxfonts.h
@@ -125,6 +125,12 @@ enum nx_fontid_e
{
FONTID_DEFAULT = 0 /* The default font */
+/* Monospace fonts */
+
+#ifdef CONFIG_NXFONT_MONO5X8
+ , FONTID_MONO5X8 = 18 /* The 5x8 monospace font */
+#endif
+
/* Sans Serif fonts */
#ifdef CONFIG_NXFONT_SANS17X22
diff --git a/nuttx/include/pthread.h b/nuttx/include/pthread.h
index 5a08f13b61..5066275b41 100644
--- a/nuttx/include/pthread.h
+++ b/nuttx/include/pthread.h
@@ -41,15 +41,15 @@
********************************************************************************/
#include /* Default settings */
-#include /* Compiler settings */
+#include /* Compiler settings, noreturn_function */
#include /* Needed for general types */
#include /* C99 fixed width integer types */
#include /* C99 boolean types */
+#include /* For getpid */
#include /* Needed for sem_t */
#include /* Needed for sigset_t */
#include /* Needed for struct timespec */
-#include /* For noreturn_function */
/********************************************************************************
* Compilation Switches
diff --git a/nuttx/include/stdbool.h b/nuttx/include/stdbool.h
index 9c16aee293..6c33025493 100644
--- a/nuttx/include/stdbool.h
+++ b/nuttx/include/stdbool.h
@@ -90,8 +90,8 @@
# define bool _Bool8
#endif
-#define true 1
-#define false 0
+#define true (bool)1
+#define false (bool)0
#define __bool_true_false_are_defined 1
diff --git a/nuttx/tools/bdf-converter.c b/nuttx/tools/bdf-converter.c
index b32209fcf6..a03faa93e7 100644
--- a/nuttx/tools/bdf-converter.c
+++ b/nuttx/tools/bdf-converter.c
@@ -43,6 +43,7 @@
* Included Files
****************************************************************************/
+#include
#include
#include
#include
From 247ad37c4bd0c27e3cf358df30fa29517f033260 Mon Sep 17 00:00:00 2001
From: patacongo
Date: Fri, 21 Dec 2012 21:30:33 +0000
Subject: [PATCH 002/118] configs/sim/nxwm now uses kconfig-frontends
git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5449 42af7a65-404d-4744-a932-0658087f49c3
---
nuttx/ChangeLog | 7 +-
nuttx/arch/sim/Kconfig | 2 +-
nuttx/configs/sim/README.txt | 81 +--
nuttx/configs/sim/nxwm/appconfig | 40 --
nuttx/configs/sim/nxwm/defconfig | 860 +++++++++++++++++++++----------
nuttx/include/pthread.h | 148 +++---
6 files changed, 707 insertions(+), 431 deletions(-)
delete mode 100644 nuttx/configs/sim/nxwm/appconfig
diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog
index c4a06af5e9..04f180a8b1 100644
--- a/nuttx/ChangeLog
+++ b/nuttx/ChangeLog
@@ -3805,6 +3805,9 @@
* graphics/: Adds 5x8 monospace font. This tiny font is useful for graph
labels and for small bitmapped display. Contributed by Petteri
Aimonen.
- * configs/stm3220g-eval/nxwm: Converted to use the kconfig-fronteds
+ * configs/stm3220g-eval/nxwm: Converted to use the kconfig-frontends
configuration tool.
-
+ * configs/sim/nxwm: Converted to use the kconfig-frontends configuration
+ tool.
+ * include/pthread.h: In sys/prctl.h because it is needed by
+ pthread_[set|get]name_np()
diff --git a/nuttx/arch/sim/Kconfig b/nuttx/arch/sim/Kconfig
index 331f61c79e..dc3a85b549 100644
--- a/nuttx/arch/sim/Kconfig
+++ b/nuttx/arch/sim/Kconfig
@@ -50,7 +50,7 @@ config SIM_FRAMEBUFFER
config SIM_X11FB
bool "Use X11 window"
default n
- depends on NX && FB_CMAP
+ depends on NX
---help---
Use an X11 graphics window to simulate the graphics device"
diff --git a/nuttx/configs/sim/README.txt b/nuttx/configs/sim/README.txt
index 032bb39b87..f1dfd0dd22 100644
--- a/nuttx/configs/sim/README.txt
+++ b/nuttx/configs/sim/README.txt
@@ -461,46 +461,57 @@ nxwm
nuttx-code/NxWidgets/UnitTests/READEM.txt
- NOTE: There is an issue with running this example under the
- simulation. In the default configuration, this example will
- run the NxConsole example which waits on readline() for console
- intput. When it calls readline(), the whole system blocks
- waiting from input from the host OS. So, in order to get
- this example to run, you must comment out the readline call in
- apps/nshlib/nsh_consolemain.c like:
+ NOTES
+ -----
+ 1. This configuration uses the mconf-based configuration tool. To
+ change this configuration using that tool, you should:
- Index: nsh_consolemain.c
- ===================================================================
- --- nsh_consolemain.c (revision 4681)
- +++ nsh_consolemain.c (working copy)
- @@ -117,7 +117,8 @@
- /* Execute the startup script */
+ a. Build and install the mconf tool. See nuttx/README.txt and
+ misc/tools/
+
+ b. Execute 'make menuconfig' in nuttx/ in order to start the
+ reconfiguration process.
+
+ 2. There is an issue with running this example under the
+ simulation. In the default configuration, this example will
+ run the NxConsole example which waits on readline() for console
+ input. When it calls readline(), the whole system blocks
+ waiting from input from the host OS. So, in order to get
+ this example to run, you must comment out the readline call in
+ apps/nshlib/nsh_consolemain.c like:
+
+ Index: nsh_consolemain.c
+ ===================================================================
+ --- nsh_consolemain.c (revision 4681)
+ +++ nsh_consolemain.c (working copy)
+ @@ -117,7 +117,8 @@
+ /* Execute the startup script */
- #ifdef CONFIG_NSH_ROMFSETC
- - (void)nsh_script(&pstate->cn_vtbl, "init", NSH_INITPATH);
- +// REMOVE ME
- +// (void)nsh_script(&pstate->cn_vtbl, "init", NSH_INITPATH);
- #endif
+ #ifdef CONFIG_NSH_ROMFSETC
+ - (void)nsh_script(&pstate->cn_vtbl, "init", NSH_INITPATH);
+ +// REMOVE ME
+ +// (void)nsh_script(&pstate->cn_vtbl, "init", NSH_INITPATH);
+ #endif
- /* Then enter the command line parsing loop */
- @@ -130,7 +131,8 @@
- fflush(pstate->cn_outstream);
+ /* Then enter the command line parsing loop */
+ @@ -130,7 +131,8 @@
+ fflush(pstate->cn_outstream);
- /* Get the next line of input */
- -
- +sleep(2); // REMOVE ME
- +#if 0 // REMOVE ME
- ret = readline(pstate->cn_line, CONFIG_NSH_LINELEN,
- INSTREAM(pstate), OUTSTREAM(pstate));
- if (ret > 0)
- @@ -153,6 +155,7 @@
- "readline", NSH_ERRNO_OF(-ret));
- nsh_exit(&pstate->cn_vtbl, 1);
- }
- +#endif // REMOVE ME
- }
+ /* Get the next line of input */
+ -
+ +sleep(2); // REMOVE ME
+ +#if 0 // REMOVE ME
+ ret = readline(pstate->cn_line, CONFIG_NSH_LINELEN,
+ INSTREAM(pstate), OUTSTREAM(pstate));
+ if (ret > 0)
+ @@ -153,6 +155,7 @@
+ "readline", NSH_ERRNO_OF(-ret));
+ nsh_exit(&pstate->cn_vtbl, 1);
+ }
+ +#endif // REMOVE ME
+ }
- /* Clean up */
+ /* Clean up */
ostest
diff --git a/nuttx/configs/sim/nxwm/appconfig b/nuttx/configs/sim/nxwm/appconfig
deleted file mode 100644
index 47c290dfeb..0000000000
--- a/nuttx/configs/sim/nxwm/appconfig
+++ /dev/null
@@ -1,40 +0,0 @@
-############################################################################
-# configs/sim/nxwm/appconfig
-#
-# Copyright (C) 2012 Gregory Nutt. All rights reserved.
-# Author: Gregory Nutt
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in
-# the documentation and/or other materials provided with the
-# distribution.
-# 3. Neither the name NuttX nor the names of its contributors may be
-# used to endorse or promote products derived from this software
-# without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-#
-############################################################################
-
-# The NSH Library
-
-CONFIGURED_APPS += system/readline
-CONFIGURED_APPS += nshlib
-
diff --git a/nuttx/configs/sim/nxwm/defconfig b/nuttx/configs/sim/nxwm/defconfig
index 161322da8c..6a295ef4f2 100644
--- a/nuttx/configs/sim/nxwm/defconfig
+++ b/nuttx/configs/sim/nxwm/defconfig
@@ -1,159 +1,150 @@
-############################################################################
-# sim/nxwm/defconfig
#
-# Copyright (C) 2012 Gregory Nutt. All rights reserved.
-# Author: Gregory Nutt
+# Automatically generated file; DO NOT EDIT.
+# Nuttx/ Configuration
#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
+CONFIG_NUTTX_NEWCONFIG=y
+
#
-# 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.
+# Build Setup
#
-# 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.
+# 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
#
-# Architecture selection
+# CONFIG_APPS_DIR="../apps"
+# CONFIG_BUILD_2PASS is not set
+
#
-CONFIG_ARCH="sim"
+# Binary Output Formats
+#
+# CONFIG_RRLOAD_BINARY is not set
+# CONFIG_INTELHEX_BINARY is not set
+# CONFIG_MOTOROLA_SREC is not set
+# CONFIG_RAW_BINARY is not set
+
+#
+# Customize Header Files
+#
+# CONFIG_ARCH_STDBOOL_H is not set
+# CONFIG_ARCH_MATH_H is not set
+# CONFIG_ARCH_FLOAT_H is not set
+# CONFIG_ARCH_STDARG_H is not set
+
+#
+# Debug Options
+#
+# CONFIG_DEBUG is not set
+CONFIG_DEBUG_SYMBOLS=y
+
+#
+# System Type
+#
+# CONFIG_ARCH_8051 is not set
+# CONFIG_ARCH_ARM is not set
+# CONFIG_ARCH_AVR is not set
+# CONFIG_ARCH_HC is not set
+# CONFIG_ARCH_MIPS is not set
+# CONFIG_ARCH_RGMP is not set
+# CONFIG_ARCH_SH is not set
CONFIG_ARCH_SIM=y
-CONFIG_ARCH_BOARD="sim"
-CONFIG_ARCH_BOARD_SIM=y
+# CONFIG_ARCH_X86 is not set
+# CONFIG_ARCH_Z16 is not set
+# CONFIG_ARCH_Z80 is not set
+CONFIG_ARCH="sim"
+CONFIG_BOARD_LOOPSPERMSEC=
#
-# Framebuffer driver options
-#
-CONFIG_FB_CMAP=n
-CONFIG_FB_HWCURSOR=n
-CONFIG_FB_HWCURSORIMAGE=n
-#CONFIG_FB_HWCURSORSIZE
-#CONFIG_FB_TRANSPARENCY
-
-#
-# Simulated framebuffer configuration
+# Simulation Configuration Options
#
+# CONFIG_SIM_M32 is not set
+# CONFIG_SIM_WALLTIME is not set
+CONFIG_SIM_FRAMEBUFFER=y
CONFIG_SIM_X11FB=y
-CONFIG_SIM_FBWIDTH=480
+# CONFIG_SIM_X11NOSHM is not set
CONFIG_SIM_FBHEIGHT=240
+CONFIG_SIM_FBWIDTH=480
CONFIG_SIM_FBBPP=32
#
-# Simulated touchscreen configuration
-# (Set both of the following to 'y' to enable)
+# Architecture Options
#
-CONFIG_INPUT=n
-CONFIG_SIM_TOUCHSCREEN=n
+# CONFIG_ARCH_NOINTC is not set
+# CONFIG_ARCH_DMA is not set
+# CONFIG_ARCH_IRQPRIO is not set
+# CONFIG_CUSTOM_STACK is not set
+# CONFIG_ADDRENV is not set
+# CONFIG_ARCH_STACKDUMP is not set
+# CONFIG_ENDIAN_BIG is not set
#
-# General OS setup
+# Board Settings
#
-CONFIG_USER_ENTRYPOINT="nxwm_main"
-CONFIG_DEBUG=n
-CONFIG_DEBUG_VERBOSE=n
-CONFIG_DEBUG_SYMBOLS=y
-CONFIG_DEBUG_GRAPHICS=n
-CONFIG_HAVE_CXX=y
-CONFIG_HAVE_CXXINITIALIZE=n
-CONFIG_MM_REGIONS=1
-CONFIG_ARCH_LOWPUTC=y
+CONFIG_DRAM_START=
+CONFIG_DRAM_SIZE=
+
+#
+# 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_SIM=y
+# CONFIG_ARCH_BOARD_CUSTOM is not set
+CONFIG_ARCH_BOARD="sim"
+
+#
+# Common Board Options
+#
+CONFIG_NSH_MMCSDMINOR=0
+
+#
+# Board-Specific Options
+#
+
+#
+# RTOS Features
+#
+CONFIG_MSEC_PER_TICK=10
CONFIG_RR_INTERVAL=0
-CONFIG_SCHED_INSTRUMENTATION=n
+# CONFIG_SCHED_INSTRUMENTATION is not set
CONFIG_TASK_NAME_SIZE=32
+# CONFIG_JULIAN_TIME is not set
CONFIG_START_YEAR=2012
CONFIG_START_MONTH=5
CONFIG_START_DAY=1
-CONFIG_JULIAN_TIME=n
CONFIG_DEV_CONSOLE=y
-CONFIG_DEV_LOWCONSOLE=n
-CONFIG_MUTEX_TYPES=n
-CONFIG_PRIORITY_INHERITANCE=n
-CONFIG_SEM_PREALLOCHOLDERS=0
-CONFIG_SEM_NNESTPRIO=0
-CONFIG_FDCLONE_DISABLE=n
-CONFIG_FDCLONE_STDIO=n
+# CONFIG_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_SIG_SIGWORK=4
-CONFIG_SCHED_WORKQUEUE=n
-CONFIG_SCHED_WORKPRIORITY=192
-CONFIG_SCHED_WORKPERIOD=50000
-CONFIG_SCHED_WORKSTACKSIZE=8192
+# CONFIG_SCHED_WORKQUEUE is not set
CONFIG_SCHED_WAITPID=y
-CONFIG_SCHED_ATEXIT=n
+# CONFIG_SCHED_ATEXIT is not set
CONFIG_SCHED_ONEXIT=y
-
-#
-# The following can be used to disable categories of
-# APIs supported by the OS. If the compiler supports
-# weak functions, then it should not be necessary to
-# disable functions unless you want to restrict usage
-# of those APIs.
-#
-# There are certain dependency relationships in these
-# features.
-#
-# o mq_notify logic depends on signals to awaken tasks
-# waiting for queues to become full or empty.
-# o pthread_condtimedwait() depends on signals to wake
-# up waiting tasks.
-#
-CONFIG_DISABLE_CLOCK=n
+CONFIG_SCHED_ONEXIT_MAX=1
+CONFIG_USER_ENTRYPOINT="nxwm_main"
+CONFIG_DISABLE_OS_API=y
+# CONFIG_DISABLE_CLOCK is not set
CONFIG_DISABLE_POSIX_TIMERS=y
-CONFIG_DISABLE_PTHREAD=n
-CONFIG_DISABLE_SIGNALS=n
-CONFIG_DISABLE_MQUEUE=n
-CONFIG_DISABLE_MOUNTPOINT=n
-CONFIG_DISABLE_ENVIRON=n
+# CONFIG_DISABLE_PTHREAD is not set
+# CONFIG_DISABLE_SIGNALS is not set
+# CONFIG_DISABLE_MQUEUE is not set
+# CONFIG_DISABLE_MOUNTPOINT is not set
+# CONFIG_DISABLE_ENVIRON is not set
CONFIG_DISABLE_POLL=y
-#
-# Misc libc settings
-#
-CONFIG_NOPRINTF_FIELDWIDTH=n
-
-#
-# Allow for architecture optimized implementations
-#
-# The architecture can provide optimized versions of the
-# following to improve sysem performance
-#
-CONFIG_ARCH_MEMCPY=n
-CONFIG_ARCH_MEMCMP=n
-CONFIG_ARCH_MEMMOVE=n
-CONFIG_ARCH_MEMSET=n
-CONFIG_ARCH_STRCMP=n
-CONFIG_ARCH_STRCPY=n
-CONFIG_ARCH_STRNCPY=n
-CONFIG_ARCH_STRLEN=n
-CONFIG_ARCH_STRNLEN=n
-CONFIG_ARCH_BZERO=n
-
-#
-# General build options
-#
-CONFIG_RRLOAD_BINARY=n
-CONFIG_INTELHEX_BINARY=n
-CONFIG_RAW_BINARY=n
-
#
# Sizes of configurable things (0 disables)
#
@@ -163,9 +154,6 @@ CONFIG_NPTHREAD_KEYS=4
CONFIG_NFILE_DESCRIPTORS=16
CONFIG_NFILE_STREAMS=16
CONFIG_NAME_MAX=32
-CONFIG_STDIO_BUFFER_SIZE=256
-CONFIG_STDIO_LINEBUFFER=y
-CONFIG_NUNGET_CHARS=2
CONFIG_PREALLOC_MQ_MSGS=32
CONFIG_MQ_MAXMSGSIZE=48
CONFIG_MAX_WDOGPARMS=4
@@ -173,156 +161,371 @@ CONFIG_PREALLOC_WDOGS=32
CONFIG_PREALLOC_TIMERS=8
#
-# Filesystem configuration
+# Stack and heap information
+#
+CONFIG_IDLETHREAD_STACKSIZE=8192
+CONFIG_USERMAIN_STACKSIZE=8192
+CONFIG_PTHREAD_STACK_MIN=256
+CONFIG_PTHREAD_STACK_DEFAULT=8192
+
+#
+# Device Drivers
+#
+CONFIG_DEV_NULL=y
+# CONFIG_DEV_ZERO is not set
+# CONFIG_LOOP is not set
+# CONFIG_RAMDISK is not set
+# CONFIG_CAN is not set
+# CONFIG_PWM is not set
+# CONFIG_I2C is not set
+# CONFIG_SPI is not set
+# CONFIG_RTC is not set
+# CONFIG_WATCHDOG is not set
+# CONFIG_ANALOG is not set
+# CONFIG_BCH is not set
+# CONFIG_INPUT is not set
+# CONFIG_LCD is not set
+# CONFIG_MMCSD is not set
+# CONFIG_MTD is not set
+# CONFIG_PIPES is not set
+# CONFIG_PM is not set
+# CONFIG_POWER is not set
+# CONFIG_SENSORS is not set
+# CONFIG_SERCOMM_CONSOLE is not set
+CONFIG_SERIAL=y
+# CONFIG_DEV_LOWCONSOLE is not set
+# CONFIG_16550_UART is not set
+# CONFIG_STANDARD_SERIAL 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_FS_FAT=y
CONFIG_FAT_LCNAMES=y
CONFIG_FAT_LFN=y
CONFIG_FAT_MAXFNAME=32
-CONFIG_FS_NXFFS=n
+# CONFIG_FS_FATTIME is not set
+# CONFIG_FAT_DMAMEMORY is not set
+# CONFIG_FS_RAMMAP is not set
+# CONFIG_FS_NXFFS is not set
CONFIG_FS_ROMFS=y
#
-# TCP/IP and UDP support via uIP
+# System Logging
#
-CONFIG_NET=n
-CONFIG_NET_IPv6=n
-CONFIG_NSOCKET_DESCRIPTORS=0
-CONFIG_NET_SOCKOPTS=y
-CONFIG_NET_BUFSIZE=420
-CONFIG_NET_TCP=n
-CONFIG_NET_TCP_CONNS=40
-CONFIG_NET_MAX_LISTENPORTS=40
-CONFIG_NET_UDP=n
-CONFIG_NET_UDP_CHECKSUMS=y
-#CONFIG_NET_UDP_CONNS=10
-CONFIG_NET_ICMP=n
-CONFIG_NET_ICMP_PING=n
-#CONFIG_NET_PINGADDRCONF=0
-CONFIG_NET_STATISTICS=y
-#CONFIG_NET_RECEIVE_WINDOW=
-#CONFIG_NET_ARPTAB_SIZE=8
-CONFIG_NET_BROADCAST=n
+# CONFIG_SYSLOG is not set
#
-# UIP Network Utilities
-#
-CONFIG_NET_DHCP_LIGHT=n
-CONFIG_NET_RESOLV_ENTRIES=4
-
-#
-# Graphics related configuration settings
+# Graphics Support
#
CONFIG_NX=y
-CONFIG_NX_MULTIUSER=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=y
CONFIG_NX_DISABLE_24BPP=y
-CONFIG_NX_DISABLE_32BPP=n
-CONFIG_NX_PACKEDMSFIRST=n
+# CONFIG_NX_DISABLE_32BPP is not set
+# CONFIG_NX_PACKEDMSFIRST is not set
+
+#
+# Input Devices
+#
CONFIG_NX_MOUSE=y
CONFIG_NX_KBD=y
-#CONFIG_NXTK_BORDERWIDTH=4
+
+#
+# Framed Window Borders
+#
+CONFIG_NXTK_BORDERWIDTH=4
CONFIG_NXTK_BORDERCOLOR1=0x005a96bd
CONFIG_NXTK_BORDERCOLOR2=0x00233a49
CONFIG_NXTK_BORDERCOLOR3=0x00f8f8f8
-CONFIG_NXTK_AUTORAISE=n
-CONFIG_NXFONT_SANS22X29=n
-CONFIG_NXFONT_SANS23X27=y
-CONFIG_NXFONT_SANS28X37=n
-CONFIG_NXFONT_SANS22X29B=n
-CONFIG_NXFONT_SANS28X37B=y
-CONFIG_NXFONT_SANS40X49B=n
-CONFIG_NXFONT_SERIF22X29=n
-CONFIG_NXFONT_SERIF29X37=n
-CONFIG_NXFONT_SERIF38X48=n
-CONFIG_NXFONT_SERIF22X28B=n
-CONFIG_NXFONT_SERIF27X38B=n
-CONFIG_NXFONT_SERIF38X49B=n
+# CONFIG_NXTK_AUTORAISE is not set
+
+#
+# Font Selections
+#
CONFIG_NXFONTS_CHARBITS=7
+# 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=y
+# 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=y
+
+#
+# NxConsole Output Text/Graphics Options
+#
+CONFIG_NXCONSOLE_BPP=32
+CONFIG_NXCONSOLE_CURSORCHAR=137
+CONFIG_NXCONSOLE_MXCHARS=256
+CONFIG_NXCONSOLE_CACHESIZE=16
+CONFIG_NXCONSOLE_LINESEPARATION=0
+# CONFIG_NXCONSOLE_NOWRAP is not set
+
+#
+# NxConsole Input options
+#
+# CONFIG_NXCONSOLE_NXKBDIN is not set
+CONFIG_NXCONSOLE_KBDBUFSIZE=16
+CONFIG_NXCONSOLE_NPOLLWAITERS=4
+
+#
+# NX Multi-user only options
+#
+CONFIG_NX_MULTIUSER=y
CONFIG_NX_BLOCKING=y
CONFIG_NX_MXSERVERMSGS=32
CONFIG_NX_MXCLIENTMSGS=16
#
-# NxWidgets / NxWM
+# Memory Management
#
-# Use all defaults except
-# 1. 32 bits-per-pixel
-# 2. Need an especially big server stack size to work with X
-# 3. Make the NxWidgets background color match the NxWM back color
-# 4. Taskbar on the left
-# 5. Bigger stack for NxConsole
-# 6. No touchscreen
-#
-CONFIG_NXWIDGETS_BPP=32
-CONFIG_NXWIDGETS_SERVERSTACK=16384
-CONFIG_NXWIDGETS_LISTENERSTACK=8192
-CONFIG_NXWIDGETS_DEFAULT_BACKGROUNDCOLOR=MKRGB(148,189,215)
-CONFIG_NXWIDGETS_DEFAULT_SELECTEDBACKGROUNDCOLOR=MKRGB(206,227,241)
-CONFIG_NXWIDGETS_DEFAULT_SHADOWEDGECOLOR=MKRGB(35,58,73)
-
-CONFIG_NXWM_TASKBAR_LEFT=y
-CONFIG_NXWM_NXCONSOLE_STACKSIZE=8192
-CONFIG_NXWM_UNITTEST=y
-CONFIG_NXWM_TOUCHSCREEN=n
+# CONFIG_MM_SMALL is not set
+CONFIG_MM_REGIONS=1
+# CONFIG_GRAN is not set
#
-# NxConsole Configuration Settings:
+# Binary Formats
#
-CONFIG_NXCONSOLE=y
-CONFIG_NXCONSOLE_BPP=32
-CONFIG_NXCONSOLE_MXCHARS=256
+# CONFIG_BINFMT_DISABLE is not set
+# CONFIG_BINFMT_EXEPATH is not set
+# CONFIG_NXFLAT is not set
+# CONFIG_ELF is not set
+# CONFIG_PIC is not set
+# CONFIG_SYMTAB_ORDEREDBYNAME is not set
+
+#
+# Library Routines
+#
+CONFIG_STDIO_BUFFER_SIZE=256
+CONFIG_STDIO_LINEBUFFER=y
+CONFIG_NUNGET_CHARS=2
+CONFIG_LIB_HOMEDIR="/"
+# CONFIG_LIBM is not set
+# CONFIG_NOPRINTF_FIELDWIDTH is not set
+# CONFIG_LIBC_FLOATINGPOINT is not set
+# CONFIG_EOL_IS_CR is not set
+# CONFIG_EOL_IS_LF is not set
+# CONFIG_EOL_IS_BOTH_CRLF is not set
+CONFIG_EOL_IS_EITHER_CRLF=y
+# CONFIG_LIBC_STRERROR is not set
+# CONFIG_LIBC_PERROR_STDOUT is not set
+CONFIG_ARCH_LOWPUTC=y
+CONFIG_LIB_SENDFILE_BUFSIZE=512
+# CONFIG_ARCH_ROMGETC is not set
+# CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set
+
+#
+# Basic CXX Support
+#
+# CONFIG_C99_BOOL8 is not set
+CONFIG_HAVE_CXX=y
+# CONFIG_HAVE_CXXINITIALIZE is not set
+# CONFIG_CXX_NEWLONG is not set
+
+#
+# uClibc++ Standard C++ Library
+#
+# CONFIG_UCLIBCXX is not set
+
+#
+# Application Configuration
#
#
-# Settings for examples/uip
+# Named Applications
#
-CONFIG_EXAMPLES_UIP_IPADDR=0xc0a80080
-CONFIG_EXAMPLES_UIP_DRIPADDR=0xc0a80001
-CONFIG_EXAMPLES_UIP_NETMASK=0xffffff00
-CONFIG_EXAMPLES_UIP_DHCPC=n
+# CONFIG_NAMEDAPP is not set
#
-# Settings for examples/nettest
+# Examples
#
-CONFIG_EXAMPLES_NETTEST_SERVER=n
-CONFIG_EXAMPLES_NETTEST_PERFORMANCE=n
-CONFIG_EXAMPLES_NETTEST_NOMAC=n
-CONFIG_EXAMPLES_NETTEST_IPADDR=0xc0a80080
-CONFIG_EXAMPLES_NETTEST_DRIPADDR=0xc0a80001
-CONFIG_EXAMPLES_NETTEST_NETMASK=0xffffff00
-CONFIG_EXAMPLES_NETTEST_CLIENTIP=0xc0a8006a
+# CONFIG_EXAMPLES_BUTTONS is not set
+# CONFIG_EXAMPLES_CAN is not set
+# CONFIG_EXAMPLES_CDCACM is not set
+# CONFIG_EXAMPLES_COMPOSITE is not set
+# CONFIG_EXAMPLES_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_MOUNT is not set
+# CONFIG_EXAMPLES_MODBUS is not set
+# CONFIG_EXAMPLES_NETTEST is not set
+# CONFIG_EXAMPLES_NSH is not set
+# CONFIG_EXAMPLES_NULL is not set
+# CONFIG_EXAMPLES_NX is not set
+# CONFIG_EXAMPLES_NXCONSOLE is not set
+# CONFIG_EXAMPLES_NXFFS is not set
+# CONFIG_EXAMPLES_NXFLAT is not set
+# CONFIG_EXAMPLES_NXHELLO is not set
+# CONFIG_EXAMPLES_NXIMAGE is not set
+# CONFIG_EXAMPLES_NXLINES is not set
+# CONFIG_EXAMPLES_NXTEXT is not set
+# CONFIG_EXAMPLES_OSTEST is not set
+# CONFIG_EXAMPLES_PASHELLO is not set
+# CONFIG_EXAMPLES_PIPE is not set
+# CONFIG_EXAMPLES_POLL is not set
+# CONFIG_EXAMPLES_QENCODER is not set
+# CONFIG_EXAMPLES_RGMP is not set
+# CONFIG_EXAMPLES_ROMFS is not set
+# CONFIG_EXAMPLES_SENDMAIL is not set
+# CONFIG_EXAMPLES_SERLOOP is not set
+# CONFIG_EXAMPLES_TELNETD is not set
+# CONFIG_EXAMPLES_THTTPD is not set
+# CONFIG_EXAMPLES_TIFF is not set
+# CONFIG_EXAMPLES_TOUCHSCREEN is not set
+# CONFIG_EXAMPLES_UDP is not set
+# CONFIG_EXAMPLES_UIP is not set
+# CONFIG_EXAMPLES_USBSERIAL is not set
+# CONFIG_EXAMPLES_USBMSC is not set
+# CONFIG_EXAMPLES_USBTERM is not set
+# CONFIG_EXAMPLES_WATCHDOG is not set
+# CONFIG_EXAMPLES_WLAN is not set
#
-# Settings for examples/ostest
+# Interpreters
#
-CONFIG_EXAMPLES_OSTEST_LOOPS=100
-CONFIG_EXAMPLES_OSTEST_STACKSIZE=8192
#
-# Settings for apps/nshlib
+# Interpreters
#
-CONFIG_NSH_BUILTIN_APPS=n
+# CONFIG_INTERPRETERS_FICL is not set
+# CONFIG_INTERPRETERS_PCODE is not set
+
+#
+# Network Utilities
+#
+
+#
+# Networking Utilities
+#
+# CONFIG_NETUTILS_CODECS is not set
+# CONFIG_NETUTILS_DHCPC is not set
+# CONFIG_NETUTILS_DHCPD is not set
+# CONFIG_NETUTILS_FTPC is not set
+# CONFIG_NETUTILS_FTPD is not set
+# CONFIG_NETUTILS_JSON is not set
+# CONFIG_NETUTILS_RESOLV is not set
+# CONFIG_NETUTILS_SMTP is not set
+# CONFIG_NETUTILS_TELNETD is not set
+# CONFIG_NETUTILS_TFTPC is not set
+# CONFIG_NETUTILS_THTTPD is not set
+# CONFIG_NETUTILS_UIPLIB is not set
+# CONFIG_NETUTILS_WEBCLIENT is not set
+
+#
+# ModBus
+#
+
+#
+# FreeModbus
+#
+# CONFIG_MODBUS is not set
+
+#
+# NSH Library
+#
+CONFIG_NSH_LIBRARY=y
+
+#
+# Disable Individual commands
+#
+# CONFIG_NSH_DISABLE_CAT is not set
+# CONFIG_NSH_DISABLE_CD is not set
+# CONFIG_NSH_DISABLE_CP is not set
+# CONFIG_NSH_DISABLE_DD is not set
+# CONFIG_NSH_DISABLE_ECHO is not set
+# CONFIG_NSH_DISABLE_EXEC is not set
+# CONFIG_NSH_DISABLE_EXIT is not set
+# CONFIG_NSH_DISABLE_FREE is not set
+# CONFIG_NSH_DISABLE_GET is not set
+# CONFIG_NSH_DISABLE_HELP is not set
+# CONFIG_NSH_DISABLE_HEXDUMP is not set
+# CONFIG_NSH_DISABLE_IFCONFIG is not set
+# CONFIG_NSH_DISABLE_KILL is not set
+# CONFIG_NSH_DISABLE_LOSETUP is not set
+# CONFIG_NSH_DISABLE_LS is not set
+# CONFIG_NSH_DISABLE_MB is not set
+# CONFIG_NSH_DISABLE_MKDIR is not set
+# CONFIG_NSH_DISABLE_MKFATFS is not set
+# CONFIG_NSH_DISABLE_MKFIFO is not set
+# CONFIG_NSH_DISABLE_MKRD is not set
+# CONFIG_NSH_DISABLE_MH is not set
+# CONFIG_NSH_DISABLE_MOUNT is not set
+# CONFIG_NSH_DISABLE_MW is not set
+# CONFIG_NSH_DISABLE_NSFMOUNT is not set
+# CONFIG_NSH_DISABLE_PS is not set
+# CONFIG_NSH_DISABLE_PING is not set
+# CONFIG_NSH_DISABLE_PUT is not set
+# CONFIG_NSH_DISABLE_PWD is not set
+# CONFIG_NSH_DISABLE_RM is not set
+# CONFIG_NSH_DISABLE_RMDIR is not set
+# CONFIG_NSH_DISABLE_SET is not set
+# CONFIG_NSH_DISABLE_SH is not set
+# CONFIG_NSH_DISABLE_SLEEP is not set
+# CONFIG_NSH_DISABLE_TEST is not set
+# CONFIG_NSH_DISABLE_UMOUNT is not set
+# CONFIG_NSH_DISABLE_UNSET is not set
+# CONFIG_NSH_DISABLE_USLEEP is not set
+# CONFIG_NSH_DISABLE_WGET is not set
+# CONFIG_NSH_DISABLE_XD is not set
+CONFIG_NSH_CODECS_BUFSIZE=128
CONFIG_NSH_FILEIOSIZE=1024
-CONFIG_NSH_STRERROR=n
CONFIG_NSH_LINELEN=80
CONFIG_NSH_NESTDEPTH=3
-CONFIG_NSH_DISABLESCRIPT=n
-CONFIG_NSH_DISABLEBG=n
+# CONFIG_NSH_DISABLESCRIPT is not set
+# CONFIG_NSH_DISABLEBG is not set
CONFIG_NSH_ROMFSETC=y
-CONFIG_NSH_CONSOLE=y
-CONFIG_NSH_TELNET=n
-CONFIG_NSH_IOBUFFER_SIZE=512
-CONFIG_NSH_DHCPC=n
-CONFIG_NSH_NOMAC=n
-CONFIG_NSH_IPADDR=0x0a000002
-CONFIG_NSH_DRIPADDR=0x0a000001
-CONFIG_NSH_NETMASK=0xffffff00
CONFIG_NSH_ROMFSMOUNTPT="/etc"
CONFIG_NSH_INITSCRIPT="init.d/rcS"
CONFIG_NSH_ROMFSDEVNO=1
@@ -331,81 +534,176 @@ CONFIG_NSH_FATDEVNO=2
CONFIG_NSH_FATSECTSIZE=512
CONFIG_NSH_FATNSECTORS=1024
CONFIG_NSH_FATMOUNTPT="/tmp"
+CONFIG_NSH_CONSOLE=y
+# CONFIG_NSH_CONDEV is not set
+# CONFIG_NSH_ARCHINIT is not set
#
-# Settings for examples/nx
+# NxWidgets/NxWM
#
-CONFIG_EXAMPLES_NX_BUILTIN=n
-CONFIG_EXAMPLES_NX_VPLANE=0
-#CONFIG_EXAMPLES_NX_BGCOLOR
-#CONFIG_EXAMPLES_NX_COLOR1
-#CONFIG_EXAMPLES_NX_COLOR2
-#CONFIG_EXAMPLES_NX_TBCOLOR
-#CONFIG_EXAMPLES_NX_FONTCOLOR
-CONFIG_EXAMPLES_NX_BPP=CONFIG_SIM_FBBPP
-CONFIG_EXAMPLES_NX_RAWWINDOWS=n
-CONFIG_EXAMPLES_NX_STACKSIZE=8192
-CONFIG_EXAMPLES_NX_CLIENTPRIO=80
-CONFIG_EXAMPLES_NX_SERVERPRIO=120
-CONFIG_EXAMPLES_NX_NOTIFYSIGNO=4
+CONFIG_NXWIDGETS=y
#
-# Settings for examples/nxhello
+# NX Server/Device Configuration
#
-CONFIG_EXAMPLES_NXHELLO_BUILTIN=y
-CONFIG_EXAMPLES_NXHELLO_VPLANE=0
-#CONFIG_EXAMPLES_NXHELLO_BGCOLOR
-CONFIG_EXAMPLES_NXHELLO_FONTID=6
-#CONFIG_EXAMPLES_NXHELLO_FONTCOLOR
-CONFIG_EXAMPLES_NXHELLO_BPP=CONFIG_SIM_FBBPP
-CONFIG_EXAMPLES_NXHELLO_EXTERNINIT=n
+# CONFIG_NXWIDGETS_FLICKERFREE is not set
+CONFIG_NXWIDGETS_DEVNO=0
+CONFIG_NXWIDGETS_VPLANE=0
+CONFIG_NXWIDGETS_SERVERPRIO=51
+CONFIG_NXWIDGETS_SERVERSTACK=16384
+CONFIG_NXWIDGETS_CLIENTPRIO=50
+CONFIG_NXWIDGETS_LISTENERPRIO=50
+CONFIG_NXWIDGETS_LISTENERSTACK=8192
+# CONFIG_NXWIDGETS_EXTERNINIT is not set
+# CONFIG_NXWIDGET_EVENTWAIT is not set
#
-# Settings for examples/nxlines
+# NXWidget Configuration
#
-CONFIG_EXAMPLES_NXLINES_VPLANE=0
-#CONFIG_EXAMPLES_NXLINES_BGCOLOR
-CONFIG_EXAMPLES_NXLINES_LINEWIDTH=16
-#CONFIG_EXAMPLES_NXLINES_LINECOLOR
-CONFIG_EXAMPLES_NXLINES_BORDERWIDTH=4
-#CONFIG_EXAMPLES_NXLINES_BORDERCOLOR
-#CONFIG_EXAMPLES_NXLINES_CIRCLECOLOR
-CONFIG_EXAMPLES_NXLINES_BPP=CONFIG_SIM_FBBPP
-CONFIG_EXAMPLES_NXLINES_EXTERNINIT=n
+CONFIG_NXWIDGETS_BPP=32
+CONFIG_NXWIDGETS_SIZEOFCHAR=1
#
-# Settings for examples/touchscreen
+# NXWidget Default Values
#
-CONFIG_EXAMPLES_TOUCHSCREEN_BUILTIN=y
-CONFIG_EXAMPLES_TOUCHSCREEN_MINOR=0
-CONFIG_EXAMPLES_TOUCHSCREEN_DEVPATH="/dev/input0"
-CONFIG_EXAMPLES_TOUCHSCREEN_NSAMPLES=25
+# CONFIG_NXWIDGETS_SYSTEM_CUSTOM_FONTID is not set
+CONFIG_NXWIDGETS_TNXARRAY_INITIALSIZE=16
+CONFIG_NXWIDGETS_TNXARRAY_SIZEINCREMENT=8
+# CONFIG_NXWIDGETS_CUSTOM_FILLCOLORS is not set
+# CONFIG_NXWIDGETS_CUSTOM_EDGECOLORS is not set
+# CONFIG_NXWIDGETS_CUSTOM_TEXTCOLORS is not set
+CONFIG_NXWIDGETS_TRANSPARENT_COLOR=0x0
#
-# Settings for examples/mount
+# Keypad behavior
#
-CONFIG_EXAMPLES_MOUNT_DEVNAME="/dev/ram0"
-#CONFIG_EXAMPLES_MOUNT_NSECTORS=2048
-#CONFIG_EXAMPLES_MOUNT_SECTORSIZE=512
-#CONFIG_EXAMPLES_MOUNT_RAMDEVNO=1
+CONFIG_NXWIDGETS_FIRST_REPEAT_TIME=500
+CONFIG_NXWIDGETS_CONTINUE_REPEAT_TIME=200
+CONFIG_NXWIDGETS_DOUBLECLICK_TIME=350
+CONFIG_NXWIDGETS_KBDBUFFER_SIZE=16
+CONFIG_NXWIDGETS_CURSORCONTROL_SIZE=4
+# CONFIG_NXWIDGET_MEMMONITOR is not set
+CONFIG_NXWM=y
#
-# Stack and heap information
+# General settings
#
-CONFIG_BOOT_RUNFROMFLASH=n
-CONFIG_BOOT_COPYTORAM=n
-CONFIG_CUSTOM_STACK=n
-CONFIG_IDLETHREAD_STACKSIZE=8192
-CONFIG_USERMAIN_STACKSIZE=8192
-CONFIG_PTHREAD_STACK_MIN=256
-CONFIG_PTHREAD_STACK_DEFAULT=8192
-CONFIG_HEAP_BASE=
-CONFIG_HEAP_SIZE=
+# CONFIG_NXWM_SYSTEM_CUSTOM_FONTID is not set
+CONFIG_NXWM_UNITTEST=y
#
-# Maintain legacy build behavior (revisit)
+# Color configuration
+#
+# CONFIG_NXWM_CUSTOM_FILLCOLORS is not set
+# CONFIG_NXWM_CUSTOM_EDGECOLORS is not set
+# CONFIG_NXWM_CUSTOM_TEXTCOLORS is not set
+
+#
+# Horizontal and vertical spacing of icons in the task bar
+#
+CONFIG_NXWM_TASKBAR_VSPACING=2
+CONFIG_NXWM_TASKBAR_HSPACING=2
+# CONFIG_NXWM_TASKBAR_TOP is not set
+# CONFIG_NXWM_TASKBAR_BOTTOM is not set
+CONFIG_NXWM_TASKBAR_LEFT=y
+# CONFIG_NXWM_TASKBAR_RIGHT is not set
+# CONFIG_NXWM_CUSTOM_TASKBAR_WIDTH is not set
+# CONFIG_NXWM_DISABLE_MINIMIZE is not set
+
+#
+# Tool Bar Configuration
+#
+# CONFIG_NXWM_CUSTOM_TOOLBAR_HEIGHT is not set
+
+#
+# Background Image
+#
+# CONFIG_NXWM_DISABLE_BACKGROUND_IMAGE is not set
+CONFIG_NXWM_BACKGROUND_IMAGE=""
+
+#
+# Start Window Configuration
#
-CONFIG_MMCSD=y
-CONFIG_MMCSD_SPI=y
-CONFIG_MMCSD_SDIO=y
+#
+# Horizontal and vertical spacing of icons in the task bar
+#
+CONFIG_NXWM_STARTWINDOW_VSPACING=4
+CONFIG_NXWM_STARTWINDOW_HSPACING=4
+# CONFIG_NXWM_CUSTOM_STARTWINDOW_ICON is not set
+CONFIG_NXWM_STARTWINDOW_MQNAME="/dev/nxwm"
+CONFIG_NXWM_STARTWINDOW_MXMSGS=32
+CONFIG_NXWM_STARTWINDOW_MXMPRIO=42
+CONFIG_NXWM_STARTWINDOW_PRIO=50
+CONFIG_NXWM_STARTWINDOW_STACKSIZE=2048
+
+#
+# NxConsole Window Configuration
+#
+CONFIG_NXWM_NXCONSOLE_PRIO=50
+CONFIG_NXWM_NXCONSOLE_STACKSIZE=8192
+# CONFIG_NXWM_NXCONSOLE_CUSTOM_COLORS is not set
+# CONFIG_NXWM_NXCONSOLE_CUSTOM_FONTID is not set
+# CONFIG_NXWM_CUSTOM_NXCONSOLE_ICON is not set
+# CONFIG_NXWM_TOUCHSCREEN is not set
+# CONFIG_NXWM_KEYBOARD is not set
+
+#
+# Calibration display settings
+#
+# CONFIG_NXWM_CALIBRATION_CUSTOM_COLORS is not set
+# CONFIG_NXWM_CUSTOM_CALIBRATION_ICON is not set
+CONFIG_NXWM_CALIBRATION_SIGNO=5
+CONFIG_NXWM_CALIBRATION_LISTENERPRIO=50
+CONFIG_NXWM_CALIBRATION_LISTENERSTACK=2048
+
+#
+# Hex Calculator display settings
+#
+# CONFIG_NXWM_HEXCALCULATOR_CUSTOM_COLORS is not set
+# CONFIG_NXWM_CUSTOM_HEXCALCULATOR_ICON is not set
+# CONFIG_NXWM_HEXCALCULATOR_CUSTOM_FONTID is not set
+
+#
+# System NSH Add-Ons
+#
+
+#
+# Custom Free Memory Command
+#
+# CONFIG_SYSTEM_FREE is not set
+
+#
+# I2C tool
+#
+
+#
+# FLASH Program Installation
+#
+# CONFIG_SYSTEM_INSTALL is not set
+
+#
+# readline()
+#
+CONFIG_SYSTEM_READLINE=y
+CONFIG_READLINE_ECHO=y
+
+#
+# Power Off
+#
+# CONFIG_SYSTEM_POWEROFF is not set
+
+#
+# RAMTRON
+#
+# CONFIG_SYSTEM_RAMTRON is not set
+
+#
+# SD Card
+#
+# CONFIG_SYSTEM_SDCARD is not set
+
+#
+# Sysinfo
+#
+# CONFIG_SYSTEM_SYSINFO is not set
diff --git a/nuttx/include/pthread.h b/nuttx/include/pthread.h
index 5066275b41..a98b9aaaaf 100644
--- a/nuttx/include/pthread.h
+++ b/nuttx/include/pthread.h
@@ -44,6 +44,8 @@
#include /* Compiler settings, noreturn_function */
#include /* Needed for general types */
+#include /* Needed by pthread_[set|get]name_np */
+
#include /* C99 fixed width integer types */
#include /* C99 boolean types */
#include /* For getpid */
@@ -58,10 +60,11 @@
/* Standard POSIX switches */
#ifndef _POSIX_THREADS
-#define _POSIX_THREADS
+# define _POSIX_THREADS
#endif
+
#ifndef _POSIX_THREAD_ATTR_STACKSIZE
-#define _POSIX_THREAD_ATTR_STACKSIZE
+# define _POSIX_THREAD_ATTR_STACKSIZE
#endif
/********************************************************************************
@@ -153,10 +156,8 @@
********************************************************************************/
#ifdef __cplusplus
-#define EXTERN extern "C"
-extern "C" {
-#else
-#define EXTERN extern
+extern "C"
+{
#endif
/* pthread-specific types */
@@ -245,28 +246,29 @@ struct sched_param; /* Defined in sched.h */
* the individual attributes used by a given implementation.
*/
-EXTERN int pthread_attr_init(FAR pthread_attr_t *attr);
+int pthread_attr_init(FAR pthread_attr_t *attr);
/* An attributes object can be deleted when it is no longer needed. */
-EXTERN int pthread_attr_destroy(pthread_attr_t *attr);
+int pthread_attr_destroy(pthread_attr_t *attr);
/* Set or obtain the default scheduling algorithm */
-EXTERN int pthread_attr_setschedpolicy(FAR pthread_attr_t *attr, int policy);
-EXTERN int pthread_attr_getschedpolicy(FAR pthread_attr_t *attr, int *policy);
-EXTERN int pthread_attr_setschedparam(FAR pthread_attr_t *attr,
- FAR const struct sched_param *param);
-EXTERN int pthread_attr_getschedparam(FAR pthread_attr_t *attr,
- FAR struct sched_param *param);
-EXTERN int pthread_attr_setinheritsched(FAR pthread_attr_t *attr, int inheritsched);
-EXTERN int pthread_attr_getinheritsched(FAR const pthread_attr_t *attr,
- FAR int *inheritsched);
+int pthread_attr_setschedpolicy(FAR pthread_attr_t *attr, int policy);
+int pthread_attr_getschedpolicy(FAR pthread_attr_t *attr, int *policy);
+int pthread_attr_setschedparam(FAR pthread_attr_t *attr,
+ FAR const struct sched_param *param);
+int pthread_attr_getschedparam(FAR pthread_attr_t *attr,
+ FAR struct sched_param *param);
+int pthread_attr_setinheritsched(FAR pthread_attr_t *attr,
+ int inheritsched);
+int pthread_attr_getinheritsched(FAR const pthread_attr_t *attr,
+ FAR int *inheritsched);
/* Set or obtain the default stack size */
-EXTERN int pthread_attr_setstacksize(FAR pthread_attr_t *attr, long stacksize);
-EXTERN int pthread_attr_getstacksize(FAR pthread_attr_t *attr, long *stackaddr);
+int pthread_attr_setstacksize(FAR pthread_attr_t *attr, long stacksize);
+int pthread_attr_getstacksize(FAR pthread_attr_t *attr, long *stackaddr);
/* To create a thread object and runnable thread, a routine must be specified
* as the new thread's start routine. An argument may be passed to this
@@ -275,34 +277,33 @@ EXTERN int pthread_attr_getstacksize(FAR pthread_attr_t *attr, long *stackaddr);
* about the kind of thread being created.
*/
-EXTERN int pthread_create(FAR pthread_t *thread, FAR pthread_attr_t *attr,
- pthread_startroutine_t startroutine,
- pthread_addr_t arg);
+int pthread_create(FAR pthread_t *thread, FAR pthread_attr_t *attr,
+ pthread_startroutine_t startroutine, pthread_addr_t arg);
/* A thread object may be "detached" to specify that the return value and
* completion status will not be requested.
*/
-EXTERN int pthread_detach(pthread_t thread);
+int pthread_detach(pthread_t thread);
/* A thread may terminate it's own execution or the execution of another
* thread.
*/
-EXTERN void pthread_exit(pthread_addr_t value) noreturn_function;
-EXTERN int pthread_cancel(pthread_t thread);
-EXTERN int pthread_setcancelstate(int state, FAR int *oldstate);
-EXTERN void pthread_testcancel(void);
+void pthread_exit(pthread_addr_t value) noreturn_function;
+int pthread_cancel(pthread_t thread);
+int pthread_setcancelstate(int state, FAR int *oldstate);
+void pthread_testcancel(void);
/* A thread can await termination of another thread and retrieve the return
* value of the thread.
*/
-EXTERN int pthread_join(pthread_t thread, FAR pthread_addr_t *value);
+int pthread_join(pthread_t thread, FAR pthread_addr_t *value);
/* A thread may tell the scheduler that its processor can be made available. */
-EXTERN void pthread_yield(void);
+void pthread_yield(void);
/* A thread may obtain a copy of its own thread handle. */
@@ -314,91 +315,94 @@ EXTERN void pthread_yield(void);
/* Thread scheduling parameters */
-EXTERN int pthread_getschedparam(pthread_t thread, FAR int *policy,
- FAR struct sched_param *param);
-EXTERN int pthread_setschedparam(pthread_t thread, int policy,
- FAR const struct sched_param *param);
-EXTERN int pthread_setschedprio(pthread_t thread, int prio);
+int pthread_getschedparam(pthread_t thread, FAR int *policy,
+ FAR struct sched_param *param);
+int pthread_setschedparam(pthread_t thread, int policy,
+ FAR const struct sched_param *param);
+int pthread_setschedprio(pthread_t thread, int prio);
/* Thread-specific Data Interfaces */
-EXTERN int pthread_key_create(FAR pthread_key_t *key,
- CODE void (*destructor)(FAR void*));
-EXTERN int pthread_setspecific(pthread_key_t key, FAR void *value);
-EXTERN FAR void *pthread_getspecific(pthread_key_t key);
-EXTERN int pthread_key_delete(pthread_key_t key);
+int pthread_key_create(FAR pthread_key_t *key,
+ CODE void (*destructor)(FAR void*));
+int pthread_setspecific(pthread_key_t key, FAR void *value);
+FAR void *pthread_getspecific(pthread_key_t key);
+int pthread_key_delete(pthread_key_t key);
/* Create, operate on, and destroy mutex attributes. */
-EXTERN int pthread_mutexattr_init(FAR pthread_mutexattr_t *attr);
-EXTERN int pthread_mutexattr_destroy(FAR pthread_mutexattr_t *attr);
-EXTERN int pthread_mutexattr_getpshared(FAR pthread_mutexattr_t *attr, FAR int *pshared);
-EXTERN int pthread_mutexattr_setpshared(FAR pthread_mutexattr_t *attr, int pshared);
+int pthread_mutexattr_init(FAR pthread_mutexattr_t *attr);
+int pthread_mutexattr_destroy(FAR pthread_mutexattr_t *attr);
+int pthread_mutexattr_getpshared(FAR pthread_mutexattr_t *attr,
+ FAR int *pshared);
+int pthread_mutexattr_setpshared(FAR pthread_mutexattr_t *attr,
+ int pshared);
#ifdef CONFIG_MUTEX_TYPES
-EXTERN int pthread_mutexattr_gettype(const pthread_mutexattr_t *attr, int *type);
-EXTERN int pthread_mutexattr_settype(pthread_mutexattr_t *attr, int type);
+int pthread_mutexattr_gettype(const pthread_mutexattr_t *attr, int *type);
+int pthread_mutexattr_settype(pthread_mutexattr_t *attr, int type);
#endif
/* The following routines create, delete, lock and unlock mutexes. */
-EXTERN int pthread_mutex_init(FAR pthread_mutex_t *mutex, FAR pthread_mutexattr_t *attr);
-EXTERN int pthread_mutex_destroy(FAR pthread_mutex_t *mutex);
-EXTERN int pthread_mutex_lock(FAR pthread_mutex_t *mutex);
-EXTERN int pthread_mutex_trylock(FAR pthread_mutex_t *mutex);
-EXTERN int pthread_mutex_unlock(FAR pthread_mutex_t *mutex);
+int pthread_mutex_init(FAR pthread_mutex_t *mutex,
+ FAR pthread_mutexattr_t *attr);
+int pthread_mutex_destroy(FAR pthread_mutex_t *mutex);
+int pthread_mutex_lock(FAR pthread_mutex_t *mutex);
+int pthread_mutex_trylock(FAR pthread_mutex_t *mutex);
+int pthread_mutex_unlock(FAR pthread_mutex_t *mutex);
/* Operations on condition variables */
-EXTERN int pthread_condattr_init(FAR pthread_condattr_t *attr);
-EXTERN int pthread_condattr_destroy(FAR pthread_condattr_t *attr);
+int pthread_condattr_init(FAR pthread_condattr_t *attr);
+int pthread_condattr_destroy(FAR pthread_condattr_t *attr);
/* A thread can create and delete condition variables. */
-EXTERN int pthread_cond_init(FAR pthread_cond_t *cond, FAR pthread_condattr_t *attr);
-EXTERN int pthread_cond_destroy(FAR pthread_cond_t *cond);
+int pthread_cond_init(FAR pthread_cond_t *cond, FAR pthread_condattr_t *attr);
+int pthread_cond_destroy(FAR pthread_cond_t *cond);
/* A thread can signal to and broadcast on a condition variable. */
-EXTERN int pthread_cond_broadcast(FAR pthread_cond_t *cond);
-EXTERN int pthread_cond_signal(FAR pthread_cond_t *cond);
+int pthread_cond_broadcast(FAR pthread_cond_t *cond);
+int pthread_cond_signal(FAR pthread_cond_t *cond);
/* A thread can wait for a condition variable to be signalled or broadcast. */
-EXTERN int pthread_cond_wait(FAR pthread_cond_t *cond, FAR pthread_mutex_t *mutex);
+int pthread_cond_wait(FAR pthread_cond_t *cond, FAR pthread_mutex_t *mutex);
/* A thread can perform a timed wait on a condition variable. */
-EXTERN int pthread_cond_timedwait(FAR pthread_cond_t *cond, FAR pthread_mutex_t *mutex,
- FAR const struct timespec *abstime);
+int pthread_cond_timedwait(FAR pthread_cond_t *cond,
+ FAR pthread_mutex_t *mutex,
+ FAR const struct timespec *abstime);
/* Barrier attributes */
-EXTERN int pthread_barrierattr_destroy(FAR pthread_barrierattr_t *attr);
-EXTERN int pthread_barrierattr_init(FAR pthread_barrierattr_t *attr);
-EXTERN int pthread_barrierattr_getpshared(FAR const pthread_barrierattr_t *attr,
- FAR int *pshared);
-EXTERN int pthread_barrierattr_setpshared(FAR pthread_barrierattr_t *attr,
- int pshared);
+int pthread_barrierattr_destroy(FAR pthread_barrierattr_t *attr);
+int pthread_barrierattr_init(FAR pthread_barrierattr_t *attr);
+int pthread_barrierattr_getpshared(FAR const pthread_barrierattr_t *attr,
+ FAR int *pshared);
+int pthread_barrierattr_setpshared(FAR pthread_barrierattr_t *attr,
+ int pshared);
/* Barriers */
-EXTERN int pthread_barrier_destroy(FAR pthread_barrier_t *barrier);
-EXTERN int pthread_barrier_init(FAR pthread_barrier_t *barrier,
+int pthread_barrier_destroy(FAR pthread_barrier_t *barrier);
+int pthread_barrier_init(FAR pthread_barrier_t *barrier,
FAR const pthread_barrierattr_t *attr,
unsigned int count);
-EXTERN int pthread_barrier_wait(FAR pthread_barrier_t *barrier);
+int pthread_barrier_wait(FAR pthread_barrier_t *barrier);
/* Pthread initialization */
-EXTERN int pthread_once(FAR pthread_once_t *once_control,
+int pthread_once(FAR pthread_once_t *once_control,
CODE void (*init_routine)(void));
/* Pthread signal management APIs */
-EXTERN int pthread_kill(pthread_t thread, int sig);
-EXTERN int pthread_sigmask(int how, FAR const sigset_t *set, FAR sigset_t *oset);
+int pthread_kill(pthread_t thread, int sig);
+int pthread_sigmask(int how, FAR const sigset_t *set, FAR sigset_t *oset);
-#undef EXTERN
#ifdef __cplusplus
}
#endif
From e975043dd3f56765a2a0292784666b2246ea6211 Mon Sep 17 00:00:00 2001
From: patacongo
Date: Sat, 22 Dec 2012 16:47:02 +0000
Subject: [PATCH 003/118] Add tools/kconfig.bat
git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5450 42af7a65-404d-4744-a932-0658087f49c3
---
nuttx/ChangeLog | 2 +
nuttx/Kconfig | 2 +-
nuttx/Makefile.win | 17 ++---
nuttx/README.txt | 136 +++++++++++++++++++++++++++-------------
nuttx/tools/README.txt | 30 +++++++++
nuttx/tools/kconfig.bat | 131 ++++++++++++++++++++++++++++++++++++++
6 files changed, 265 insertions(+), 53 deletions(-)
create mode 100755 nuttx/tools/kconfig.bat
diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog
index 04f180a8b1..56edf9487a 100644
--- a/nuttx/ChangeLog
+++ b/nuttx/ChangeLog
@@ -3811,3 +3811,5 @@
tool.
* include/pthread.h: In sys/prctl.h because it is needed by
pthread_[set|get]name_np()
+ * tools/kconfig.bat: Kludge to run kconfig-frontends from a DOS shell.
+
diff --git a/nuttx/Kconfig b/nuttx/Kconfig
index 10d624efb8..2c8c9b26ea 100644
--- a/nuttx/Kconfig
+++ b/nuttx/Kconfig
@@ -7,7 +7,7 @@ mainmenu "Nuttx/$ARCH Configuration"
config APPSDIR
string
- option env="APPSDIR"
+ default "../apps"
# This is a temporary kludge to let the build system know that we are using the new
# configuration system
diff --git a/nuttx/Makefile.win b/nuttx/Makefile.win
index 34da12ad09..fcf971d325 100644
--- a/nuttx/Makefile.win
+++ b/nuttx/Makefile.win
@@ -252,7 +252,7 @@ LINKLIBS = $(patsubst lib\\%,%,$(NUTTXLIBS))
BIN = nuttx$(EXEEXT)
all: $(BIN)
-.PHONY: context clean_context check_context export subdir_clean clean subdir_distclean distclean apps_clean apps_distclean
+.PHONY: context clean_context check_context configenv config oldconfig menuconfig export subdir_clean clean subdir_distclean distclean apps_clean apps_distclean
# Target used to copy include\nuttx\math.h. If CONFIG_ARCH_MATH_H is
# defined, then there is an architecture specific math.h header file
@@ -647,14 +647,17 @@ pass2dep: context tools\mkdeps$(HOSTEXEEXT)
# location: http://ymorin.is-a-geek.org/projects/kconfig-frontends. See
# misc\tools\README.txt for additional information.
-config:
- $(Q) APPSDIR=${CONFIG_APPS_DIR} conf Kconfig
+configenv:
+ $(Q) set APPSDIR=${CONFIG_APPS_DIR}
-oldconfig:
- $(Q) APPSDIR=${CONFIG_APPS_DIR} conf --oldconfig Kconfig
+config: configenv
+ $(Q) conf Kconfig
-menuconfig:
- $(Q) APPSDIR=${CONFIG_APPS_DIR} mconf Kconfig
+oldconfig: configenv
+ $(Q) conf --oldconfig Kconfig
+
+menuconfig: configenv
+ $(Q) mconf Kconfig
# export
#
diff --git a/nuttx/README.txt b/nuttx/README.txt
index b9210277e8..b71012cd8b 100644
--- a/nuttx/README.txt
+++ b/nuttx/README.txt
@@ -10,6 +10,7 @@ README
o Configuring NuttX
- Instantiating "Canned" Configurations
- NuttX Configuration Tool
+ - NuttX Configuration Tool from DOS
o Toolchains
- Cross-Development Toolchains
- NuttX Buildroot Toolchain
@@ -249,7 +250,6 @@ easier. It is used as follows:
cd ${TOPDIR}/tools
./configure.sh /
-
NuttX Configuration Tool
------------------------
@@ -292,6 +292,52 @@ NuttX Configuration Tool
install 'mconf', make certain that your PATH variable includes
a path to that installation directory.
+NuttX Configuration Tool from DOS
+---------------------------------
+
+Recent versions of NuttX support building NuttX from a native Windows
+CMD.exe shell (see "Native Windows Build" below). But kconfig-frontends
+is a Linux tool. There have been some successes building a Windows
+native version of the kconfig-frontends tool, but that is not ready
+for prime time.
+
+At this point, there are only a few options for the Windows user:
+
+ 1. You can run the configuration tool using Cygwin. However, the
+ Cygwin Makefile.win will complain so to do this will, you have
+ to manually edit the .config file:
+
+ a. Delete the line: CONFIG_WINDOWS_NATIVE=y
+ b. Change the apps/ directory path, CONFIG_APPS_DIR to use Unix
+ style delimiters. For example, change "..\apps" to "../apps"
+
+ And of course, after you use the configuration tool you need to
+ restore CONFIG_WINDOWS_NATIVE=y and the correct CONFIG_APPS_DIR.
+
+ 2) You can, with some effort, run the the Cygwin mconf tool directly
+ in the CMD.exe shell. In this case, you do not have to modify the
+ .config file, but there are other complexities:
+
+ a. You need to temporarily set the Cgywin directories in the PATH
+ variable then run mconf manually like:
+
+ mconf Kconfig
+
+ There is a Windows bacht file at tools/kconfig.bat that automates
+ these steps:
+
+ tools/kconfig menuconfig
+
+ b. There is an issue with accessing DOS environment variables from
+ the Cygwin mconf running in the CMD.exe shell. The following
+ change to the top-level Kconfig file seems to work around these
+ problems:
+
+ config APPSDIR
+ string
+ - option env="APPSDIR"
+ + default "../apps"
+
TOOLCHAINS
^^^^^^^^^^
@@ -523,68 +569,68 @@ Native Windows Build
Installing GNUWin32
-------------------
-The Windows native build will depend upon a few Unix-like tools that can be
-provided either by MSYS or GNUWin32. The GNUWin32 are available from
-http://gnuwin32.sourceforge.net/. GNUWin32 provides ports of tools with a
-GPL or similar open source license to modern MS-Windows (Microsoft Windows
-2000 / XP / 2003 / Vista / 2008 / 7). See
-http://gnuwin32.sourceforge.net/packages.html for a list of all of the tools
-available in the GNUWin32 package.
+ The Windows native build will depend upon a few Unix-like tools that can be
+ provided either by MSYS or GNUWin32. The GNUWin32 are available from
+ http://gnuwin32.sourceforge.net/. GNUWin32 provides ports of tools with a
+ GPL or similar open source license to modern MS-Windows (Microsoft Windows
+ 2000 / XP / 2003 / Vista / 2008 / 7). See
+ http://gnuwin32.sourceforge.net/packages.html for a list of all of the tools
+ available in the GNUWin32 package.
-The SourceForge project is located here:
-http://sourceforge.net/projects/gnuwin32/. The project is still being
-actively supported (although some of the Windows ports have gotten very old).
+ The SourceForge project is located here:
+ http://sourceforge.net/projects/gnuwin32/. The project is still being
+ actively supported (although some of the Windows ports have gotten very old).
-Some commercial toolchains include a subset of the GNUWin32 tools in the
-installation. My recommendation is that you download the GNUWin32 tools
-directly from the sourceforge.net website so that you will know what you are
-using and can reproduce your build environment.
+ Some commercial toolchains include a subset of the GNUWin32 tools in the
+ installation. My recommendation is that you download the GNUWin32 tools
+ directly from the sourceforge.net website so that you will know what you are
+ using and can reproduce your build environment.
-GNUWin32 Installation Steps:
+ GNUWin32 Installation Steps:
-The following steps will download and execute the GNUWin32 installer.
+ The following steps will download and execute the GNUWin32 installer.
-1. Download GetGNUWin32-x.x.x.exe from
- http://sourceforge.net/projects/getgnuwin32/files/. This is the
- installer. The current version as of this writing is 0.6.3.
+ 1. Download GetGNUWin32-x.x.x.exe from
+ http://sourceforge.net/projects/getgnuwin32/files/. This is the
+ installer. The current version as of this writing is 0.6.3.
-2. Run the installer.
+ 2. Run the installer.
-3. Accept the license.
+ 3. Accept the license.
-4. Select the installation directory. My recommendation is the
- directory that contains this README file ().
+ 4. Select the installation directory. My recommendation is the
+ directory that contains this README file ().
-5. After running GetGNUWin32-0.x.x.exe, you will have a new directory
- /GetGNUWin32
+ 5. After running GetGNUWin32-0.x.x.exe, you will have a new directory
+ /GetGNUWin32
-Note the the GNUWin32 installer didn't install GNUWin32. Instead, it
-installed another, smarter downloader. That downloader is the GNUWin32
-package management tool developed by the Open SSL project.
+ Note the the GNUWin32 installer didn't install GNUWin32. Instead, it
+ installed another, smarter downloader. That downloader is the GNUWin32
+ package management tool developed by the Open SSL project.
-The following steps probably should be performed from inside a DOS shell.
+ The following steps probably should be performed from inside a DOS shell.
-6. Change to the directory created by GetGNUWin32-x.x.x.exe
+ 6. Change to the directory created by GetGNUWin32-x.x.x.exe
- cd GetGNUWin32
+ cd GetGNUWin32
-7. Execute the download.bat script. The download.bat script will download
- about 446 packages! Enough to have a very complete Linux-like environment
- under the DOS shell. This will take awhile. This step only downloads
- the packages and the next step will install the packages.
+ 7. Execute the download.bat script. The download.bat script will download
+ about 446 packages! Enough to have a very complete Linux-like environment
+ under the DOS shell. This will take awhile. This step only downloads
+ the packages and the next step will install the packages.
- download
+ download
-8. This step will install the downloaded packages. The argument of the
- install.bat script is the installation location. C:\gnuwin32 is the
- standard install location:
+ 8. This step will install the downloaded packages. The argument of the
+ install.bat script is the installation location. C:\gnuwin32 is the
+ standard install location:
- install C:\gnuwin32
+ install C:\gnuwin32
-NOTE: This installation step will install *all* GNUWin32 packages... far
-more than you will ever need. If disc space is a problem for you, you might
-need to perform a manual installation of the individual ZIP files that you
-will find in the /GetGNUWin32/packages directory.
+ NOTE: This installation step will install *all* GNUWin32 packages... far
+ more than you will ever need. If disc space is a problem for you, you might
+ need to perform a manual installation of the individual ZIP files that you
+ will find in the /GetGNUWin32/packages directory.
CYGWIN BUILD PROBLEMS
^^^^^^^^^^^^^^^^^^^^^
diff --git a/nuttx/tools/README.txt b/nuttx/tools/README.txt
index 2b9ac61f45..fc03322127 100644
--- a/nuttx/tools/README.txt
+++ b/nuttx/tools/README.txt
@@ -413,6 +413,36 @@ unlink.bat
NTFS mklink.exe command instead of copying files. That logic, however,
has not been verified as of this writing.
+kconfig.bat
+-----------
+
+ Recent versions of NuttX support building NuttX from a native Windows
+ CMD.exe shell. But kconfig-frontends is a Linux tool and is not yet
+ available in the pure CMD.exe environment. At this point, there are
+ only a few options for the Windows user (see the top-level README.txt
+ file).
+
+ You can, with some effort, run the the Cygwin mconf tool directly
+ in the CMD.exe shell. In this case, you do not have to modify the
+ .config file, but there are other complexities: You need to
+ temporarily set the Cgywin directories in the PATH variable and
+ then run mconf outside of the Make system.
+
+ kconfig.bat is a Windows batch file at tools/kconfig.bat that automates
+ these steps. It is used from the top-level NuttX directory like:
+
+ tools/kconfig menuconfig
+
+ NOTE: There is an currently an issue with accessing DOS environment
+ variables from the Cygwin mconf running in the CMD.exe shell. The
+ following change to the top-level Kconfig file seems to work around
+ these problems:
+
+ config APPSDIR
+ string
+ - option env="APPSDIR"
+ + default "../apps"
+
mkimage.sh
----------
diff --git a/nuttx/tools/kconfig.bat b/nuttx/tools/kconfig.bat
new file mode 100755
index 0000000000..65ab60506c
--- /dev/null
+++ b/nuttx/tools/kconfig.bat
@@ -0,0 +1,131 @@
+@echo off
+
+rem tools/kconfig.bat
+rem
+rem Copyright (C) 2012 Gregory Nutt. All rights reserved.
+rem Author: Gregory Nutt
+rem
+rem Redistribution and use in source and binary forms, with or without
+rem modification, are permitted provided that the following conditions
+rem are met:
+rem
+rem 1. Redistributions of source code must retain the above copyright
+rem notice, this list of conditions and the following disclaimer.
+rem 2. Redistributions in binary form must reproduce the above copyright
+rem notice, this list of conditions and the following disclaimer in
+rem the documentation and/or other materials provided with the
+rem distribution.
+rem 3. Neither the name NuttX nor the names of its contributors may be
+rem used to endorse or promote products derived from this software
+rem without specific prior written permission.
+rem
+rem THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+rem "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+rem LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+rem FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+rem COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+rem INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+rem BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+rem OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+rem AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+rem LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+rem ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+rem POSSIBILITY OF SUCH DAMAGE.
+rem
+
+rem Remember the state of the PATH variable on entry
+
+set oldpath=%PATH%
+
+rem Handle command line options
+
+set action=%1
+shift
+if "%action%"=="" goto :MissingArgument
+
+set appsdir=..\apps
+set cygwindir=C:\Cygwin
+
+:ArgLoop
+
+if "%1"=="" goto :CheckArguments
+
+if "%1"=="-a" (
+ shift
+ set appsdir=%1
+ goto :NextArg
+)
+
+if "%1"=="-c" (
+ shift
+ set cygwindir=%1
+ goto :NextArg
+)
+
+echo ERROR: Unrecognized option: %1
+goto :ShowUsage
+
+:NextArg
+shift
+goto :ArgLoop
+
+rem Verify that all of the paths are valid
+
+:CheckArguments
+if exist "%appsdir%" goto :CheckCygwinDir
+
+echo ERROR: %appsdir% does not exist
+goto :ShowUsage
+
+:CheckCygwinDir
+
+if exist "%cygwindir%" goto :SetPath
+
+echo ERROR: %cygwindir% does not exist
+goto :ShowUsage
+
+rem Setup some required environment variables and PATH settings
+
+:SetPath
+set PATH=%cygwindir%\usr\local\bin;%cygwindir%\usr\bin;%cygwindir%\bin;%PATH%
+set APPSDIR=%appsdir%
+
+rem Execute the requested action
+
+if "%action%"=="config" goto :DoConfig
+if "%action%"=="oldconfig" goto :DoOldConfig
+if "%action%"=="menuconfig" goto :DoMenuConfig
+
+echo ERROR: Unrecognized action: %action%
+goto :ShowUsage
+
+:DoConfig
+conf Kconfig
+goto End
+
+:DoOldConfig
+conf --oldconfig Kconfig
+goto End
+
+:DoMenuConfig
+mconf Kconfig
+goto End
+
+:MissingArgument
+
+echo ERROR: Missing required argument
+
+:ShowUsage
+echo USAGE: %0 ^ [-a ^] [-c ^]
+echo Where:
+echo ^ is one of config, oldconf, or menuconfig
+echo ^ is the relative path to the apps\ directory.
+echo This defaults to ..\apps
+echo ^ is the relative path to the Cygwin installation
+echo directory. This defaults to C:\Cygwin
+
+rem Restore the original PATH settings
+
+:End
+set PATH=%oldpath%
+
From f2a0267b0724206a9aa20b4c0caba36b3eecc3fe Mon Sep 17 00:00:00 2001
From: patacongo
Date: Sat, 22 Dec 2012 16:51:01 +0000
Subject: [PATCH 004/118] Fix errors and omissions in last checkin
git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5451 42af7a65-404d-4744-a932-0658087f49c3
---
misc/tools/kconfig-language.txt | 2 +-
nuttx/Kconfig | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/misc/tools/kconfig-language.txt b/misc/tools/kconfig-language.txt
index 44e2649fbb..a686f9cd69 100644
--- a/misc/tools/kconfig-language.txt
+++ b/misc/tools/kconfig-language.txt
@@ -117,7 +117,7 @@ applicable everywhere (see syntax).
This attribute is only applicable to menu blocks, if the condition is
false, the menu block is not displayed to the user (the symbols
contained there can still be selected by other symbols, though). It is
- similar to a conditional "prompt" attribude for individual menu
+ similar to a conditional "prompt" attribute for individual menu
entries. Default value of "visible" is true.
- numerical ranges: "range" ["if" ]
diff --git a/nuttx/Kconfig b/nuttx/Kconfig
index 2c8c9b26ea..10d624efb8 100644
--- a/nuttx/Kconfig
+++ b/nuttx/Kconfig
@@ -7,7 +7,7 @@ mainmenu "Nuttx/$ARCH Configuration"
config APPSDIR
string
- default "../apps"
+ option env="APPSDIR"
# This is a temporary kludge to let the build system know that we are using the new
# configuration system
From c62d3d93deef9ec14e80c3a96d70f846deeff66e Mon Sep 17 00:00:00 2001
From: patacongo
Date: Sun, 23 Dec 2012 17:32:41 +0000
Subject: [PATCH 005/118] Mostly costmetic updates
git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5452 42af7a65-404d-4744-a932-0658087f49c3
---
nuttx/Documentation/NuttX.html | 15 ++++-----
nuttx/README.txt | 24 +++++++++------
nuttx/arch/arm/src/arm/up_doirq.c | 8 +++--
nuttx/arch/arm/src/armv7-m/up_doirq.c | 8 +++--
nuttx/arch/avr/src/avr/up_doirq.c | 8 +++--
nuttx/arch/avr/src/avr32/up_doirq.c | 8 +++--
nuttx/arch/hc/src/common/up_doirq.c | 8 +++--
nuttx/arch/mips/src/mips32/up_doirq.c | 8 +++--
nuttx/arch/sh/src/common/up_doirq.c | 9 ++++++
nuttx/arch/z16/src/common/up_doirq.c | 9 ++++++
nuttx/arch/z80/include/z80/chip.h | 6 ++--
nuttx/arch/z80/src/common/up_internal.h | 41 ++++++++++++-------------
nuttx/arch/z80/src/ez80/switch.h | 26 +++++++++-------
nuttx/arch/z80/src/z180/switch.h | 25 ++++++++-------
nuttx/arch/z80/src/z8/switch.h | 28 +++++++++--------
nuttx/arch/z80/src/z80/switch.h | 26 +++++++++-------
16 files changed, 149 insertions(+), 108 deletions(-)
diff --git a/nuttx/Documentation/NuttX.html b/nuttx/Documentation/NuttX.html
index f48994babd..84f298d3ac 100644
--- a/nuttx/Documentation/NuttX.html
+++ b/nuttx/Documentation/NuttX.html
@@ -1078,7 +1078,6 @@ svn checkout -r5447 svn://svn.code.sf.net/p/nuttx/code/trunk nuttx-code
svn checkout -r5447 http://svn.code.sf.net/p/nuttx/code/trunk nuttx-code
-
Additional new features and extended functionality
@@ -1244,7 +1243,7 @@ svn checkout -r5447 http://svn.code.sf.net/p/nuttx/code/trunk nuttx-code
This build: (1) Uses all Windows style paths, (2) Uses primarily Windows batch commands from CMD.exe, with (3) a few extensions from GNUWin32.
- This capability should still be considered a work in progress because: (1) it has not been verfied on all targets and tools, and (2) still lacks some of the creature-comforts of the more mature environments (like a function configure.sh script and make menuconfig support).
+ This capability should still be considered a work in progress because: (1) It has not been verfied on all targets and tools, and (2) it still lacks some of the creature-comforts of the more mature environments (like a functional configure.sh script and make menuconfig support).
Example Windows native builds for STM32F4Discovery, eZ80, z16f, z8, Z80, and Z180.
@@ -1890,8 +1889,7 @@ svn checkout -r5447 http://svn.code.sf.net/p/nuttx/code/trunk nuttx-code
- These ports uses a GNU arm-nuttx-elf toolchain* under either Linux or Cygwin (with native Windows GNU
- tools or Cygwin-based GNU tools).
+ These ports uses a GNU arm-nuttx-elf toolchain* under either Linux or Cygwin (with native Windows GNU tools or Cygwin-based GNU tools).
@@ -1999,8 +1997,7 @@ svn checkout -r5447 http://svn.code.sf.net/p/nuttx/code/trunk nuttx-code
Atmel AT91SAM3U.
This port uses the Atmel SAM3U-EK
development board that features the AT91SAM3U4E MCU.
- This port uses a GNU arm-nuttx-elf or arm-eabi toolchain* under either Linux or Cygwin (with native Windows GNU
- tools or Cygwin-based GNU tools).
+ This port uses a GNU arm-nuttx-elf or arm-eabi toolchain* under either Linux or Cygwin (with native Windows GNU tools or Cygwin-based GNU tools).
@@ -2884,7 +2881,7 @@ BFD_ASSERT (*plt_offset != (bfd_vma) -1);
Zilog z16f Microncontroller.
This port use the Zilog z16f2800100zcog development kit and the Zilog
ZDS-II Windows command line tools.
- The development environment is Cygwin under WinXP.
+ The development environment is either Windows native or Cygwin under Windows.
@@ -2914,7 +2911,7 @@ BFD_ASSERT (*plt_offset != (bfd_vma) -1);
Both boards are based on the eZ80F091 part and both use the Zilog ZDS-II
Windows command line tools.
- The development environment is Cygwin under WinXP.
+ The development environment is either Windows native or Cygwin under Windows.
@@ -2946,7 +2943,7 @@ BFD_ASSERT (*plt_offset != (bfd_vma) -1);
and the Zilog ZDS-II Windows command line tools.
- The development environment is Cygwin under WinXP.
+ The development environment is either Windows native or Cygwin under Windows.
diff --git a/nuttx/README.txt b/nuttx/README.txt
index b71012cd8b..dc3c9fb673 100644
--- a/nuttx/README.txt
+++ b/nuttx/README.txt
@@ -10,7 +10,7 @@ README
o Configuring NuttX
- Instantiating "Canned" Configurations
- NuttX Configuration Tool
- - NuttX Configuration Tool from DOS
+ - NuttX Configuration Tool under DOS
o Toolchains
- Cross-Development Toolchains
- NuttX Buildroot Toolchain
@@ -292,16 +292,16 @@ NuttX Configuration Tool
install 'mconf', make certain that your PATH variable includes
a path to that installation directory.
-NuttX Configuration Tool from DOS
----------------------------------
+NuttX Configuration Tool under DOS
+----------------------------------
-Recent versions of NuttX support building NuttX from a native Windows
-CMD.exe shell (see "Native Windows Build" below). But kconfig-frontends
-is a Linux tool. There have been some successes building a Windows
-native version of the kconfig-frontends tool, but that is not ready
-for prime time.
+ Recent versions of NuttX support building NuttX from a native Windows
+ CMD.exe shell (see "Native Windows Build" below). But kconfig-frontends
+ is a Linux tool. There have been some successes building a Windows
+ native version of the kconfig-frontends tool, but that is not ready
+ for prime time.
-At this point, there are only a few options for the Windows user:
+ At this point, there are only a few options for the Windows user:
1. You can run the configuration tool using Cygwin. However, the
Cygwin Makefile.win will complain so to do this will, you have
@@ -566,6 +566,12 @@ Native Windows Build
http://www.mingw.org/. If you are using GNUWin32, then it is recommended
the you not install the optional MSYS components as there may be conflicts.
+ This capability should still be considered a work in progress because:
+ (1) It has not been verfied on all targets and tools, and
+ (2) itstill lacks some of the creature-comforts of the more mature environments
+ (like a functional configure.sh script and 'make menuconfig' support.
+ See the section "NuttX Configuration Tool under DOS" above).
+
Installing GNUWin32
-------------------
diff --git a/nuttx/arch/arm/src/arm/up_doirq.c b/nuttx/arch/arm/src/arm/up_doirq.c
index c82587fff0..7cd1a6a1be 100644
--- a/nuttx/arch/arm/src/arm/up_doirq.c
+++ b/nuttx/arch/arm/src/arm/up_doirq.c
@@ -79,9 +79,11 @@ void up_doirq(int irq, uint32_t *regs)
uint32_t *savestate;
/* Nested interrupts are not supported in this implementation. If you want
- * implemented nested interrupts, you would have to (1) change the way that
- * current regs is handled and (2) the design associated with
- * CONFIG_ARCH_INTERRUPTSTACK.
+ * to implement nested interrupts, you would have to (1) change the way that
+ * current_regs is handled and (2) the design associated with
+ * CONFIG_ARCH_INTERRUPTSTACK. The savestate variable will not work for
+ * that purpose as implemented here because only the outermost nested
+ * interrupt can result in a context switch (it can probably be deleted).
*/
/* Current regs non-zero indicates that we are processing an interrupt;
diff --git a/nuttx/arch/arm/src/armv7-m/up_doirq.c b/nuttx/arch/arm/src/armv7-m/up_doirq.c
index 375054fba6..6063f9ca1c 100644
--- a/nuttx/arch/arm/src/armv7-m/up_doirq.c
+++ b/nuttx/arch/arm/src/armv7-m/up_doirq.c
@@ -79,9 +79,11 @@ uint32_t *up_doirq(int irq, uint32_t *regs)
uint32_t *savestate;
/* Nested interrupts are not supported in this implementation. If you want
- * implemented nested interrupts, you would have to (1) change the way that
- * current regs is handled and (2) the design associated with
- * CONFIG_ARCH_INTERRUPTSTACK.
+ * to implement nested interrupts, you would have to (1) change the way that
+ * current_regs is handled and (2) the design associated with
+ * CONFIG_ARCH_INTERRUPTSTACK. The savestate variable will not work for
+ * that purpose as implemented here because only the outermost nested
+ * interrupt can result in a context switch (it can probably be deleted).
*/
/* Current regs non-zero indicates that we are processing an interrupt;
diff --git a/nuttx/arch/avr/src/avr/up_doirq.c b/nuttx/arch/avr/src/avr/up_doirq.c
index e38bf7fa84..7533d21592 100644
--- a/nuttx/arch/avr/src/avr/up_doirq.c
+++ b/nuttx/arch/avr/src/avr/up_doirq.c
@@ -79,9 +79,11 @@ uint8_t *up_doirq(uint8_t irq, uint8_t *regs)
uint8_t *savestate;
/* Nested interrupts are not supported in this implementation. If you want
- * implemented nested interrupts, you would have to (1) change the way that
- * current regs is handled and (2) the design associated with
- * CONFIG_ARCH_INTERRUPTSTACK.
+ * to implement nested interrupts, you would have to (1) change the way that
+ * current_regs is handled and (2) the design associated with
+ * CONFIG_ARCH_INTERRUPTSTACK. The savestate variable will not work for
+ * that purpose as implemented here because only the outermost nested
+ * interrupt can result in a context switch (it can probably be deleted).
*/
/* Current regs non-zero indicates that we are processing an interrupt;
diff --git a/nuttx/arch/avr/src/avr32/up_doirq.c b/nuttx/arch/avr/src/avr32/up_doirq.c
index 7ade35fadc..2d4a5e14a9 100644
--- a/nuttx/arch/avr/src/avr32/up_doirq.c
+++ b/nuttx/arch/avr/src/avr32/up_doirq.c
@@ -79,9 +79,11 @@ uint32_t *up_doirq(int irq, uint32_t *regs)
uint32_t *savestate;
/* Nested interrupts are not supported in this implementation. If you want
- * implemented nested interrupts, you would have to (1) change the way that
- * current regs is handled and (2) the design associated with
- * CONFIG_ARCH_INTERRUPTSTACK.
+ * to implement nested interrupts, you would have to (1) change the way that
+ * current_regs is handled and (2) the design associated with
+ * CONFIG_ARCH_INTERRUPTSTACK. The savestate variable will not work for
+ * that purpose as implemented here because only the outermost nested
+ * interrupt can result in a context switch (it can probably be deleted).
*/
/* Current regs non-zero indicates that we are processing an interrupt;
diff --git a/nuttx/arch/hc/src/common/up_doirq.c b/nuttx/arch/hc/src/common/up_doirq.c
index d03b007df1..4a56dedbdc 100644
--- a/nuttx/arch/hc/src/common/up_doirq.c
+++ b/nuttx/arch/hc/src/common/up_doirq.c
@@ -79,9 +79,11 @@ uint8_t *up_doirq(int irq, uint8_t *regs)
uint8_t *savestate;
/* Nested interrupts are not supported in this implementation. If you want
- * implemented nested interrupts, you would have to (1) change the way that
- * current regs is handled and (2) the design associated with
- * CONFIG_ARCH_INTERRUPTSTACK.
+ * to implement nested interrupts, you would have to (1) change the way that
+ * current_regs is handled and (2) the design associated with
+ * CONFIG_ARCH_INTERRUPTSTACK. The savestate variable will not work for
+ * that purpose as implemented here because only the outermost nested
+ * interrupt can result in a context switch (it can probably be deleted).
*/
/* Current regs non-zero indicates that we are processing an interrupt;
diff --git a/nuttx/arch/mips/src/mips32/up_doirq.c b/nuttx/arch/mips/src/mips32/up_doirq.c
index 29cdf9c60a..b963881e30 100644
--- a/nuttx/arch/mips/src/mips32/up_doirq.c
+++ b/nuttx/arch/mips/src/mips32/up_doirq.c
@@ -79,9 +79,11 @@ uint32_t *up_doirq(int irq, uint32_t *regs)
uint32_t *savestate;
/* Nested interrupts are not supported in this implementation. If you want
- * implemented nested interrupts, you would have to (1) change the way that
- * current regs is handled and (2) the design associated with
- * CONFIG_ARCH_INTERRUPTSTACK.
+ * to implement nested interrupts, you would have to (1) change the way that
+ * current_regs is handled and (2) the design associated with
+ * CONFIG_ARCH_INTERRUPTSTACK. The savestate variable will not work for
+ * that purpose as implemented here because only the outermost nested
+ * interrupt can result in a context switch (it can probably be deleted).
*/
/* Current regs non-zero indicates that we are processing an interrupt;
diff --git a/nuttx/arch/sh/src/common/up_doirq.c b/nuttx/arch/sh/src/common/up_doirq.c
index 717196682b..185fa96845 100644
--- a/nuttx/arch/sh/src/common/up_doirq.c
+++ b/nuttx/arch/sh/src/common/up_doirq.c
@@ -79,6 +79,15 @@ uint32_t *up_doirq(int irq, uint32_t* regs)
{
uint32_t *savestate;
+ /* Nested interrupts are not supported in this implementation. If
+ * you want to implement nested interrupts, you would have to (1)
+ * change the way that current_regs is handled and (2) the design
+ * associated with CONFIG_ARCH_INTERRUPTSTACK. The savestate
+ * variable will not work for that purpose as implemented here
+ * because only the outermost nested interrupt can result in a
+ * context switch (it can probably be deleted).
+ */
+
/* Current regs non-zero indicates that we are processing
* an interrupt; current_regs is also used to manage
* interrupt level context switches.
diff --git a/nuttx/arch/z16/src/common/up_doirq.c b/nuttx/arch/z16/src/common/up_doirq.c
index 670e6985d4..9964f44325 100644
--- a/nuttx/arch/z16/src/common/up_doirq.c
+++ b/nuttx/arch/z16/src/common/up_doirq.c
@@ -90,6 +90,15 @@ FAR chipreg_t *up_doirq(int irq, FAR chipreg_t *regs)
{
FAR chipreg_t *savestate;
+ /* Nested interrupts are not supported in this implementation. If
+ * you want to implement nested interrupts, you would have to (1) change
+ * the way that current_regs is handled and (2) the design associated
+ * with CONFIG_ARCH_INTERRUPTSTACK. The savestate variable will not
+ * work for that purpose as implemented here because only the outermost
+ * nested interrupt can result in a context switch (it can probably be
+ * deleted).
+ */
+
/* Current regs non-zero indicates that we are processing
* an interrupt; current_regs is also used to manage
* interrupt level context switches.
diff --git a/nuttx/arch/z80/include/z80/chip.h b/nuttx/arch/z80/include/z80/chip.h
index 5c0c61166a..c355eb7887 100644
--- a/nuttx/arch/z80/include/z80/chip.h
+++ b/nuttx/arch/z80/include/z80/chip.h
@@ -34,8 +34,8 @@
*
************************************************************************************/
-#ifndef __ARCH_Z80_SRC_Z80_CHIP_H
-#define __ARCH_Z80_SRC_Z80_CHIP_H
+#ifndef __ARCH_Z80_INCLUDE_Z80_CHIP_H
+#define __ARCH_Z80_INCLUDE_Z80_CHIP_H
/************************************************************************************
* Included Files
@@ -76,4 +76,4 @@ extern "C" {
#endif
#endif
-#endif /* __ARCH_Z80_SRC_Z80_CHIP_H */
+#endif /* __ARCH_Z80_INCLUDE_Z80_CHIP_H */
diff --git a/nuttx/arch/z80/src/common/up_internal.h b/nuttx/arch/z80/src/common/up_internal.h
index def13b5462..5f1750b644 100644
--- a/nuttx/arch/z80/src/common/up_internal.h
+++ b/nuttx/arch/z80/src/common/up_internal.h
@@ -94,28 +94,26 @@
#ifndef __ASSEMBLY__
#ifdef __cplusplus
-#define EXTERN extern "C"
-extern "C" {
-#else
-#define EXTERN extern
+extern "C"
+{
#endif
/* Supplied by chip- or board-specific logic */
-EXTERN void up_irqinitialize(void);
-EXTERN int up_timerisr(int irq, FAR chipreg_t *regs);
+void up_irqinitialize(void);
+int up_timerisr(int irq, FAR chipreg_t *regs);
#ifdef USE_LOWSERIALINIT
-EXTERN void up_lowserialinit(void);
+void up_lowserialinit(void);
#endif
/* Defined in up_doirq.c */
-EXTERN FAR chipreg_t *up_doirq(uint8_t irq, FAR chipreg_t *regs);
+FAR chipreg_t *up_doirq(uint8_t irq, FAR chipreg_t *regs);
/* Define in up_sigdeliver */
-EXTERN void up_sigdeliver(void);
+void up_sigdeliver(void);
/* Defined in CPU-specific logic (only for Z180) */
@@ -132,7 +130,7 @@ void up_addregion(void);
/* Defined in up_serial.c */
#ifdef USE_SERIALDRIVER
-EXTERN void up_serialinit(void);
+void up_serialinit(void);
#else
# define up_serialinit()
#endif
@@ -140,7 +138,7 @@ EXTERN void up_serialinit(void);
/* Defined in drivers/lowconsole.c */
#ifdef CONFIG_DEV_LOWCONSOLE
-EXTERN void lowconsole_init(void);
+void lowconsole_init(void);
#else
# define lowconsole_init()
#endif
@@ -159,14 +157,14 @@ extern void up_puts(const char *str);
/* Defined in up_timerisr.c */
-EXTERN void up_timerinit(void);
+void up_timerinit(void);
/* Defined in board/up_leds.c */
#ifdef CONFIG_ARCH_LEDS
-EXTERN void up_ledinit(void);
-EXTERN void up_ledon(int led);
-EXTERN void up_ledoff(int led);
+void up_ledinit(void);
+void up_ledon(int led);
+void up_ledoff(int led);
#else
# define up_ledinit()
# define up_ledon(led)
@@ -176,16 +174,16 @@ EXTERN void up_ledoff(int led);
/* Architecture specific hook into the timer interrupt handler */
#ifdef CONFIG_ARCH_TIMERHOOK
-EXTERN void up_timerhook(void);
+void up_timerhook(void);
#endif
/* Defined in board/up_network.c */
#ifdef CONFIG_NET
-EXTERN int up_netinitialize(void);
-EXTERN void up_netuninitialize(void);
+int up_netinitialize(void);
+void up_netuninitialize(void);
# ifdef CONFIG_ARCH_MCFILTER
-EXTERN int up_multicastfilter(FAR struct uip_driver_s *dev, FAR uint8_t *mac, bool enable);
+int up_multicastfilter(FAR struct uip_driver_s *dev, FAR uint8_t *mac, bool enable);
# else
# define up_multicastfilter(dev, mac, enable)
# endif
@@ -197,19 +195,18 @@ EXTERN int up_multicastfilter(FAR struct uip_driver_s *dev, FAR uint8_t *mac, bo
/* Return the current value of the stack pointer (used in stack dump logic) */
-EXTERN uint16_t up_getsp(void);
+uint16_t up_getsp(void);
/* Dump stack and registers */
#ifdef CONFIG_ARCH_STACKDUMP
-EXTERN void up_stackdump(void);
+void up_stackdump(void);
# define REGISTER_DUMP() _REGISTER_DUMP()
#else
# define up_stackdump()
# define REGISTER_DUMP()
#endif
-#undef EXTERN
#ifdef __cplusplus
}
#endif
diff --git a/nuttx/arch/z80/src/ez80/switch.h b/nuttx/arch/z80/src/ez80/switch.h
index 0bac6aed1a..0970b25ce7 100644
--- a/nuttx/arch/z80/src/ez80/switch.h
+++ b/nuttx/arch/z80/src/ez80/switch.h
@@ -67,7 +67,14 @@
#define IN_INTERRUPT() (current_regs != NULL)
-/* The following macro is used when the system enters interrupt handling logic */
+/* The following macro is used when the system enters interrupt handling logic
+ *
+ * NOTE: Nested interrupts are not supported in this implementation. If you want
+ * to implement nested interrupts, you would have to change the way that
+ * current_regs is handled. The savestate variable would not work for
+ * that purpose as implemented here because only the outermost nested
+ * interrupt can result in a context switch (it can probably be deleted).
+ */
#define DECL_SAVESTATE() \
FAR chipreg_t *savestate
@@ -132,33 +139,30 @@ extern volatile chipreg_t *current_regs;
#ifndef __ASSEMBLY__
#ifdef __cplusplus
-#define EXTERN extern "C"
-extern "C" {
-#else
-#define EXTERN extern
+extern "C"
+{
#endif
/* Defined in ez80_copystate.c */
-EXTERN void ez80_copystate(FAR chipreg_t *dest, FAR const chipreg_t *src);
+void ez80_copystate(FAR chipreg_t *dest, FAR const chipreg_t *src);
/* Defined in ez80_saveusercontext.asm */
-EXTERN int ez80_saveusercontext(FAR chipreg_t *regs);
+int ez80_saveusercontext(FAR chipreg_t *regs);
/* Defined in ez80_restorecontext.asm */
-EXTERN void ez80_restorecontext(FAR chipreg_t *regs);
+void ez80_restorecontext(FAR chipreg_t *regs);
/* Defined in ez80_sigsetup.c */
-EXTERN void ez80_sigsetup(FAR _TCB *tcb, sig_deliver_t sigdeliver, chipreg_t *regs);
+void ez80_sigsetup(FAR _TCB *tcb, sig_deliver_t sigdeliver, chipreg_t *regs);
/* Defined in ez80_registerdump.c */
-EXTERN void ez80_registerdump(void);
+void ez80_registerdump(void);
-#undef EXTERN
#ifdef __cplusplus
}
#endif
diff --git a/nuttx/arch/z80/src/z180/switch.h b/nuttx/arch/z80/src/z180/switch.h
index ae80f4f76d..7bf851a7ce 100644
--- a/nuttx/arch/z80/src/z180/switch.h
+++ b/nuttx/arch/z80/src/z180/switch.h
@@ -77,9 +77,11 @@
* - savestate holds the previous value of current_state.
* - savecpr holds the previous value of current_cpr.
*
- * TODO: I think this logic is bad... I do not thing that this will really
- * handle nested interrupts correctly. What if we are nested and then a
- * context switch occurs? current_regs will not be updated correctly!
+ * NOTE: Nested interrupts are not supported in this implementation. If you want
+ * to implement nested interrupts, you would have to change the way that
+ * current_regs/cbr is handled. The savestate/savecbr variables would not work
+ * for that purpose as implemented here because only the outermost nested
+ * interrupt can result in a context switch (they can probabaly be deleted).
*/
#define DECL_SAVESTATE() \
@@ -203,33 +205,30 @@ extern uint8_t current_cbr;
#ifndef __ASSEMBLY__
#ifdef __cplusplus
-#define EXTERN extern "C"
-extern "C" {
-#else
-#define EXTERN extern
+extern "C"
+{
#endif
/* Defined in z180_copystate.c */
-EXTERN void z180_copystate(FAR chipreg_t *dest, FAR const chipreg_t *src);
+void z180_copystate(FAR chipreg_t *dest, FAR const chipreg_t *src);
/* Defined in z180_saveusercontext.asm */
-EXTERN int z180_saveusercontext(FAR chipreg_t *regs);
+int z180_saveusercontext(FAR chipreg_t *regs);
/* Defined in z180_restoreusercontext.asm */
-EXTERN void z180_restoreusercontext(FAR chipreg_t *regs);
+void z180_restoreusercontext(FAR chipreg_t *regs);
/* Defined in z180_sigsetup.c */
-EXTERN void z180_sigsetup(FAR _TCB *tcb, sig_deliver_t sigdeliver, FAR chipreg_t *regs);
+void z180_sigsetup(FAR _TCB *tcb, sig_deliver_t sigdeliver, FAR chipreg_t *regs);
/* Defined in z180_registerdump.c */
-EXTERN void z180_registerdump(void);
+void z180_registerdump(void);
-#undef EXTERN
#ifdef __cplusplus
}
#endif
diff --git a/nuttx/arch/z80/src/z8/switch.h b/nuttx/arch/z80/src/z8/switch.h
index 45089947ca..17f15b6daf 100644
--- a/nuttx/arch/z80/src/z8/switch.h
+++ b/nuttx/arch/z80/src/z8/switch.h
@@ -112,7 +112,14 @@
#define IN_INTERRUPT() \
(g_z8irqstate.state != Z8_IRQSTATE_NONE)
-/* The following macro is used when the system enters interrupt handling logic */
+/* The following macro is used when the system enters interrupt handling logic
+ *
+ * NOTE: Nested interrupts are not supported in this implementation. If you want
+ * to implement nested interrupts, you would have to change the way that
+ * current_regs is handled. The savestate variable would not work for
+ * that purpose as implemented here because only the outermost nested
+ * interrupt can result in a context switch (it can probably be deleted).
+ */
#define DECL_SAVESTATE() \
struct z8_irqstate_s savestate
@@ -216,37 +223,34 @@ extern struct z8_irqstate_s g_z8irqstate;
#ifndef __ASSEMBLY__
#ifdef __cplusplus
-#define EXTERN extern "C"
-extern "C" {
-#else
-#define EXTERN extern
+extern "C"
+{
#endif
/* Defined in z8_irq.c */
-EXTERN void up_maskack_irq(int irq);
+void up_maskack_irq(int irq);
/* Defined in z8_saveusercontext.asm */
-EXTERN int z8_saveusercontext(FAR chipreg_t *regs);
+int z8_saveusercontext(FAR chipreg_t *regs);
/* Defined in z8_saveirqcontext.c */
-EXTERN void z8_saveirqcontext(FAR chipreg_t *regs);
+void z8_saveirqcontext(FAR chipreg_t *regs);
/* Defined in z8_restorecontext.asm */
-EXTERN void z8_restorecontext(FAR chipreg_t *regs);
+void z8_restorecontext(FAR chipreg_t *regs);
/* Defined in z8_sigsetup.c */
-EXTERN void z8_sigsetup(FAR _TCB *tcb, sig_deliver_t sigdeliver, FAR chipreg_t *regs);
+void z8_sigsetup(FAR _TCB *tcb, sig_deliver_t sigdeliver, FAR chipreg_t *regs);
/* Defined in z8_registerdump.c */
-EXTERN void z8_registerdump(void);
+void z8_registerdump(void);
-#undef EXTERN
#ifdef __cplusplus
}
#endif
diff --git a/nuttx/arch/z80/src/z80/switch.h b/nuttx/arch/z80/src/z80/switch.h
index 3732a32a39..4a49c70eff 100644
--- a/nuttx/arch/z80/src/z80/switch.h
+++ b/nuttx/arch/z80/src/z80/switch.h
@@ -66,7 +66,14 @@
#define IN_INTERRUPT() (current_regs != NULL)
-/* The following macro is used when the system enters interrupt handling logic */
+/* The following macro is used when the system enters interrupt handling logic
+ *
+ * NOTE: Nested interrupts are not supported in this implementation. If you want
+ * to implement nested interrupts, you would have to change the way that
+ * current_regs is handled. The savestate variable would not work for
+ * that purpose as implemented here because only the outermost nested
+ * interrupt can result in a context switch (it can probably be deleted).
+ */
#define DECL_SAVESTATE() \
FAR chipreg_t *savestate
@@ -131,33 +138,30 @@ extern volatile chipreg_t *current_regs;
#ifndef __ASSEMBLY__
#ifdef __cplusplus
-#define EXTERN extern "C"
-extern "C" {
-#else
-#define EXTERN extern
+extern "C"
+{
#endif
/* Defined in z80_copystate.c */
-EXTERN void z80_copystate(FAR chipreg_t *dest, FAR const chipreg_t *src);
+void z80_copystate(FAR chipreg_t *dest, FAR const chipreg_t *src);
/* Defined in z80_saveusercontext.asm */
-EXTERN int z80_saveusercontext(FAR chipreg_t *regs);
+int z80_saveusercontext(FAR chipreg_t *regs);
/* Defined in z80_restoreusercontext.asm */
-EXTERN void z80_restoreusercontext(FAR chipreg_t *regs);
+void z80_restoreusercontext(FAR chipreg_t *regs);
/* Defined in z80_sigsetup.c */
-EXTERN void z80_sigsetup(FAR _TCB *tcb, sig_deliver_t sigdeliver, FAR chipreg_t *regs);
+void z80_sigsetup(FAR _TCB *tcb, sig_deliver_t sigdeliver, FAR chipreg_t *regs);
/* Defined in z80_registerdump.c */
-EXTERN void z80_registerdump(void);
+void z80_registerdump(void);
-#undef EXTERN
#ifdef __cplusplus
}
#endif
From edb3871913d4fa7d6ef0f01827a194d6362c3c71 Mon Sep 17 00:00:00 2001
From: patacongo
Date: Sun, 23 Dec 2012 17:35:06 +0000
Subject: [PATCH 006/118] Remove some dependencies of distclean on clean. This
should not be necessary in higher level makefiles and should speed up make
distclean
git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5453 42af7a65-404d-4744-a932-0658087f49c3
---
apps/ChangeLog.txt | 5 +++++
apps/Makefile | 2 +-
apps/examples/Makefile | 2 +-
apps/interpreters/Makefile | 2 +-
apps/netutils/Makefile | 2 +-
apps/system/Makefile | 2 +-
6 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/apps/ChangeLog.txt b/apps/ChangeLog.txt
index 0695747f81..614538ad59 100644
--- a/apps/ChangeLog.txt
+++ b/apps/ChangeLog.txt
@@ -435,3 +435,8 @@
logic to find the absolute path to the program using the PATH variable.
6.25 2013-xx-xx Gregory Nutt
+
+ * Makefiles: Removed dependency of distclean on clean in most top-level
+ files. It makes sense for 'leaf' Makefiles to have this dependency,
+ but it does not make sense for upper-level Makefiles.
+
diff --git a/apps/Makefile b/apps/Makefile
index 353894b7f8..0973d64b5f 100644
--- a/apps/Makefile
+++ b/apps/Makefile
@@ -177,7 +177,7 @@ endif
$(call DELFILE, $(BIN))
$(call CLEAN)
-distclean: # clean
+distclean:
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
$(Q) for %%G in ($(SUBDIRS)) do ( \
$(MAKE) -C %%G distclean TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)" \
diff --git a/apps/examples/Makefile b/apps/examples/Makefile
index bdbfd4de80..50e9596d78 100644
--- a/apps/examples/Makefile
+++ b/apps/examples/Makefile
@@ -120,7 +120,7 @@ depend: $(foreach SDIR, $(SUBDIRS), $(SDIR)_depend)
clean: $(foreach SDIR, $(SUBDIRS), $(SDIR)_clean)
-distclean: clean $(foreach SDIR, $(SUBDIRS), $(SDIR)_distclean)
+distclean: $(foreach SDIR, $(SUBDIRS), $(SDIR)_distclean)
-include Make.dep
diff --git a/apps/interpreters/Makefile b/apps/interpreters/Makefile
index 867d45f996..f785287149 100644
--- a/apps/interpreters/Makefile
+++ b/apps/interpreters/Makefile
@@ -73,4 +73,4 @@ depend: $(foreach SDIR, $(INSTALLED_DIRS), $(SDIR)_depend)
clean: $(foreach SDIR, $(INSTALLED_DIRS), $(SDIR)_clean)
-distclean: clean $(foreach SDIR, $(INSTALLED_DIRS), $(SDIR)_distclean)
+distclean: $(foreach SDIR, $(INSTALLED_DIRS), $(SDIR)_distclean)
diff --git a/apps/netutils/Makefile b/apps/netutils/Makefile
index 0879ada4e7..781770fc10 100644
--- a/apps/netutils/Makefile
+++ b/apps/netutils/Makefile
@@ -64,4 +64,4 @@ depend: $(foreach SDIR, $(SUBDIRS), $(SDIR)_depend)
clean: $(foreach SDIR, $(SUBDIRS), $(SDIR)_clean)
-distclean: clean $(foreach SDIR, $(SUBDIRS), $(SDIR)_distclean)
+distclean: $(foreach SDIR, $(SUBDIRS), $(SDIR)_distclean)
diff --git a/apps/system/Makefile b/apps/system/Makefile
index 9955a6b2ce..057fbcf776 100644
--- a/apps/system/Makefile
+++ b/apps/system/Makefile
@@ -73,4 +73,4 @@ depend: $(foreach SDIR, $(INSTALLED_DIRS), $(SDIR)_depend)
clean: $(foreach SDIR, $(INSTALLED_DIRS), $(SDIR)_clean)
-distclean: clean $(foreach SDIR, $(INSTALLED_DIRS), $(SDIR)_distclean)
+distclean: $(foreach SDIR, $(INSTALLED_DIRS), $(SDIR)_distclean)
From 5cfde412bb9cbd55db2854939d25c2d8e053aaa5 Mon Sep 17 00:00:00 2001
From: patacongo
Date: Sun, 23 Dec 2012 20:22:41 +0000
Subject: [PATCH 007/118] Rename namedapp as simply builtin
git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5454 42af7a65-404d-4744-a932-0658087f49c3
---
apps/ChangeLog.txt | 1 +
apps/Kconfig | 4 +-
apps/Make.defs | 4 +-
apps/Makefile | 14 ++--
apps/README.txt | 30 +++----
apps/{namedapp => builtin}/Kconfig | 8 +-
apps/{namedapp => builtin}/Make.defs | 6 +-
apps/{namedapp => builtin}/Makefile | 12 +--
apps/{namedapp => builtin}/binfs.c | 12 +--
.../namedapp.c => builtin/builtin.c} | 12 +--
.../namedapp.h => builtin/builtin.h} | 13 ++-
.../exec_builtin.c} | 42 +++++-----
apps/include/apps.h | 18 ++---
apps/nshlib/Kconfig | 8 +-
apps/nshlib/README.txt | 2 +-
apps/nshlib/nsh_apps.c | 6 +-
apps/nshlib/nsh_parse.c | 8 +-
nuttx/Documentation/NuttShell.html | 81 +++++++++----------
nuttx/configs/cloudctrl/nsh/defconfig | 2 +-
.../configs/ez80f910200kitg/ostest/defconfig | 2 +-
nuttx/configs/ez80f910200zco/ostest/defconfig | 2 +-
nuttx/configs/fire-stm32v2/nsh/defconfig | 2 +-
nuttx/configs/p112/ostest/defconfig | 2 +-
nuttx/configs/shenzhou/nsh/defconfig | 2 +-
nuttx/configs/shenzhou/nxwm/defconfig | 2 +-
nuttx/configs/shenzhou/thttpd/defconfig | 2 +-
nuttx/configs/sim/README.txt | 6 +-
nuttx/configs/sim/cxxtest/defconfig | 2 +-
nuttx/configs/sim/nxwm/defconfig | 2 +-
nuttx/configs/sim/ostest/defconfig | 2 +-
nuttx/configs/stm3220g-eval/nxwm/defconfig | 2 +-
.../configs/stm3240g-eval/discover/defconfig | 2 +-
nuttx/configs/stm3240g-eval/xmlrpc/defconfig | 2 +-
.../configs/stm32f100rc_generic/nsh/defconfig | 2 +-
.../stm32f100rc_generic/ostest/defconfig | 2 +-
.../stm32f4discovery/cxxtest/defconfig | 2 +-
nuttx/configs/stm32f4discovery/elf/defconfig | 2 +-
.../stm32f4discovery/nxlines/defconfig | 2 +-
.../configs/stm32f4discovery/ostest/defconfig | 2 +-
.../stm32f4discovery/winbuild/defconfig | 2 +-
nuttx/configs/vsn/src/README.txt | 5 +-
nuttx/configs/xtrs/nsh/defconfig | 2 +-
nuttx/configs/xtrs/ostest/defconfig | 2 +-
nuttx/configs/xtrs/pashello/defconfig | 2 +-
.../configs/z16f2800100zcog/ostest/defconfig | 2 +-
.../z16f2800100zcog/pashello/defconfig | 2 +-
nuttx/configs/z80sim/nsh/defconfig | 2 +-
nuttx/configs/z80sim/ostest/defconfig | 2 +-
nuttx/configs/z80sim/pashello/defconfig | 2 +-
nuttx/configs/z8encore000zco/ostest/defconfig | 2 +-
nuttx/configs/z8f64200100kit/ostest/defconfig | 2 +-
nuttx/sched/os_bringup.c | 4 +-
52 files changed, 179 insertions(+), 179 deletions(-)
rename apps/{namedapp => builtin}/Kconfig (66%)
rename apps/{namedapp => builtin}/Make.defs (95%)
rename apps/{namedapp => builtin}/Makefile (93%)
rename apps/{namedapp => builtin}/binfs.c (98%)
rename apps/{namedapp/namedapp.c => builtin/builtin.c} (94%)
rename apps/{namedapp/namedapp.h => builtin/builtin.h} (92%)
rename apps/{namedapp/exec_namedapp.c => builtin/exec_builtin.c} (86%)
diff --git a/apps/ChangeLog.txt b/apps/ChangeLog.txt
index 614538ad59..886526b187 100644
--- a/apps/ChangeLog.txt
+++ b/apps/ChangeLog.txt
@@ -439,4 +439,5 @@
* Makefiles: Removed dependency of distclean on clean in most top-level
files. It makes sense for 'leaf' Makefiles to have this dependency,
but it does not make sense for upper-level Makefiles.
+ * namedapp/: Renamed to builtins in preparation for another change.
diff --git a/apps/Kconfig b/apps/Kconfig
index ea9bd2d314..68c36f5a5c 100644
--- a/apps/Kconfig
+++ b/apps/Kconfig
@@ -3,8 +3,8 @@
# see misc/tools/kconfig-language.txt.
#
-menu "Named Applications"
-source "$APPSDIR/namedapp/Kconfig"
+menu "Built-In Applications"
+source "$APPSDIR/builtin/Kconfig"
endmenu
menu "Examples"
diff --git a/apps/Make.defs b/apps/Make.defs
index 53ac7f8be5..12b351e7f2 100644
--- a/apps/Make.defs
+++ b/apps/Make.defs
@@ -36,6 +36,6 @@
define REGISTER
@echo "Register: $1"
- @echo "{ \"$1\", $2, $3, $4 }," >> "$(APPDIR)/namedapp/namedapp_list.h"
- @echo "EXTERN int $4(int argc, char *argv[]);" >> "$(APPDIR)/namedapp/namedapp_proto.h"
+ @echo "{ \"$1\", $2, $3, $4 }," >> "$(APPDIR)/builtin/builtin_list.h"
+ @echo "EXTERN int $4(int argc, char *argv[]);" >> "$(APPDIR)/builtin/builtin_proto.h"
endef
diff --git a/apps/Makefile b/apps/Makefile
index 0973d64b5f..299560195c 100644
--- a/apps/Makefile
+++ b/apps/Makefile
@@ -44,11 +44,11 @@ APPDIR = ${shell pwd}
# action. It is created by the configured appconfig file (a copy of which
# appears in this directory as .config)
# SUBDIRS is the list of all directories containing Makefiles. It is used
-# only for cleaning. namedapp must always be the first in the list. This
+# only for cleaning. builtin must always be the first in the list. This
# list can be extended by the .config file as well.
CONFIGURED_APPS =
-SUBDIRS = examples graphics interpreters modbus namedapp nshlib netutils system
+SUBDIRS = examples graphics interpreters modbus builtin nshlib netutils system
# There are two different mechanisms for obtaining the list of configured
# directories:
@@ -69,9 +69,9 @@ SUBDIRS = examples graphics interpreters modbus namedapp nshlib netutils system
ifeq ($(CONFIG_NUTTX_NEWCONFIG),y)
-# namedapp/Make.defs must be included first
+# builtin/Make.defs must be included first
-include namedapp/Make.defs
+include builtin/Make.defs
include examples/Make.defs
include graphics/Make.defs
include interpreters/Make.defs
@@ -82,7 +82,7 @@ include system/Make.defs
# INSTALLED_APPS is the list of currently available application directories. It
# is the same as CONFIGURED_APPS, but filtered to exclude any non-existent
-# application directory. namedapp is always in the list of applications to be
+# application directory. builtin is always in the list of applications to be
# built.
INSTALLED_APPS =
@@ -94,10 +94,10 @@ else
# INSTALLED_APPS is the list of currently available application directories. It
# is the same as CONFIGURED_APPS, but filtered to exclude any non-existent
-# application directory. namedapp is always in the list of applications to be
+# application directory. builtin is always in the list of applications to be
# built.
-INSTALLED_APPS = namedapp
+INSTALLED_APPS = builtin
endif
# Create the list of available applications (INSTALLED_APPS)
diff --git a/apps/README.txt b/apps/README.txt
index 7a379254e7..4f043dcfab 100644
--- a/apps/README.txt
+++ b/apps/README.txt
@@ -6,12 +6,12 @@ Contents
General
Directory Location
- Named Applications
- Named Startup main() function
+ Built-In Applications
+ Built-In Startup main() function
NuttShell (NSH) Built-In Commands
Synchronous Built-In Commands
Application Configuration File
- Example Named Application
+ Example Built-In Application
Building NuttX with Board-Specific Pieces Outside the Source Tree
General
@@ -47,14 +47,14 @@ ways to do that:
path to the application directory on the configuration command line
like: ./configure.sh -a /
-Named Applications
-------------------
+Built-In Applications
+---------------------
NuttX also supports applications that can be started using a name string.
In this case, application entry points with their requirements are gathered
together in two files:
- - namedapp/namedapp_proto.h Entry points, prototype function
- - namedapp/namedapp_list.h Application specific information and requirements
+ - builtin/builtin_proto.h Entry points, prototype function
+ - builtin/builtin_list.h Application specific information and requirements
The build occurs in several phases as different build targets are executed:
(1) context, (2) depend, and (3) default (all). Application information is
@@ -62,18 +62,18 @@ collected during the make context build phase.
To execute an application function:
- exec_namedapp() is defined in the nuttx/include/apps/apps.h
+ exec_builtin() is defined in the nuttx/include/apps/apps.h
NuttShell (NSH) Built-In Commands
---------------------------------
-One use of named applications is to provide a way of invoking your custom
+One use of builtin applications is to provide a way of invoking your custom
application through the NuttShell (NSH) command line. NSH will support
a seamless method invoking the applications, when the following option is
enabled in the NuttX configuration file:
CONFIG_NSH_BUILTIN_APPS=y
-Applications registered in the apps/namedapp/namedapp_list.h file will then
+Applications registered in the apps/builtin/builtin_list.h file will then
be accessible from the NSH command line. If you type 'help' at the NSH
prompt, you will see a list of the registered commands.
@@ -109,9 +109,9 @@ CONFIGURED_APPS list like:
CONFIGURED_APPS += examples/hello system/poweroff
-Named Start-Up main() function
+Built-In Start-Up main() function
------------------------------
-A named application can even be used as the main, start-up entry point
+A builtin application can even be used as the main, start-up entry point
into your embedded software. When the user defines this option in
the NuttX configuration file:
@@ -124,10 +124,10 @@ will call:
int hello_main(int argc, char *argv[])
-Example Named Application
--------------------------
+Example Built-In Application
+----------------------------
An example application skeleton can be found under the examples/hello
-sub-directory. This example shows how a named application can be added
+sub-directory. This example shows how a builtin application can be added
to the project. One must define:
1. create sub-directory as: appname
diff --git a/apps/namedapp/Kconfig b/apps/builtin/Kconfig
similarity index 66%
rename from apps/namedapp/Kconfig
rename to apps/builtin/Kconfig
index 8d8f03421b..8310e6df9b 100644
--- a/apps/namedapp/Kconfig
+++ b/apps/builtin/Kconfig
@@ -3,13 +3,13 @@
# see misc/tools/kconfig-language.txt.
#
-config NAMEDAPP
- bool "Support named applications"
+config BUILTIN
+ bool "Support Builtin Applications"
default n
---help---
- Enable support for named applications. This features assigns a string
+ Enable support for builtin applications. This features assigns a string
name to an application. This feature is also the underlying requirement
to support built-in applications in the NuttShell (NSH).
-if NAMEDAPP
+if BUILTIN
endif
diff --git a/apps/namedapp/Make.defs b/apps/builtin/Make.defs
similarity index 95%
rename from apps/namedapp/Make.defs
rename to apps/builtin/Make.defs
index 399fefee8a..ab6292cc3f 100644
--- a/apps/namedapp/Make.defs
+++ b/apps/builtin/Make.defs
@@ -1,5 +1,5 @@
############################################################################
-# apps/namedapps/Make.defs
+# apps/builtin/Make.defs
# Adds selected applications to apps/ build
#
# Copyright (C) 2012 Gregory Nutt. All rights reserved.
@@ -34,7 +34,7 @@
#
############################################################################
-ifeq ($(CONFIG_NAMEDAPP),y)
-CONFIGURED_APPS += namedapp
+ifeq ($(CONFIG_BUILTIN),y)
+CONFIGURED_APPS += builtin
endif
diff --git a/apps/namedapp/Makefile b/apps/builtin/Makefile
similarity index 93%
rename from apps/namedapp/Makefile
rename to apps/builtin/Makefile
index a88c735674..72ba0347f7 100644
--- a/apps/namedapp/Makefile
+++ b/apps/builtin/Makefile
@@ -1,5 +1,5 @@
############################################################################
-# apps/nshlib/Makefile
+# apps/builtin/Makefile
#
# Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt
@@ -42,7 +42,7 @@ include $(APPDIR)/Make.defs
# Source and object files
ASRCS =
-CSRCS = namedapp.c exec_namedapp.c
+CSRCS = builtin.c exec_builtin.c
ifeq ($(CONFIG_APPS_BINDIR),y)
CSRCS += binfs.c
@@ -83,8 +83,8 @@ $(COBJS): %$(OBJEXT): %.c
$(Q) touch .built
.context:
- @echo "/* List of application requirements, generated during make context. */" > namedapp_list.h
- @echo "/* List of application entry points, generated during make context. */" > namedapp_proto.h
+ @echo "/* List of application requirements, generated during make context. */" > builtin_list.h
+ @echo "/* List of application entry points, generated during make context. */" > builtin_proto.h
$(Q) touch $@
context: .context
@@ -103,8 +103,8 @@ distclean: clean
$(call DELFILE, .context)
$(call DELFILE, Make.dep)
$(call DELFILE, .depend)
- $(call DELFILE, namedapp_list.h)
- $(call DELFILE, namedapp_proto.h)
+ $(call DELFILE, builtin_list.h)
+ $(call DELFILE, builtin_proto.h)
-include Make.dep
diff --git a/apps/namedapp/binfs.c b/apps/builtin/binfs.c
similarity index 98%
rename from apps/namedapp/binfs.c
rename to apps/builtin/binfs.c
index 36e3ace92e..501f0a4b93 100644
--- a/apps/namedapp/binfs.c
+++ b/apps/builtin/binfs.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * apps/namedapps/binfs.c
+ * apps/builtin/binfs.c
*
* Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt
@@ -55,7 +55,7 @@
#include
#include
-#include "namedapp.h"
+#include "builtin.h"
#if !defined(CONFIG_DISABLE_MOUNTPOINT) && defined(CONFIG_APPS_BINDIR)
@@ -362,7 +362,7 @@ static int binfs_readdir(struct inode *mountpt, struct fs_dirent_s *dir)
/* Have we reached the end of the directory */
index = dir->u.binfs.fb_index;
- if (namedapps[index].name == NULL)
+ if (builtins[index].name == NULL)
{
/* We signal the end of the directory by returning the
* special error -ENOENT
@@ -375,9 +375,9 @@ static int binfs_readdir(struct inode *mountpt, struct fs_dirent_s *dir)
{
/* Save the filename and file type */
- fvdbg("Entry %d: \"%s\"\n", index, namedapps[index].name);
+ fvdbg("Entry %d: \"%s\"\n", index, builtins[index].name);
dir->fd_dir.d_type = DTYPE_FILE;
- strncpy(dir->fd_dir.d_name, namedapps[index].name, NAME_MAX+1);
+ strncpy(dir->fd_dir.d_name, builtins[index].name, NAME_MAX+1);
/* The application list is terminated by an entry with a NULL name.
* Therefore, there is at least one more entry in the list.
@@ -559,7 +559,7 @@ static int binfs_stat(struct inode *mountpt, const char *relpath, struct stat *b
{
/* Check if there is a file with this name. */
- if (namedapp_isavail(relpath) < 0)
+ if (builtin_isavail(relpath) < 0)
{
ret = -ENOENT;
goto errout_with_semaphore;
diff --git a/apps/namedapp/namedapp.c b/apps/builtin/builtin.c
similarity index 94%
rename from apps/namedapp/namedapp.c
rename to apps/builtin/builtin.c
index d59ce6e3b7..a6ed7dd3fb 100644
--- a/apps/namedapp/namedapp.c
+++ b/apps/builtin/builtin.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * apps/namedaps/namedapp.c
+ * apps/builtin/builtin.c
*
* Copyright (C) 2011 Uros Platise. All rights reserved.
* Copyright (C) 2011 Gregory Nutt. All rights reserved.
@@ -62,11 +62,11 @@ extern "C" {
#define EXTERN extern
#endif
-#include "namedapp_proto.h"
+#include "builtin_proto.h"
-const struct namedapp_s namedapps[] =
+const struct builtin_s builtins[] =
{
-# include "namedapp_list.h"
+# include "builtin_list.h"
{ NULL, 0, 0, 0 }
};
@@ -88,9 +88,9 @@ const struct namedapp_s namedapps[] =
* Public Functions
****************************************************************************/
-int number_namedapps(void)
+int number_builtins(void)
{
- return sizeof(namedapps)/sizeof(struct namedapp_s) - 1;
+ return sizeof(builtins)/sizeof(struct builtin_s) - 1;
}
diff --git a/apps/namedapp/namedapp.h b/apps/builtin/builtin.h
similarity index 92%
rename from apps/namedapp/namedapp.h
rename to apps/builtin/builtin.h
index 7fcdf42dc2..3f7ddd7ce3 100644
--- a/apps/namedapp/namedapp.h
+++ b/apps/builtin/builtin.h
@@ -1,5 +1,5 @@
/****************************************************************************
- * apps/namedaps/namedapp.h
+ * apps/builtin/builtin.h
*
* Copyright (C) 2011 Uros Platise. All rights reserved.
* Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
@@ -35,8 +35,8 @@
*
****************************************************************************/
-#ifndef __APPS_NAMEDAPP_NAMEDAPP_H
-#define __APPS_NAMEDAPP_NAMEDAPP_H
+#ifndef __APPS_BUILTIN_BUILTIN_H
+#define __APPS_BUILTIN_BUILTIN_H
/****************************************************************************
* Included Files
@@ -53,7 +53,6 @@
* Public Data
****************************************************************************/
-#undef EXTERN
#if defined(__cplusplus)
#define EXTERN extern "C"
extern "C" {
@@ -61,18 +60,18 @@ extern "C" {
#define EXTERN extern
#endif
-EXTERN const struct namedapp_s namedapps[];
+EXTERN const struct builtin_s builtins[];
/****************************************************************************
* Public Functions
****************************************************************************/
-EXTERN int number_namedapps(void);
+EXTERN int number_builtins(void);
#undef EXTERN
#if defined(__cplusplus)
}
#endif
-#endif /* __APPS_NAMEDAPP_NAMEDAPP_H */
+#endif /* __APPS_BUILTIN_BUILTIN_H */
diff --git a/apps/namedapp/exec_namedapp.c b/apps/builtin/exec_builtin.c
similarity index 86%
rename from apps/namedapp/exec_namedapp.c
rename to apps/builtin/exec_builtin.c
index 264fca7b9e..dc36302300 100644
--- a/apps/namedapp/exec_namedapp.c
+++ b/apps/builtin/exec_builtin.c
@@ -1,5 +1,5 @@
/****************************************************************************
- * apps/namedaps/exec_namedapp.c
+ * apps/builtin/exec_builtin.c
*
* Copyright (C) 2011 Uros Platise. All rights reserved.
* Author: Uros Platise
@@ -49,7 +49,7 @@
#include
#include
-#include "namedapp.h"
+#include "builtin.h"
/****************************************************************************
* Private Types
@@ -72,26 +72,26 @@
****************************************************************************/
/****************************************************************************
- * Name: namedapp_getname
+ * Name: builtin_getname
*
* Description:
- * Return the name of the application at index in the table of named
+ * Return the name of the application at index in the table of builtin
* applications.
*
****************************************************************************/
-const char *namedapp_getname(int index)
+const char *builtin_getname(int index)
{
- if (index < 0 || index >= number_namedapps())
+ if (index < 0 || index >= number_builtins())
{
return NULL;
}
- return namedapps[index].name;
+ return builtins[index].name;
}
/****************************************************************************
- * Name: namedapp_isavail
+ * Name: builtin_isavail
*
* Description:
* Return the index into the table of applications for the applicaiton with
@@ -99,13 +99,13 @@ const char *namedapp_getname(int index)
*
****************************************************************************/
-int namedapp_isavail(FAR const char *appname)
+int builtin_isavail(FAR const char *appname)
{
int i;
- for (i = 0; namedapps[i].name; i++)
+ for (i = 0; builtins[i].name; i++)
{
- if (!strcmp(namedapps[i].name, appname))
+ if (!strcmp(builtins[i].name, appname))
{
return i;
}
@@ -116,39 +116,39 @@ int namedapp_isavail(FAR const char *appname)
}
/****************************************************************************
- * Name: namedapp_isavail
+ * Name: builtin_isavail
*
* Description:
* Execute the application with name 'appname', providing the arguments
* in the argv[] array.
*
* Returned Value:
- * On success, the task ID of the named application is returned. On
+ * On success, the task ID of the builtin application is returned. On
* failure, -1 (ERROR) is returned an the errno value is set appropriately.
*
****************************************************************************/
-int exec_namedapp(FAR const char *appname, FAR const char **argv)
+int exec_builtin(FAR const char *appname, FAR const char **argv)
{
pid_t pid;
int index;
/* Verify that an application with this name exists */
- index = namedapp_isavail(appname);
+ index = builtin_isavail(appname);
if (index >= 0)
{
- /* Disable pre-emption. This means that although we start the named
+ /* Disable pre-emption. This means that although we start the builtin
* application here, it will not actually run until pre-emption is
* re-enabled below.
*/
sched_lock();
- /* Start the named application task */
+ /* Start the builtin application task */
- pid = TASK_CREATE(namedapps[index].name, namedapps[index].priority,
- namedapps[index].stacksize, namedapps[index].main,
+ pid = TASK_CREATE(builtins[index].name, builtins[index].priority,
+ builtins[index].stacksize, builtins[index].main,
(argv) ? &argv[1] : (const char **)NULL);
/* If robin robin scheduling is enabled, then set the scheduling policy
@@ -165,11 +165,11 @@ int exec_namedapp(FAR const char *appname, FAR const char **argv)
* new task cannot yet have changed from its initial value.
*/
- param.sched_priority = namedapps[index].priority;
+ param.sched_priority = builtins[index].priority;
sched_setscheduler(pid, SCHED_RR, ¶m);
}
#endif
- /* Now let the named application run */
+ /* Now let the builtin application run */
sched_unlock();
diff --git a/apps/include/apps.h b/apps/include/apps.h
index 520128203e..37599ac5c5 100644
--- a/apps/include/apps.h
+++ b/apps/include/apps.h
@@ -52,7 +52,7 @@
* Public Types
****************************************************************************/
-struct namedapp_s
+struct builtin_s
{
const char *name; /* Invocation name and as seen under /sbin/ */
int priority; /* Use: SCHED_PRIORITY_DEFAULT */
@@ -64,7 +64,7 @@ struct namedapp_s
* Public Data
****************************************************************************/
-/* The "bindir" is file system that supports access to the named applications.
+/* The "bindir" is file system that supports access to the builtin applications.
* It is typically mounted under /bin.
*/
@@ -86,7 +86,7 @@ extern "C" {
#endif
/****************************************************************************
- * Name: namedapp_isavail
+ * Name: builtin_isavail
*
* Description:
* Checks for availabiliy of application registerred during compile time.
@@ -101,10 +101,10 @@ extern "C" {
*
****************************************************************************/
-EXTERN int namedapp_isavail(FAR const char *appname);
+EXTERN int builtin_isavail(FAR const char *appname);
/****************************************************************************
- * Name: namedapp_getname
+ * Name: builtin_getname
*
* Description:
* Returns pointer to a name of built-in application pointed by the
@@ -119,13 +119,13 @@ EXTERN int namedapp_isavail(FAR const char *appname);
*
****************************************************************************/
-EXTERN const char *namedapp_getname(int index);
+EXTERN const char *builtin_getname(int index);
/****************************************************************************
- * Name: exec_namedapp
+ * Name: exec_builtin
*
* Description:
- * Executes builtin named application registered during compile time.
+ * Executes builtin applications registered during 'make context' time.
* New application is run in a separate task context (and thread).
*
* Input Parameter:
@@ -139,7 +139,7 @@ EXTERN const char *namedapp_getname(int index);
*
****************************************************************************/
-EXTERN int exec_namedapp(FAR const char *appname, FAR const char **argv);
+EXTERN int exec_builtin(FAR const char *appname, FAR const char **argv);
#undef EXTERN
#if defined(__cplusplus)
diff --git a/apps/nshlib/Kconfig b/apps/nshlib/Kconfig
index 17b107b8f5..e60e9c4806 100644
--- a/apps/nshlib/Kconfig
+++ b/apps/nshlib/Kconfig
@@ -15,12 +15,12 @@ if NSH_LIBRARY
config NSH_BUILTIN_APPS
bool "Enable built-in applications"
default y
- depends on NAMEDAPP
+ depends on BUILTIN
---help---
- Support external registered, "named" applications that can be
+ Support external registered, "built-in" applications that can be
executed from the NSH command line (see apps/README.txt for
- more information). This options requires support for named applications
- (NAMEDAPP).
+ more information). This options requires support for builtin
+ applications (BUILTIN).
menu "Disable Individual commands"
diff --git a/apps/nshlib/README.txt b/apps/nshlib/README.txt
index bc626e6995..006839628c 100644
--- a/apps/nshlib/README.txt
+++ b/apps/nshlib/README.txt
@@ -945,7 +945,7 @@ NSH-Specific Configuration Settings
the configs//defconfig file:
* CONFIG_NSH_BUILTIN_APPS
- Support external registered, "named" applications that can be
+ Support external registered, "builtin" applications that can be
executed from the NSH command line (see apps/README.txt for
more information).
diff --git a/apps/nshlib/nsh_apps.c b/apps/nshlib/nsh_apps.c
index 7dbaf9ba8d..ea8791eef2 100644
--- a/apps/nshlib/nsh_apps.c
+++ b/apps/nshlib/nsh_apps.c
@@ -90,7 +90,7 @@
* Attempt to execute the application task whose name is 'cmd'
*
* Returned Value:
- * <0 If exec_namedapp() fails, then the negated errno value
+ * <0 If exec_builtin() fails, then the negated errno value
* is returned.
* -1 (ERROR) if the application task corresponding to 'cmd' could not
* be started (possibly because it doesn not exist).
@@ -119,7 +119,7 @@ int nsh_execapp(FAR struct nsh_vtbl_s *vtbl, FAR const char *cmd,
* applications.
*/
- ret = exec_namedapp(cmd, (FAR const char **)argv);
+ ret = exec_builtin(cmd, (FAR const char **)argv);
if (ret >= 0)
{
/* The application was successfully started (but still blocked because
@@ -205,7 +205,7 @@ int nsh_execapp(FAR struct nsh_vtbl_s *vtbl, FAR const char *cmd,
sched_unlock();
- /* If exec_namedapp() or waitpid() failed, then return the negated errno
+ /* If exec_builtin() or waitpid() failed, then return the negated errno
* value.
*/
diff --git a/apps/nshlib/nsh_parse.c b/apps/nshlib/nsh_parse.c
index 27068acff0..70fa39f62a 100644
--- a/apps/nshlib/nsh_parse.c
+++ b/apps/nshlib/nsh_parse.c
@@ -605,7 +605,7 @@ static inline void help_builtins(FAR struct nsh_vtbl_s *vtbl)
/* List the set of available built-in commands */
nsh_output(vtbl, "\nBuiltin Apps:\n");
- for (i = 0; (name = namedapp_getname(i)) != NULL; i++)
+ for (i = 0; (name = builtin_getname(i)) != NULL; i++)
{
nsh_output(vtbl, " %s\n", name);
}
@@ -726,7 +726,7 @@ static int cmd_exit(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv)
* Exectue the command in argv[0]
*
* Returned Value:
- * <0 If exec_namedapp() fails, then the negated errno value
+ * <0 If exec_builtin() fails, then the negated errno value
* is returned.
* -1 (ERRROR) if the command was unsuccessful
* 0 (OK) if the command was successful
@@ -1439,13 +1439,13 @@ int nsh_parse(FAR struct nsh_vtbl_s *vtbl, char *cmdline)
}
/* Handle the case where the command is executed in background.
- * However is app is to be started as namedapp new process will
+ * However is app is to be started as builtin new process will
* be created anyway, so skip this step. */
#ifndef CONFIG_NSH_DISABLEBG
if (vtbl->np.np_bg
#ifdef CONFIG_NSH_BUILTIN_APPS
- && namedapp_isavail(argv[0]) < 0
+ && builtin_isavail(argv[0]) < 0
#endif
)
{
diff --git a/nuttx/Documentation/NuttShell.html b/nuttx/Documentation/NuttShell.html
index 0b5f7aa11b..cc3f078ddf 100644
--- a/nuttx/Documentation/NuttShell.html
+++ b/nuttx/Documentation/NuttShell.html
@@ -2515,7 +2515,7 @@ nsh>
CONFIG_NSH_BUILTIN_APPS |
- Support external registered, "named" applications that can be
+ Support external registered, "builtin" applications that can be
executed from the NSH command line (see apps/README.txt for
more information).
|
@@ -3239,48 +3239,48 @@ Builtin Apps:
Note that no detailed help information beyond the name of the built-in application is provided.
-4.3.1 Named Applications
+4.3.1 Built-In Applications
Overview.
- The underlying logic that supports the NSH built-in applications is called "Named Applications".
- The named application logic can be found at apps/namedapp.
+ The underlying logic that supports the NSH built-in applications is called "Built-In Applications".
+ The builtin application logic can be found at apps/builtin.
This logic simply does the following:
-
- It supports registration mechanism so that named applications can dynamically register themselves at build time, and
+ It supports registration mechanism so that builtin applications can dynamically register themselves at build time, and
-
- Utility functions to look up, list, and execute the named applications.
+ Utility functions to look up, list, and execute the builtin applications.
- Named Application Utility Functions.
- The utility functions exported by the named application logic are prototyped in apps/include/apps.h.
+ Built-In Application Utility Functions.
+ The utility functions exported by the builtin application logic are prototyped in apps/include/apps.h.
These utility functions include:
-
- int namedapp_isavail(FAR const char *appname);
+ int builtin_isavail(FAR const char *appname);
Checks for availability of application registered as appname during build time.
-
- const char *namedapp_getname(int index);
+ const char *builtin_getname(int index);
Returns a pointer to a name of built-in application pointed by the index.
This is the utility function that is used by NSH in order to list the available built-in applications when "nsh> help" is entered.
-
- int exec_namedapp(FAR const char *appname, FAR const char **argv);
- Executes built-in named application registered during compile time.
+ int exec_builtin(FAR const char *appname, FAR const char **argv);
+ Executes built-in builtin application registered during compile time.
This is the utility function used by NSH to execute the built-in application.
@@ -3292,23 +3292,23 @@ Builtin Apps:
-
- apps/namedapp/namedapp_proto.h:
+ apps/builtin/builtin_proto.h:
Prototypes of application task entry points.
-
- apps/namedapp/namedapp_list.h:
+ apps/builtin/builtin_list.h:
Application specific information and start-up requirements
- Registration of Named Applications.
+ Registration of Built-In Applications.
The NuttX build occurs in several phases as different build targets are executed:
(1) context when the configuration is established,
(2) depend when target dependencies are generated, and
(3) default (all) when the normal compilation and link operations are performed.
- Named application information is collected during the make context build phase.
+ Built-in application information is collected during the make context build phase.
@@ -3376,7 +3376,7 @@ make apps_distclean
- Logic for the context target in apps/examples/hello/Makefile registers the hello_main() application in the namedapp's namedapp_proto.hand namedapp_list.h files.
+ Logic for the context target in apps/examples/hello/Makefile registers the hello_main() application in the builtin's builtin_proto.hand builtin_list.h files.
That logic that does that in apps/examples/hello/Makefile is abstracted below:
@@ -3388,13 +3388,13 @@ make apps_distclean
include $(APPDIR)/Make.defs
- This defines a macro called REGISTER that adds data to the namedapp header files:
+ This defines a macro called REGISTER that adds data to the builtin header files:
define REGISTER
@echo "Register: $1"
- @echo "{ \"$1\", $2, $3, $4 }," >> "$(APPDIR)/namedapp/namedapp_list.h"
- @echo "EXTERN int $4(int argc, char *argv[]);" >> "$(APPDIR)/namedapp/namedapp_proto.h"
+ @echo "{ \"$1\", $2, $3, $4 }," >> "$(APPDIR)/builtin/builtin_list.h"
+ @echo "EXTERN int $4(int argc, char *argv[]);" >> "$(APPDIR)/builtin/builtin_proto.h"
endef
@@ -3412,7 +3412,7 @@ STACKSIZE = 2048
-
- And finally, the Makefile invokes the REGISTER macro to added the hello_main() named application.
+ And finally, the Makefile invokes the REGISTER macro to added the hello_main() builtin application.
Then, when the system build completes, the hello command can be executed from the NSH command line.
When the hello command is executed, it will start the task with entry point hello_main() with the default priority and with a stack size of 2K.
@@ -3424,16 +3424,16 @@ STACKSIZE = 2048
- Other Uses of Named Application.
- The primary purpose of named applications is to support command line execution of applications from NSH.
- However, there are two other uses of named applications that should be mentioned.
+ Other Uses of Built-In Application.
+ The primary purpose of builtin applications is to support command line execution of applications from NSH.
+ However, there are two other uses of builtin applications that should be mentioned.
-
- Named Application Start-Up main() function.
- A named application can even be used as the main, start-up entry point into your embedded software.
+ Built-In Application Start-Up main() function.
+ A builtin application can even be used as the main, start-up entry point into your embedded software.
When the user defines this option in the NuttX configuration file:
@@ -3451,11 +3451,11 @@ CONFIG_BUILTIN_APP_START=<application name>
-
binfs.
- binfs is a tiny file system located at apps/namedapp/binfs.c.
- This provides an alternative what of visualizing installed named applications.
- Without binfs, you can see the installed named applications using the NSH help command.
+ binfs is a tiny file system located at apps/builtin/binfs.c.
+ This provides an alternative what of visualizing installed builtin applications.
+ Without binfs, you can see the installed builtin applications using the NSH help command.
binfs will create a tiny pseudo-file system mounted at /bin.
- Using binfs, you can see the available named applications by listing the contents of /bin directory.
+ Using binfs, you can see the available builtin applications by listing the contents of /bin directory.
This gives some superficial Unix compatibility, but does not really add any new functionality.
@@ -3762,7 +3762,12 @@ mount -t vfat /dev/ram1 /tmp
- Background command priority
binfs
- Built-In applications
+ - Built-In application start-up
main()
- Built-in variables
+ builtin_getname()
+ builtin_isavail()
+ builtin_list.h
+ builtin_proto.h
base64dec
base64enc
cat
@@ -3827,12 +3832,12 @@ mount -t vfat /dev/ram1 /tmp
echo
- Environment Variables
/etc/init.d/rcS
- exec
- exec_namedapp()
- exit
- free
+ exec
+ exec_builtin()
+ exit
+ free
g_cmdmap
genromfs
get
@@ -3858,12 +3863,6 @@ mount -t vfat /dev/ram1 /tmp
mkromfsimg.sh
mount
mv
- - Named application start-up
main()
- - Named applications
- namedapp_getname()
- namedapp_isavail()
- namedapp_list.h
- namedapp_proto.h
nfsmount
nice
- NSH library (
nshlib)
@@ -3887,7 +3886,7 @@ mount -t vfat /dev/ram1 /tmp
PWD
rcS.template
- Re-directed commands
- - Registration of named applications
+ - Registration of builtin applications
rm
rmdir
- ROMFS, Modifying the ROMFS image
diff --git a/nuttx/configs/cloudctrl/nsh/defconfig b/nuttx/configs/cloudctrl/nsh/defconfig
index fbb5e8c139..99c7eb7901 100644
--- a/nuttx/configs/cloudctrl/nsh/defconfig
+++ b/nuttx/configs/cloudctrl/nsh/defconfig
@@ -505,7 +505,7 @@ CONFIG_HAVE_CXX=y
#
# Named Applications
#
-CONFIG_NAMEDAPP=y
+CONFIG_BUILTIN=y
#
# Examples
diff --git a/nuttx/configs/ez80f910200kitg/ostest/defconfig b/nuttx/configs/ez80f910200kitg/ostest/defconfig
index 50efbfdaf3..80c9e682ea 100644
--- a/nuttx/configs/ez80f910200kitg/ostest/defconfig
+++ b/nuttx/configs/ez80f910200kitg/ostest/defconfig
@@ -334,7 +334,7 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512
#
# Named Applications
#
-# CONFIG_NAMEDAPP is not set
+# CONFIG_BUILTIN is not set
#
# Examples
diff --git a/nuttx/configs/ez80f910200zco/ostest/defconfig b/nuttx/configs/ez80f910200zco/ostest/defconfig
index 3a13523331..88c1b72791 100644
--- a/nuttx/configs/ez80f910200zco/ostest/defconfig
+++ b/nuttx/configs/ez80f910200zco/ostest/defconfig
@@ -342,7 +342,7 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512
#
# Named Applications
#
-# CONFIG_NAMEDAPP is not set
+# CONFIG_BUILTIN is not set
#
# Examples
diff --git a/nuttx/configs/fire-stm32v2/nsh/defconfig b/nuttx/configs/fire-stm32v2/nsh/defconfig
index 2fb623a0d0..c42bb15696 100644
--- a/nuttx/configs/fire-stm32v2/nsh/defconfig
+++ b/nuttx/configs/fire-stm32v2/nsh/defconfig
@@ -531,7 +531,7 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512
#
# Named Applications
#
-CONFIG_NAMEDAPP=y
+CONFIG_BUILTIN=y
#
# Examples
diff --git a/nuttx/configs/p112/ostest/defconfig b/nuttx/configs/p112/ostest/defconfig
index c30adcf225..3699475c59 100644
--- a/nuttx/configs/p112/ostest/defconfig
+++ b/nuttx/configs/p112/ostest/defconfig
@@ -370,7 +370,7 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512
#
# Named Applications
#
-# CONFIG_NAMEDAPP is not set
+# CONFIG_BUILTIN is not set
#
# Examples
diff --git a/nuttx/configs/shenzhou/nsh/defconfig b/nuttx/configs/shenzhou/nsh/defconfig
index 36f8e40fc6..c54d714d0d 100644
--- a/nuttx/configs/shenzhou/nsh/defconfig
+++ b/nuttx/configs/shenzhou/nsh/defconfig
@@ -505,7 +505,7 @@ CONFIG_HAVE_CXX=y
#
# Named Applications
#
-CONFIG_NAMEDAPP=y
+CONFIG_BUILTIN=y
#
# Examples
diff --git a/nuttx/configs/shenzhou/nxwm/defconfig b/nuttx/configs/shenzhou/nxwm/defconfig
index 0f100ed5e5..9753277470 100644
--- a/nuttx/configs/shenzhou/nxwm/defconfig
+++ b/nuttx/configs/shenzhou/nxwm/defconfig
@@ -630,7 +630,7 @@ CONFIG_HAVE_CXXINITIALIZE=y
#
# Named Applications
#
-CONFIG_NAMEDAPP=y
+CONFIG_BUILTIN=y
#
# Examples
diff --git a/nuttx/configs/shenzhou/thttpd/defconfig b/nuttx/configs/shenzhou/thttpd/defconfig
index ccbcf9ab25..958ab02ed1 100644
--- a/nuttx/configs/shenzhou/thttpd/defconfig
+++ b/nuttx/configs/shenzhou/thttpd/defconfig
@@ -474,7 +474,7 @@ CONFIG_HAVE_CXX=y
#
# Named Applications
#
-CONFIG_NAMEDAPP=y
+CONFIG_BUILTIN=y
#
# Examples
diff --git a/nuttx/configs/sim/README.txt b/nuttx/configs/sim/README.txt
index f1dfd0dd22..03f163ea5a 100644
--- a/nuttx/configs/sim/README.txt
+++ b/nuttx/configs/sim/README.txt
@@ -148,9 +148,9 @@ If you are running X11 applications as NSH add-on programs, then the stack
size of the add-on program is controlled in another way. Here are the
steps for increasing the stack size in that case:
- cd ../apps/namedapps # Go to the namedapps directory
- vi namedapps_list.h # Edit this file and increase the stack size of the add-on
- rm .built *.o # This will force the namedapps logic to rebuild
+ cd ../apps/builtin # Go to the builtin apps directory
+ vi builtin_list.h # Edit this file and increase the stack size of the add-on
+ rm .built *.o # This will force the builtin apps logic to rebuild
Buffered I/O Issues
-------------------
diff --git a/nuttx/configs/sim/cxxtest/defconfig b/nuttx/configs/sim/cxxtest/defconfig
index 648a928519..6ac45d44d8 100644
--- a/nuttx/configs/sim/cxxtest/defconfig
+++ b/nuttx/configs/sim/cxxtest/defconfig
@@ -298,7 +298,7 @@ CONFIG_UCLIBCXX_HAVE_LIBSUPCXX=y
#
# Named Applications
#
-# CONFIG_NAMEDAPP is not set
+# CONFIG_BUILTIN is not set
#
# Examples
diff --git a/nuttx/configs/sim/nxwm/defconfig b/nuttx/configs/sim/nxwm/defconfig
index 6a295ef4f2..90ee00f500 100644
--- a/nuttx/configs/sim/nxwm/defconfig
+++ b/nuttx/configs/sim/nxwm/defconfig
@@ -376,7 +376,7 @@ CONFIG_HAVE_CXX=y
#
# Named Applications
#
-# CONFIG_NAMEDAPP is not set
+# CONFIG_BUILTIN is not set
#
# Examples
diff --git a/nuttx/configs/sim/ostest/defconfig b/nuttx/configs/sim/ostest/defconfig
index beee306398..55687c366a 100644
--- a/nuttx/configs/sim/ostest/defconfig
+++ b/nuttx/configs/sim/ostest/defconfig
@@ -297,7 +297,7 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512
#
# Named Applications
#
-# CONFIG_NAMEDAPP is not set
+# CONFIG_BUILTIN is not set
#
# Examples
diff --git a/nuttx/configs/stm3220g-eval/nxwm/defconfig b/nuttx/configs/stm3220g-eval/nxwm/defconfig
index 11e88f7640..ab061f07a3 100644
--- a/nuttx/configs/stm3220g-eval/nxwm/defconfig
+++ b/nuttx/configs/stm3220g-eval/nxwm/defconfig
@@ -659,7 +659,7 @@ CONFIG_HAVE_CXXINITIALIZE=y
#
# Named Applications
#
-# CONFIG_NAMEDAPP is not set
+# CONFIG_BUILTIN is not set
#
# Examples
diff --git a/nuttx/configs/stm3240g-eval/discover/defconfig b/nuttx/configs/stm3240g-eval/discover/defconfig
index 152486d1bb..e11d39ce1a 100644
--- a/nuttx/configs/stm3240g-eval/discover/defconfig
+++ b/nuttx/configs/stm3240g-eval/discover/defconfig
@@ -494,7 +494,7 @@ CONFIG_HAVE_CXXINITIALIZE=y
#
# Named Applications
#
-# CONFIG_NAMEDAPP is not set
+# CONFIG_BUILTIN is not set
#
# Examples
diff --git a/nuttx/configs/stm3240g-eval/xmlrpc/defconfig b/nuttx/configs/stm3240g-eval/xmlrpc/defconfig
index 6b4c9af707..4f621d4535 100644
--- a/nuttx/configs/stm3240g-eval/xmlrpc/defconfig
+++ b/nuttx/configs/stm3240g-eval/xmlrpc/defconfig
@@ -487,7 +487,7 @@ CONFIG_HAVE_CXXINITIALIZE=y
#
# Named Applications
#
-# CONFIG_NAMEDAPP is not set
+# CONFIG_BUILTIN is not set
#
# Examples
diff --git a/nuttx/configs/stm32f100rc_generic/nsh/defconfig b/nuttx/configs/stm32f100rc_generic/nsh/defconfig
index a0228a3def..65ac9a73d8 100644
--- a/nuttx/configs/stm32f100rc_generic/nsh/defconfig
+++ b/nuttx/configs/stm32f100rc_generic/nsh/defconfig
@@ -428,7 +428,7 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512
#
# Named Applications
#
-CONFIG_NAMEDAPP=y
+CONFIG_BUILTIN=y
#
# Examples
diff --git a/nuttx/configs/stm32f100rc_generic/ostest/defconfig b/nuttx/configs/stm32f100rc_generic/ostest/defconfig
index 0041feb502..2d2842c543 100644
--- a/nuttx/configs/stm32f100rc_generic/ostest/defconfig
+++ b/nuttx/configs/stm32f100rc_generic/ostest/defconfig
@@ -410,7 +410,7 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512
#
# Named Applications
#
-# CONFIG_NAMEDAPP is not set
+# CONFIG_BUILTIN is not set
#
# Examples
diff --git a/nuttx/configs/stm32f4discovery/cxxtest/defconfig b/nuttx/configs/stm32f4discovery/cxxtest/defconfig
index 6487742cf3..e7fa499541 100644
--- a/nuttx/configs/stm32f4discovery/cxxtest/defconfig
+++ b/nuttx/configs/stm32f4discovery/cxxtest/defconfig
@@ -426,7 +426,7 @@ CONFIG_UCLIBCXX_HAVE_LIBSUPCXX=y
#
# Named Applications
#
-# CONFIG_NAMEDAPP is not set
+# CONFIG_BUILTIN is not set
#
# Examples
diff --git a/nuttx/configs/stm32f4discovery/elf/defconfig b/nuttx/configs/stm32f4discovery/elf/defconfig
index 9379c885b5..3f5a5d0fcf 100644
--- a/nuttx/configs/stm32f4discovery/elf/defconfig
+++ b/nuttx/configs/stm32f4discovery/elf/defconfig
@@ -460,7 +460,7 @@ CONFIG_HAVE_CXX=y
#
# Named Applications
#
-# CONFIG_NAMEDAPP is not set
+# CONFIG_BUILTIN is not set
#
# Examples
diff --git a/nuttx/configs/stm32f4discovery/nxlines/defconfig b/nuttx/configs/stm32f4discovery/nxlines/defconfig
index 8609993ea1..58eebd41f1 100644
--- a/nuttx/configs/stm32f4discovery/nxlines/defconfig
+++ b/nuttx/configs/stm32f4discovery/nxlines/defconfig
@@ -518,7 +518,7 @@ CONFIG_HAVE_CXXINITIALIZE=y
#
# Named Applications
#
-# CONFIG_NAMEDAPP is not set
+# CONFIG_BUILTIN is not set
#
# Examples
diff --git a/nuttx/configs/stm32f4discovery/ostest/defconfig b/nuttx/configs/stm32f4discovery/ostest/defconfig
index b29622c8ed..5fdd30f57e 100644
--- a/nuttx/configs/stm32f4discovery/ostest/defconfig
+++ b/nuttx/configs/stm32f4discovery/ostest/defconfig
@@ -430,7 +430,7 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512
#
# Named Applications
#
-# CONFIG_NAMEDAPP is not set
+# CONFIG_BUILTIN is not set
#
# Examples
diff --git a/nuttx/configs/stm32f4discovery/winbuild/defconfig b/nuttx/configs/stm32f4discovery/winbuild/defconfig
index ac8a18c9bb..95be148865 100644
--- a/nuttx/configs/stm32f4discovery/winbuild/defconfig
+++ b/nuttx/configs/stm32f4discovery/winbuild/defconfig
@@ -430,7 +430,7 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512
#
# Named Applications
#
-# CONFIG_NAMEDAPP is not set
+# CONFIG_BUILTIN is not set
#
# Examples
diff --git a/nuttx/configs/vsn/src/README.txt b/nuttx/configs/vsn/src/README.txt
index 4e2d50e0b1..87a538a109 100644
--- a/nuttx/configs/vsn/src/README.txt
+++ b/nuttx/configs/vsn/src/README.txt
@@ -12,7 +12,7 @@ Execution starts in the following order:
is set. It must be set for the VSN board.
- boot, performs initial chip and board initialization
- - sched/os_bringup.c then calls either user_start or exec_namedapp()
+ - sched/os_bringup.c then calls either user_start or exec_builtin()
with application as set in the .config
@@ -55,4 +55,5 @@ Compile notes
To link-in the sif_main() utility do, in this folder:
- make context TOPDIR=
-This will result in registering the application into the namedapp.
+This will result in registering the application into the builtin application
+registry.
diff --git a/nuttx/configs/xtrs/nsh/defconfig b/nuttx/configs/xtrs/nsh/defconfig
index 8730ebab72..72b32d9aaa 100644
--- a/nuttx/configs/xtrs/nsh/defconfig
+++ b/nuttx/configs/xtrs/nsh/defconfig
@@ -303,7 +303,7 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512
#
# Named Applications
#
-# CONFIG_NAMEDAPP is not set
+# CONFIG_BUILTIN is not set
#
# Examples
diff --git a/nuttx/configs/xtrs/ostest/defconfig b/nuttx/configs/xtrs/ostest/defconfig
index a0a100bcfd..74a0199dfe 100644
--- a/nuttx/configs/xtrs/ostest/defconfig
+++ b/nuttx/configs/xtrs/ostest/defconfig
@@ -302,7 +302,7 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512
#
# Named Applications
#
-# CONFIG_NAMEDAPP is not set
+# CONFIG_BUILTIN is not set
#
# Examples
diff --git a/nuttx/configs/xtrs/pashello/defconfig b/nuttx/configs/xtrs/pashello/defconfig
index d23c507163..abdaf1f359 100644
--- a/nuttx/configs/xtrs/pashello/defconfig
+++ b/nuttx/configs/xtrs/pashello/defconfig
@@ -303,7 +303,7 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512
#
# Named Applications
#
-# CONFIG_NAMEDAPP is not set
+# CONFIG_BUILTIN is not set
#
# Examples
diff --git a/nuttx/configs/z16f2800100zcog/ostest/defconfig b/nuttx/configs/z16f2800100zcog/ostest/defconfig
index defd3d5efa..64828738f2 100644
--- a/nuttx/configs/z16f2800100zcog/ostest/defconfig
+++ b/nuttx/configs/z16f2800100zcog/ostest/defconfig
@@ -342,7 +342,7 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512
#
# Named Applications
#
-# CONFIG_NAMEDAPP is not set
+# CONFIG_BUILTIN is not set
#
# Examples
diff --git a/nuttx/configs/z16f2800100zcog/pashello/defconfig b/nuttx/configs/z16f2800100zcog/pashello/defconfig
index f3067a9e7c..ba99283d33 100644
--- a/nuttx/configs/z16f2800100zcog/pashello/defconfig
+++ b/nuttx/configs/z16f2800100zcog/pashello/defconfig
@@ -342,7 +342,7 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512
#
# Named Applications
#
-# CONFIG_NAMEDAPP is not set
+# CONFIG_BUILTIN is not set
#
# Examples
diff --git a/nuttx/configs/z80sim/nsh/defconfig b/nuttx/configs/z80sim/nsh/defconfig
index fb9fac5462..d13f0f7f7f 100644
--- a/nuttx/configs/z80sim/nsh/defconfig
+++ b/nuttx/configs/z80sim/nsh/defconfig
@@ -303,7 +303,7 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512
#
# Named Applications
#
-# CONFIG_NAMEDAPP is not set
+# CONFIG_BUILTIN is not set
#
# Examples
diff --git a/nuttx/configs/z80sim/ostest/defconfig b/nuttx/configs/z80sim/ostest/defconfig
index d3410d52d3..bd4144821a 100644
--- a/nuttx/configs/z80sim/ostest/defconfig
+++ b/nuttx/configs/z80sim/ostest/defconfig
@@ -302,7 +302,7 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512
#
# Named Applications
#
-# CONFIG_NAMEDAPP is not set
+# CONFIG_BUILTIN is not set
#
# Examples
diff --git a/nuttx/configs/z80sim/pashello/defconfig b/nuttx/configs/z80sim/pashello/defconfig
index e7dee626c1..58d609c4b8 100644
--- a/nuttx/configs/z80sim/pashello/defconfig
+++ b/nuttx/configs/z80sim/pashello/defconfig
@@ -302,7 +302,7 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512
#
# Named Applications
#
-# CONFIG_NAMEDAPP is not set
+# CONFIG_BUILTIN is not set
#
# Examples
diff --git a/nuttx/configs/z8encore000zco/ostest/defconfig b/nuttx/configs/z8encore000zco/ostest/defconfig
index 7d9b227f4b..7bd512727e 100644
--- a/nuttx/configs/z8encore000zco/ostest/defconfig
+++ b/nuttx/configs/z8encore000zco/ostest/defconfig
@@ -329,7 +329,7 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512
#
# Named Applications
#
-# CONFIG_NAMEDAPP is not set
+# CONFIG_BUILTIN is not set
#
# Examples
diff --git a/nuttx/configs/z8f64200100kit/ostest/defconfig b/nuttx/configs/z8f64200100kit/ostest/defconfig
index a349529872..e98e415618 100644
--- a/nuttx/configs/z8f64200100kit/ostest/defconfig
+++ b/nuttx/configs/z8f64200100kit/ostest/defconfig
@@ -329,7 +329,7 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512
#
# Named Applications
#
-# CONFIG_NAMEDAPP is not set
+# CONFIG_BUILTIN is not set
#
# Examples
diff --git a/nuttx/sched/os_bringup.c b/nuttx/sched/os_bringup.c
index e0a236bbed..4b5adcae1a 100644
--- a/nuttx/sched/os_bringup.c
+++ b/nuttx/sched/os_bringup.c
@@ -189,11 +189,11 @@ int os_bringup(void)
svdbg("Starting init thread\n");
#ifdef CONFIG_BUILTIN_APP_START
- /* Start the built-in named application, passing an "init" argument, so that
+ /* Start the built-in application, passing an "init" argument, so that
* application can distinguish different run-levels
*/
- init_taskid = exec_namedapp(CONFIG_BUILTIN_APP_START, argv);
+ init_taskid = exec_builtin(CONFIG_BUILTIN_APP_START, argv);
#else
/* Start the default application at CONFIG_USER_ENTRYPOINT() */
From 3fe53af6be14a28174eec48b5740dbbe7c1f818a Mon Sep 17 00:00:00 2001
From: patacongo
Date: Sun, 23 Dec 2012 22:17:09 +0000
Subject: [PATCH 008/118] Remove .context kludge from apps/ directory
git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5455 42af7a65-404d-4744-a932-0658087f49c3
---
apps/ChangeLog.txt | 4 +++
apps/Make.defs | 9 +++--
apps/Makefile | 9 +----
apps/builtin/Makefile | 33 +++++++++++-------
apps/builtin/registry/Makefile | 54 ++++++++++++++++++++++++++++++
apps/examples/adc/Makefile | 9 ++---
apps/examples/buttons/Makefile | 9 ++---
apps/examples/can/Makefile | 9 ++---
apps/examples/cdcacm/Makefile | 13 ++++---
apps/examples/composite/Makefile | 13 ++++---
apps/examples/cxxtest/Makefile | 9 ++---
apps/examples/dhcpd/Makefile | 9 ++---
apps/examples/discover/Makefile | 9 ++---
apps/examples/ftpc/Makefile | 10 +++---
apps/examples/ftpd/Makefile | 13 ++++---
apps/examples/hello/Makefile | 9 ++---
apps/examples/helloxx/Makefile | 9 ++---
apps/examples/json/Makefile | 9 ++---
apps/examples/keypadtest/Makefile | 9 ++---
apps/examples/lcdrw/Makefile | 9 ++---
apps/examples/modbus/Makefile | 9 ++---
apps/examples/nettest/Makefile | 9 ++---
apps/examples/nx/Makefile | 9 ++---
apps/examples/nxhello/Makefile | 9 ++---
apps/examples/nximage/Makefile | 9 ++---
apps/examples/nxlines/Makefile | 9 ++---
apps/examples/nxtext/Makefile | 9 ++---
apps/examples/ostest/Makefile | 9 ++---
apps/examples/pwm/Makefile | 9 +++--
apps/examples/qencoder/Makefile | 9 ++---
apps/examples/relays/Makefile | 9 ++---
apps/examples/telnetd/Makefile | 9 ++---
apps/examples/tiff/Makefile | 9 ++---
apps/examples/touchscreen/Makefile | 9 ++---
apps/examples/usbstorage/Makefile | 13 ++++---
apps/examples/usbterm/Makefile | 9 ++---
apps/examples/watchdog/Makefile | 9 +++--
apps/examples/wgetjson/Makefile | 9 ++---
apps/examples/xmlrpc/Makefile | 9 ++---
apps/graphics/tiff/Makefile | 1 -
apps/interpreters/ficl/Makefile | 1 -
apps/modbus/Makefile | 1 -
apps/nshlib/Makefile | 1 -
apps/system/free/Makefile | 10 +++---
apps/system/i2c/Makefile | 12 ++++---
apps/system/install/Makefile | 10 +++---
apps/system/poweroff/Makefile | 10 +++---
apps/system/ramtron/Makefile | 10 +++---
apps/system/readline/Makefile | 1 -
apps/system/sdcard/Makefile | 10 +++---
apps/system/sysinfo/Makefile | 10 +++---
nuttx/Documentation/NuttShell.html | 9 ++---
nuttx/configs/vsn/src/Makefile | 9 +++--
53 files changed, 322 insertions(+), 205 deletions(-)
create mode 100644 apps/builtin/registry/Makefile
diff --git a/apps/ChangeLog.txt b/apps/ChangeLog.txt
index 886526b187..8999047ef1 100644
--- a/apps/ChangeLog.txt
+++ b/apps/ChangeLog.txt
@@ -440,4 +440,8 @@
files. It makes sense for 'leaf' Makefiles to have this dependency,
but it does not make sense for upper-level Makefiles.
* namedapp/: Renamed to builtins in preparation for another change.
+ * .context: Removed the .context kludge. This causes lots of problems
+ when changing configurations because there is no easy way to get the
+ system to rebuild the context. Now, the context will be rebuilt
+ whenever there is a change in either .config or the Makefile.
diff --git a/apps/Make.defs b/apps/Make.defs
index 12b351e7f2..217137a29c 100644
--- a/apps/Make.defs
+++ b/apps/Make.defs
@@ -34,8 +34,11 @@
#
############################################################################
+BUILTIN_REGISTRY = $(APPDIR)$(DELIM)builtin$(DELIM)registry
+
define REGISTER
- @echo "Register: $1"
- @echo "{ \"$1\", $2, $3, $4 }," >> "$(APPDIR)/builtin/builtin_list.h"
- @echo "EXTERN int $4(int argc, char *argv[]);" >> "$(APPDIR)/builtin/builtin_proto.h"
+ $(Q) echo "Register: $1"
+ $(Q) echo "{ \"$1\", $2, $3, $4 }," > "$(BUILTIN_REGISTRY)$(DELIM)$4.bdat"
+ $(Q) echo "int $4(int argc, char *argv[]);" > "$(BUILTIN_REGISTRY)$(DELIM)$4.pdat"
+ $(Q) touch "$(BUILTIN_REGISTRY)$(DELIM).updated"
endef
diff --git a/apps/Makefile b/apps/Makefile
index 299560195c..cf6b33cd7e 100644
--- a/apps/Makefile
+++ b/apps/Makefile
@@ -132,21 +132,16 @@ $(INSTALLED_APPS):
$(BIN): $(INSTALLED_APPS)
-.context:
+context:
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
$(Q) for %%G in ($(INSTALLED_APPS)) do ( \
- if exist %%G\.context del /f /q %%G\.context \
$(MAKE) -C %%G TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)" context \
)
else
$(Q) for dir in $(INSTALLED_APPS) ; do \
- rm -f $$dir/.context ; \
$(MAKE) -C $$dir TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)" context ; \
done
endif
- $(Q) touch $@
-
-context: .context
.depend: context Makefile $(SRCS)
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
@@ -183,7 +178,6 @@ ifeq ($(CONFIG_WINDOWS_NATIVE),y)
$(MAKE) -C %%G distclean TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)" \
)
$(call DELFILE, .config)
- $(call DELFILE, .context)
$(call DELFILE, .depend)
$(Q) ( if exist external ( \
echo ********************************************************" \
@@ -195,7 +189,6 @@ else
$(MAKE) -C $$dir distclean TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)"; \
done
$(call DELFILE, .config)
- $(call DELFILE, .context)
$(call DELFILE, .depend)
$(Q) ( if [ -e external ]; then \
echo "********************************************************"; \
diff --git a/apps/builtin/Makefile b/apps/builtin/Makefile
index 72ba0347f7..6633146e93 100644
--- a/apps/builtin/Makefile
+++ b/apps/builtin/Makefile
@@ -33,12 +33,9 @@
#
############################################################################
--include $(TOPDIR)/.config
-include $(TOPDIR)/Make.defs
include $(APPDIR)/Make.defs
-# NSH Library
-
# Source and object files
ASRCS =
@@ -70,7 +67,7 @@ VPATH =
# Build Targets
all: .built
-.PHONY: .context context depend clean distclean
+.PHONY: context depend clean distclean
$(AOBJS): %$(OBJEXT): %.S
$(call ASSEMBLE, $<, $@)
@@ -78,16 +75,27 @@ $(AOBJS): %$(OBJEXT): %.S
$(COBJS): %$(OBJEXT): %.c
$(call COMPILE, $<, $@)
-.built: $(OBJS)
+builtin_list.h: registry/.updated
+ $(call DELFILE, builtin_list.h)
+ifeq ($(CONFIG_WINDOWS_NATIVE),y)
+ $(Q) for /f %%G in ('dir /b registry\*.bdat`) do ( type registry\%%G >> builtin_list.h )
+else
+ $(Q) for file in `ls registry/*.bdat`; do cat $$file >> builtin_list.h; done
+endif
+
+builtin_proto.h: registry/.updated
+ $(call DELFILE, builtin_proto.h)
+ifeq ($(CONFIG_WINDOWS_NATIVE),y)
+ $(Q) for /f %%G in ('dir /b registry\*.pdat`) do ( type registry\%%G >> builtin_proto.h )
+else
+ $(Q) for file in `ls registry/*.pdat`; do cat $$file >> builtin_proto.h; done
+endif
+
+.built: builtin_list.h builtin_proto.h $(OBJS)
$(call ARCHIVE, $(BIN), $(OBJS))
$(Q) touch .built
-.context:
- @echo "/* List of application requirements, generated during make context. */" > builtin_list.h
- @echo "/* List of application entry points, generated during make context. */" > builtin_proto.h
- $(Q) touch $@
-
-context: .context
+context:
.depend: Makefile $(SRCS)
$(Q) $(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
@@ -100,11 +108,10 @@ clean:
$(call CLEAN)
distclean: clean
- $(call DELFILE, .context)
+ $(Q) $(MAKE) -C registry distclean TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)"
$(call DELFILE, Make.dep)
$(call DELFILE, .depend)
$(call DELFILE, builtin_list.h)
$(call DELFILE, builtin_proto.h)
-include Make.dep
-
diff --git a/apps/builtin/registry/Makefile b/apps/builtin/registry/Makefile
new file mode 100644
index 0000000000..9117f53d6e
--- /dev/null
+++ b/apps/builtin/registry/Makefile
@@ -0,0 +1,54 @@
+############################################################################
+# apps/builtin/registry/Makefile
+#
+# Copyright (C) 2012 Gregory Nutt. All rights reserved.
+# Author: Gregory Nutt
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+# 3. Neither the name NuttX nor the names of its contributors may be
+# used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+#
+############################################################################
+
+-include $(TOPDIR)/Make.defs
+include $(APPDIR)/Make.defs
+
+# NSH Library
+
+all:
+.PHONY: context depend clean distclean
+
+context:
+
+depend:
+
+clean:
+ $(call CLEAN)
+
+distclean: clean
+ $(call DELFILE, *.bdat)
+ $(call DELFILE, *.pdat)
+ $(call DELFILE, .updated)
diff --git a/apps/examples/adc/Makefile b/apps/examples/adc/Makefile
index 69862b383d..55bc259e4b 100644
--- a/apps/examples/adc/Makefile
+++ b/apps/examples/adc/Makefile
@@ -83,13 +83,14 @@ $(COBJS): %$(OBJEXT): %.c
$(call ARCHIVE, $(BIN), $(OBJS))
@touch .built
-.context:
ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
- @touch $@
-endif
-context: .context
+context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
+else
+context:
+endif
.depend: Makefile $(SRCS)
@$(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
diff --git a/apps/examples/buttons/Makefile b/apps/examples/buttons/Makefile
index 77c1cd67df..ac1f2f05aa 100644
--- a/apps/examples/buttons/Makefile
+++ b/apps/examples/buttons/Makefile
@@ -83,13 +83,14 @@ $(COBJS): %$(OBJEXT): %.c
$(call ARCHIVE, $(BIN), $(OBJS))
@touch .built
-.context:
ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
- @touch $@
-endif
-context: .context
+context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
+else
+context:
+endif
.depend: Makefile $(SRCS)
@$(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
diff --git a/apps/examples/can/Makefile b/apps/examples/can/Makefile
index 8924797e37..5df96e1e7d 100644
--- a/apps/examples/can/Makefile
+++ b/apps/examples/can/Makefile
@@ -83,13 +83,14 @@ $(COBJS): %$(OBJEXT): %.c
$(call ARCHIVE, $(BIN), $(OBJS))
@touch .built
-.context:
ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
- @touch $@
-endif
-context: .context
+context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
+else
+context:
+endif
.depend: Makefile $(SRCS)
@$(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
diff --git a/apps/examples/cdcacm/Makefile b/apps/examples/cdcacm/Makefile
index e8d03807d8..d9e19e9064 100644
--- a/apps/examples/cdcacm/Makefile
+++ b/apps/examples/cdcacm/Makefile
@@ -87,12 +87,17 @@ $(COBJS): %$(OBJEXT): %.c
$(call ARCHIVE, $(BIN), $(OBJS))
@touch .built
-.context:
+ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME1)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
$(call REGISTER,$(APPNAME1),$(PRIORITY1),$(STACKSIZE1),$(APPNAME1)_main)
- $(call REGISTER,$(APPNAME2),$(PRIORITY2),$(STACKSIZE2),$(APPNAME2)_main)
- @touch $@
-context: .context
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME2)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
+ $(call REGISTER,$(APPNAME2),$(PRIORITY2),$(STACKSIZE2),$(APPNAME2)_main)
+
+context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME1)_main.bdat $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME2)_main.bdat
+else
+context:
+endif
.depend: Makefile $(SRCS)
@$(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
diff --git a/apps/examples/composite/Makefile b/apps/examples/composite/Makefile
index 016ccbe3eb..b1fe493082 100644
--- a/apps/examples/composite/Makefile
+++ b/apps/examples/composite/Makefile
@@ -87,14 +87,17 @@ $(COBJS): %$(OBJEXT): %.c
$(call ARCHIVE, $(BIN), $(OBJS))
@touch .built
-.context:
ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME1)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
$(call REGISTER,$(APPNAME1),$(PRIORITY1),$(STACKSIZE1),$(APPNAME1)_main)
- $(call REGISTER,$(APPNAME2),$(PRIORITY2),$(STACKSIZE2),$(APPNAME2)_main)
- @touch $@
-endif
-context: .context
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME2)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
+ $(call REGISTER,$(APPNAME2),$(PRIORITY2),$(STACKSIZE2),$(APPNAME2)_main)
+
+context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME1)_main.bdat $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME2)_main.bdat
+else
+context:
+endif
.depend: Makefile $(SRCS)
@$(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
diff --git a/apps/examples/cxxtest/Makefile b/apps/examples/cxxtest/Makefile
index f0764b6e94..cba9f0a4f0 100644
--- a/apps/examples/cxxtest/Makefile
+++ b/apps/examples/cxxtest/Makefile
@@ -100,13 +100,14 @@ $(CXXOBJS): %$(OBJEXT): %.cxx
$(call ARCHIVE, $(BIN), $(OBJS))
@touch .built
-.context:
ifeq ($(CONFIG_EXAMPLES_HELLOXX_BUILTIN),y)
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
- @touch $@
-endif
-context: .context
+context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
+else
+context:
+endif
.depend: Makefile $(SRCS)
@$(MKDEP) $(ROOTDEPPATH) "$(CXX)" -- $(CXXFLAGS) -- $(SRCS) >Make.dep
diff --git a/apps/examples/dhcpd/Makefile b/apps/examples/dhcpd/Makefile
index a41db5cdd7..0522d4cc47 100644
--- a/apps/examples/dhcpd/Makefile
+++ b/apps/examples/dhcpd/Makefile
@@ -83,13 +83,14 @@ $(COBJS): %$(OBJEXT): %.c
$(call ARCHIVE, $(BIN), $(OBJS))
@touch .built
-.context:
ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
- @touch $@
-endif
-context: .context
+context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
+else
+context:
+endif
.depend: Makefile $(SRCS)
@$(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
diff --git a/apps/examples/discover/Makefile b/apps/examples/discover/Makefile
index 2ce52a18e9..b0285fbff3 100644
--- a/apps/examples/discover/Makefile
+++ b/apps/examples/discover/Makefile
@@ -84,13 +84,14 @@ $(COBJS): %$(OBJEXT): %.c
$(call ARCHIVE, $(BIN), $(OBJS))
@touch .built
-.context:
ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
- @touch $@
-endif
-context: .context
+context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
+else
+context:
+endif
.depend: Makefile $(SRCS)
@$(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
diff --git a/apps/examples/ftpc/Makefile b/apps/examples/ftpc/Makefile
index 29960fb94c..e09779abdf 100644
--- a/apps/examples/ftpc/Makefile
+++ b/apps/examples/ftpc/Makefile
@@ -83,11 +83,14 @@ $(COBJS): %$(OBJEXT): %.c
# Register application
-.context:
+ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
- @touch $@
-context: .context
+context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
+else
+context:
+endif
# Create dependencies
@@ -102,7 +105,6 @@ clean:
$(call CLEAN)
distclean: clean
- $(call DELFILE, .context)
$(call DELFILE, Make.dep)
$(call DELFILE, .depend)
diff --git a/apps/examples/ftpd/Makefile b/apps/examples/ftpd/Makefile
index 0b43b85a9c..dc53bfdeab 100644
--- a/apps/examples/ftpd/Makefile
+++ b/apps/examples/ftpd/Makefile
@@ -78,14 +78,17 @@ $(COBJS): %$(OBJEXT): %.c
$(call ARCHIVE, $(BIN), $(OBJS))
@touch .built
-.context:
ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
+$(BUILTIN_REGISTRY)$(DELIM)ftpd_start.bdat: $(TOPDIR)$(DELIM).config Makefile
$(call REGISTER,ftpd_start,SCHED_PRIORITY_DEFAULT,2048,ftpd_start)
- $(call REGISTER,ftpd_stop,SCHED_PRIORITY_DEFAULT,2048,ftpd_stop)
- @touch $@
-endif
-context: .context
+$(BUILTIN_REGISTRY)$(DELIM)ftpd_stop.bdat: $(TOPDIR)$(DELIM).config Makefile
+ $(call REGISTER,ftpd_stop,SCHED_PRIORITY_DEFAULT,2048,ftpd_stop)
+
+context: $(BUILTIN_REGISTRY)$(DELIM)ftpd_start.bdat $(BUILTIN_REGISTRY)$(DELIM)ftpd_stop.bdat
+else
+context:
+endif
.depend: Makefile $(SRCS)
@$(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
diff --git a/apps/examples/hello/Makefile b/apps/examples/hello/Makefile
index 560b0da358..c4e6f735a5 100644
--- a/apps/examples/hello/Makefile
+++ b/apps/examples/hello/Makefile
@@ -83,13 +83,14 @@ $(COBJS): %$(OBJEXT): %.c
$(call ARCHIVE, $(BIN), $(OBJS))
@touch .built
-.context:
ifeq ($(CONFIG_EXAMPLES_HELLO_BUILTIN),y)
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
- @touch $@
-endif
-context: .context
+context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
+else
+context:
+endif
.depend: Makefile $(SRCS)
@$(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
diff --git a/apps/examples/helloxx/Makefile b/apps/examples/helloxx/Makefile
index 062da7d588..df1b360a50 100644
--- a/apps/examples/helloxx/Makefile
+++ b/apps/examples/helloxx/Makefile
@@ -100,13 +100,14 @@ $(CXXOBJS): %$(OBJEXT): %.cxx
$(call ARCHIVE, $(BIN), $(OBJS))
@touch .built
-.context:
ifeq ($(CONFIG_EXAMPLES_HELLOXX_BUILTIN),y)
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
- @touch $@
-endif
-context: .context
+context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
+else
+context:
+endif
.depend: Makefile $(SRCS)
@$(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
diff --git a/apps/examples/json/Makefile b/apps/examples/json/Makefile
index c3e9203f93..1e42757b86 100644
--- a/apps/examples/json/Makefile
+++ b/apps/examples/json/Makefile
@@ -81,13 +81,14 @@ $(COBJS): %$(OBJEXT): %.c
$(call ARCHIVE, $(BIN), $(OBJS))
@touch .built
-.context:
ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
- @touch $@
-endif
-context: .context
+context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
+else
+context:
+endif
.depend: Makefile $(SRCS)
@$(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
diff --git a/apps/examples/keypadtest/Makefile b/apps/examples/keypadtest/Makefile
index 3de0556a2b..0c40a5c6c1 100644
--- a/apps/examples/keypadtest/Makefile
+++ b/apps/examples/keypadtest/Makefile
@@ -83,13 +83,14 @@ $(COBJS): %$(OBJEXT): %.c
$(call ARCHIVE, $(BIN), $(OBJS))
@touch .built
-.context:
ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
- @touch $@
-endif
-context: .context
+context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
+else
+context:
+endif
.depend: Makefile $(SRCS)
@$(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
diff --git a/apps/examples/lcdrw/Makefile b/apps/examples/lcdrw/Makefile
index ed612e0bec..61d6bcce6e 100644
--- a/apps/examples/lcdrw/Makefile
+++ b/apps/examples/lcdrw/Makefile
@@ -83,13 +83,14 @@ $(COBJS): %$(OBJEXT): %.c
$(call ARCHIVE, $(BIN), $(OBJS))
@touch .built
-.context:
ifeq ($(CONFIG_EXAMPLES_LCDRW_BUILTIN),y)
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
- @touch $@
-endif
-context: .context
+context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
+else
+context:
+endif
.depend: Makefile $(SRCS)
@$(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
diff --git a/apps/examples/modbus/Makefile b/apps/examples/modbus/Makefile
index d6caefe81d..da31c3b524 100644
--- a/apps/examples/modbus/Makefile
+++ b/apps/examples/modbus/Makefile
@@ -83,13 +83,14 @@ $(COBJS): %$(OBJEXT): %.c
$(call ARCHIVE, $(BIN), $(OBJS))
@touch .built
-.context:
ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
- @touch $@
-endif
-context: .context
+context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
+else
+context:
+endif
.depend: Makefile $(SRCS)
@$(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
diff --git a/apps/examples/nettest/Makefile b/apps/examples/nettest/Makefile
index 085b9406d8..e6f56e7659 100644
--- a/apps/examples/nettest/Makefile
+++ b/apps/examples/nettest/Makefile
@@ -116,13 +116,14 @@ $(HOST_BIN): $(HOST_OBJS)
$(call ARCHIVE, $(BIN), $(TARG_OBJS))
@touch .built
-.context:
ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
- @touch $@
-endif
-context: .context
+context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
+else
+context:
+endif
.depend: Makefile $(TARG_SRCS)
@$(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(TARG_SRCS) >Make.dep
diff --git a/apps/examples/nx/Makefile b/apps/examples/nx/Makefile
index ad2bee84ea..4474a58c3f 100644
--- a/apps/examples/nx/Makefile
+++ b/apps/examples/nx/Makefile
@@ -86,13 +86,14 @@ $(COBJS): %$(OBJEXT): %.c
$(call ARCHIVE, $(BIN), $(OBJS))
@touch .built
-.context:
ifeq ($(CONFIG_EXAMPLES_NX_BUILTIN),y)
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
- @touch $@
-endif
-context: .context
+context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
+else
+context:
+endif
.depend: Makefile $(SRCS)
@$(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
diff --git a/apps/examples/nxhello/Makefile b/apps/examples/nxhello/Makefile
index b1ac6f116f..52ced123d5 100644
--- a/apps/examples/nxhello/Makefile
+++ b/apps/examples/nxhello/Makefile
@@ -83,13 +83,14 @@ $(COBJS): %$(OBJEXT): %.c
$(call ARCHIVE, $(BIN), $(OBJS))
@touch .built
-.context:
ifeq ($(CONFIG_EXAMPLES_NXHELLO_BUILTIN),y)
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
- @touch $@
-endif
-context: .context
+context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
+else
+context:
+endif
.depend: Makefile $(SRCS)
@$(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
diff --git a/apps/examples/nximage/Makefile b/apps/examples/nximage/Makefile
index e2e9201e74..98f04c2d53 100644
--- a/apps/examples/nximage/Makefile
+++ b/apps/examples/nximage/Makefile
@@ -83,13 +83,14 @@ $(COBJS): %$(OBJEXT): %.c
$(call ARCHIVE, $(BIN), $(OBJS))
@touch .built
-.context:
ifeq ($(CONFIG_EXAMPLES_NXIMAGE_BUILTIN),y)
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
- @touch $@
-endif
-context: .context
+context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
+else
+context:
+endif
.depend: Makefile $(SRCS)
@$(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
diff --git a/apps/examples/nxlines/Makefile b/apps/examples/nxlines/Makefile
index cdda7ad8cd..9673a5520d 100644
--- a/apps/examples/nxlines/Makefile
+++ b/apps/examples/nxlines/Makefile
@@ -83,13 +83,14 @@ $(COBJS): %$(OBJEXT): %.c
$(call ARCHIVE, $(BIN), $(OBJS))
@touch .built
-.context:
ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
- @touch $@
-endif
-context: .context
+context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
+else
+context:
+endif
.depend: Makefile $(SRCS)
@$(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
diff --git a/apps/examples/nxtext/Makefile b/apps/examples/nxtext/Makefile
index dffe66ba1f..738209754f 100644
--- a/apps/examples/nxtext/Makefile
+++ b/apps/examples/nxtext/Makefile
@@ -87,13 +87,14 @@ $(COBJS): %$(OBJEXT): %.c
$(call ARCHIVE, $(BIN), $(OBJS))
@touch .built
-.context:
ifeq ($(CONFIG_EXAMPLES_NXTEXT_BUILTIN),y)
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
- @touch $@
-endif
-context: .context
+context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
+else
+context:
+endif
.depend: Makefile $(SRCS)
@$(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
diff --git a/apps/examples/ostest/Makefile b/apps/examples/ostest/Makefile
index 3e78c64e83..dfb500387a 100644
--- a/apps/examples/ostest/Makefile
+++ b/apps/examples/ostest/Makefile
@@ -127,13 +127,14 @@ $(COBJS): %$(OBJEXT): %.c
$(call ARCHIVE, $(BIN), $(OBJS))
@touch .built
-.context:
ifeq ($(CONFIG_EXAMPLES_OSTEST_BUILTIN),y)
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
- @touch $@
-endif
-context: .context
+context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
+else
+context:
+endif
.depend: Makefile $(SRCS)
@$(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
diff --git a/apps/examples/pwm/Makefile b/apps/examples/pwm/Makefile
index 3a6f2520a0..d33d1c2775 100644
--- a/apps/examples/pwm/Makefile
+++ b/apps/examples/pwm/Makefile
@@ -83,11 +83,14 @@ $(COBJS): %$(OBJEXT): %.c
$(call ARCHIVE, $(BIN), $(OBJS))
@touch .built
-.context:
+ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
- @touch $@
-context: .context
+context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
+else
+context:
+endif
.depend: Makefile $(SRCS)
@$(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
diff --git a/apps/examples/qencoder/Makefile b/apps/examples/qencoder/Makefile
index 7d2427c6bf..1caff2ed30 100644
--- a/apps/examples/qencoder/Makefile
+++ b/apps/examples/qencoder/Makefile
@@ -83,13 +83,14 @@ $(COBJS): %$(OBJEXT): %.c
$(call ARCHIVE, $(BIN), $(OBJS))
@touch .built
-.context:
ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
- @touch $@
-endif
-context: .context
+context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
+else
+context:
+endif
.depend: Makefile $(SRCS)
@$(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
diff --git a/apps/examples/relays/Makefile b/apps/examples/relays/Makefile
index 8e91ab5723..17bf7a6a4b 100644
--- a/apps/examples/relays/Makefile
+++ b/apps/examples/relays/Makefile
@@ -83,13 +83,14 @@ $(COBJS): %$(OBJEXT): %.c
$(call ARCHIVE, $(BIN), $(OBJS))
@touch .built
-.context:
ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
- @touch $@
-endif
-context: .context
+context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
+else
+context:
+endif
.depend: Makefile $(SRCS)
@$(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
diff --git a/apps/examples/telnetd/Makefile b/apps/examples/telnetd/Makefile
index 8f5e5b6d2f..63876baa03 100644
--- a/apps/examples/telnetd/Makefile
+++ b/apps/examples/telnetd/Makefile
@@ -83,13 +83,14 @@ $(COBJS): %$(OBJEXT): %.c
$(call ARCHIVE, $(BIN), $(OBJS))
@touch .built
-.context:
ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
- @touch $@
-endif
-context: .context
+context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
+else
+context:
+endif
.depend: Makefile $(SRCS)
@$(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
diff --git a/apps/examples/tiff/Makefile b/apps/examples/tiff/Makefile
index f62209931a..853e904a73 100644
--- a/apps/examples/tiff/Makefile
+++ b/apps/examples/tiff/Makefile
@@ -83,13 +83,14 @@ $(COBJS): %$(OBJEXT): %.c
$(call ARCHIVE, $(BIN), $(OBJS))
@touch .built
-.context:
ifeq ($(CONFIG_EXAMPLES_TIFF_BUILTIN),y)
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
- @touch $@
-endif
-context: .context
+context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
+else
+context:
+endif
.depend: Makefile $(SRCS)
@$(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
diff --git a/apps/examples/touchscreen/Makefile b/apps/examples/touchscreen/Makefile
index b3943951ef..8761cc5b50 100644
--- a/apps/examples/touchscreen/Makefile
+++ b/apps/examples/touchscreen/Makefile
@@ -83,13 +83,14 @@ $(COBJS): %$(OBJEXT): %.c
$(call ARCHIVE, $(BIN), $(OBJS))
@touch .built
-.context:
ifeq ($(CONFIG_EXAMPLES_TOUCHSCREEN_BUILTIN),y)
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
- @touch $@
-endif
-context: .context
+context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
+else
+context:
+endif
.depend: Makefile $(SRCS)
@$(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
diff --git a/apps/examples/usbstorage/Makefile b/apps/examples/usbstorage/Makefile
index 5492e47dc4..a1eb77836e 100644
--- a/apps/examples/usbstorage/Makefile
+++ b/apps/examples/usbstorage/Makefile
@@ -87,14 +87,17 @@ $(COBJS): %$(OBJEXT): %.c
$(call ARCHIVE, $(BIN), $(OBJS))
@touch .built
-.context:
ifeq ($(CONFIG_EXAMPLES_USBMSC_BUILTIN),y)
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME1)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
$(call REGISTER,$(APPNAME1),$(PRIORITY1),$(STACKSIZE1),$(APPNAME1)_main)
- $(call REGISTER,$(APPNAME2),$(PRIORITY2),$(STACKSIZE2),$(APPNAME2)_main)
- @touch $@
-endif
-context: .context
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME2)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
+ $(call REGISTER,$(APPNAME2),$(PRIORITY2),$(STACKSIZE2),$(APPNAME2)_main)
+
+context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME1)_main.bdat $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME2)_main.bdat
+else
+context:
+endif
.depend: Makefile $(SRCS)
@$(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
diff --git a/apps/examples/usbterm/Makefile b/apps/examples/usbterm/Makefile
index c5fb95331e..3b3ca6cd7f 100644
--- a/apps/examples/usbterm/Makefile
+++ b/apps/examples/usbterm/Makefile
@@ -83,13 +83,14 @@ $(COBJS): %$(OBJEXT): %.c
$(call ARCHIVE, $(BIN), $(OBJS))
@touch .built
-.context:
ifeq ($(CONFIG_EXAMPLES_USBTERM_BUILTIN),y)
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
- @touch $@
-endif
-context: .context
+context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
+else
+context:
+endif
.depend: Makefile $(SRCS)
@$(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
diff --git a/apps/examples/watchdog/Makefile b/apps/examples/watchdog/Makefile
index 9890959fb5..cf947b0119 100644
--- a/apps/examples/watchdog/Makefile
+++ b/apps/examples/watchdog/Makefile
@@ -83,11 +83,14 @@ $(COBJS): %$(OBJEXT): %.c
$(call ARCHIVE, $(BIN), $(OBJS))
@touch .built
-.context:
+ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
- @touch $@
-context: .context
+context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
+else
+context:
+endif
.depend: Makefile $(SRCS)
@$(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
diff --git a/apps/examples/wgetjson/Makefile b/apps/examples/wgetjson/Makefile
index fa8f302c68..38bd8ac04f 100644
--- a/apps/examples/wgetjson/Makefile
+++ b/apps/examples/wgetjson/Makefile
@@ -83,13 +83,14 @@ $(COBJS): %$(OBJEXT): %.c
$(call ARCHIVE, $(BIN), $(OBJS))
@touch .built
-.context:
ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
- @touch $@
-endif
-context: .context
+context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
+else
+context:
+endif
.depend: Makefile $(SRCS)
@$(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
diff --git a/apps/examples/xmlrpc/Makefile b/apps/examples/xmlrpc/Makefile
index 7053f54d38..4756bfabbb 100644
--- a/apps/examples/xmlrpc/Makefile
+++ b/apps/examples/xmlrpc/Makefile
@@ -84,13 +84,14 @@ $(COBJS): %$(OBJEXT): %.c
$(call ARCHIVE, $(BIN), $(OBJS))
@touch .built
-.context:
ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
- @touch $@
-endif
-context: .context
+context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
+else
+context:
+endif
.depend: Makefile $(SRCS)
@$(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
diff --git a/apps/graphics/tiff/Makefile b/apps/graphics/tiff/Makefile
index e42091ad94..b5f6c5b73b 100644
--- a/apps/graphics/tiff/Makefile
+++ b/apps/graphics/tiff/Makefile
@@ -90,7 +90,6 @@ clean:
$(call CLEAN)
distclean: clean
- $(call DELFILE, .context)
$(call DELFILE, Make.dep)
$(call DELFILE, .depend)
diff --git a/apps/interpreters/ficl/Makefile b/apps/interpreters/ficl/Makefile
index 990630fb89..3b2dc7ab9b 100644
--- a/apps/interpreters/ficl/Makefile
+++ b/apps/interpreters/ficl/Makefile
@@ -108,7 +108,6 @@ context:
depend: .depend
clean:
- $(call DELFILE, .context)
$(call DELFILE, .built)
$(call CLEAN)
diff --git a/apps/modbus/Makefile b/apps/modbus/Makefile
index d2b1481628..27548f3d61 100644
--- a/apps/modbus/Makefile
+++ b/apps/modbus/Makefile
@@ -111,7 +111,6 @@ clean:
$(call CLEAN)
distclean: clean
- $(call DELFILE, .context)
$(call DELFILE, Make.dep)
$(call DELFILE, .depend)
diff --git a/apps/nshlib/Makefile b/apps/nshlib/Makefile
index 73325e899d..7ddbb67bf3 100644
--- a/apps/nshlib/Makefile
+++ b/apps/nshlib/Makefile
@@ -130,7 +130,6 @@ clean:
$(call CLEAN)
distclean: clean
- $(call DELFILE, .context)
$(call DELFILE, Make.dep)
$(call DELFILE, .depend)
diff --git a/apps/system/free/Makefile b/apps/system/free/Makefile
index dada00d992..4f6424f50d 100644
--- a/apps/system/free/Makefile
+++ b/apps/system/free/Makefile
@@ -92,11 +92,14 @@ $(COBJS): %$(OBJEXT): %.c
# Register application
-.context:
+ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
- $(Q) touch $@
-context: .context
+context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
+else
+context:
+endif
# Create dependencies
@@ -111,7 +114,6 @@ clean:
$(call CLEAN)
distclean: clean
- $(call DELFILE, .context)
$(call DELFILE, Make.dep)
$(call DELFILE, .depend)
diff --git a/apps/system/i2c/Makefile b/apps/system/i2c/Makefile
index 029d2b6fe4..7f42801a9f 100644
--- a/apps/system/i2c/Makefile
+++ b/apps/system/i2c/Makefile
@@ -68,7 +68,7 @@ STACKSIZE = 2048
# Build targets
all: .built
-.PHONY: .context context .depend depend clean distclean
+.PHONY: context .depend depend clean distclean
$(AOBJS): %$(OBJEXT): %.S
$(call ASSEMBLE, $<, $@)
@@ -80,11 +80,14 @@ $(COBJS): %$(OBJEXT): %.c
$(call ARCHIVE, $(BIN), $(OBJS))
$(Q) touch .built
-.context:
+ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
- $(Q) touch $@
-context: .context
+context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
+else
+context:
+endif
.depend: Makefile $(SRCS)
$(Q) $(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
@@ -97,7 +100,6 @@ clean:
$(call CLEAN)
distclean: clean
- $(call DELFILE, .context)
$(call DELFILE, Make.dep)
$(call DELFILE, .depend)
diff --git a/apps/system/install/Makefile b/apps/system/install/Makefile
index 6a02d859ff..aa65e60edd 100644
--- a/apps/system/install/Makefile
+++ b/apps/system/install/Makefile
@@ -93,11 +93,14 @@ $(COBJS): %$(OBJEXT): %.c
# Register application
-.context:
+ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
- $(Q) touch $@
-context: .context
+context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
+else
+context:
+endif
# Create dependencies
@@ -112,7 +115,6 @@ clean:
$(call CLEAN)
distclean: clean
- $(call DELFILE, .context)
$(call DELFILE, Make.dep)
$(call DELFILE, .depend)
diff --git a/apps/system/poweroff/Makefile b/apps/system/poweroff/Makefile
index bbceccb9e9..0067a13abe 100644
--- a/apps/system/poweroff/Makefile
+++ b/apps/system/poweroff/Makefile
@@ -93,11 +93,14 @@ $(COBJS): %$(OBJEXT): %.c
# Register application
-.context:
+ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
- $(Q) touch $@
-context: .context
+context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
+else
+context:
+endif
# Create dependencies
@@ -112,7 +115,6 @@ clean:
$(call CLEAN)
distclean: clean
- $(call DELFILE, .context)
$(call DELFILE, Make.dep)
$(call DELFILE, .depend)
diff --git a/apps/system/ramtron/Makefile b/apps/system/ramtron/Makefile
index 9f5af1659b..1c92398f32 100644
--- a/apps/system/ramtron/Makefile
+++ b/apps/system/ramtron/Makefile
@@ -93,11 +93,14 @@ $(COBJS): %$(OBJEXT): %.c
# Register application
-.context:
+ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
- $(Q) touch $@
-context: .context
+context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
+else
+context:
+endif
# Create dependencies
@@ -112,7 +115,6 @@ clean:
$(call CLEAN)
distclean: clean
- $(call DELFILE, .context)
$(call DELFILE, Make.dep)
$(call DELFILE, .depend)
diff --git a/apps/system/readline/Makefile b/apps/system/readline/Makefile
index 3a48d324e7..040fd2e28f 100644
--- a/apps/system/readline/Makefile
+++ b/apps/system/readline/Makefile
@@ -100,7 +100,6 @@ clean:
$(call CLEAN)
distclean: clean
- $(call DELFILE, .context)
$(call DELFILE, Make.dep)
$(call DELFILE, .depend)
diff --git a/apps/system/sdcard/Makefile b/apps/system/sdcard/Makefile
index 6d5d129608..6c580ba868 100644
--- a/apps/system/sdcard/Makefile
+++ b/apps/system/sdcard/Makefile
@@ -93,11 +93,14 @@ $(COBJS): %$(OBJEXT): %.c
# Register application
-.context:
+ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
- $(Q) touch $@
-context: .context
+context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
+else
+context:
+endif
# Create dependencies
@@ -112,7 +115,6 @@ clean:
$(call CLEAN)
distclean: clean
- $(call DELFILE, .context)
$(call DELFILE, Make.dep)
$(call DELFILE, .depend)
diff --git a/apps/system/sysinfo/Makefile b/apps/system/sysinfo/Makefile
index fa6aebf711..d233aa3d80 100644
--- a/apps/system/sysinfo/Makefile
+++ b/apps/system/sysinfo/Makefile
@@ -93,11 +93,14 @@ $(COBJS): %$(OBJEXT): %.c
# Register application
-.context:
+ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
- $(Q) touch $@
-context: .context
+context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
+else
+context:
+endif
# Create dependencies
@@ -112,7 +115,6 @@ clean:
$(call CLEAN)
distclean: clean
- $(call DELFILE, .context)
$(call DELFILE, Make.dep)
$(call DELFILE, .depend)
diff --git a/nuttx/Documentation/NuttShell.html b/nuttx/Documentation/NuttShell.html
index cc3f078ddf..7ad96da79b 100644
--- a/nuttx/Documentation/NuttShell.html
+++ b/nuttx/Documentation/NuttShell.html
@@ -3349,11 +3349,7 @@ int hello_main(int argc, char *argv[])
-
- And finally, the apps/examples/Makefilewill execute the context target in all configured examplesub-directores, getting us finally to apps/examples/Makefile (which is covered below).
- -
-
- At the conclusion of the context phase, the apps/Makefile will touch a file called .context in the apps/ directory, preventing any further configurations during any subsequent context phase build attempts.
-
+ And finally, the apps/examples/Makefile will execute the context target in all configured examplesub-directores, getting us finally to apps/examples/Makefile which is covered below.
@@ -3417,9 +3413,8 @@ STACKSIZE = 2048
When the hello command is executed, it will start the task with entry point hello_main() with the default priority and with a stack size of 2K.
-.context:
+context:
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
- @touch $@
diff --git a/nuttx/configs/vsn/src/Makefile b/nuttx/configs/vsn/src/Makefile
index a71c80c8ab..b0eba0a20b 100644
--- a/nuttx/configs/vsn/src/Makefile
+++ b/nuttx/configs/vsn/src/Makefile
@@ -85,11 +85,14 @@ libboard$(LIBEXT): $(OBJS)
# Register application
-.context:
+ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
- $(Q) touch $@
-context: .context
+context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
+else
+context:
+endif
# Create dependencies
From 424d1af00f29a81ec98b9b91bc518b70fb8e2013 Mon Sep 17 00:00:00 2001
From: patacongo
Date: Mon, 24 Dec 2012 13:15:57 +0000
Subject: [PATCH 009/118] Some fixes to apps/builtin/registry need to handle
some additional cases
git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5456 42af7a65-404d-4744-a932-0658087f49c3
---
apps/ChangeLog.txt | 5 ++++-
apps/Make.defs | 6 ++++++
apps/builtin/Makefile | 2 ++
apps/builtin/registry/Makefile | 9 ++++++++-
apps/examples/adc/Makefile | 2 +-
apps/examples/buttons/Makefile | 2 +-
apps/examples/can/Makefile | 2 +-
apps/examples/cdcacm/Makefile | 4 ++--
apps/examples/composite/Makefile | 4 ++--
apps/examples/cxxtest/Makefile | 2 +-
apps/examples/dhcpd/Makefile | 2 +-
apps/examples/discover/Makefile | 2 +-
apps/examples/ftpc/Makefile | 2 +-
apps/examples/ftpd/Makefile | 4 ++--
apps/examples/hello/Makefile | 2 +-
apps/examples/helloxx/Makefile | 2 +-
apps/examples/json/Makefile | 2 +-
apps/examples/keypadtest/Makefile | 2 +-
apps/examples/lcdrw/Makefile | 2 +-
apps/examples/modbus/Makefile | 2 +-
apps/examples/nettest/Makefile | 2 +-
apps/examples/nx/Makefile | 2 +-
apps/examples/nxhello/Makefile | 2 +-
apps/examples/nximage/Makefile | 2 +-
apps/examples/nxlines/Makefile | 2 +-
apps/examples/nxtext/Makefile | 2 +-
apps/examples/ostest/Makefile | 2 +-
apps/examples/pwm/Makefile | 2 +-
apps/examples/qencoder/Makefile | 2 +-
apps/examples/relays/Makefile | 2 +-
apps/examples/telnetd/Makefile | 2 +-
apps/examples/tiff/Makefile | 2 +-
apps/examples/touchscreen/Makefile | 2 +-
apps/examples/usbstorage/Makefile | 4 ++--
apps/examples/usbterm/Makefile | 2 +-
apps/examples/watchdog/Makefile | 2 +-
apps/examples/wgetjson/Makefile | 2 +-
apps/examples/xmlrpc/Makefile | 2 +-
apps/system/free/Makefile | 2 +-
apps/system/i2c/Makefile | 2 +-
apps/system/install/Makefile | 2 +-
apps/system/poweroff/Makefile | 2 +-
apps/system/ramtron/Makefile | 2 +-
apps/system/sdcard/Makefile | 2 +-
apps/system/sysinfo/Makefile | 2 +-
45 files changed, 65 insertions(+), 47 deletions(-)
diff --git a/apps/ChangeLog.txt b/apps/ChangeLog.txt
index 8999047ef1..09a4f634d1 100644
--- a/apps/ChangeLog.txt
+++ b/apps/ChangeLog.txt
@@ -440,8 +440,11 @@
files. It makes sense for 'leaf' Makefiles to have this dependency,
but it does not make sense for upper-level Makefiles.
* namedapp/: Renamed to builtins in preparation for another change.
- * .context: Removed the .context kludge. This causes lots of problems
+ * .context: Removed the .context kludge. This caused lots of problems
when changing configurations because there is no easy way to get the
system to rebuild the context. Now, the context will be rebuilt
whenever there is a change in either .config or the Makefile.
+ * builtin/registry: Updated new built-in registration logic to handle
+ cases where (1) old apps/.config is used, and (2) applications ared
+ removed, not just added.
diff --git a/apps/Make.defs b/apps/Make.defs
index 217137a29c..c62999804c 100644
--- a/apps/Make.defs
+++ b/apps/Make.defs
@@ -36,6 +36,12 @@
BUILTIN_REGISTRY = $(APPDIR)$(DELIM)builtin$(DELIM)registry
+ifeq ($(CONFIG_NUTTX_NEWCONFIG),y)
+DEPCONFIG = $(TOPDIR)/.config
+else
+DEPCONFIG = $(TOPDIR)/.config $(APPDIR)/.config
+endif
+
define REGISTER
$(Q) echo "Register: $1"
$(Q) echo "{ \"$1\", $2, $3, $4 }," > "$(BUILTIN_REGISTRY)$(DELIM)$4.bdat"
diff --git a/apps/builtin/Makefile b/apps/builtin/Makefile
index 6633146e93..2d8b0193ed 100644
--- a/apps/builtin/Makefile
+++ b/apps/builtin/Makefile
@@ -96,6 +96,7 @@ endif
$(Q) touch .built
context:
+ $(Q) $(MAKE) -C registry context TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)"
.depend: Makefile $(SRCS)
$(Q) $(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
@@ -104,6 +105,7 @@ context:
depend: .depend
clean:
+ $(Q) $(MAKE) -C registry clean TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)"
$(call DELFILE, .built)
$(call CLEAN)
diff --git a/apps/builtin/registry/Makefile b/apps/builtin/registry/Makefile
index 9117f53d6e..4ecd5da9fa 100644
--- a/apps/builtin/registry/Makefile
+++ b/apps/builtin/registry/Makefile
@@ -41,7 +41,14 @@ include $(APPDIR)/Make.defs
all:
.PHONY: context depend clean distclean
-context:
+.updated: $(DEPCONFIG)
+ $(call DELFILE, *.bdat)
+ $(call DELFILE, *.pdat)
+ $(Q) touch .updated
+
+# This must run before any other context target
+
+context: .updated
depend:
diff --git a/apps/examples/adc/Makefile b/apps/examples/adc/Makefile
index 55bc259e4b..3cbe843f6f 100644
--- a/apps/examples/adc/Makefile
+++ b/apps/examples/adc/Makefile
@@ -84,7 +84,7 @@ $(COBJS): %$(OBJEXT): %.c
@touch .built
ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
-$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
diff --git a/apps/examples/buttons/Makefile b/apps/examples/buttons/Makefile
index ac1f2f05aa..a2e8679d49 100644
--- a/apps/examples/buttons/Makefile
+++ b/apps/examples/buttons/Makefile
@@ -84,7 +84,7 @@ $(COBJS): %$(OBJEXT): %.c
@touch .built
ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
-$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
diff --git a/apps/examples/can/Makefile b/apps/examples/can/Makefile
index 5df96e1e7d..548c6702c1 100644
--- a/apps/examples/can/Makefile
+++ b/apps/examples/can/Makefile
@@ -84,7 +84,7 @@ $(COBJS): %$(OBJEXT): %.c
@touch .built
ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
-$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
diff --git a/apps/examples/cdcacm/Makefile b/apps/examples/cdcacm/Makefile
index d9e19e9064..2cf3a107fa 100644
--- a/apps/examples/cdcacm/Makefile
+++ b/apps/examples/cdcacm/Makefile
@@ -88,10 +88,10 @@ $(COBJS): %$(OBJEXT): %.c
@touch .built
ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
-$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME1)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME1)_main.bdat: $(DEPCONFIG) Makefile
$(call REGISTER,$(APPNAME1),$(PRIORITY1),$(STACKSIZE1),$(APPNAME1)_main)
-$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME2)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME2)_main.bdat: $(DEPCONFIG) Makefile
$(call REGISTER,$(APPNAME2),$(PRIORITY2),$(STACKSIZE2),$(APPNAME2)_main)
context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME1)_main.bdat $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME2)_main.bdat
diff --git a/apps/examples/composite/Makefile b/apps/examples/composite/Makefile
index b1fe493082..1f05d9c647 100644
--- a/apps/examples/composite/Makefile
+++ b/apps/examples/composite/Makefile
@@ -88,10 +88,10 @@ $(COBJS): %$(OBJEXT): %.c
@touch .built
ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
-$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME1)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME1)_main.bdat: $(DEPCONFIG) Makefile
$(call REGISTER,$(APPNAME1),$(PRIORITY1),$(STACKSIZE1),$(APPNAME1)_main)
-$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME2)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME2)_main.bdat: $(DEPCONFIG) Makefile
$(call REGISTER,$(APPNAME2),$(PRIORITY2),$(STACKSIZE2),$(APPNAME2)_main)
context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME1)_main.bdat $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME2)_main.bdat
diff --git a/apps/examples/cxxtest/Makefile b/apps/examples/cxxtest/Makefile
index cba9f0a4f0..97fdb6edee 100644
--- a/apps/examples/cxxtest/Makefile
+++ b/apps/examples/cxxtest/Makefile
@@ -101,7 +101,7 @@ $(CXXOBJS): %$(OBJEXT): %.cxx
@touch .built
ifeq ($(CONFIG_EXAMPLES_HELLOXX_BUILTIN),y)
-$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
diff --git a/apps/examples/dhcpd/Makefile b/apps/examples/dhcpd/Makefile
index 0522d4cc47..d718d79e13 100644
--- a/apps/examples/dhcpd/Makefile
+++ b/apps/examples/dhcpd/Makefile
@@ -84,7 +84,7 @@ $(COBJS): %$(OBJEXT): %.c
@touch .built
ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
-$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
diff --git a/apps/examples/discover/Makefile b/apps/examples/discover/Makefile
index b0285fbff3..033ab11313 100644
--- a/apps/examples/discover/Makefile
+++ b/apps/examples/discover/Makefile
@@ -85,7 +85,7 @@ $(COBJS): %$(OBJEXT): %.c
@touch .built
ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
-$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
diff --git a/apps/examples/ftpc/Makefile b/apps/examples/ftpc/Makefile
index e09779abdf..cc966f8d6b 100644
--- a/apps/examples/ftpc/Makefile
+++ b/apps/examples/ftpc/Makefile
@@ -84,7 +84,7 @@ $(COBJS): %$(OBJEXT): %.c
# Register application
ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
-$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
diff --git a/apps/examples/ftpd/Makefile b/apps/examples/ftpd/Makefile
index dc53bfdeab..dd18d5043b 100644
--- a/apps/examples/ftpd/Makefile
+++ b/apps/examples/ftpd/Makefile
@@ -79,10 +79,10 @@ $(COBJS): %$(OBJEXT): %.c
@touch .built
ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
-$(BUILTIN_REGISTRY)$(DELIM)ftpd_start.bdat: $(TOPDIR)$(DELIM).config Makefile
+$(BUILTIN_REGISTRY)$(DELIM)ftpd_start.bdat: $(DEPCONFIG) Makefile
$(call REGISTER,ftpd_start,SCHED_PRIORITY_DEFAULT,2048,ftpd_start)
-$(BUILTIN_REGISTRY)$(DELIM)ftpd_stop.bdat: $(TOPDIR)$(DELIM).config Makefile
+$(BUILTIN_REGISTRY)$(DELIM)ftpd_stop.bdat: $(DEPCONFIG) Makefile
$(call REGISTER,ftpd_stop,SCHED_PRIORITY_DEFAULT,2048,ftpd_stop)
context: $(BUILTIN_REGISTRY)$(DELIM)ftpd_start.bdat $(BUILTIN_REGISTRY)$(DELIM)ftpd_stop.bdat
diff --git a/apps/examples/hello/Makefile b/apps/examples/hello/Makefile
index c4e6f735a5..fc98fa7f45 100644
--- a/apps/examples/hello/Makefile
+++ b/apps/examples/hello/Makefile
@@ -84,7 +84,7 @@ $(COBJS): %$(OBJEXT): %.c
@touch .built
ifeq ($(CONFIG_EXAMPLES_HELLO_BUILTIN),y)
-$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
diff --git a/apps/examples/helloxx/Makefile b/apps/examples/helloxx/Makefile
index df1b360a50..44d8806583 100644
--- a/apps/examples/helloxx/Makefile
+++ b/apps/examples/helloxx/Makefile
@@ -101,7 +101,7 @@ $(CXXOBJS): %$(OBJEXT): %.cxx
@touch .built
ifeq ($(CONFIG_EXAMPLES_HELLOXX_BUILTIN),y)
-$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
diff --git a/apps/examples/json/Makefile b/apps/examples/json/Makefile
index 1e42757b86..f6a38fb1a1 100644
--- a/apps/examples/json/Makefile
+++ b/apps/examples/json/Makefile
@@ -82,7 +82,7 @@ $(COBJS): %$(OBJEXT): %.c
@touch .built
ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
-$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
diff --git a/apps/examples/keypadtest/Makefile b/apps/examples/keypadtest/Makefile
index 0c40a5c6c1..e38e66a822 100644
--- a/apps/examples/keypadtest/Makefile
+++ b/apps/examples/keypadtest/Makefile
@@ -84,7 +84,7 @@ $(COBJS): %$(OBJEXT): %.c
@touch .built
ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
-$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
diff --git a/apps/examples/lcdrw/Makefile b/apps/examples/lcdrw/Makefile
index 61d6bcce6e..aab04acf5e 100644
--- a/apps/examples/lcdrw/Makefile
+++ b/apps/examples/lcdrw/Makefile
@@ -84,7 +84,7 @@ $(COBJS): %$(OBJEXT): %.c
@touch .built
ifeq ($(CONFIG_EXAMPLES_LCDRW_BUILTIN),y)
-$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
diff --git a/apps/examples/modbus/Makefile b/apps/examples/modbus/Makefile
index da31c3b524..b2fba6764e 100644
--- a/apps/examples/modbus/Makefile
+++ b/apps/examples/modbus/Makefile
@@ -84,7 +84,7 @@ $(COBJS): %$(OBJEXT): %.c
@touch .built
ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
-$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
diff --git a/apps/examples/nettest/Makefile b/apps/examples/nettest/Makefile
index e6f56e7659..a0308713c1 100644
--- a/apps/examples/nettest/Makefile
+++ b/apps/examples/nettest/Makefile
@@ -117,7 +117,7 @@ $(HOST_BIN): $(HOST_OBJS)
@touch .built
ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
-$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
diff --git a/apps/examples/nx/Makefile b/apps/examples/nx/Makefile
index 4474a58c3f..13a9388219 100644
--- a/apps/examples/nx/Makefile
+++ b/apps/examples/nx/Makefile
@@ -87,7 +87,7 @@ $(COBJS): %$(OBJEXT): %.c
@touch .built
ifeq ($(CONFIG_EXAMPLES_NX_BUILTIN),y)
-$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
diff --git a/apps/examples/nxhello/Makefile b/apps/examples/nxhello/Makefile
index 52ced123d5..4a72eb8c7b 100644
--- a/apps/examples/nxhello/Makefile
+++ b/apps/examples/nxhello/Makefile
@@ -84,7 +84,7 @@ $(COBJS): %$(OBJEXT): %.c
@touch .built
ifeq ($(CONFIG_EXAMPLES_NXHELLO_BUILTIN),y)
-$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
diff --git a/apps/examples/nximage/Makefile b/apps/examples/nximage/Makefile
index 98f04c2d53..7bdaa46d23 100644
--- a/apps/examples/nximage/Makefile
+++ b/apps/examples/nximage/Makefile
@@ -84,7 +84,7 @@ $(COBJS): %$(OBJEXT): %.c
@touch .built
ifeq ($(CONFIG_EXAMPLES_NXIMAGE_BUILTIN),y)
-$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
diff --git a/apps/examples/nxlines/Makefile b/apps/examples/nxlines/Makefile
index 9673a5520d..54495b2924 100644
--- a/apps/examples/nxlines/Makefile
+++ b/apps/examples/nxlines/Makefile
@@ -84,7 +84,7 @@ $(COBJS): %$(OBJEXT): %.c
@touch .built
ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
-$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
diff --git a/apps/examples/nxtext/Makefile b/apps/examples/nxtext/Makefile
index 738209754f..dfb165608d 100644
--- a/apps/examples/nxtext/Makefile
+++ b/apps/examples/nxtext/Makefile
@@ -88,7 +88,7 @@ $(COBJS): %$(OBJEXT): %.c
@touch .built
ifeq ($(CONFIG_EXAMPLES_NXTEXT_BUILTIN),y)
-$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
diff --git a/apps/examples/ostest/Makefile b/apps/examples/ostest/Makefile
index dfb500387a..3d19f6a780 100644
--- a/apps/examples/ostest/Makefile
+++ b/apps/examples/ostest/Makefile
@@ -128,7 +128,7 @@ $(COBJS): %$(OBJEXT): %.c
@touch .built
ifeq ($(CONFIG_EXAMPLES_OSTEST_BUILTIN),y)
-$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
diff --git a/apps/examples/pwm/Makefile b/apps/examples/pwm/Makefile
index d33d1c2775..ece901a993 100644
--- a/apps/examples/pwm/Makefile
+++ b/apps/examples/pwm/Makefile
@@ -84,7 +84,7 @@ $(COBJS): %$(OBJEXT): %.c
@touch .built
ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
-$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
diff --git a/apps/examples/qencoder/Makefile b/apps/examples/qencoder/Makefile
index 1caff2ed30..9668796e67 100644
--- a/apps/examples/qencoder/Makefile
+++ b/apps/examples/qencoder/Makefile
@@ -84,7 +84,7 @@ $(COBJS): %$(OBJEXT): %.c
@touch .built
ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
-$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
diff --git a/apps/examples/relays/Makefile b/apps/examples/relays/Makefile
index 17bf7a6a4b..1ab4c87167 100644
--- a/apps/examples/relays/Makefile
+++ b/apps/examples/relays/Makefile
@@ -84,7 +84,7 @@ $(COBJS): %$(OBJEXT): %.c
@touch .built
ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
-$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
diff --git a/apps/examples/telnetd/Makefile b/apps/examples/telnetd/Makefile
index 63876baa03..4391870c0a 100644
--- a/apps/examples/telnetd/Makefile
+++ b/apps/examples/telnetd/Makefile
@@ -84,7 +84,7 @@ $(COBJS): %$(OBJEXT): %.c
@touch .built
ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
-$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
diff --git a/apps/examples/tiff/Makefile b/apps/examples/tiff/Makefile
index 853e904a73..17b3bb92cf 100644
--- a/apps/examples/tiff/Makefile
+++ b/apps/examples/tiff/Makefile
@@ -84,7 +84,7 @@ $(COBJS): %$(OBJEXT): %.c
@touch .built
ifeq ($(CONFIG_EXAMPLES_TIFF_BUILTIN),y)
-$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
diff --git a/apps/examples/touchscreen/Makefile b/apps/examples/touchscreen/Makefile
index 8761cc5b50..1a65c7282d 100644
--- a/apps/examples/touchscreen/Makefile
+++ b/apps/examples/touchscreen/Makefile
@@ -84,7 +84,7 @@ $(COBJS): %$(OBJEXT): %.c
@touch .built
ifeq ($(CONFIG_EXAMPLES_TOUCHSCREEN_BUILTIN),y)
-$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
diff --git a/apps/examples/usbstorage/Makefile b/apps/examples/usbstorage/Makefile
index a1eb77836e..6c486bf9c4 100644
--- a/apps/examples/usbstorage/Makefile
+++ b/apps/examples/usbstorage/Makefile
@@ -88,10 +88,10 @@ $(COBJS): %$(OBJEXT): %.c
@touch .built
ifeq ($(CONFIG_EXAMPLES_USBMSC_BUILTIN),y)
-$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME1)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME1)_main.bdat: $(DEPCONFIG) Makefile
$(call REGISTER,$(APPNAME1),$(PRIORITY1),$(STACKSIZE1),$(APPNAME1)_main)
-$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME2)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME2)_main.bdat: $(DEPCONFIG) Makefile
$(call REGISTER,$(APPNAME2),$(PRIORITY2),$(STACKSIZE2),$(APPNAME2)_main)
context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME1)_main.bdat $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME2)_main.bdat
diff --git a/apps/examples/usbterm/Makefile b/apps/examples/usbterm/Makefile
index 3b3ca6cd7f..91e80686e2 100644
--- a/apps/examples/usbterm/Makefile
+++ b/apps/examples/usbterm/Makefile
@@ -84,7 +84,7 @@ $(COBJS): %$(OBJEXT): %.c
@touch .built
ifeq ($(CONFIG_EXAMPLES_USBTERM_BUILTIN),y)
-$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
diff --git a/apps/examples/watchdog/Makefile b/apps/examples/watchdog/Makefile
index cf947b0119..076272fe36 100644
--- a/apps/examples/watchdog/Makefile
+++ b/apps/examples/watchdog/Makefile
@@ -84,7 +84,7 @@ $(COBJS): %$(OBJEXT): %.c
@touch .built
ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
-$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
diff --git a/apps/examples/wgetjson/Makefile b/apps/examples/wgetjson/Makefile
index 38bd8ac04f..89cb3e11e4 100644
--- a/apps/examples/wgetjson/Makefile
+++ b/apps/examples/wgetjson/Makefile
@@ -84,7 +84,7 @@ $(COBJS): %$(OBJEXT): %.c
@touch .built
ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
-$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
diff --git a/apps/examples/xmlrpc/Makefile b/apps/examples/xmlrpc/Makefile
index 4756bfabbb..b103fd7edc 100644
--- a/apps/examples/xmlrpc/Makefile
+++ b/apps/examples/xmlrpc/Makefile
@@ -85,7 +85,7 @@ $(COBJS): %$(OBJEXT): %.c
@touch .built
ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
-$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
diff --git a/apps/system/free/Makefile b/apps/system/free/Makefile
index 4f6424f50d..58ca7956c3 100644
--- a/apps/system/free/Makefile
+++ b/apps/system/free/Makefile
@@ -93,7 +93,7 @@ $(COBJS): %$(OBJEXT): %.c
# Register application
ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
-$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
diff --git a/apps/system/i2c/Makefile b/apps/system/i2c/Makefile
index 7f42801a9f..1ed7a2faef 100644
--- a/apps/system/i2c/Makefile
+++ b/apps/system/i2c/Makefile
@@ -81,7 +81,7 @@ $(COBJS): %$(OBJEXT): %.c
$(Q) touch .built
ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
-$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
diff --git a/apps/system/install/Makefile b/apps/system/install/Makefile
index aa65e60edd..07d42887a5 100644
--- a/apps/system/install/Makefile
+++ b/apps/system/install/Makefile
@@ -94,7 +94,7 @@ $(COBJS): %$(OBJEXT): %.c
# Register application
ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
-$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
diff --git a/apps/system/poweroff/Makefile b/apps/system/poweroff/Makefile
index 0067a13abe..eb7518fbcc 100644
--- a/apps/system/poweroff/Makefile
+++ b/apps/system/poweroff/Makefile
@@ -94,7 +94,7 @@ $(COBJS): %$(OBJEXT): %.c
# Register application
ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
-$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
diff --git a/apps/system/ramtron/Makefile b/apps/system/ramtron/Makefile
index 1c92398f32..b47781095d 100644
--- a/apps/system/ramtron/Makefile
+++ b/apps/system/ramtron/Makefile
@@ -94,7 +94,7 @@ $(COBJS): %$(OBJEXT): %.c
# Register application
ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
-$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
diff --git a/apps/system/sdcard/Makefile b/apps/system/sdcard/Makefile
index 6c580ba868..d748b2b04f 100644
--- a/apps/system/sdcard/Makefile
+++ b/apps/system/sdcard/Makefile
@@ -94,7 +94,7 @@ $(COBJS): %$(OBJEXT): %.c
# Register application
ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
-$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
diff --git a/apps/system/sysinfo/Makefile b/apps/system/sysinfo/Makefile
index d233aa3d80..eb788b01ac 100644
--- a/apps/system/sysinfo/Makefile
+++ b/apps/system/sysinfo/Makefile
@@ -94,7 +94,7 @@ $(COBJS): %$(OBJEXT): %.c
# Register application
ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
-$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(TOPDIR)$(DELIM).config Makefile
+$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
context: $(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat
From 5859e0d35365a89d1b3001f562f89dd81d001302 Mon Sep 17 00:00:00 2001
From: patacongo
Date: Mon, 24 Dec 2012 14:31:02 +0000
Subject: [PATCH 010/118] Correct round-to-ticks logic in sigtimedwait()
git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5457 42af7a65-404d-4744-a932-0658087f49c3
---
apps/README.txt | 114 ++++++++++++++++++++++++++++++------
nuttx/ChangeLog | 3 +
nuttx/sched/sig_timedwait.c | 22 ++++++-
3 files changed, 118 insertions(+), 21 deletions(-)
diff --git a/apps/README.txt b/apps/README.txt
index 4f043dcfab..3281269057 100644
--- a/apps/README.txt
+++ b/apps/README.txt
@@ -17,15 +17,15 @@ Contents
General
-------
This folder provides various applications found in sub-directories. These
-applications are not inherently a part of NuttX but are provided you help
+applications are not inherently a part of NuttX but are provided to help
you develop your own applications. The apps/ directory is a "break away"
-part of the configuration that you may chose to use or not.
+part of the configuration that you may choose to use or not.
Directory Location
------------------
The default application directory used by the NuttX build should be named
apps/ (or apps-x.y/ where x.y is the NuttX version number). This apps/
-directoy should appear in the directory tree at the same level as the
+directory should appear in the directory tree at the same level as the
NuttX directory. Like:
.
@@ -54,7 +54,7 @@ In this case, application entry points with their requirements are gathered
together in two files:
- builtin/builtin_proto.h Entry points, prototype function
- - builtin/builtin_list.h Application specific information and requirements
+ - builtin/builtin_list.h Application specific information and requirements
The build occurs in several phases as different build targets are executed:
(1) context, (2) depend, and (3) default (all). Application information is
@@ -96,11 +96,11 @@ after the NSH command.
Application Configuration File
------------------------------
-A special configuration file is used to configure which applications
-are to be included in the build. The source for this file is
-configs///appconfig. The existence of the appconfig
-file in the board configuration directory is sufficient to enable building
-of applications.
+The old-style NuttX configuration uses a special configuration file is
+used to configure which applications are to be included in the build.
+The source for this file is configs///appconfig.
+The existence of the appconfig file in the board configuration directory\
+is sufficient to enable building of applications.
The appconfig file is copied into the apps/ directory as .config when
NuttX is configured. .config is included in the toplevel apps/Makefile.
@@ -109,6 +109,38 @@ CONFIGURED_APPS list like:
CONFIGURED_APPS += examples/hello system/poweroff
+The new NuttX configuration uses kconfig-frontends tools and only the
+NuttX .config file. The new configuration is indicated by the existence
+of the definition CONFIG_NUTTX_NEWCONFIG=y in the NuttX .config file.
+If CONFIG_NUTTX_NEWCONFIG is defined, then the Makefile will:
+
+- Assume that there is no apps/.config file and will instead
+- Include Make.defs files from each of the subdirectories.
+
+When an application is enabled using the kconfig-frontends tool, then
+a new definition is added to the NuttX .config file. For example, if
+you want to enable apps/examples/hello then the old apps/.config would
+have had:
+
+ CONFIGURED_APPS += examples/hello
+
+But in the new configuration there will be no apps/.config file and,
+instead, the NuttX .config will have:
+
+ CONFIG_EXAMPLES_HELLO=y
+
+This will select the apps/examples/hello in the following way:
+
+- The top-level make will include examples/Make.defs
+- examples/Make.defs will set CONFIGURED_APPS += examples/hello
+ like this:
+
+ ifeq ($(CONFIG_EXAMPLES_HELLO),y)
+ CONFIGURED_APPS += examples/hello
+ endif
+
+Thus accomplishing the same thing with no apps/.config file.
+
Built-In Start-Up main() function
------------------------------
A builtin application can even be used as the main, start-up entry point
@@ -130,17 +162,63 @@ An example application skeleton can be found under the examples/hello
sub-directory. This example shows how a builtin application can be added
to the project. One must define:
- 1. create sub-directory as: appname
- 2. provide entry point: appname_main()
- 3. set the requirements in the file: Makefile, specially the lines:
+Old configuration method:
- APPNAME = appname
- PRIORITY = SCHED_PRIORITY_DEFAULT
- STACKSIZE = 768
- ASRCS = asm source file list as a.asm b.asm ...
- CSRCS = C source file list as foo1.c foo2.c ..
+ 1. Create sub-directory as: appname
- 4. add application in the apps/.config
+ 2. In this directory there should be:
+
+ - A Makefile, and
+ - The application source code.
+
+ 3. The application source code should provide the entry point:
+ appname_main()
+
+ 4. Set the requirements in the file: Makefile, specially the lines:
+
+ APPNAME = appname
+ PRIORITY = SCHED_PRIORITY_DEFAULT
+ STACKSIZE = 768
+ ASRCS = asm source file list as a.asm b.asm ...
+ CSRCS = C source file list as foo1.c foo2.c ..
+
+ Look at some of the other Makefiles for examples. Note the
+ special registration logic needed for the context: target
+
+ 5. Add the to the application to the CONFIGIURED_APPS in the
+ apps/.config file:
+
+ CONFIGURED_APPS += appname
+
+New Configuration Method:
+
+ 1. Create sub-directory as: appname
+
+ 2. In this directory there should be:
+
+ - A Make.defs file that would be included by the apps/Makefile
+ - A Kconfig file that would be used by the configuration tool (see
+ misc/tools/kconfig-language.txt). This Kconfig file should be
+ included by the apps/Kconfig file
+ - A Makefile, and
+ - The application source code.
+
+ 3. The application source code should provide the entry point:
+ appname_main()
+
+ 4. Set the requirements in the file: Makefile, specially the lines:
+
+ APPNAME = appname
+ PRIORITY = SCHED_PRIORITY_DEFAULT
+ STACKSIZE = 768
+ ASRCS = asm source file list as a.asm b.asm ...
+ CSRCS = C source file list as foo1.c foo2.c ..
+
+ 4b. The Make.defs file should include a line like:
+
+ ifeq ($(CONFIG_APPNAME),y)
+ CONFIGURED_APPS += appname
+ endif
Building NuttX with Board-Specific Pieces Outside the Source Tree
-----------------------------------------------------------------
diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog
index 56edf9487a..6c6fd7843c 100644
--- a/nuttx/ChangeLog
+++ b/nuttx/ChangeLog
@@ -3812,4 +3812,7 @@
* include/pthread.h: In sys/prctl.h because it is needed by
pthread_[set|get]name_np()
* tools/kconfig.bat: Kludge to run kconfig-frontends from a DOS shell.
+ * sched/sig_timedwait.c: Should always move the time up to the next
+ largest number of system ticks. The logic was rounding. Noted by
+ Petteri Aimonen.
diff --git a/nuttx/sched/sig_timedwait.c b/nuttx/sched/sig_timedwait.c
index 1b8dfd1620..d03611610d 100644
--- a/nuttx/sched/sig_timedwait.c
+++ b/nuttx/sched/sig_timedwait.c
@@ -238,10 +238,25 @@ int sigtimedwait(FAR const sigset_t *set, FAR struct siginfo *info,
if (timeout)
{
- /* Convert the timespec to milliseconds */
+ /* Convert the timespec to system clock ticks, making sure that
+ * the resultint delay is greater than or equal to the requested
+ * time in nanoseconds.
+ */
- waitticks = MSEC2TICK(timeout->tv_sec * MSEC_PER_SEC
- + timeout->tv_nsec / NSEC_PER_MSEC);
+#ifdef CONFIG_HAVE_LONG_LONG
+ uint64_t waitticks64 = (timeout->tv_sec * NSEC_PER_SEC +
+ timeout->tv_nsec + NSEC_PER_TICK - 1) /
+ NSEC_PER_TICK;
+ DEBUGASSERT(waitticks64 <= UINT32_MAX);
+ waitticks = (uint32_t)waitticks64;
+#else
+ uint32_t waitmsec;
+
+ DEBUGASSERT(timeout->tv_sec < UINT32_MAX / MSEC_PER_SEC);
+ waitmsec = timeout->tv_sec * MSEC_PER_SEC +
+ (timeout->tv_nsec + NSEC_PER_MSEC - 1) / NSEC_PER_MSEC;
+ waitticks = (waitmsec + MSEC_PER_TICK - 1) / MSEC_PER_TICK;
+#endif
/* Create a watchdog */
@@ -326,6 +341,7 @@ int sigtimedwait(FAR const sigset_t *set, FAR struct siginfo *info,
{
memcpy(info, &rtcb->sigunbinfo, sizeof(struct siginfo));
}
+
irqrestore(saved_state);
}
From 7c73fe57c659ce9f9a31a247b04f7068a0b62cb1 Mon Sep 17 00:00:00 2001
From: patacongo
Date: Mon, 24 Dec 2012 17:49:58 +0000
Subject: [PATCH 011/118] Fixes for l3s, USB composite, nfsmount, apps context
build problems
git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5458 42af7a65-404d-4744-a932-0658087f49c3
---
apps/builtin/Makefile | 16 +++++++++++--
apps/nshlib/nsh_mntcmds.c | 3 +++
apps/nshlib/nsh_netcmds.c | 1 +
nuttx/configs/ekk-lm3s9b96/nsh/setenv.sh | 12 ++++++----
nuttx/configs/ekk-lm3s9b96/ostest/setenv.sh | 12 ++++++----
nuttx/configs/lm3s8962-ek/nsh/appconfig | 2 +-
nuttx/configs/lm3s8962-ek/nsh/setenv.sh | 26 +++++++++++++++++----
nuttx/configs/lm3s8962-ek/nx/setenv.sh | 26 +++++++++++++++++----
nuttx/configs/lm3s8962-ek/ostest/setenv.sh | 26 +++++++++++++++++----
nuttx/configs/stm3210e-eval/RIDE/defconfig | 2 +-
nuttx/drivers/usbdev/composite.c | 4 ++--
nuttx/include/nuttx/clock.h | 2 +-
nuttx/sched/sig_timedwait.c | 5 ++--
13 files changed, 105 insertions(+), 32 deletions(-)
diff --git a/apps/builtin/Makefile b/apps/builtin/Makefile
index 2d8b0193ed..0efb832f87 100644
--- a/apps/builtin/Makefile
+++ b/apps/builtin/Makefile
@@ -77,18 +77,30 @@ $(COBJS): %$(OBJEXT): %.c
builtin_list.h: registry/.updated
$(call DELFILE, builtin_list.h)
+ $(Q) touch builtin_list.h
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
$(Q) for /f %%G in ('dir /b registry\*.bdat`) do ( type registry\%%G >> builtin_list.h )
else
- $(Q) for file in `ls registry/*.bdat`; do cat $$file >> builtin_list.h; done
+ $(Q) ( \
+ filelist=`ls registry/*.bdat 2>/dev/null || echo ""`; \
+ for file in $$filelist; \
+ do cat $$file >> builtin_list.h; \
+ done; \
+ )
endif
builtin_proto.h: registry/.updated
$(call DELFILE, builtin_proto.h)
+ $(Q) touch builtin_proto.h
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
$(Q) for /f %%G in ('dir /b registry\*.pdat`) do ( type registry\%%G >> builtin_proto.h )
else
- $(Q) for file in `ls registry/*.pdat`; do cat $$file >> builtin_proto.h; done
+ $(Q) ( \
+ filelist=`ls registry/*.pdat 2>/dev/null || echo ""`; \
+ for file in $$filelist; \
+ do cat $$file >> builtin_proto.h; \
+ done; \
+ )
endif
.built: builtin_list.h builtin_proto.h $(OBJS)
diff --git a/apps/nshlib/nsh_mntcmds.c b/apps/nshlib/nsh_mntcmds.c
index 690d027cae..f6eb26c31a 100644
--- a/apps/nshlib/nsh_mntcmds.c
+++ b/apps/nshlib/nsh_mntcmds.c
@@ -45,10 +45,13 @@
#include
#include
+#include
#include
#include
#include
+#include
+
#include "nsh.h"
#include "nsh_console.h"
diff --git a/apps/nshlib/nsh_netcmds.c b/apps/nshlib/nsh_netcmds.c
index 371d304606..506950e14f 100644
--- a/apps/nshlib/nsh_netcmds.c
+++ b/apps/nshlib/nsh_netcmds.c
@@ -67,6 +67,7 @@
#if defined(CONFIG_NET_ICMP) && defined(CONFIG_NET_ICMP_PING) && \
!defined(CONFIG_DISABLE_CLOCK) && !defined(CONFIG_DISABLE_SIGNALS)
# include
+# include
#endif
#if defined(CONFIG_NET_UDP) && CONFIG_NFILE_DESCRIPTORS > 0
diff --git a/nuttx/configs/ekk-lm3s9b96/nsh/setenv.sh b/nuttx/configs/ekk-lm3s9b96/nsh/setenv.sh
index 6e591e0dd7..bba7595de3 100755
--- a/nuttx/configs/ekk-lm3s9b96/nsh/setenv.sh
+++ b/nuttx/configs/ekk-lm3s9b96/nsh/setenv.sh
@@ -48,12 +48,16 @@ if [ -z "${PATH_ORIG}" ]; then
export PATH_ORIG="${PATH}"
fi
-# TOOLCHAIN_BIN must be defined to the full path to the location where you
-# have installed the toolchain of your choice. Modify the following:
+# 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"
-# Andd add the toolchain path to the PATH variable
-
+# 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/ekk-lm3s9b96/ostest/setenv.sh b/nuttx/configs/ekk-lm3s9b96/ostest/setenv.sh
index d98c6cc40c..60dfa3c71d 100755
--- a/nuttx/configs/ekk-lm3s9b96/ostest/setenv.sh
+++ b/nuttx/configs/ekk-lm3s9b96/ostest/setenv.sh
@@ -48,12 +48,16 @@ if [ -z "${PATH_ORIG}" ]; then
export PATH_ORIG="${PATH}"
fi
-# TOOLCHAIN_BIN must be defined to the full path to the location where you
-# have installed the toolchain of your choice. Modify the following:
+# 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"
-# Andd add the toolchain path to the PATH variable
-
+# 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/lm3s8962-ek/nsh/appconfig b/nuttx/configs/lm3s8962-ek/nsh/appconfig
index 5eeb566076..2e2421b675 100644
--- a/nuttx/configs/lm3s8962-ek/nsh/appconfig
+++ b/nuttx/configs/lm3s8962-ek/nsh/appconfig
@@ -40,7 +40,7 @@ CONFIGURED_APPS += examples/nsh
# NSH library
CONFIGURED_APPS += system/readline
-CONFIGURED_APPS += nshlibO
+CONFIGURED_APPS += nshlib
# Networking support
diff --git a/nuttx/configs/lm3s8962-ek/nsh/setenv.sh b/nuttx/configs/lm3s8962-ek/nsh/setenv.sh
index 511552d94b..1db7f8ee26 100755
--- a/nuttx/configs/lm3s8962-ek/nsh/setenv.sh
+++ b/nuttx/configs/lm3s8962-ek/nsh/setenv.sh
@@ -32,15 +32,31 @@
# POSSIBILITY OF SUCH DAMAGE.
#
-if [ "$(basename $0)" = "setenv.sh" ] ; then
+if [ "$_" = "$0" ] ; then
echo "You must source this script, not run it!" 1>&2
exit 1
fi
-if [ -z "${PATH_ORIG}" ]; then export PATH_ORIG="${PATH}"; fi
-
WD=`pwd`
-export BUILDROOT_BIN="${WD}/../misc/buildroot/build_arm_nofpu/staging_dir/bin"
-export PATH="${BUILDROOT_BIN}:/sbin:/usr/sbin:${PATH_ORIG}"
+if [ ! -x "setenv.sh" ]; then
+ echo "This script must be executed from the top-level NuttX build directory"
+ exit 1
+fi
+
+if [ -z "${PATH_ORIG}" ]; then
+ export PATH_ORIG="${PATH}"
+fi
+
+# This is the Cygwin path to the location where I installed the CodeSourcery
+# toolchain under windows. You will also have to edit this if you install
+# the CodeSourcery toolchain in any other location
+# export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/CodeSourcery/Sourcery G++ Lite/bin"
+
+# This is the Cygwin path to the location where I build the buildroot
+# toolchain.
+export TOOLCHAIN_BIN="${WD}/../misc/buildroot/build_arm_nofpu/staging_dir/bin"
+
+# Add the path to the toolchain to the PATH varialble
+export PATH="${TOOLCHAIN_BIN}:/sbin:/usr/sbin:${PATH_ORIG}"
echo "PATH : ${PATH}"
diff --git a/nuttx/configs/lm3s8962-ek/nx/setenv.sh b/nuttx/configs/lm3s8962-ek/nx/setenv.sh
index a367250836..c716ddf5ef 100755
--- a/nuttx/configs/lm3s8962-ek/nx/setenv.sh
+++ b/nuttx/configs/lm3s8962-ek/nx/setenv.sh
@@ -32,15 +32,31 @@
# POSSIBILITY OF SUCH DAMAGE.
#
-if [ "$(basename $0)" = "setenv.sh" ] ; then
+if [ "$_" = "$0" ] ; then
echo "You must source this script, not run it!" 1>&2
exit 1
fi
-if [ -z "${PATH_ORIG}" ]; then export PATH_ORIG="${PATH}"; fi
-
WD=`pwd`
-export BUILDROOT_BIN="${WD}/../misc/buildroot/build_arm_nofpu/staging_dir/bin"
-export PATH="${BUILDROOT_BIN}:/sbin:/usr/sbin:${PATH_ORIG}"
+if [ ! -x "setenv.sh" ]; then
+ echo "This script must be executed from the top-level NuttX build directory"
+ exit 1
+fi
+
+if [ -z "${PATH_ORIG}" ]; then
+ export PATH_ORIG="${PATH}"
+fi
+
+# This is the Cygwin path to the location where I installed the CodeSourcery
+# toolchain under windows. You will also have to edit this if you install
+# the CodeSourcery toolchain in any other location
+# export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/CodeSourcery/Sourcery G++ Lite/bin"
+
+# This is the Cygwin path to the location where I build the buildroot
+# toolchain.
+export TOOLCHAIN_BIN="${WD}/../misc/buildroot/build_arm_nofpu/staging_dir/bin"
+
+# Add the path to the toolchain to the PATH varialble
+export PATH="${TOOLCHAIN_BIN}:/sbin:/usr/sbin:${PATH_ORIG}"
echo "PATH : ${PATH}"
diff --git a/nuttx/configs/lm3s8962-ek/ostest/setenv.sh b/nuttx/configs/lm3s8962-ek/ostest/setenv.sh
index 6bd49b6fa0..91bf1095b9 100755
--- a/nuttx/configs/lm3s8962-ek/ostest/setenv.sh
+++ b/nuttx/configs/lm3s8962-ek/ostest/setenv.sh
@@ -32,15 +32,31 @@
# POSSIBILITY OF SUCH DAMAGE.
#
-if [ "$(basename $0)" = "setenv.sh" ] ; then
+if [ "$_" = "$0" ] ; then
echo "You must source this script, not run it!" 1>&2
exit 1
fi
-if [ -z "${PATH_ORIG}" ]; then export PATH_ORIG="${PATH}"; fi
-
WD=`pwd`
-export BUILDROOT_BIN="${WD}/../misc/buildroot/build_arm_nofpu/staging_dir/bin"
-export PATH="${BUILDROOT_BIN}:/sbin:/usr/sbin:${PATH_ORIG}"
+if [ ! -x "setenv.sh" ]; then
+ echo "This script must be executed from the top-level NuttX build directory"
+ exit 1
+fi
+
+if [ -z "${PATH_ORIG}" ]; then
+ export PATH_ORIG="${PATH}"
+fi
+
+# This is the Cygwin path to the location where I installed the CodeSourcery
+# toolchain under windows. You will also have to edit this if you install
+# the CodeSourcery toolchain in any other location
+# export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/CodeSourcery/Sourcery G++ Lite/bin"
+
+# This is the Cygwin path to the location where I build the buildroot
+# toolchain.
+export TOOLCHAIN_BIN="${WD}/../misc/buildroot/build_arm_nofpu/staging_dir/bin"
+
+# Add the path to the toolchain to the PATH varialble
+export PATH="${TOOLCHAIN_BIN}:/sbin:/usr/sbin:${PATH_ORIG}"
echo "PATH : ${PATH}"
diff --git a/nuttx/configs/stm3210e-eval/RIDE/defconfig b/nuttx/configs/stm3210e-eval/RIDE/defconfig
index 64665f47e7..e71540c24c 100755
--- a/nuttx/configs/stm3210e-eval/RIDE/defconfig
+++ b/nuttx/configs/stm3210e-eval/RIDE/defconfig
@@ -169,7 +169,7 @@ CONFIG_RAW_BINARY=n
#
# General OS setup
#
-#CONFIG_USER_ENTRYPOINT=
+CONFIG_USER_ENTRYPOINT="null_main"
CONFIG_DEBUG=n
CONFIG_DEBUG_VERBOSE=n
CONFIG_DEBUG_SYMBOLS=n
diff --git a/nuttx/drivers/usbdev/composite.c b/nuttx/drivers/usbdev/composite.c
index 4cad8af864..530d644169 100644
--- a/nuttx/drivers/usbdev/composite.c
+++ b/nuttx/drivers/usbdev/composite.c
@@ -523,12 +523,12 @@ static int composite_setup(FAR struct usbdevclass_driver_s *driver,
{
/* Save the configuration and inform the constituent classes */
- ret = CLASS_SETUP(priv->dev1, dev, ctrl);
+ ret = CLASS_SETUP(priv->dev1, dev, ctrl, dataout, outlen);
dispatched = true;
if (ret >= 0)
{
- ret = CLASS_SETUP(priv->dev2, dev, ctrl);
+ ret = CLASS_SETUP(priv->dev2, dev, ctrl, dataout, outlen);
if (ret >= 0)
{
priv->config = value;
diff --git a/nuttx/include/nuttx/clock.h b/nuttx/include/nuttx/clock.h
index 952e0e5efc..e640ecd2e5 100644
--- a/nuttx/include/nuttx/clock.h
+++ b/nuttx/include/nuttx/clock.h
@@ -113,7 +113,7 @@
#define USEC2TICK(usec) (((usec)+(USEC_PER_TICK/2))/USEC_PER_TICK) /* Rounds */
#define MSEC2TICK(msec) (((msec)+(MSEC_PER_TICK/2))/MSEC_PER_TICK) /* Rounds */
#define DSEC2TICK(dsec) MSEC2TICK((dsec)*MSEC_PER_DSEC)
-#define SEC2TICK(sec) MSEC2TICK((sec)*MSEC_PER_SEC)
+#define SEC2TICK(sec) MSEC2TICK((sec)*MSEC_PER_SEC) /* Exact */
#define TICK2NSEC(tick) ((tick)*NSEC_PER_TICK) /* Exact */
#define TICK2USEC(tick) ((tick)*USEC_PER_TICK) /* Exact */
diff --git a/nuttx/sched/sig_timedwait.c b/nuttx/sched/sig_timedwait.c
index d03611610d..d7610cd491 100644
--- a/nuttx/sched/sig_timedwait.c
+++ b/nuttx/sched/sig_timedwait.c
@@ -38,6 +38,7 @@
****************************************************************************/
#include
+#include
#include
#include
@@ -244,8 +245,8 @@ int sigtimedwait(FAR const sigset_t *set, FAR struct siginfo *info,
*/
#ifdef CONFIG_HAVE_LONG_LONG
- uint64_t waitticks64 = (timeout->tv_sec * NSEC_PER_SEC +
- timeout->tv_nsec + NSEC_PER_TICK - 1) /
+ uint64_t waitticks64 = ((uint64_t)timeout->tv_sec * NSEC_PER_SEC +
+ (uint64_t)timeout->tv_nsec + NSEC_PER_TICK - 1) /
NSEC_PER_TICK;
DEBUGASSERT(waitticks64 <= UINT32_MAX);
waitticks = (uint32_t)waitticks64;
From 6953365d30f06846a8f3877b73e01ee7d8321db0 Mon Sep 17 00:00:00 2001
From: patacongo
Date: Mon, 24 Dec 2012 20:22:14 +0000
Subject: [PATCH 012/118] Fix several build issues noted by Mike Smith
git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5459 42af7a65-404d-4744-a932-0658087f49c3
---
apps/ChangeLog.txt | 10 +++-
apps/builtin/Makefile | 5 +-
apps/examples/nettest/Makefile | 57 +++++++++++----------
nuttx/ChangeLog | 3 ++
nuttx/arch/arm/src/arm/up_head.S | 51 +++++++++++++-----
nuttx/configs/ntosd-dm320/nettest/setenv.sh | 26 ++++++++--
nuttx/configs/ntosd-dm320/nsh/setenv.sh | 26 ++++++++--
nuttx/configs/ntosd-dm320/ostest/setenv.sh | 26 ++++++++--
nuttx/configs/ntosd-dm320/poll/setenv.sh | 26 ++++++++--
nuttx/configs/ntosd-dm320/thttpd/setenv.sh | 26 ++++++++--
nuttx/configs/ntosd-dm320/udp/setenv.sh | 26 ++++++++--
nuttx/configs/ntosd-dm320/uip/setenv.sh | 26 ++++++++--
12 files changed, 228 insertions(+), 80 deletions(-)
diff --git a/apps/ChangeLog.txt b/apps/ChangeLog.txt
index 09a4f634d1..ea1b247f51 100644
--- a/apps/ChangeLog.txt
+++ b/apps/ChangeLog.txt
@@ -439,12 +439,18 @@
* Makefiles: Removed dependency of distclean on clean in most top-level
files. It makes sense for 'leaf' Makefiles to have this dependency,
but it does not make sense for upper-level Makefiles.
- * namedapp/: Renamed to builtins in preparation for another change.
+ * apps/namedapp/: Renamed to builtins in preparation for another change.
* .context: Removed the .context kludge. This caused lots of problems
when changing configurations because there is no easy way to get the
system to rebuild the context. Now, the context will be rebuilt
whenever there is a change in either .config or the Makefile.
- * builtin/registry: Updated new built-in registration logic to handle
+ * apps/builtin/registry: Updated new built-in registration logic to handle
cases where (1) old apps/.config is used, and (2) applications ared
removed, not just added.
+ * apps/examples/nettest/Makefile: Fix an error that crept in during
+ some of the recent, massive build system changes.
+ * apps/builtin/Makefile: Need to have auto-generated header files
+ in place early in the dependency generation phase to avoid warnings.
+ It is not important if they are only stubbed out header files at
+ this build phase.
diff --git a/apps/builtin/Makefile b/apps/builtin/Makefile
index 0efb832f87..ccb860c884 100644
--- a/apps/builtin/Makefile
+++ b/apps/builtin/Makefile
@@ -75,6 +75,9 @@ $(AOBJS): %$(OBJEXT): %.S
$(COBJS): %$(OBJEXT): %.c
$(call COMPILE, $<, $@)
+registry/.updated:
+ $(V) $(MAKE) -C registry .updated TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)"
+
builtin_list.h: registry/.updated
$(call DELFILE, builtin_list.h)
$(Q) touch builtin_list.h
@@ -110,7 +113,7 @@ endif
context:
$(Q) $(MAKE) -C registry context TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)"
-.depend: Makefile $(SRCS)
+.depend: Makefile $(SRCS) builtin_list.h builtin_proto.h
$(Q) $(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
$(Q) touch $@
diff --git a/apps/examples/nettest/Makefile b/apps/examples/nettest/Makefile
index a0308713c1..5368bdefc0 100644
--- a/apps/examples/nettest/Makefile
+++ b/apps/examples/nettest/Makefile
@@ -39,64 +39,64 @@ include $(APPDIR)/Make.defs
# Basic TCP networking test
-TARG_ASRCS =
-TARG_AOBJS = $(TARG_ASRCS:.S=$(OBJEXT))
+TARG_ASRCS =
+TARG_AOBJS = $(TARG_ASRCS:.S=$(OBJEXT))
-TARG_CSRCS = nettest.c
+TARG_CSRCS = nettest.c
ifeq ($(CONFIG_EXAMPLES_NETTEST_SERVER),y)
-TARG_CSRCS += nettest_server.c
+TARG_CSRCS += nettest_server.c
else
-TARG_CSRCS += nettest_client.c
+TARG_CSRCS += nettest_client.c
endif
-TARG_COBJS = $(TARG_CSRCS:.c=$(OBJEXT))
+TARG_COBJS = $(TARG_CSRCS:.c=$(OBJEXT))
-TARG_SRCS = $(TARG_ASRCS) $(TARG_CSRCS)
-TARG_OBJS = $(TARG_AOBJS) $(TARG_COBJS)
+TARG_SRCS = $(TARG_ASRCS) $(TARG_CSRCS)
+TARG_OBJS = $(TARG_AOBJS) $(TARG_COBJS)
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
- TARG_BIN = ..\..\libapps$(LIBEXT)
+ TARG_BIN = ..\..\libapps$(LIBEXT)
else
ifeq ($(WINTOOL),y)
- TARG_BIN = ..\\..\\libapps$(LIBEXT)
+ TARG_BIN = ..\\..\\libapps$(LIBEXT)
else
- TARG_BIN = ../../libapps$(LIBEXT)
+ TARG_BIN = ../../libapps$(LIBEXT)
endif
endif
-HOSTCFLAGS += -DCONFIG_EXAMPLES_NETTEST_HOST=1
+HOSTCFLAGS += -DCONFIG_EXAMPLES_NETTEST_HOST=1
ifeq ($(CONFIG_EXAMPLES_NETTEST_SERVER),y)
-HOSTCFLAGS += -DCONFIG_EXAMPLES_NETTEST_SERVER=1 \
- -DCONFIG_EXAMPLES_NETTEST_CLIENTIP="$(CONFIG_EXAMPLES_NETTEST_CLIENTIP)"
+HOSTCFLAGS += -DCONFIG_EXAMPLES_NETTEST_SERVER=1 -DCONFIG_EXAMPLES_NETTEST_CLIENTIP="$(CONFIG_EXAMPLES_NETTEST_CLIENTIP)"
endif
ifeq ($(CONFIG_EXAMPLES_NETTEST_PERFORMANCE),y)
-HOSTCFLAGS += -DCONFIG_EXAMPLES_NETTEST_PERFORMANCE=1
+HOSTCFLAGS += -DCONFIG_EXAMPLES_NETTEST_PERFORMANCE=1
endif
-HOST_SRCS = host.c
+HOST_SRCS = host.c
ifeq ($(CONFIG_EXAMPLES_NETTEST_SERVER),y)
-HOST_SRCS += nettest_client.c
+HOST_SRCS += nettest_client.c
else
-HOST_SRCS += nettest_server.c
+HOST_SRCS += nettest_server.c
endif
-HOST_OBJS = $(HOST_SRCS:.c=.o)
-HOST_BIN = host
+HOSTOBJEXT ?= .hobj
+HOST_OBJS = $(HOST_SRCS:.c=$(HOSTOBJEXT))
+HOST_BIN = host
-ROOTDEPPATH = --dep-path .
+ROOTDEPPATH = --dep-path .
# NET test built-in application info
-APPNAME = nettest
-PRIORITY = SCHED_PRIORITY_DEFAULT
-STACKSIZE = 2048
+APPNAME = nettest
+PRIORITY = SCHED_PRIORITY_DEFAULT
+STACKSIZE = 2048
# Common build
-VPATH =
+VPATH =
all: .built $(HOST_BIN)
-.PHONY: clean depend distclean
+.PHONY: clean depend distclean
$(TARG_AOBJS): %$(OBJEXT): %.S
$(call ASSEMBLE, $<, $@)
@@ -104,7 +104,7 @@ $(TARG_AOBJS): %$(OBJEXT): %.S
$(TARG_COBJS): %$(OBJEXT): %.c
$(call COMPILE, $<, $@)
-$(HOST_OBJS): %.o: %.c
+$(HOST_OBJS): %$(HOSTOBJEXT): %.c
@echo "CC: $<"
@$(HOSTCC) -c $(HOSTCFLAGS) $< -o $@
@@ -113,7 +113,7 @@ $(HOST_BIN): $(HOST_OBJS)
@$(HOSTCC) $(HOSTLDFLAGS) $(HOST_OBJS) -o $@
.built: $(TARG_OBJS)
- $(call ARCHIVE, $(BIN), $(TARG_OBJS))
+ $(call ARCHIVE, $(TARG_BIN), $(TARG_OBJS))
@touch .built
ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
@@ -132,6 +132,7 @@ endif
depend: .depend
clean:
+ $(call DELFILE, *$(HOSTOBJEXT))
$(call DELFILE, $(HOST_BIN))
$(call DELFILE, .built)
$(call CLEAN)
diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog
index 6c6fd7843c..c5cc9b54a8 100644
--- a/nuttx/ChangeLog
+++ b/nuttx/ChangeLog
@@ -3815,4 +3815,7 @@
* sched/sig_timedwait.c: Should always move the time up to the next
largest number of system ticks. The logic was rounding. Noted by
Petteri Aimonen.
+ * arch/arm/src/up_head.S: Fix backward conditional compilation. NOTE
+ there is a issue of ARM9 systems with low vectors and large memories
+ that will have to be addressed in the future.
diff --git a/nuttx/arch/arm/src/arm/up_head.S b/nuttx/arch/arm/src/arm/up_head.S
index 91d67fd15b..46efd87725 100644
--- a/nuttx/arch/arm/src/arm/up_head.S
+++ b/nuttx/arch/arm/src/arm/up_head.S
@@ -1,5 +1,5 @@
/****************************************************************************
- * arch/arm/src/arm/up_head.S
+ * arch/arm/src/arm/up_pghead.S
*
* Copyright (C) 2007, 2009-2010 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt
@@ -78,6 +78,10 @@
* beginning of FLASH.
*/
+# if !defined(CONFIG_FLASH_START) || !defined(CONFIG_FLASH_VSTART)
+# error "CONFIG_FLASH_START or CONFIG_FLASH_VSTART is not defined"
+# endif
+
# if CONFIG_FLASH_START == CONFIG_FLASH_VSTART
# define CONFIG_IDENTITY_TEXTMAP 1
# endif
@@ -102,6 +106,10 @@
* beginning of FLASH.
*/
+# if !defined(CONFIG_FLASH_START) || !defined(CONFIG_FLASH_VSTART)
+# error "CONFIG_FLASH_START or CONFIG_FLASH_VSTART is not defined"
+# endif
+
# if CONFIG_FLASH_START == CONFIG_FLASH_VSTART
# define CONFIG_IDENTITY_TEXTMAP 1
# endif
@@ -120,6 +128,10 @@
* beginning of RAM.
*/
+# if !defined(CONFIG_DRAM_START) || !defined(CONFIG_DRAM_VSTART)
+# error "CONFIG_DRAM_START or CONFIG_DRAM_VSTART is not defined"
+# endif
+
# if CONFIG_DRAM_START == CONFIG_DRAM_VSTART
# define CONFIG_IDENTITY_TEXTMAP 1
# endif
@@ -162,26 +174,37 @@
* Assembly Macros
****************************************************************************/
-/* The ARM9 L1 page table can be placed at the beginning or at the end of the
- * RAM space. This decision is based on the placement of the vector area:
- * If the vectors are place in low memory at address 0x0000 0000, then the
- * page table is placed in high memory; if the vectors are placed in high
- * memory at address 0xfff0 0000, then the page table is locating at the
- * beginning of RAM.
+/* The ARM9 L1 page table can be placed at the beginning or at the end of
+ * the RAM space. This decision is based on the placement of the vector
+ * area: If the vectors are place in low memory at address 0x0000 0000, then
+ * the page table is placed in high memory; if the vectors are placed in
+ * high memory at address 0xfff0 0000, then the page table is locating at
+ * the beginning of RAM.
*
- * For the special case where (1) the program executes out of RAM, and (2) the
- * page is located at the beginning of RAM, then the following macro can
- * easily find the physical address of the section that includes the first
- * part of the text region: Since the page table is closely related to the
- * NuttX base address in this case, we can convert the page table base address
- * to the base address of the section containing both.
+ * For the special case where (1) the program executes out of RAM, and (2)
+ * the page is located at the beginning of RAM (i.e., the high vector case),
+ * then the following macro can easily find the physical address of the
+ * section that includes the first part of the text region: Since the page
+ * table is closely related to the NuttX base address in this case, we can
+ * convert the page table base address to the base address of the section
+ * containing both.
+ */
+
+/* REVISIT: This works now of the low vector case only because the RAM
+ * sizes that we have been dealing with are less then 1MB so that both the
+ * page table and the vector table are in the same 1MB RAM block. But
+ * this will certainly break later. Hence, the annoying warning.
*/
#ifdef CONFIG_ARCH_LOWVECTORS
+# warning "REVISIT"
+#endif
+
+//#ifndef CONFIG_ARCH_LOWVECTORS
.macro mksection, section, pgtable
bic \section, \pgtable, #0x000ff000
.endm
-#endif
+//#endif
/* This macro will modify r0, r1, r2 and r14 */
diff --git a/nuttx/configs/ntosd-dm320/nettest/setenv.sh b/nuttx/configs/ntosd-dm320/nettest/setenv.sh
index 6090d4cea3..cfb438ce72 100755
--- a/nuttx/configs/ntosd-dm320/nettest/setenv.sh
+++ b/nuttx/configs/ntosd-dm320/nettest/setenv.sh
@@ -32,15 +32,31 @@
# POSSIBILITY OF SUCH DAMAGE.
#
-if [ "$(basename $0)" = "setenv.sh" ] ; then
+if [ "$_" = "$0" ] ; then
echo "You must source this script, not run it!" 1>&2
exit 1
fi
-if [ -z ${PATH_ORIG} ]; then export PATH_ORIG=${PATH}; fi
-
WD=`pwd`
-export BUILDROOT_BIN=${WD}/../misc/buildroot/build_arm_nofpu/staging_dir/bin
-export PATH=${BUILDROOT_BIN}:/sbin:/usr/sbin:${PATH_ORIG}
+if [ ! -x "setenv.sh" ]; then
+ echo "This script must be executed from the top-level NuttX build directory"
+ exit 1
+fi
+
+if [ -z "${PATH_ORIG}" ]; then
+ export PATH_ORIG="${PATH}"
+fi
+
+# This is the Cygwin path to the location where I installed the CodeSourcery
+# toolchain under windows. You will also have to edit this if you install
+# the CodeSourcery toolchain in any other location
+# export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/CodeSourcery/Sourcery G++ Lite/bin"
+
+# This is the Cygwin path to the location where I build the buildroot
+# toolchain.
+export TOOLCHAIN_BIN="${WD}/../misc/buildroot/build_arm_nofpu/staging_dir/bin"
+
+# Add the path to the toolchain to the PATH varialble
+export PATH="${TOOLCHAIN_BIN}:/sbin:/usr/sbin:${PATH_ORIG}"
echo "PATH : ${PATH}"
diff --git a/nuttx/configs/ntosd-dm320/nsh/setenv.sh b/nuttx/configs/ntosd-dm320/nsh/setenv.sh
index a84e68884b..005aa81530 100755
--- a/nuttx/configs/ntosd-dm320/nsh/setenv.sh
+++ b/nuttx/configs/ntosd-dm320/nsh/setenv.sh
@@ -32,15 +32,31 @@
# POSSIBILITY OF SUCH DAMAGE.
#
-if [ "$(basename $0)" = "setenv.sh" ] ; then
+if [ "$_" = "$0" ] ; then
echo "You must source this script, not run it!" 1>&2
exit 1
fi
-if [ -z ${PATH_ORIG} ]; then export PATH_ORIG=${PATH}; fi
-
WD=`pwd`
-export BUILDROOT_BIN=${WD}/../misc/buildroot/build_arm_nofpu/staging_dir/bin
-export PATH=${BUILDROOT_BIN}:/sbin:/usr/sbin:${PATH_ORIG}
+if [ ! -x "setenv.sh" ]; then
+ echo "This script must be executed from the top-level NuttX build directory"
+ exit 1
+fi
+
+if [ -z "${PATH_ORIG}" ]; then
+ export PATH_ORIG="${PATH}"
+fi
+
+# This is the Cygwin path to the location where I installed the CodeSourcery
+# toolchain under windows. You will also have to edit this if you install
+# the CodeSourcery toolchain in any other location
+# export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/CodeSourcery/Sourcery G++ Lite/bin"
+
+# This is the Cygwin path to the location where I build the buildroot
+# toolchain.
+export TOOLCHAIN_BIN="${WD}/../misc/buildroot/build_arm_nofpu/staging_dir/bin"
+
+# Add the path to the toolchain to the PATH varialble
+export PATH="${TOOLCHAIN_BIN}:/sbin:/usr/sbin:${PATH_ORIG}"
echo "PATH : ${PATH}"
diff --git a/nuttx/configs/ntosd-dm320/ostest/setenv.sh b/nuttx/configs/ntosd-dm320/ostest/setenv.sh
index a65be2677d..75d6f0cd0d 100755
--- a/nuttx/configs/ntosd-dm320/ostest/setenv.sh
+++ b/nuttx/configs/ntosd-dm320/ostest/setenv.sh
@@ -32,15 +32,31 @@
# POSSIBILITY OF SUCH DAMAGE.
#
-if [ "$(basename $0)" = "setenv.sh" ] ; then
+if [ "$_" = "$0" ] ; then
echo "You must source this script, not run it!" 1>&2
exit 1
fi
-if [ -z ${PATH_ORIG} ]; then export PATH_ORIG=${PATH}; fi
-
WD=`pwd`
-export BUILDROOT_BIN=${WD}/../misc/buildroot/build_arm_nofpu/staging_dir/bin
-export PATH=${BUILDROOT_BIN}:/sbin:/usr/sbin:${PATH_ORIG}
+if [ ! -x "setenv.sh" ]; then
+ echo "This script must be executed from the top-level NuttX build directory"
+ exit 1
+fi
+
+if [ -z "${PATH_ORIG}" ]; then
+ export PATH_ORIG="${PATH}"
+fi
+
+# This is the Cygwin path to the location where I installed the CodeSourcery
+# toolchain under windows. You will also have to edit this if you install
+# the CodeSourcery toolchain in any other location
+# export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/CodeSourcery/Sourcery G++ Lite/bin"
+
+# This is the Cygwin path to the location where I build the buildroot
+# toolchain.
+export TOOLCHAIN_BIN="${WD}/../misc/buildroot/build_arm_nofpu/staging_dir/bin"
+
+# Add the path to the toolchain to the PATH varialble
+export PATH="${TOOLCHAIN_BIN}:/sbin:/usr/sbin:${PATH_ORIG}"
echo "PATH : ${PATH}"
diff --git a/nuttx/configs/ntosd-dm320/poll/setenv.sh b/nuttx/configs/ntosd-dm320/poll/setenv.sh
index de3b64ea90..427ffe26ab 100755
--- a/nuttx/configs/ntosd-dm320/poll/setenv.sh
+++ b/nuttx/configs/ntosd-dm320/poll/setenv.sh
@@ -32,15 +32,31 @@
# POSSIBILITY OF SUCH DAMAGE.
#
-if [ "$(basename $0)" = "setenv.sh" ] ; then
+if [ "$_" = "$0" ] ; then
echo "You must source this script, not run it!" 1>&2
exit 1
fi
-if [ -z ${PATH_ORIG} ]; then export PATH_ORIG=${PATH}; fi
-
WD=`pwd`
-export BUILDROOT_BIN=${WD}/../misc/buildroot/build_arm_nofpu/staging_dir/bin
-export PATH=${BUILDROOT_BIN}:/sbin:/usr/sbin:${PATH_ORIG}
+if [ ! -x "setenv.sh" ]; then
+ echo "This script must be executed from the top-level NuttX build directory"
+ exit 1
+fi
+
+if [ -z "${PATH_ORIG}" ]; then
+ export PATH_ORIG="${PATH}"
+fi
+
+# This is the Cygwin path to the location where I installed the CodeSourcery
+# toolchain under windows. You will also have to edit this if you install
+# the CodeSourcery toolchain in any other location
+# export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/CodeSourcery/Sourcery G++ Lite/bin"
+
+# This is the Cygwin path to the location where I build the buildroot
+# toolchain.
+export TOOLCHAIN_BIN="${WD}/../misc/buildroot/build_arm_nofpu/staging_dir/bin"
+
+# Add the path to the toolchain to the PATH varialble
+export PATH="${TOOLCHAIN_BIN}:/sbin:/usr/sbin:${PATH_ORIG}"
echo "PATH : ${PATH}"
diff --git a/nuttx/configs/ntosd-dm320/thttpd/setenv.sh b/nuttx/configs/ntosd-dm320/thttpd/setenv.sh
index 92ff91700e..ea38c09a51 100755
--- a/nuttx/configs/ntosd-dm320/thttpd/setenv.sh
+++ b/nuttx/configs/ntosd-dm320/thttpd/setenv.sh
@@ -32,15 +32,31 @@
# POSSIBILITY OF SUCH DAMAGE.
#
-if [ "$(basename $0)" = "setenv.sh" ] ; then
+if [ "$_" = "$0" ] ; then
echo "You must source this script, not run it!" 1>&2
exit 1
fi
-if [ -z ${PATH_ORIG} ]; then export PATH_ORIG=${PATH}; fi
-
WD=`pwd`
-export BUILDROOT_BIN=${WD}/../misc/buildroot/build_arm_nofpu/staging_dir/bin
-export PATH=${BUILDROOT_BIN}:/sbin:/usr/sbin:${PATH_ORIG}
+if [ ! -x "setenv.sh" ]; then
+ echo "This script must be executed from the top-level NuttX build directory"
+ exit 1
+fi
+
+if [ -z "${PATH_ORIG}" ]; then
+ export PATH_ORIG="${PATH}"
+fi
+
+# This is the Cygwin path to the location where I installed the CodeSourcery
+# toolchain under windows. You will also have to edit this if you install
+# the CodeSourcery toolchain in any other location
+# export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/CodeSourcery/Sourcery G++ Lite/bin"
+
+# This is the Cygwin path to the location where I build the buildroot
+# toolchain.
+export TOOLCHAIN_BIN="${WD}/../misc/buildroot/build_arm_nofpu/staging_dir/bin"
+
+# Add the path to the toolchain to the PATH varialble
+export PATH="${TOOLCHAIN_BIN}:/sbin:/usr/sbin:${PATH_ORIG}"
echo "PATH : ${PATH}"
diff --git a/nuttx/configs/ntosd-dm320/udp/setenv.sh b/nuttx/configs/ntosd-dm320/udp/setenv.sh
index 052413b089..92995bee56 100755
--- a/nuttx/configs/ntosd-dm320/udp/setenv.sh
+++ b/nuttx/configs/ntosd-dm320/udp/setenv.sh
@@ -32,15 +32,31 @@
# POSSIBILITY OF SUCH DAMAGE.
#
-if [ "$(basename $0)" = "setenv.sh" ] ; then
+if [ "$_" = "$0" ] ; then
echo "You must source this script, not run it!" 1>&2
exit 1
fi
-if [ -z ${PATH_ORIG} ]; then export PATH_ORIG=${PATH}; fi
-
WD=`pwd`
-export BUILDROOT_BIN=${WD}/../misc/buildroot/build_arm_nofpu/staging_dir/bin
-export PATH=${BUILDROOT_BIN}:/sbin:/usr/sbin:${PATH_ORIG}
+if [ ! -x "setenv.sh" ]; then
+ echo "This script must be executed from the top-level NuttX build directory"
+ exit 1
+fi
+
+if [ -z "${PATH_ORIG}" ]; then
+ export PATH_ORIG="${PATH}"
+fi
+
+# This is the Cygwin path to the location where I installed the CodeSourcery
+# toolchain under windows. You will also have to edit this if you install
+# the CodeSourcery toolchain in any other location
+# export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/CodeSourcery/Sourcery G++ Lite/bin"
+
+# This is the Cygwin path to the location where I build the buildroot
+# toolchain.
+export TOOLCHAIN_BIN="${WD}/../misc/buildroot/build_arm_nofpu/staging_dir/bin"
+
+# Add the path to the toolchain to the PATH varialble
+export PATH="${TOOLCHAIN_BIN}:/sbin:/usr/sbin:${PATH_ORIG}"
echo "PATH : ${PATH}"
diff --git a/nuttx/configs/ntosd-dm320/uip/setenv.sh b/nuttx/configs/ntosd-dm320/uip/setenv.sh
index 988e0a1269..33c252e1ec 100755
--- a/nuttx/configs/ntosd-dm320/uip/setenv.sh
+++ b/nuttx/configs/ntosd-dm320/uip/setenv.sh
@@ -32,15 +32,31 @@
# POSSIBILITY OF SUCH DAMAGE.
#
-if [ "$(basename $0)" = "setenv.sh" ] ; then
+if [ "$_" = "$0" ] ; then
echo "You must source this script, not run it!" 1>&2
exit 1
fi
-if [ -z ${PATH_ORIG} ]; then export PATH_ORIG=${PATH}; fi
-
WD=`pwd`
-export BUILDROOT_BIN=${WD}/../misc/buildroot/build_arm_nofpu/staging_dir/bin
-export PATH=${BUILDROOT_BIN}:/sbin:/usr/sbin:${PATH_ORIG}
+if [ ! -x "setenv.sh" ]; then
+ echo "This script must be executed from the top-level NuttX build directory"
+ exit 1
+fi
+
+if [ -z "${PATH_ORIG}" ]; then
+ export PATH_ORIG="${PATH}"
+fi
+
+# This is the Cygwin path to the location where I installed the CodeSourcery
+# toolchain under windows. You will also have to edit this if you install
+# the CodeSourcery toolchain in any other location
+# export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/CodeSourcery/Sourcery G++ Lite/bin"
+
+# This is the Cygwin path to the location where I build the buildroot
+# toolchain.
+export TOOLCHAIN_BIN="${WD}/../misc/buildroot/build_arm_nofpu/staging_dir/bin"
+
+# Add the path to the toolchain to the PATH varialble
+export PATH="${TOOLCHAIN_BIN}:/sbin:/usr/sbin:${PATH_ORIG}"
echo "PATH : ${PATH}"
From 292d4db37a4080585577c43434157db335cd5158 Mon Sep 17 00:00:00 2001
From: patacongo
Date: Tue, 25 Dec 2012 17:22:58 +0000
Subject: [PATCH 013/118] Add logic to serialize and marshal out-of-band
keyboard commands
git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5460 42af7a65-404d-4744-a932-0658087f49c3
---
apps/Make.defs | 4 +-
apps/builtin/Makefile | 6 +-
nuttx/ChangeLog | 4 +-
nuttx/include/nuttx/input/kbd_codec.h | 292 ++++++++++++++++++++++++++
nuttx/include/nuttx/usb/hid.h | 2 +-
nuttx/libc/misc/Make.defs | 2 +-
nuttx/libc/misc/lib_kbddecode.c | 258 +++++++++++++++++++++++
nuttx/libc/misc/lib_kbdencode.c | 81 +++++++
8 files changed, 641 insertions(+), 8 deletions(-)
create mode 100644 nuttx/include/nuttx/input/kbd_codec.h
create mode 100644 nuttx/libc/misc/lib_kbddecode.c
create mode 100644 nuttx/libc/misc/lib_kbdencode.c
diff --git a/apps/Make.defs b/apps/Make.defs
index c62999804c..f7e6aa08da 100644
--- a/apps/Make.defs
+++ b/apps/Make.defs
@@ -37,9 +37,9 @@
BUILTIN_REGISTRY = $(APPDIR)$(DELIM)builtin$(DELIM)registry
ifeq ($(CONFIG_NUTTX_NEWCONFIG),y)
-DEPCONFIG = $(TOPDIR)/.config
+DEPCONFIG = $(TOPDIR)$(DELIM).config
else
-DEPCONFIG = $(TOPDIR)/.config $(APPDIR)/.config
+DEPCONFIG = $(TOPDIR)$(DELIM).config $(APPDIR)$(DELIM).config
endif
define REGISTER
diff --git a/apps/builtin/Makefile b/apps/builtin/Makefile
index ccb860c884..8c89288864 100644
--- a/apps/builtin/Makefile
+++ b/apps/builtin/Makefile
@@ -75,10 +75,10 @@ $(AOBJS): %$(OBJEXT): %.S
$(COBJS): %$(OBJEXT): %.c
$(call COMPILE, $<, $@)
-registry/.updated:
+registry$(DELIM).updated:
$(V) $(MAKE) -C registry .updated TOPDIR="$(TOPDIR)" APPDIR="$(APPDIR)"
-builtin_list.h: registry/.updated
+builtin_list.h: registry$(DELIM).updated
$(call DELFILE, builtin_list.h)
$(Q) touch builtin_list.h
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
@@ -92,7 +92,7 @@ else
)
endif
-builtin_proto.h: registry/.updated
+builtin_proto.h: registry$(DELIM).updated
$(call DELFILE, builtin_proto.h)
$(Q) touch builtin_proto.h
ifeq ($(CONFIG_WINDOWS_NATIVE),y)
diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog
index c5cc9b54a8..80ddb56c6b 100644
--- a/nuttx/ChangeLog
+++ b/nuttx/ChangeLog
@@ -3818,4 +3818,6 @@
* arch/arm/src/up_head.S: Fix backward conditional compilation. NOTE
there is a issue of ARM9 systems with low vectors and large memories
that will have to be addressed in the future.
-
+ * libc/misc/lib_kbdencode.c and lib_kbddecode.c: Add logic to marshal
+ and serialized "out-of-band" keyboard commands intermixed with normal
+ ASCII data (not yet hooked into anything).
diff --git a/nuttx/include/nuttx/input/kbd_codec.h b/nuttx/include/nuttx/input/kbd_codec.h
new file mode 100644
index 0000000000..b103d544ec
--- /dev/null
+++ b/nuttx/include/nuttx/input/kbd_codec.h
@@ -0,0 +1,292 @@
+/************************************************************************************
+ * include/nuttx/input/kbd_codec.h
+ * Serialize and marshaling out-of-band keyboard data
+ *
+ * Copyright (C) 2012 Gregory Nutt. All rights reserved.
+ * Author: Gregory Nutt
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ * 3. Neither the name NuttX nor the names of its contributors may be
+ * used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ ************************************************************************************/
+
+#ifndef __INCLUDE_NUTTX_INPUT_KBD_CODEC_H
+#define __INCLUDE_NUTTX_INPUT_KBD_CODEC_H
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include
+#include
+
+/****************************************************************************
+ * Pre-processor Definitions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Public Types
+ ****************************************************************************/
+
+/* These are the special, "out-of-band" keyboard commands recognized by the
+ * CODEC.
+ */
+
+enum kbd_keycode_e
+{
+ KEYCODE_NORMAL = 0, /* Not a special keycode */
+
+ /* Delete and Backspace keycodes (in case they may be different than the
+ * ASCII BKSP and DEL values.
+ */
+
+ KEYCODE_FWDDEL, /* DELete (forward delete) */
+ KEYCODE_BACKDEL, /* Backspace (backward delete) */
+
+ /* Cursor movement */
+
+ KEYCODE_HOME, /* Home */
+ KEYCODE_END, /* End */
+ KEYCODE_LEFT, /* Left arrow */
+ KEYCODE_RIGHT, /* Right arrow */
+ KEYCODE_UP, /* Up arrow */
+ KEYCODE_DOWN, /* Down arrow */
+ KEYCODE_PAGEUP, /* Page up */
+ KEYCODE_PAGEDOWN, /* Page down */
+
+ /* Edit commands */
+
+ KEYCODE_INSERT, /* Insert */
+ KEYCODE_AGAIN, /* Again */
+ KEYCODE_UNDO, /* Undo */
+ KEYCODE_REDO, /* Redo */
+ KEYCODE_CUT, /* Cut */
+ KEYCODE_COPY, /* Copy */
+ KEYCODE_PASTE, /* Paste */
+ KEYCODE_FIND , /* Find */
+
+ /* Selection codes */
+
+ KEYCODE_ENTER, /* Enter */
+ KEYCODE_SELECT, /* Select */
+ KEYCODE_EXECUTE, /* Execute */
+
+ /* Keyboard modes */
+
+ KEYCODE_CAPSLOCK, /* Caps Lock */
+ KEYCODE_SCROLLLOCK, /* Scroll Lock */
+ KEYCODE_NUMLOCK, /* Keypad Num Lock and Clear */
+ KEYCODE_LCAPSLOCK, /* Locking Caps Lock */
+ KEYCODE_LNUMLOCK, /* Locking Num Lock */
+ KEYCODE_LSCROLLLOCK, /* Locking Scroll Lock */
+
+ /* Misc control codes */
+
+ KEYCODE_POWER, /* Power */
+ KEYCODE_HELP, /* Help */
+ KEYCODE_MENU, /* Menu */
+ KEYCODE_STOP, /* Stop */
+ KEYCODE_PAUSE, /* Pause */
+ KEYCODE_BREAK, /* Break */
+ KEYCODE_CANCEL, /* Cancel */
+ KEYCODE_PRINTSCN, /* PrintScreen */
+ KEYCODE_SYSREQ, /* SysReq/Attention */
+
+ /* Audio */
+
+ KEYCODE_MUTE, /* Mute */
+ KEYCODE_VOLUP, /* Volume Up */
+ KEYCODE_VOLDOWN, /* Volume Down */
+
+ /* Telephone */
+
+ KEYCODE_ANSWER, /* Answer (phone) */
+ KEYCODE_HANGUP, /* Hang-up (phone) */
+
+ /* Calculator */
+
+ KEYCODE_CLEAR, /* Clear */
+ KEYCODE_CLEARENTRY, /* Clear entry */
+
+ KEYCODE_MEMSET, /* Memory set */
+ KEYCODE_MEMCLEAR, /* Memory clear */
+ KEYCODE_MEMRECALL, /* Memory recall */
+ KEYCODE_MEMADD, /* Memory add */
+ KEYCODE_MEMSUBTRACT, /* Memory substract */
+ KEYCODE_MEMMULTIPY, /* Memory multiply */
+ KEYCODE_MEMDIVIDE, /* Memory divide */
+
+ KEYCODE_BINARY, /* Binary mode */
+ KEYCODE_OCTAL, /* Octal mode */
+ KEYCODE_DECIMAL, /* Decimal mode */
+ KEYCODE_HEXADECIMAL, /* Hexadecimal mode */
+
+ /* Languages */
+
+ KEYCODE_LANG1, /* LANG1 */
+ KEYCODE_LANG2, /* LANG2 */
+ KEYCODE_LANG3, /* LANG3 */
+ KEYCODE_LANG4, /* LANG4 */
+ KEYCODE_LANG5, /* LANG5 */
+ KEYCODE_LANG6, /* LANG6 */
+ KEYCODE_LANG7, /* LANG7 */
+ KEYCODE_LANG8, /* LANG8 */
+
+ /* Context-specific function keys */
+
+ KEYCODE_F1, /* Function key 1 */
+ KEYCODE_F2, /* Function key 2 */
+ KEYCODE_F3, /* Function key 3 */
+ KEYCODE_F4, /* Function key 4 */
+ KEYCODE_F5, /* Function key 5 */
+ KEYCODE_F6, /* Function key 6 */
+ KEYCODE_F7, /* Function key 7 */
+ KEYCODE_F8, /* Function key 8 */
+ KEYCODE_F9, /* Function key 9 */
+ KEYCODE_F10, /* Function key 10 */
+ KEYCODE_F11, /* Function key 11 */
+ KEYCODE_F12, /* Function key 12 */
+ KEYCODE_F13, /* Function key 13 */
+ KEYCODE_F14, /* Function key 14 */
+ KEYCODE_F15, /* Function key 15 */
+ KEYCODE_F16, /* Function key 16 */
+ KEYCODE_F17, /* Function key 17 */
+ KEYCODE_F18, /* Function key 18 */
+ KEYCODE_F19, /* Function key 19 */
+ KEYCODE_F20, /* Function key 20 */
+ KEYCODE_F21, /* Function key 21 */
+ KEYCODE_F22, /* Function key 22 */
+ KEYCODE_F23, /* Function key 23 */
+ KEYCODE_F24 /* Function key 24 */
+};
+
+#define FIRST_KEYCODE KEYCODE_FWDDEL
+#define LAST_KEYCODE KEYCODE_F24
+
+/* kbd_get return values */
+
+#define KBD_NORMAL 0
+#define KBD_SPECIAL 1
+#define KBD_ERROR EOF
+
+/****************************************************************************
+ * Public Types
+ ****************************************************************************/
+
+struct kget_getstate_s
+{
+ uint8_t nch; /* Number of characters in the buffer */
+ uint8_t ndx; /* Index to next character in the buffer */
+ uint8_t buf[4]; /* Buffer of ungotten data */
+};
+
+/****************************************************************************
+ * Public Function Prototypes
+ ****************************************************************************/
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/****************************************************************************
+ * The following functions are intended for use by "producer", keyboard
+ * or keypad drivers to encode information into driver buffers.
+ ****************************************************************************/
+
+/****************************************************************************
+ * Name: kbd_puttext
+ *
+ * Description:
+ * Put one byte of normal, "in-band" ASCII data into the output stream.
+ *
+ * Input Parameters:
+ * ch - The character to be into the output stream.
+ * stream - An instance of lib_outstream_s to do the low-level put
+ * operation.
+ *
+ * Returned Value:
+ * None
+ *
+ ****************************************************************************/
+
+#define kbd_puttext(ch, stream) (stream)->put((stream), (int)(ch))
+
+/****************************************************************************
+ * Name: kbd_putspecial
+ *
+ * Description:
+ * Put one special, "out-of-band" command into the output stream.
+ *
+ * Input Parameters:
+ *
+ * Returned Value:
+ * None
+ *
+ ****************************************************************************/
+
+void kbd_putspecial(enum kbd_keycode_e keycode,
+ FAR struct lib_outstream_s *stream);
+
+/****************************************************************************
+ * The following functions are intended for use by "consumer" applications
+ * to remove and decode information from the driver provided buffer.
+ ****************************************************************************/
+
+/****************************************************************************
+ * Name: kbd_get
+ *
+ * Description:
+ * Put one byte of data or special command from the driver provided input
+ * buffer.
+ *
+ * Input Parameters:
+ * stream - An instance of lib_instream_s to do the low-level get
+ * operation.
+ * pch - The location character to save the returned value. This may be
+ * either a normal, "in-band" ASCII characer or a special, "out-of-band"
+ * command.
+ * state - A user provided buffer to support parsing. This structure
+ * should be cleared the first time that kbd_get is called.
+ *
+ * Returned Value:
+ * 1 - Indicates the successful receipt of a special, "out-of-band" command
+ * 0 - Indicates the successful receipt of normal, "in-band" ASCII data.
+ * EOF - An error has getting the next character (reported by the stream).
+ * Normally indicates the end of file.
+ *
+ ****************************************************************************/
+
+int kbd_get(FAR struct lib_instream_s *stream,
+ FAR struct kget_getstate_s *state, FAR uint8_t *pch);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __INCLUDE_NUTTX_INPUT_KBD_CODEC_H */
+
diff --git a/nuttx/include/nuttx/usb/hid.h b/nuttx/include/nuttx/usb/hid.h
index 5b83f08fc8..877203a9c2 100644
--- a/nuttx/include/nuttx/usb/hid.h
+++ b/nuttx/include/nuttx/usb/hid.h
@@ -619,7 +619,7 @@
#define USBHID_KBDUSE_RCTRL 0xe4 /* Keyboard RightControl */
#define USBHID_KBDUSE_RSHIFT 0xe5 /* Keyboard RightShift */
#define USBHID_KBDUSE_RALT 0xe6 /* Keyboard RightAlt */
-#define USBHID_KBDUSE_RGUI 0xe7 /* Keyboard Right GUI*/
+#define USBHID_KBDUSE_RGUI 0xe7 /* Keyboard Right GUI */
#define USBHID_KBDUSE_MAX 0xe7
diff --git a/nuttx/libc/misc/Make.defs b/nuttx/libc/misc/Make.defs
index f4284ac60c..c6af5f8604 100644
--- a/nuttx/libc/misc/Make.defs
+++ b/nuttx/libc/misc/Make.defs
@@ -35,7 +35,7 @@
# Add the internal C files to the build
-CSRCS += lib_init.c lib_filesem.c
+CSRCS += lib_init.c lib_filesem.c lib_kbdencode.c lib_kbddecode.c
# Add C files that depend on file OR socket descriptors
diff --git a/nuttx/libc/misc/lib_kbddecode.c b/nuttx/libc/misc/lib_kbddecode.c
new file mode 100644
index 0000000000..046d570f90
--- /dev/null
+++ b/nuttx/libc/misc/lib_kbddecode.c
@@ -0,0 +1,258 @@
+/********************************************************************************************
+ * libc/msic/lib_kbddecode.c
+ * Decoding side of the Keyboard CODEC
+ *
+ * Copyright (C) 2012 Gregory Nutt. All rights reserved.
+ * Authors: Gregory Nutt
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ * 3. Neither the name NuttX nor the names of its contributors may be
+ * used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ ********************************************************************************************/
+
+/********************************************************************************************
+ * Included Files
+ ********************************************************************************************/
+
+#include
+
+#include
+#include
+
+#include
+#include
+#include
+
+/********************************************************************************************
+ * Pre-Processor Definitions
+ ********************************************************************************************/
+
+#define NDX_ESC 0
+#define NDX_BRACKET 1
+#define NDX_CODE 2
+#define NCX_SEMICOLON 3
+
+#define NCH_ESC 1
+#define NCH_BRACKET 2
+#define NCH_CODE 3
+#define NCH_SEMICOLON 4
+
+/********************************************************************************************
+ * Private Functions
+ ********************************************************************************************/
+
+/****************************************************************************
+ * Name: kbd_reget
+ *
+ * Description:
+ * We have unused characters from the last, unsuccessful. Return one of
+ * these instead of the .
+ *
+ * Input Parameters:
+ * stream - An instance of lib_instream_s to do the low-level get
+ * operation.
+ * pch - The location character to save the returned value. This may be
+ * either a normal, "in-band" ASCII characer or a special, "out-of-band"
+ * command.
+ * state - A user provided buffer to support parsing. This structure
+ * should be cleared the first time that kbd_get is called.
+ *
+ * Returned Value:
+ * 2 - Indicates the successful receipt of a special, "out-of-band" command
+ * 1 - Indicates the successful receipt of normal, "in-band" ASCII data.
+ * 0 - Indicates end-of-file or that the stream has been closed
+ * EOF - An error has getting the next character (reported by the stream).
+ *
+ ****************************************************************************/
+
+static int kbd_reget(FAR struct kget_getstate_s *state, FAR uint8_t *pch)
+{
+ /* Return the next character */
+
+ *pch = state->buf[state->ndx];
+ state->ndx++;
+ state->nch--;
+ return KBD_NORMAL;
+}
+
+/********************************************************************************************
+ * Public Functions
+ ********************************************************************************************/
+
+/****************************************************************************
+ * Name: kbd_get
+ *
+ * Description:
+ * Put one byte of data or special command from the driver provided input
+ * buffer.
+ *
+ * Input Parameters:
+ * stream - An instance of lib_instream_s to do the low-level get
+ * operation.
+ * pch - The location character to save the returned value. This may be
+ * either a normal, "in-band" ASCII characer or a special, "out-of-band"
+ * command.
+ * state - A user provided buffer to support parsing. This structure
+ * should be cleared the first time that kbd_get is called.
+ *
+ * Returned Value:
+ * 1 - Indicates the successful receipt of a special, "out-of-band" command
+ * 0 - Indicates the successful receipt of normal, "in-band" ASCII data.
+ * EOF - An error has getting the next character (reported by the stream).
+ * Normally indicates the end of file.
+ *
+ ****************************************************************************/
+
+int kbd_get(FAR struct lib_instream_s *stream,
+ FAR struct kget_getstate_s *state, FAR uint8_t *pch)
+{
+ int ch;
+
+ DEBUGASSERT(stream && state && pch);
+
+ /* Are their ungotten characters from the last, failed parse? */
+
+ if (state->nch > 0)
+ {
+ /* Yes, return the next ungotten character */
+
+ return kbd_reget(state, pch);
+ }
+
+ state->ndx = 0;
+
+ /* No, ungotten characters. Check for the beginning of an esc sequence. */
+
+ ch = stream->get(stream);
+ if (ch == EOF)
+ {
+ /* End of file/stream */
+
+ return KBD_ERROR;
+ }
+ else
+ {
+ state->buf[NDX_ESC] = (uint8_t)ch;
+ state->nch = NCH_ESC;
+
+ if (ch != ASCII_ESC)
+ {
+ /* Not the beginning of an escape sequence. Return the character. */
+
+ return kbd_reget(state, pch);
+ }
+ }
+
+ /* Check for ESC-[ */
+
+ ch = stream->get(stream);
+ if (ch == EOF)
+ {
+ /* End of file/stream. Return the escape character now. We will
+ * return the EOF indication next time.
+ */
+
+ return kbd_reget(state, pch);
+ }
+ else
+ {
+ state->buf[NDX_BRACKET] = ch;
+ state->nch = NCH_BRACKET;
+
+ if (ch != '[')
+ {
+ /* Not the beginning of an escape sequence. Return the ESC now,
+ * return the following character later.
+ */
+
+ return kbd_reget(state, pch);
+ }
+ }
+
+ /* Get and verify the special, "out-of-band" command code */
+
+ ch = stream->get(stream);
+ if (ch == EOF)
+ {
+ /* End of file/stream. Unget everything and return the ESC character.
+ */
+
+ return kbd_reget(state, pch);
+ }
+ else
+ {
+ state->buf[NDX_CODE] = (uint8_t)ch;
+ state->nch = NCH_CODE;
+
+ /* Check for a valid special command code */
+
+ if (ch < FIRST_KEYCODE || ch > LAST_KEYCODE)
+ {
+ /* Not a special command code, return the ESC now and the next two
+ * characters later.
+ */
+
+ return kbd_reget(state, pch);
+ }
+ }
+
+ /* Check for the final semicolon */
+
+ ch = stream->get(stream);
+ if (ch == EOF)
+ {
+ /* End of file/stream. Unget everything and return the ESC character.
+ */
+
+ return kbd_reget(state, pch);
+ }
+ else
+ {
+ state->buf[NCX_SEMICOLON] = (uint8_t)ch;
+ state->nch = NCH_SEMICOLON;
+
+ /* Check for a valid special command code */
+
+ if (ch != ';')
+ {
+ /* Not a special command code, return the ESC now and the next two
+ * characters later.
+ */
+
+ return kbd_reget(state, pch);
+ }
+ }
+
+ /* We have successfully parsed the the entire escape sequence. Return the
+ * special code in pch and the value 2.
+ */
+
+ *pch = state->buf[NDX_CODE];
+ state->nch = 0;
+ return KBD_SPECIAL;
+}
+
diff --git a/nuttx/libc/misc/lib_kbdencode.c b/nuttx/libc/misc/lib_kbdencode.c
new file mode 100644
index 0000000000..80bf147777
--- /dev/null
+++ b/nuttx/libc/misc/lib_kbdencode.c
@@ -0,0 +1,81 @@
+/********************************************************************************************
+ * libc/msic/lib_kbdencode.c
+ * Encoding side of the Keyboard CODEC
+ *
+ * Copyright (C) 2012 Gregory Nutt. All rights reserved.
+ * Authors: Gregory Nutt
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ * 3. Neither the name NuttX nor the names of its contributors may be
+ * used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ ********************************************************************************************/
+
+/********************************************************************************************
+ * Included Files
+ ********************************************************************************************/
+
+#include
+
+#include
+#include
+
+#include
+#include
+#include
+
+/********************************************************************************************
+ * Pre-Processor Definitions
+ ********************************************************************************************/
+
+/********************************************************************************************
+ * Public Functions
+ ********************************************************************************************/
+
+/****************************************************************************
+ * Name: kbd_putspecial
+ *
+ * Description:
+ * Put one special, "out-of-band" command into the output stream.
+ *
+ * Input Parameters:
+ *
+ * Returned Value:
+ * None
+ *
+ ****************************************************************************/
+
+void kbd_putspecial(enum kbd_keycode_e keycode,
+ FAR struct lib_outstream_s *stream)
+{
+ DEBUGASSERT(stream && keycode >= KEYCODE_FWDDEL && keycode <= LAST_KEYCODE);
+
+ stream->put(stream, ASCII_ESC);
+ stream->put(stream, '[');
+ stream->put(stream, (int)keycode);
+ stream->put(stream, ';');
+}
+
From 373e145e546cc34b6a0000d7b3f71538c05a3b1b Mon Sep 17 00:00:00 2001
From: patacongo
Date: Wed, 26 Dec 2012 18:54:59 +0000
Subject: [PATCH 014/118] Implement encoding the usbhost HID keyboard driver;
configre olimex-lpc1766stk HID keyboard configuration to use the
kconfig-frontends tool
git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5461 42af7a65-404d-4744-a932-0658087f49c3
---
apps/examples/hidkbd/hidkbd_main.c | 4 +-
nuttx/ChangeLog | 6 +
nuttx/Documentation/NuttxPortingGuide.html | 148 ++-
nuttx/configs/olimex-lpc1766stk/README.txt | 20 +-
.../olimex-lpc1766stk/hidkbd/appconfig | 39 -
.../olimex-lpc1766stk/hidkbd/defconfig | 1010 +++++++++--------
.../olimex-lpc1766stk/hidkbd/setenv.sh | 4 +-
nuttx/drivers/usbhost/Kconfig | 66 +-
nuttx/drivers/usbhost/usbhost_hidkbd.c | 379 ++++++-
nuttx/include/nuttx/input/kbd_codec.h | 26 +-
nuttx/libc/misc/lib_kbddecode.c | 10 +-
nuttx/libc/misc/lib_kbdencode.c | 3 +
12 files changed, 1131 insertions(+), 584 deletions(-)
delete mode 100644 nuttx/configs/olimex-lpc1766stk/hidkbd/appconfig
diff --git a/apps/examples/hidkbd/hidkbd_main.c b/apps/examples/hidkbd/hidkbd_main.c
index e744a495c7..bc1eebed0b 100644
--- a/apps/examples/hidkbd/hidkbd_main.c
+++ b/apps/examples/hidkbd/hidkbd_main.c
@@ -206,7 +206,7 @@ int hidkbd_main(int argc, char *argv[])
printf("Device %s opened\n", CONFIG_EXAMPLES_HIDKBD_DEVNAME);
fflush(stdout);
- /* Loop until there is a read failure */
+ /* Loop until there is a read failure (or EOF?) */
do
{
@@ -220,7 +220,7 @@ int hidkbd_main(int argc, char *argv[])
(void)write(1, buffer, nbytes);
}
}
- while (nbytes >= 0);
+ while (nbytes > 0);
printf("Closing device %s: %d\n", CONFIG_EXAMPLES_HIDKBD_DEVNAME, (int)nbytes);
fflush(stdout);
diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog
index 80ddb56c6b..7e1c538d72 100644
--- a/nuttx/ChangeLog
+++ b/nuttx/ChangeLog
@@ -3821,3 +3821,9 @@
* libc/misc/lib_kbdencode.c and lib_kbddecode.c: Add logic to marshal
and serialized "out-of-band" keyboard commands intermixed with normal
ASCII data (not yet hooked into anything).
+ * drivers/usbhost/usbhost_hidkbd.c: If CONFIG_HIDKBD_ENCODED is
+ defined, this driver will now use libc/misc/lib_kbdencode.c to
+ encode special function keys.
+ * configs/olimex-lpc1766stk/hidkbd: This configuration has been
+ converted to use the kconfig-frontends configuration tool.
+
diff --git a/nuttx/Documentation/NuttxPortingGuide.html b/nuttx/Documentation/NuttxPortingGuide.html
index 0408f82ac8..ebb3eff4bf 100644
--- a/nuttx/Documentation/NuttxPortingGuide.html
+++ b/nuttx/Documentation/NuttxPortingGuide.html
@@ -131,7 +131,8 @@
6.3.12 PWM Drivers
6.3.13 CAN Drivers
6.3.14 Quadrature Encoder Drivers
- 6.3.15 Watchdog Timer Drivers
+ 6.3.15 Watchdog Timer Drivers
+ 6.3.16 Keyboard/Keypad Drivers
6.4 Power Management
@@ -3620,6 +3621,151 @@ extern void up_ledoff(int led);
+
+
+ "Out-of-Band" Commands.
+ Keyboards and keypads are the same device for NuttX.
+ A keypad is thought of as simply a keyboard with fewer keys.
+ In NuttX, a keyboard/keypad driver is simply a character driver that may have an (optional) encoding/decoding layer on the data returned by the character driver.
+ A keyboard may return simple text data (alphabetic, numeric, and punctuaction) or control characters (enter, control-C, etc.).
+ We can think about this the normal "in-band" keyboard data stream.
+ However, in addition, most keyboards support actions that cannot be represented as text data.
+ Such actions include things like cursor controls (home, up arrow, page down, etc.), editing functions (insert, delete, etc.), volume controls, (mute, volume up, etc.) and other special functions.
+ We can think about this as special, "out-of-band" keyboard commands.
+ In this case, some special encoding may be required to multiplex the in-band text data and out-of-band command streams.
+
+
+ Encoding/Decoding Layer.
+ An optional encoding/decoding layer can be used with the basic character driver to encode the out-of-band commands into the text data stream.
+ The function interfaces that comprise that encoding/decoding layer are defined in the header file include/nuttx/input/kbd_code.h.
+ These functions provide an matched set of (a) driver encoding interfaces, and (b) application decoding interfaces.
+
+
+ -
+
+ Driver Encoding Interfaces.
+
+
+ Description:
+
+ Put one byte of normal, "in-band" ASCII data into the output stream.
+
+ Input Pameters:
+
+ -
+
ch: The character to be added to the output stream.
+
+ -
+
stream: An instance of lib_outstream_s to perform the actual low-level put operation.
+
+
+ Returned Value:
+
+
+ -
+
+ kbd_putspecial()
+
+ Function Prototype:
+
+#include <nuttx/streams.h>
+#include <nuttx/input/kbd_codec.h>
+void kbd_putspecial(enum kbd_keycode_e keycode, FAR struct lib_outstream_s *stream);
+
+ Description:
+
+ Put one special, "out-of-band" command into the output stream.
+
+ Input Pameters:
+
+ -
+
keycode: The command to be added to the output stream.
+ The enumeration enum kbd_keycode_e keycode identifies all commands known to the system.
+
+ -
+
stream: An instance of lib_outstream_s to perform the actual low-level put operation.
+
+
+ Returned Value:
+
+
+
+
+ -
+
+ Application Decoding Interfaces.
+
+
+ Description:
+
+ Get one byte of data or special command from the driver provided input buffer.
+
+ Input Pameters:
+
+ -
+
stream: An instance of lib_instream_s to perform the actual low-level get operation.
+
+ -
+
pch: The location character to save the returned value.
+ This may be either a normal, "in-band" ASCII characer or a special, "out-of-band" command (i.e., a value from enum kbd_getstate_s.
+
+ -
+
state: A user provided buffer to support parsing.
+ This structure should be cleared the first time that kbd_get is called.
+
+
+ Returned Value:
+
+ -
+ 1:
+ Indicates the successful receipt of a special, "out-of-band" command.
+ The returned value in
pch is a value from enum kbd_getstate_s.
+
+ -
+ 0:
+ Indicates the successful receipt of normal, "in-band" ASCII data.
+ The returned value in
pch is a simple byte of text or control data.
+
+ -
+
EOF:
+ An error has getting the next character (reported by the stream).
+ Normally indicates the end of file.
+
+
+
+
+
+
+
+ I/O Streams.
+ Notice the use of the abstract I/O streams in these interfaces.
+ These stream interfaces are defined in include/nuttx/streams.h.
+
+
diff --git a/nuttx/configs/olimex-lpc1766stk/README.txt b/nuttx/configs/olimex-lpc1766stk/README.txt
index ec7ddd42db..e2c940bac5 100644
--- a/nuttx/configs/olimex-lpc1766stk/README.txt
+++ b/nuttx/configs/olimex-lpc1766stk/README.txt
@@ -899,7 +899,25 @@ Where is one of the following:
This configuration directory, performs a simple test of the USB host
HID keyboard class driver using the test logic in apps/examples/hidkbd.
- nettest:
+ NOTES:
+
+ 1. This configuration uses the mconf-based configuration tool. To
+ change this configuration using that tool, you should:
+
+ a. Build and install the mconf tool. See nuttx/README.txt and
+ misc/tools/
+
+ b. Execute 'make menuconfig' in nuttx/ in order to start the
+ reconfiguration process.
+
+ 2. Default platform/toolchain: This is how the build is configured by
+ be default. These options can easily be re-confured, however.
+
+ CONFIG_HOST_WINDOWS=y : Windows
+ CONFIG_WINDOWS_CYGWIN=y : Cygwin environment on Windows
+ CONFIG_STM32_CODESOURCERYW=y : CodeSourcery under Windows
+
+ nettest:
This configuration directory may be used to enable networking using the
LPC17xx's Ethernet controller. It uses apps/examples/nettest to excercise the
TCP/IP network.
diff --git a/nuttx/configs/olimex-lpc1766stk/hidkbd/appconfig b/nuttx/configs/olimex-lpc1766stk/hidkbd/appconfig
deleted file mode 100644
index 79a7c50abe..0000000000
--- a/nuttx/configs/olimex-lpc1766stk/hidkbd/appconfig
+++ /dev/null
@@ -1,39 +0,0 @@
-############################################################################
-# configs/olimex-lpc1766stk/hidkbd/appconfig
-#
-# Copyright (C) 2011 Gregory Nutt. All rights reserved.
-# Author: Gregory Nutt
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in
-# the documentation and/or other materials provided with the
-# distribution.
-# 3. Neither the name NuttX nor the names of its contributors may be
-# used to endorse or promote products derived from this software
-# without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-#
-############################################################################
-
-# Path to example in apps/examples containing the user_start entry point
-
-CONFIGURED_APPS += examples/hidkbd
-
diff --git a/nuttx/configs/olimex-lpc1766stk/hidkbd/defconfig b/nuttx/configs/olimex-lpc1766stk/hidkbd/defconfig
index 9a4c37fb44..78e4115609 100755
--- a/nuttx/configs/olimex-lpc1766stk/hidkbd/defconfig
+++ b/nuttx/configs/olimex-lpc1766stk/hidkbd/defconfig
@@ -1,244 +1,282 @@
-############################################################################
-# configs/olimex-lpc1766stk/hidkbd/defconfig
#
-# Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
-# Author: Gregory Nutt
+# Automatically generated file; DO NOT EDIT.
+# Nuttx/ Configuration
#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in
-# the documentation and/or other materials provided with the
-# distribution.
-# 3. Neither the name NuttX nor the names of its contributors may be
-# used to endorse or promote products derived from this software
-# without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-#
-############################################################################
-#
-# Architecture Selection
-#
-CONFIG_ARCH="arm"
-CONFIG_ARCH_ARM=y
-CONFIG_ARCH_CORTEXM3=y
-CONFIG_ARCH_CHIP="lpc17xx"
-CONFIG_ARCH_CHIP_LPC17XX=y
-CONFIG_ARCH_CHIP_LPC1766=y
-CONFIG_ARCH_BOARD="olimex-lpc1766stk"
-CONFIG_ARCH_BOARD_LPC1766STK=y
-CONFIG_BOARD_LOOPSPERMSEC=8111
-CONFIG_DRAM_SIZE=32768
-CONFIG_DRAM_START=0x10000000
-CONFIG_ARCH_IRQPRIO=y
-CONFIG_ARCH_INTERRUPTSTACK=0
-CONFIG_ARCH_STACKDUMP=y
-CONFIG_ARCH_BOOTLOADER=n
-CONFIG_ARCH_LEDS=y
-CONFIG_ARCH_BUTTONS=n
-CONFIG_ARCH_CALIBRATION=n
-CONFIG_ARCH_DMA=n
+CONFIG_NUTTX_NEWCONFIG=y
#
-# Identify toolchain and linker options
+# Build Setup
#
-CONFIG_LPC17_CODESOURCERYW=n
-CONFIG_LPC17_CODESOURCERYL=n
-CONFIG_LPC17_DEVKITARM=n
-CONFIG_LPC17_BUILDROOT=y
+# CONFIG_EXPERIMENTAL is not set
+# CONFIG_HOST_LINUX is not set
+# CONFIG_HOST_OSX is not set
+CONFIG_HOST_WINDOWS=y
+# CONFIG_HOST_OTHER is not set
+# CONFIG_WINDOWS_NATIVE is not set
+CONFIG_WINDOWS_CYGWIN=y
+# CONFIG_WINDOWS_MSYS is not set
+# CONFIG_WINDOWS_OTHER is not set
#
-# Individual subsystems can be enabled:
+# Build Configuration
#
-CONFIG_LPC17_ETHERNET=n
-CONFIG_LPC17_USBHOST=y
-CONFIG_LPC17_USBOTG=n
-CONFIG_LPC17_USBDEV=n
-CONFIG_LPC17_UART0=y
-CONFIG_LPC17_UART1=n
-CONFIG_LPC17_UART2=n
-CONFIG_LPC17_UART3=n
-CONFIG_LPC17_CAN1=n
-CONFIG_LPC17_CAN2=n
-CONFIG_LPC17_SPI=n
-CONFIG_LPC17_SSP0=n
-CONFIG_LPC17_SSP1=n
-CONFIG_LPC17_I2C0=n
-CONFIG_LPC17_I2C1=n
-CONFIG_LPC17_I2S=n
-CONFIG_LPC17_TMR0=n
-CONFIG_LPC17_TMR1=n
-CONFIG_LPC17_TMR2=n
-CONFIG_LPC17_TMR3=n
-CONFIG_LPC17_RIT=n
-CONFIG_LPC17_PWM=n
-CONFIG_LPC17_MCPWM=n
-CONFIG_LPC17_QEI=n
-CONFIG_LPC17_RTC=n
-CONFIG_LPC17_WDT=n
-CONFIG_LPC17_ADC=n
-CONFIG_LPC17_DAC=n
-CONFIG_LPC17_GPDMA=n
+# CONFIG_APPS_DIR="../apps"
+# CONFIG_BUILD_2PASS is not set
#
-# LPC17xx Button interrupt support
+# Binary Output Formats
#
-CONFIG_GPIO_IRQ=n
-CONFIG_ARCH_IRQBUTTONS=n
-
-#
-# LPC17xx specific serial device driver settings
-#
-CONFIG_UART0_SERIAL_CONSOLE=y
-CONFIG_UART1_SERIAL_CONSOLE=n
-CONFIG_UART2_SERIAL_CONSOLE=n
-CONFIG_UART3_SERIAL_CONSOLE=n
-
-CONFIG_UART0_TXBUFSIZE=256
-CONFIG_UART1_TXBUFSIZE=256
-CONFIG_UART2_TXBUFSIZE=256
-CONFIG_UART3_TXBUFSIZE=256
-
-CONFIG_UART0_RXBUFSIZE=256
-CONFIG_UART1_RXBUFSIZE=256
-CONFIG_UART2_RXBUFSIZE=256
-CONFIG_UART3_RXBUFSIZE=256
-
-CONFIG_UART0_BAUD=57600
-CONFIG_UART2_BAUD=57600
-CONFIG_UART3_BAUD=57600
-CONFIG_UART1_BAUD=57600
-
-CONFIG_UART0_BITS=8
-CONFIG_UART1_BITS=8
-CONFIG_UART2_BITS=8
-CONFIG_UART3_BITS=8
-
-CONFIG_UART0_PARITY=0
-CONFIG_UART1_PARITY=0
-CONFIG_UART2_PARITY=0
-CONFIG_UART3_PARITY=0
-
-CONFIG_UART0_2STOP=0
-CONFIG_UART1_2STOP=0
-CONFIG_UART2_2STOP=0
-CONFIG_UART3_2STOP=0
-
-#
-# LPC17xx specific PHY/Ethernet device driver settings
-#
-CONFIG_PHY_KS8721=y
-CONFIG_PHY_AUTONEG=y
-CONFIG_PHY_SPEED100=n
-CONFIG_PHY_FDUPLEX=y
-CONFIG_NET_EMACRAM_SIZE=8192
-CONFIG_NET_NTXDESC=7
-CONFIG_NET_NRXDESC=7
-CONFIG_NET_REGDEBUG=n
-
-#
-# General build options
-#
-CONFIG_RRLOAD_BINARY=n
+# CONFIG_RRLOAD_BINARY is not set
CONFIG_INTELHEX_BINARY=y
-CONFIG_MOTOROLA_SREC=n
-CONFIG_RAW_BINARY=n
+# CONFIG_MOTOROLA_SREC is not set
+# CONFIG_RAW_BINARY is not set
#
-# General OS setup
+# Customize Header Files
#
-CONFIG_USER_ENTRYPOINT="hidkbd_main"
-CONFIG_DEBUG=n
-CONFIG_DEBUG_VERBOSE=n
-CONFIG_DEBUG_SYMBOLS=n
-CONFIG_DEBUG_USB=n
-CONFIG_MM_REGIONS=2
-CONFIG_ARCH_LOWPUTC=y
+# 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_LM3S is not set
+CONFIG_ARCH_CHIP_LPC17XX=y
+# 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_SAM3U is not set
+# CONFIG_ARCH_CHIP_STM32 is not set
+# CONFIG_ARCH_CHIP_STR71X is not set
+CONFIG_ARCH_CORTEXM3=y
+CONFIG_ARCH_FAMILY="armv7-m"
+CONFIG_ARCH_CHIP="lpc17xx"
+CONFIG_ARCH_HAVE_MPU=y
+# CONFIG_ARMV7M_MPU is not set
+CONFIG_BOARD_LOOPSPERMSEC=8111
+# CONFIG_ARCH_CALIBRATION is not set
+
+#
+# ARMV7M Configuration Options
+#
+# CONFIG_ARMV7M_TOOLCHAIN_ATOLLIC is not set
+# CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT is not set
+# CONFIG_ARMV7M_TOOLCHAIN_CODEREDW is not set
+CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYW=y
+# CONFIG_ARMV7M_TOOLCHAIN_DEVKITARM is not set
+# CONFIG_ARMV7M_TOOLCHAIN_GNU_EABI is not set
+# CONFIG_ARMV7M_TOOLCHAIN_RAISONANCE is not set
+
+#
+# LPC17xx Configuration Options
+#
+# CONFIG_ARCH_CHIP_LPC1751 is not set
+# CONFIG_ARCH_CHIP_LPC1752 is not set
+# CONFIG_ARCH_CHIP_LPC1754 is not set
+# CONFIG_ARCH_CHIP_LPC1756 is not set
+# CONFIG_ARCH_CHIP_LPC1758 is not set
+# CONFIG_ARCH_CHIP_LPC1759 is not set
+# CONFIG_ARCH_CHIP_LPC1764 is not set
+# CONFIG_ARCH_CHIP_LPC1765 is not set
+CONFIG_ARCH_CHIP_LPC1766=y
+# CONFIG_ARCH_CHIP_LPC1767 is not set
+# CONFIG_ARCH_CHIP_LPC1768 is not set
+# CONFIG_ARCH_CHIP_LPC1769 is not set
+CONFIG_ARCH_FAMILY_LPC176X=y
+
+#
+# LPC17xx Peripheral Support
+#
+CONFIG_LPC17_MAINOSC=y
+CONFIG_LPC17_PLL0=y
+# CONFIG_LPC17_PLL1 is not set
+# CONFIG_LPC17_ETHERNET is not set
+CONFIG_LPC17_USBHOST=y
+# CONFIG_LPC17_USBDEV is not set
+CONFIG_LPC17_UART0=y
+# CONFIG_LPC17_UART1 is not set
+# CONFIG_LPC17_UART2 is not set
+# CONFIG_LPC17_UART3 is not set
+# CONFIG_LPC17_CAN1 is not set
+# CONFIG_LPC17_CAN2 is not set
+# CONFIG_LPC17_SPI is not set
+# CONFIG_LPC17_SSP0 is not set
+# CONFIG_LPC17_SSP1 is not set
+# CONFIG_LPC17_I2C0 is not set
+# CONFIG_LPC17_I2C1 is not set
+# CONFIG_LPC17_I2C2 is not set
+# CONFIG_LPC17_I2S is not set
+# CONFIG_LPC17_TMR0 is not set
+# CONFIG_LPC17_TMR1 is not set
+# CONFIG_LPC17_TMR2 is not set
+# CONFIG_LPC17_TMR3 is not set
+# CONFIG_LPC17_RIT is not set
+# CONFIG_LPC17_PWM is not set
+# CONFIG_LPC17_MCPWM is not set
+# CONFIG_LPC17_QEI is not set
+# CONFIG_LPC17_RTC is not set
+# CONFIG_LPC17_WDT is not set
+# CONFIG_LPC17_ADC is not set
+# CONFIG_LPC17_DAC is not set
+# CONFIG_LPC17_GPDMA is not set
+# CONFIG_LPC17_FLASH is not set
+
+#
+# Serial driver options
+#
+# CONFIG_SERIAL_TERMIOS is not set
+# CONFIG_UART0_FLOWCONTROL is not set
+
+#
+# ADC driver options
+#
+
+#
+# CAN driver options
+#
+# CONFIG_GPIO_IRQ is not set
+
+#
+# I2C driver options
+#
+
+#
+# Ethernet driver options
+#
+
+#
+# USB device driver options
+#
+
+#
+# USB host driver options
+#
+CONFIG_USBHOST_OHCIRAM_SIZE=1536
+CONFIG_USBHOST_NEDS=2
+CONFIG_USBHOST_NTDS=3
+CONFIG_USBHOST_TDBUFFERS=3
+CONFIG_USBHOST_TDBUFSIZE=128
+CONFIG_USBHOST_IOBUFSIZE=512
+CONFIG_USBHOST_BULK_DISABLE=y
+# CONFIG_USBHOST_INT_DISABLE is not set
+CONFIG_USBHOST_ISOC_DISABLE=y
+# CONFIG_SDIO_DMA is not set
+# CONFIG_SDIO_WIDTH_D1_ONLY is not set
+
+#
+# Architecture Options
+#
+# CONFIG_ARCH_NOINTC 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_STACKDUMP=y
+# CONFIG_ENDIAN_BIG is not set
+
+#
+# Board Settings
+#
+CONFIG_DRAM_START=0x10000000
+CONFIG_DRAM_SIZE=32768
+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_LPC1766STK=y
+# CONFIG_ARCH_BOARD_CUSTOM is not set
+CONFIG_ARCH_BOARD="olimex-lpc1766stk"
+
+#
+# Common Board Options
+#
+CONFIG_ARCH_HAVE_LEDS=y
+CONFIG_ARCH_LEDS=y
+CONFIG_ARCH_HAVE_BUTTONS=y
+# CONFIG_ARCH_BUTTONS is not set
+CONFIG_ARCH_HAVE_IRQBUTTONS=y
+
+#
+# Board-Specific Options
+#
+
+#
+# RTOS Features
+#
+CONFIG_MSEC_PER_TICK=10
CONFIG_RR_INTERVAL=200
-CONFIG_SCHED_INSTRUMENTATION=n
+# CONFIG_SCHED_INSTRUMENTATION is not set
CONFIG_TASK_NAME_SIZE=0
+# CONFIG_JULIAN_TIME is not set
CONFIG_START_YEAR=2010
CONFIG_START_MONTH=11
CONFIG_START_DAY=10
-CONFIG_GREGORIAN_TIME=n
-CONFIG_JULIAN_TIME=n
CONFIG_DEV_CONSOLE=y
-CONFIG_DEV_LOWCONSOLE=n
-CONFIG_MUTEX_TYPES=n
-CONFIG_PRIORITY_INHERITANCE=n
-CONFIG_SEM_PREALLOCHOLDERS=0
-CONFIG_SEM_NNESTPRIO=0
-CONFIG_FDCLONE_DISABLE=n
-CONFIG_FDCLONE_STDIO=n
+# CONFIG_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_NXFLAT=n
CONFIG_SCHED_WORKQUEUE=y
CONFIG_SCHED_WORKPRIORITY=192
CONFIG_SCHED_WORKPERIOD=50000
CONFIG_SCHED_WORKSTACKSIZE=1024
CONFIG_SIG_SIGWORK=4
-
-#
-# The following can be used to disable categories of
-# APIs supported by the OS. If the compiler supports
-# weak functions, then it should not be necessary to
-# disable functions unless you want to restrict usage
-# of those APIs.
-#
-# There are certain dependency relationships in these
-# features.
-#
-# o mq_notify logic depends on signals to awaken tasks
-# waiting for queues to become full or empty.
-# o pthread_condtimedwait() depends on signals to wake
-# up waiting tasks.
-#
-CONFIG_DISABLE_CLOCK=n
-CONFIG_DISABLE_POSIX_TIMERS=n
-CONFIG_DISABLE_PTHREAD=n
-CONFIG_DISABLE_SIGNALS=n
-CONFIG_DISABLE_MQUEUE=n
-CONFIG_DISABLE_MOUNTPOINT=n
-CONFIG_DISABLE_ENVIRON=n
-CONFIG_DISABLE_POLL=n
-
-#
-# Misc libc settings
-#
-CONFIG_NOPRINTF_FIELDWIDTH=n
-
-#
-# Allow for architecture optimized implementations
-#
-# The architecture can provide optimized versions of the
-# following to improve system performance
-#
-CONFIG_ARCH_MEMCPY=n
-CONFIG_ARCH_MEMCMP=n
-CONFIG_ARCH_MEMMOVE=n
-CONFIG_ARCH_MEMSET=n
-CONFIG_ARCH_STRCMP=n
-CONFIG_ARCH_STRCPY=n
-CONFIG_ARCH_STRNCPY=n
-CONFIG_ARCH_STRLEN=n
-CONFIG_ARCH_STRNLEN=n
-CONFIG_ARCH_BZERO=n
+# CONFIG_SCHED_LPWORK is not set
+# CONFIG_SCHED_WAITPID is not set
+# CONFIG_SCHED_ATEXIT is not set
+# CONFIG_SCHED_ONEXIT is not set
+CONFIG_USER_ENTRYPOINT="hidkbd_main"
+CONFIG_DISABLE_OS_API=y
+# CONFIG_DISABLE_CLOCK is not set
+# CONFIG_DISABLE_POSIX_TIMERS is not set
+# CONFIG_DISABLE_PTHREAD is not set
+# CONFIG_DISABLE_SIGNALS is not set
+# CONFIG_DISABLE_MQUEUE is not set
+# CONFIG_DISABLE_MOUNTPOINT is not set
+# CONFIG_DISABLE_ENVIRON is not set
+# CONFIG_DISABLE_POLL is not set
#
# Sizes of configurable things (0 disables)
@@ -249,258 +287,318 @@ CONFIG_NPTHREAD_KEYS=4
CONFIG_NFILE_DESCRIPTORS=8
CONFIG_NFILE_STREAMS=8
CONFIG_NAME_MAX=32
-CONFIG_STDIO_BUFFER_SIZE=256
-CONFIG_NUNGET_CHARS=2
CONFIG_PREALLOC_MQ_MSGS=4
CONFIG_MQ_MAXMSGSIZE=32
CONFIG_MAX_WDOGPARMS=2
CONFIG_PREALLOC_WDOGS=4
CONFIG_PREALLOC_TIMERS=4
-#
-# Filesystem configuration
-#
-CONFIG_FS_FAT=n
-CONFIG_FAT_LCNAMES=n
-CONFIG_FAT_LFN=n
-CONFIG_FAT_MAXFNAME=32
-CONFIG_FS_NXFFS=n
-CONFIG_FS_ROMFS=n
-
-#
-# Maintain legacy build behavior (revisit)
-#
-
-CONFIG_MMCSD=y
-CONFIG_MMCSD_SPI=y
-CONFIG_MMCSD_SDIO=y
-
-#
-# SPI-based MMC/SD driver
-#
-CONFIG_MMCSD_NSLOTS=1
-CONFIG_MMCSD_READONLY=n
-CONFIG_MMCSD_SPICLOCK=12500000
-
-#
-# Block driver buffering
-#
-CONFIG_FS_READAHEAD=n
-CONFIG_FS_WRITEBUFFER=n
-
-#
-# SDIO-based MMC/SD driver
-#
-CONFIG_SDIO_DMA=n
-CONFIG_MMCSD_MMCSUPPORT=n
-CONFIG_MMCSD_HAVECARDDETECT=n
-
-#
-# TCP/IP and UDP support via uIP
-#
-CONFIG_NET=n
-CONFIG_NET_IPv6=n
-CONFIG_NSOCKET_DESCRIPTORS=8
-CONFIG_NET_SOCKOPTS=y
-CONFIG_NET_BUFSIZE=562
-CONFIG_NET_TCP=y
-CONFIG_NET_TCP_CONNS=8
-CONFIG_NET_NTCP_READAHEAD_BUFFERS=16
-CONFIG_NET_TCPBACKLOG=n
-CONFIG_NET_MAX_LISTENPORTS=8
-CONFIG_NET_UDP=y
-CONFIG_NET_UDP_CHECKSUMS=y
-#CONFIG_NET_UDP_CONNS=8
-CONFIG_NET_ICMP=y
-CONFIG_NET_ICMP_PING=y
-#CONFIG_NET_PINGADDRCONF=0
-CONFIG_NET_STATISTICS=y
-#CONFIG_NET_RECEIVE_WINDOW=
-#CONFIG_NET_ARPTAB_SIZE=8
-CONFIG_NET_BROADCAST=n
-
-#
-# UIP Network Utilities
-#
-CONFIG_NET_DHCP_LIGHT=n
-CONFIG_NET_RESOLV_ENTRIES=4
-
-#
-# USB Device Configuration
-#
-CONFIG_USBDEV=n
-CONFIG_USBDEV_ISOCHRONOUS=n
-CONFIG_USBDEV_DUALSPEED=n
-CONFIG_USBDEV_SELFPOWERED=y
-CONFIG_USBDEV_REMOTEWAKEUP=n
-CONFIG_USBDEV_MAXPOWER=100
-CONFIG_USBDEV_TRACE=n
-CONFIG_USBDEV_TRACE_NRECORDS=128
-
-#
-# USB Host Configuration
-#
-CONFIG_USBHOST=y
-CONFIG_USBHOST_NPREALLOC=0
-CONFIG_USBHOST_BULK_DISABLE=y
-CONFIG_USBHOST_INT_DISABLE=n
-CONFIG_USBHOST_ISOC_DISABLE=y
-
-#
-# LPC17xx USB Device Configuration
-#
-CONFIG_LPC17_USBDEV_FRAME_INTERRUPT=n
-CONFIG_LPC17_USBDEV_EPFAST_INTERRUPT=n
-CONFIG_LPC17_USBDEV_DMA=n
-CONFIG_LPC17_USBDEV_NDMADESCRIPTORS=0
-CONFIG_LPC17_USBDEV_DMAINTMASK=0
-
-#
-# LPC17xx USB Host Configuration
-#
-# OHCI RAM layout:
-#
-CONFIG_USBHOST_OHCIRAM_SIZE=1536
-CONFIG_USBHOST_NEDS=2
-CONFIG_USBHOST_NTDS=3
-CONFIG_USBHOST_TDBUFFERS=3
-CONFIG_USBHOST_TDBUFSIZE=128
-CONFIG_USBHOST_IOBUFSIZE=512
-
-#
-# USB Serial Device Configuration
-#
-CONFIG_PL2303=n
-CONFIG_PL2303_EPINTIN=1
-CONFIG_PL2303_EPBULKOUT=2
-CONFIG_PL2303_EPBULKIN=5
-CONFIG_PL2303_NWRREQS=4
-CONFIG_PL2303_NRDREQS=4
-CONFIG_PL2303_VENDORID=0x067b
-CONFIG_PL2303_PRODUCTID=0x2303
-CONFIG_PL2303_VENDORSTR="Nuttx"
-CONFIG_PL2303_PRODUCTSTR="USBdev Serial"
-CONFIG_PL2303_RXBUFSIZE=512
-CONFIG_PL2303_TXBUFSIZE=512
-
-#
-# USB Storage Device Configuration
-#
-CONFIG_USBMSC=n
-CONFIG_USBMSC_EP0MAXPACKET=64
-CONFIG_USBMSC_EPBULKOUT=2
-CONFIG_USBMSC_EPBULKIN=5
-CONFIG_USBMSC_NRDREQS=2
-CONFIG_USBMSC_NWRREQS=2
-CONFIG_USBMSC_BULKINREQLEN=256
-CONFIG_USBMSC_BULKOUTREQLEN=256
-CONFIG_USBMSC_VENDORID=0x584e
-CONFIG_USBMSC_VENDORSTR="NuttX"
-CONFIG_USBMSC_PRODUCTID=0x5342
-CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
-CONFIG_USBMSC_VERSIONNO=0x0399
-CONFIG_USBMSC_REMOVABLE=y
-
-#
-# Settings for examples/uip
-#
-CONFIG_EXAMPLES_UIP_IPADDR=0x0a000002
-CONFIG_EXAMPLES_UIP_DRIPADDR=0x0a000001
-CONFIG_EXAMPLES_UIP_NETMASK=0xffffff00
-CONFIG_EXAMPLES_UIP_DHCPC=n
-
-#
-# Settings for examples/nettest
-#
-CONFIG_EXAMPLES_NETTEST_SERVER=n
-CONFIG_EXAMPLES_NETTEST_PERFORMANCE=n
-CONFIG_EXAMPLES_NETTEST_NOMAC=y
-CONFIG_EXAMPLES_NETTEST_IPADDR=0x0a000002
-CONFIG_EXAMPLES_NETTEST_DRIPADDR=0x0a000001
-CONFIG_EXAMPLES_NETTEST_NETMASK=0xffffff00
-CONFIG_EXAMPLES_NETTEST_CLIENTIP=0x0a000001
-
-#
-# Settings for examples/ostest
-#
-CONFIG_EXAMPLES_OSTEST_LOOPS=1
-CONFIG_EXAMPLES_OSTEST_STACKSIZE=2048
-CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=3
-
-#
-# Settings for examples/buttons
-#
-CONFIG_EXAMPLES_BUTTONS_MIN=0
-CONFIG_EXAMPLES_BUTTONS_MAX=7
-CONFIG_EXAMPLES_IRQBUTTONS_MIN=0
-CONFIG_EXAMPLES_IRQBUTTONS_MAX=7
-CONFIG_EXAMPLES_BUTTONS_NAME0="BUT1"
-CONFIG_EXAMPLES_BUTTONS_NAME1="BUT2"
-CONFIG_EXAMPLES_BUTTONS_NAME2="WAKE-UP"
-CONFIG_EXAMPLES_BUTTONS_NAME3="CENTER"
-CONFIG_EXAMPLES_BUTTONS_NAME4="UP"
-CONFIG_EXAMPLES_BUTTONS_NAME5="DOWN"
-CONFIG_EXAMPLES_BUTTONS_NAME6="LEFT"
-CONFIG_EXAMPLES_BUTTONS_NAME7="RIGHT"
-
-#
-# Settings for apps/nshlib
-#
-CONFIG_NSH_FILEIOSIZE=512
-CONFIG_NSH_STRERROR=n
-CONFIG_NSH_LINELEN=64
-CONFIG_NSH_NESTDEPTH=3
-CONFIG_NSH_DISABLESCRIPT=n
-CONFIG_NSH_DISABLEBG=n
-CONFIG_NSH_ROMFSETC=n
-CONFIG_NSH_CONSOLE=y
-CONFIG_NSH_TELNET=y
-CONFIG_NSH_ARCHINIT=y
-CONFIG_NSH_IOBUFFER_SIZE=512
-CONFIG_NSH_DHCPC=n
-CONFIG_NSH_NOMAC=y
-CONFIG_NSH_IPADDR=0x0a000002
-CONFIG_NSH_DRIPADDR=0x0a000001
-CONFIG_NSH_NETMASK=0xffffff00
-CONFIG_NSH_ROMFSMOUNTPT="/etc"
-CONFIG_NSH_INITSCRIPT="init.d/rcS"
-CONFIG_NSH_ROMFSDEVNO=0
-CONFIG_NSH_ROMFSSECTSIZE=64
-CONFIG_NSH_FATDEVNO=1
-CONFIG_NSH_FATSECTSIZE=512
-CONFIG_NSH_FATNSECTORS=1024
-CONFIG_NSH_FATMOUNTPT="/tmp"
-
-#
-# Architecture-specific NSH options
-#
-CONFIG_NSH_MMCSDSPIPORTNO=1
-CONFIG_NSH_MMCSDSLOTNO=0
-CONFIG_NSH_MMCSDMINOR=0
-
-#
-# Settings for examples/usbserial
-#
-CONFIG_EXAMPLES_USBSERIAL_INONLY=n
-CONFIG_EXAMPLES_USBSERIAL_OUTONLY=n
-CONFIG_EXAMPLES_USBSERIAL_ONLYSMALL=n
-CONFIG_EXAMPLES_USBSERIAL_ONLYBIG=n
-
-CONFIG_EXAMPLES_USBSERIAL_TRACEINIT=n
-CONFIG_EXAMPLES_USBSERIAL_TRACECLASS=n
-CONFIG_EXAMPLES_USBSERIAL_TRACETRANSFERS=n
-CONFIG_EXAMPLES_USBSERIAL_TRACECONTROLLER=n
-CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n
-
#
# Stack and heap information
#
-CONFIG_BOOT_RUNFROMFLASH=n
-CONFIG_BOOT_COPYTORAM=n
-CONFIG_CUSTOM_STACK=n
CONFIG_IDLETHREAD_STACKSIZE=1024
CONFIG_USERMAIN_STACKSIZE=2048
CONFIG_PTHREAD_STACK_MIN=256
CONFIG_PTHREAD_STACK_DEFAULT=2048
-CONFIG_HEAP_BASE=
-CONFIG_HEAP_SIZE=
+
+#
+# Device Drivers
+#
+CONFIG_DEV_NULL=y
+# CONFIG_DEV_ZERO is not set
+# CONFIG_LOOP is not set
+# CONFIG_RAMDISK is not set
+# CONFIG_CAN is not set
+# CONFIG_PWM is not set
+# CONFIG_I2C is not set
+# CONFIG_SPI is not set
+# CONFIG_RTC is not set
+# CONFIG_WATCHDOG is not set
+# CONFIG_ANALOG is not set
+# CONFIG_BCH is not set
+# CONFIG_INPUT is not set
+# CONFIG_LCD is not set
+CONFIG_MMCSD=y
+CONFIG_MMCSD_NSLOTS=1
+# CONFIG_MMCSD_READONLY is not set
+# CONFIG_MMCSD_MULTIBLOCK_DISABLE is not set
+# CONFIG_MMCSD_MMCSUPPORT is not set
+# CONFIG_MMCSD_HAVECARDDETECT is not set
+CONFIG_MMCSD_SPI=y
+CONFIG_MMCSD_SPICLOCK=12500000
+CONFIG_MMCSD_SDIO=y
+# CONFIG_SDIO_MUXBUS is not set
+# CONFIG_MTD is not set
+# CONFIG_PIPES is not set
+# CONFIG_PM is not set
+# CONFIG_POWER is not set
+# CONFIG_SENSORS is not set
+# CONFIG_SERCOMM_CONSOLE is not set
+CONFIG_SERIAL=y
+# CONFIG_DEV_LOWCONSOLE is not set
+# CONFIG_16550_UART is not set
+CONFIG_ARCH_HAVE_UART0=y
+CONFIG_MCU_SERIAL=y
+CONFIG_STANDARD_SERIAL=y
+CONFIG_CONFIG_SERIAL_NPOLLWAITERS=2
+CONFIG_UART0_SERIAL_CONSOLE=y
+# CONFIG_NO_SERIAL_CONSOLE is not set
+
+#
+# UART0 Configuration
+#
+CONFIG_UART0_RXBUFSIZE=256
+CONFIG_UART0_TXBUFSIZE=256
+CONFIG_UART0_BAUD=57600
+CONFIG_UART0_BITS=8
+CONFIG_UART0_PARITY=0
+CONFIG_UART0_2STOP=0
+# CONFIG_USBDEV is not set
+CONFIG_USBHOST=y
+CONFIG_USBHOST_NPREALLOC=0
+# CONFIG_USBHOST_MSC is not set
+CONFIG_USBHOST_HIDKBD=y
+CONFIG_HIDKBD_POLLUSEC=100000
+CONFIG_HIDKBD_DEFPRIO=50
+CONFIG_HIDKBD_STACKSIZE=1024
+CONFIG_HIDKBD_BUFSIZE=64
+CONFIG_HIDKBD_NPOLLWAITERS=2
+# CONFIG_HIDKBD_RAWSCANCODES is not set
+# CONFIG_HIDKBD_ENCODED is not set
+# CONFIG_HIDKBD_ALLSCANCODES is not set
+# CONFIG_HIDKBD_NODEBOUNCE is not set
+# CONFIG_WIRELESS is not set
+
+#
+# System Logging Device Options
+#
+
+#
+# System Logging
+#
+# CONFIG_RAMLOG is not set
+
+#
+# Networking Support
+#
+# CONFIG_NET is not set
+
+#
+# File Systems
+#
+
+#
+# File system configuration
+#
+# CONFIG_FS_FAT is not set
+# CONFIG_FS_RAMMAP is not set
+# CONFIG_FS_NXFFS is not set
+# CONFIG_FS_ROMFS is not set
+
+#
+# System Logging
+#
+# CONFIG_SYSLOG is not set
+
+#
+# Graphics Support
+#
+# CONFIG_NX is not set
+
+#
+# Memory Management
+#
+# CONFIG_MM_SMALL is not set
+CONFIG_MM_REGIONS=2
+# CONFIG_GRAN is not set
+
+#
+# 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_PIC is not set
+# CONFIG_SYMTAB_ORDEREDBYNAME is not set
+
+#
+# Library Routines
+#
+CONFIG_STDIO_BUFFER_SIZE=256
+CONFIG_STDIO_LINEBUFFER=y
+CONFIG_NUNGET_CHARS=2
+CONFIG_LIB_HOMEDIR="/"
+# CONFIG_LIBM is not set
+# CONFIG_NOPRINTF_FIELDWIDTH is not set
+# CONFIG_LIBC_FLOATINGPOINT is not set
+# CONFIG_EOL_IS_CR is not set
+# CONFIG_EOL_IS_LF is not set
+# CONFIG_EOL_IS_BOTH_CRLF is not set
+CONFIG_EOL_IS_EITHER_CRLF=y
+# CONFIG_LIBC_STRERROR is not set
+# CONFIG_LIBC_PERROR_STDOUT is not set
+CONFIG_ARCH_LOWPUTC=y
+CONFIG_LIB_SENDFILE_BUFSIZE=512
+# CONFIG_ARCH_ROMGETC is not set
+# CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set
+
+#
+# Basic CXX Support
+#
+# CONFIG_C99_BOOL8 is not set
+# CONFIG_HAVE_CXX is not set
+
+#
+# Application Configuration
+#
+
+#
+# Built-In Applications
+#
+# CONFIG_BUILTIN is not set
+
+#
+# Examples
+#
+# CONFIG_EXAMPLES_BUTTONS is not set
+# CONFIG_EXAMPLES_CAN is not set
+# CONFIG_EXAMPLES_CDCACM is not set
+# CONFIG_EXAMPLES_COMPOSITE is not set
+# CONFIG_EXAMPLES_DHCPD is not set
+# CONFIG_EXAMPLES_ELF is not set
+# CONFIG_EXAMPLES_FTPC is not set
+# CONFIG_EXAMPLES_FTPD is not set
+# CONFIG_EXAMPLES_HELLO is not set
+# CONFIG_EXAMPLES_HELLOXX is not set
+# CONFIG_EXAMPLES_JSON is not set
+CONFIG_EXAMPLES_HIDKBD=y
+# CONFIG_EXAMPLES_KEYPADTEST is not set
+# CONFIG_EXAMPLES_IGMP is not set
+# CONFIG_EXAMPLES_LCDRW is not set
+# CONFIG_EXAMPLES_MM is not set
+# CONFIG_EXAMPLES_MOUNT is not set
+# CONFIG_EXAMPLES_MODBUS is not set
+# CONFIG_EXAMPLES_NETTEST is not set
+# CONFIG_EXAMPLES_NSH is not set
+# CONFIG_EXAMPLES_NULL is not set
+# CONFIG_EXAMPLES_NX is not set
+# CONFIG_EXAMPLES_NXCONSOLE is not set
+# CONFIG_EXAMPLES_NXFFS is not set
+# CONFIG_EXAMPLES_NXFLAT is not set
+# CONFIG_EXAMPLES_NXHELLO is not set
+# CONFIG_EXAMPLES_NXIMAGE is not set
+# CONFIG_EXAMPLES_NXLINES is not set
+# CONFIG_EXAMPLES_NXTEXT is not set
+# CONFIG_EXAMPLES_OSTEST is not set
+# CONFIG_EXAMPLES_PASHELLO is not set
+# CONFIG_EXAMPLES_PIPE is not set
+# CONFIG_EXAMPLES_POLL is not set
+# CONFIG_EXAMPLES_QENCODER is not set
+# CONFIG_EXAMPLES_RGMP is not set
+# CONFIG_EXAMPLES_ROMFS is not set
+# CONFIG_EXAMPLES_SENDMAIL is not set
+# CONFIG_EXAMPLES_SERLOOP is not set
+# CONFIG_EXAMPLES_TELNETD is not set
+# CONFIG_EXAMPLES_THTTPD is not set
+# CONFIG_EXAMPLES_TIFF is not set
+# CONFIG_EXAMPLES_TOUCHSCREEN is not set
+# CONFIG_EXAMPLES_UDP is not set
+# CONFIG_EXAMPLES_UIP is not set
+# CONFIG_EXAMPLES_USBSERIAL is not set
+# CONFIG_EXAMPLES_USBMSC is not set
+# CONFIG_EXAMPLES_USBTERM is not set
+# CONFIG_EXAMPLES_WATCHDOG is not set
+# CONFIG_EXAMPLES_WLAN is not set
+
+#
+# Interpreters
+#
+
+#
+# Interpreters
+#
+# CONFIG_INTERPRETERS_FICL is not set
+# CONFIG_INTERPRETERS_PCODE is not set
+
+#
+# Network Utilities
+#
+
+#
+# Networking Utilities
+#
+# CONFIG_NETUTILS_CODECS is not set
+# CONFIG_NETUTILS_DHCPC is not set
+# CONFIG_NETUTILS_DHCPD is not set
+# CONFIG_NETUTILS_FTPC is not set
+# CONFIG_NETUTILS_FTPD is not set
+# CONFIG_NETUTILS_JSON is not set
+# CONFIG_NETUTILS_RESOLV is not set
+# CONFIG_NETUTILS_SMTP is not set
+# CONFIG_NETUTILS_TELNETD is not set
+# CONFIG_NETUTILS_TFTPC is not set
+# CONFIG_NETUTILS_THTTPD is not set
+# CONFIG_NETUTILS_UIPLIB is not set
+# CONFIG_NETUTILS_WEBCLIENT is not set
+
+#
+# ModBus
+#
+
+#
+# FreeModbus
+#
+# CONFIG_MODBUS is not set
+
+#
+# NSH Library
+#
+# CONFIG_NSH_LIBRARY is not set
+
+#
+# NxWidgets/NxWM
+#
+
+#
+# System NSH Add-Ons
+#
+
+#
+# Custom Free Memory Command
+#
+# CONFIG_SYSTEM_FREE is not set
+
+#
+# I2C tool
+#
+
+#
+# FLASH Program Installation
+#
+# CONFIG_SYSTEM_INSTALL is not set
+
+#
+# readline()
+#
+# CONFIG_SYSTEM_READLINE is not set
+
+#
+# Power Off
+#
+# CONFIG_SYSTEM_POWEROFF is not set
+
+#
+# RAMTRON
+#
+# CONFIG_SYSTEM_RAMTRON is not set
+
+#
+# SD Card
+#
+# CONFIG_SYSTEM_SDCARD is not set
+
+#
+# Sysinfo
+#
+# CONFIG_SYSTEM_SYSINFO is not set
diff --git a/nuttx/configs/olimex-lpc1766stk/hidkbd/setenv.sh b/nuttx/configs/olimex-lpc1766stk/hidkbd/setenv.sh
index af4a2589ee..6b51c10deb 100755
--- a/nuttx/configs/olimex-lpc1766stk/hidkbd/setenv.sh
+++ b/nuttx/configs/olimex-lpc1766stk/hidkbd/setenv.sh
@@ -50,7 +50,7 @@ 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"
+export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/CodeSourcery/Sourcery G++ Lite/bin"
# These are the Cygwin paths to the locations where I installed the Atollic
# toolchain under windows. You will also have to edit this if you install
@@ -62,7 +62,7 @@ fi
# 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"
+# export TOOLCHAIN_BIN="${WD}/../misc/buildroot/build_arm_nofpu/staging_dir/bin"
# The Olimex-lpc1766stk/tools directory
export LPCTOOL_DIR="${WD}/configs/olimex-lpc1766stk/tools"
diff --git a/nuttx/drivers/usbhost/Kconfig b/nuttx/drivers/usbhost/Kconfig
index 35695d7501..de8469b41d 100644
--- a/nuttx/drivers/usbhost/Kconfig
+++ b/nuttx/drivers/usbhost/Kconfig
@@ -2,6 +2,7 @@
# For a description of the syntax of this configuration file,
# see misc/tools/kconfig-language.txt.
#
+
config USBHOST_NPREALLOC
int "Number of pre-allocated class instances"
default 4
@@ -29,64 +30,85 @@ config USBHOST_ISOC_DISABLE
On some architectures, selecting this setting will reduce driver size
by disabling isochronous endpoint support
-config USBHOST_HIDKBD
- bool "HID keyboad class support"
+config USBHOST_MSC
+ bool "Mass Storage Class Support"
default n
- depends on !USBHOST_INT_DISABLE && SCHED_WORKQUEUE && !DISABLE_SIGNALS
+ depends on !BULK_DISABLE
+ ---help---
+ Enable support for the keyboard class driver. This also depends on
+ NFILE_DESCRIPTORS > 0 && SCHED_WORKQUEUE=y
+
+config USBHOST_HIDKBD
+ bool "HID Keyboard Class Support"
+ default n
+ depends on !INT_DISABLE
+ ---help---
+ Enable support for the keyboard class driver. This also depends on
+ SCHED_WORKQUEUE && !DISABLE_SIGNALS
if USBHOST_HIDKBD
config HIDKBD_POLLUSEC
- bool ""
- default n
+ int "Keyboard Poll Rate (MSEC)"
+ default 100000
---help---
- Device poll rate in microseconds. Default: 100 milliseconds.
+ Device poll rate in microseconds. Default: 100,000 microseconds.
config HIDKBD_DEFPRIO
- bool ""
- default n
+ int "Polling Thread Priority"
+ default 50
---help---
Priority of the polling thread. Default: 50.
config HIDKBD_STACKSIZE
- bool ""
- default n
+ int "Polling thread stack size"
+ default 1024
---help---
Stack size for polling thread. Default: 1024
config HIDKBD_BUFSIZE
- bool ""
- default n
+ int "Scancode Buffer Size"
+ default 64
---help---
Scancode buffer size. Default: 64.
config HIDKBD_NPOLLWAITERS
- bool ""
- default n
+ int "Max Number of Waiters for Poll Event"
+ default 2
+ depends on !DISABLE_POLL
---help---
If the poll() method is enabled, this defines the maximum number
of threads that can be waiting for keyboard events. Default: 2.
config HIDKBD_RAWSCANCODES
- bool ""
+ bool "Use Raw Scan Codes"
default n
---help---
- If set to y no conversion will be made on the raw keyboard scan
- codes. Default: ASCII conversion.
+ If set to y no conversions will be made on the raw keyboard scan
+ codes. This option is useful during testing. Default: ASCII conversion.
+
+config HIDKBD_ENCODED
+ bool "Enocode Special Keys"
+ default n
+ depends on !HIDKBD_RAWSCANCODES
+ ---help---
+ Encode special key press events in the user buffer. In this case,
+ the use end must decode the encoded special key values using the
+ interfaces defined in include/nuttx/input/kbd_codec.h. These
+ special keys include such things as up/down arrows, home and end
+ keys, etc. If this not defined, only 7-bit print-able and control
+ ASCII characters will be provided to the user.
config HIDKBD_ALLSCANCODES
- bool ""
+ bool "Use All Scancodes"
default n
---help---
If set to y all 231 possible scancodes will be converted to
something. Default: 104 key US keyboard.
config HIDKBD_NODEBOUNCE
- bool ""
+ bool "Disable Debounce"
default n
---help---
If set to y normal debouncing is disabled. Default:
Debounce enabled (No repeat keys).
- USB host mass storage class driver. Requires USBHOST=y,
- config USBHOST_BULK_DISABLE=n, NFILE_DESCRIPTORS > 0,
- and SCHED_WORKQUEUE=y
endif
diff --git a/nuttx/drivers/usbhost/usbhost_hidkbd.c b/nuttx/drivers/usbhost/usbhost_hidkbd.c
index e69d68e7b2..e0c4680ebb 100644
--- a/nuttx/drivers/usbhost/usbhost_hidkbd.c
+++ b/nuttx/drivers/usbhost/usbhost_hidkbd.c
@@ -1,7 +1,7 @@
/****************************************************************************
* drivers/usbhost/usbhost_hidkbd.c
*
- * Copyright (C) 2011 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt
*
* Redistribution and use in source and binary forms, with or without
@@ -62,6 +62,11 @@
#include
#include
+#ifdef CONFIG_HIDKBD_ENCODED
+# include
+# include
+#endif
+
/* Don't compile if prerequisites are not met */
#if defined(CONFIG_USBHOST) && !defined(CONFIG_USBHOST_INT_DISABLE) && CONFIG_NFILE_DESCRIPTORS > 0
@@ -126,6 +131,14 @@
# endif
#endif
+/* If we are using raw scancodes, then we cannot support encoding of
+ * special characters either.
+ */
+
+#ifdef CONFIG_HIDKBD_RAWSCANCODES
+# undef CONFIG_HIDKBD_ENCODED
+#endif
+
/* Driver support ***********************************************************/
/* This format is used to construct the /dev/kbd[n] device driver path. It
* defined here so that it will be used consistently in all places.
@@ -144,6 +157,23 @@
#define USBHOST_MAX_CREFS 0x7fff
+/* Debug ********************************************************************/
+/* Both CONFIG_DEBUG_INPUT and CONFIG_DEBUG_USB could apply to this file.
+ * We assume here that CONFIG_DEBUG_INPUT might be enabled separately, but
+ * CONFIG_DEBUG_USB implies both.
+ */
+
+#ifndef CONFIG_DEBUG_INPUT
+# undef idbg
+# define idbg udbg
+# undef illdbg
+# define illdbg ulldbg
+# undef ivdbg
+# define ivdbg uvdbg
+# undef illvdbg
+# define illvdbg ullvdbg
+#endif
+
/****************************************************************************
* Private Types
****************************************************************************/
@@ -209,6 +239,16 @@ struct usbhost_state_s
uint8_t kbdbuffer[CONFIG_HIDKBD_BUFSIZE];
};
+/* This type is used for encoding special characters */
+
+#ifdef CONFIG_HIDKBD_ENCODED
+struct usbhost_outstream_s
+{
+ struct lib_outstream_s stream;
+ FAR struct usbhost_state_s *priv;
+};
+#endif
+
/****************************************************************************
* Private Function Prototypes
****************************************************************************/
@@ -240,7 +280,15 @@ static inline void usbhost_mkdevname(FAR struct usbhost_state_s *priv, char *dev
/* Keyboard polling thread */
static void usbhost_destroy(FAR void *arg);
+static void usbhost_putbuffer(FAR struct usbhost_state_s *priv, uint8_t keycode);
+#ifdef CONFIG_HIDKBD_ENCODED
+static void usbhost_putstream(FAR struct lib_outstream_s *this, int ch);
+#endif
static inline uint8_t usbhost_mapscancode(uint8_t scancode, uint8_t modifier);
+#ifdef CONFIG_HIDKBD_ENCODED
+static inline void usbhost_encodescancode(FAR struct usbhost_state_s *priv,
+ uint8_t scancode, uint8_t modifier);
+#endif
static int usbhost_kbdpoll(int argc, char *argv[]);
/* Helpers for usbhost_connect() */
@@ -346,6 +394,121 @@ static struct usbhost_state_s *g_priv; /* Data passed to thread */
*/
#ifndef CONFIG_HIDKBD_RAWSCANCODES
+#ifdef CONFIG_HIDKBD_ENCODED
+
+/* The first and last scancode values with encode-able values */
+
+#define FIRST_ENCODING USBHID_KBDUSE_ENTER /* 0x28 Keyboard Return (ENTER) */
+#ifdef CONFIG_HIDKBD_ALLSCANCODES
+# define LAST_ENCODING USBHID_KBDUSE_POWER /* 0x66 Keyboard Power */
+#else
+#define LAST_ENCODING USBHID_KBDUSE_KPDHEXADECIMAL /* 0xdd Keypad Hexadecimal */
+#endif
+
+#define USBHID_NUMENCODINGS (LAST_ENCODING - FIRST_ENCODING + 1)
+
+static const uint8_t encoding[USBHID_NUMENCODINGS] =
+{
+ /* 0x28-0x2f: Enter,escape,del,back-tab,space,_,+,{ */
+
+ KEYCODE_ENTER, 0, KEYCODE_FWDDEL, KEYCODE_BACKDEL, 0, 0, 0, 0,
+
+ /* 0x30-0x37: },|,Non-US tilde,:,",grave tidle,<,> */
+
+ 0, 0, 0, 0, 0, 0, 0, 0,
+
+ /* 0x38-0x3f: /,CapsLock,F1,F2,F3,F4,F5,F6 */
+
+ 0, KEYCODE_CAPSLOCK, KEYCODE_F1, KEYCODE_F2, KEYCODE_F3, KEYCODE_F4, KEYCODE_F5, KEYCODE_F6,
+
+ /* 0x40-0x47: F7,F8,F9,F10,F11,F12,PrtScn,ScrollLock */
+
+ KEYCODE_F7, KEYCODE_F8, KEYCODE_F9, KEYCODE_F10, KEYCODE_F11, KEYCODE_F12, KEYCODE_PRTSCRN, KEYCODE_SCROLLLOCK,
+
+ /* 0x48-0x4f: Pause,Insert,Home,PageUp,DeleteForward,End,PageDown,RightArrow */
+
+ KEYCODE_PAUSE, KEYCODE_INSERT, KEYCODE_HOME, KEYCODE_PAGEUP, KEYCODE_FWDDEL, KEYCODE_END, KEYCODE_PAGEDOWN, KEYCODE_RIGHT,
+
+ /* 0x50-0x57: LeftArrow,DownArrow,UpArrow,Num Lock,/,*,-,+ */
+
+ KEYCODE_LEFT, KEYCODE_DOWN, KEYCODE_UP, KEYCODE_NUMLOCK, 0, 0, 0, 0,
+
+ /* 0x58-0x5f: Enter,1-7 */
+
+ KEYCODE_ENTER, 0, 0, 0, 0, 0, 0, 0,
+
+ /* 0x60-0x66: 8-9,0,.,Non-US \,Application,Power */
+
+ 0, 0, 0, 0, 0, 0, KEYCODE_POWER,
+
+#ifdef CONFIG_HIDKBD_ALLSCANCODES
+
+ 0, /* 0x67 = */
+
+ /* 0x68-0x6f: F13,F14,F15,F16,F17,F18,F19,F20 */
+
+ KEYCODE_F13, KEYCODE_F14, KEYCODE_F15, KEYCODE_F16, KEYCODE_F17, KEYCODE_F18, KEYCODE_F19, KEYCODE_F20,
+
+ /* 0x70-0x77: F21,F22,F23,F24,Execute,Help,Menu,Select */
+
+ KEYCODE_F21, KEYCODE_F22, KEYCODE_F23, KEYCODE_F24, KEYCODE_EXECUTE, KEYCODE_HELP, KEYCODE_MENU, KEYCODE_SELECT,
+
+ /* 0x78-0x7f: Stop,Again,Undo,Cut,Copy,Paste,Find,Mute */
+
+ KEYCODE_STOP, KEYCODE_AGAIN, KEYCODE_UNDO, KEYCODE_CUT, KEYCODE_COPY, KEYCODE_PASTE, KEYCODE_FIND, KEYCODE_MUTE,
+
+ /* 0x80-0x87: VolUp,VolDown,LCapsLock,lNumLock,LScrollLock,,,=,International1 */
+
+ KEYCODE_VOLUP, KEYCODE_VOLDOWN, KEYCODE_LCAPSLOCK, KEYCODE_LNUMLOCK, KEYCODE_LSCROLLLOCK, 0, 0, 0,
+
+ /* 0x88-0x8f: International 2-9 */
+
+ 0, 0, 0, 0, 0, 0, 0, 0,
+
+ /* 0x90-0x97: LAN 1-8 */
+
+ KEYCODE_LANG1, KEYCODE_LANG2, KEYCODE_LANG3, KEYCODE_LANG4, KEYCODE_LANG5, KEYCODE_LANG6, KEYCODE_LANG7, KEYCODE_LANG8,
+
+ /* 0x98-0x9f: LAN 9,Erase,SysReq,Cancel,Clear,Prior,Return,Separator */
+
+ 0, 0, KEYCODE_SYSREQ, KEYCODE_CANCEL, KEYCODE_CLEAR, 0, KEYCODE_ENTER, 0,
+
+ /* 0xa0-0xa7: Out,Oper,Clear,CrSel,Excel,(reserved) */
+
+ 0, 0, 0, 0, 0, 0, 0, 0,
+
+ /* 0xa8-0xaf: (reserved) */
+
+ 0, 0, 0, 0, 0, 0, 0, 0,
+
+ /* 0xb0-0xb7: 00,000,ThouSeparator,DecSeparator,CurrencyUnit,SubUnit,(,) */
+
+ 0, 0, 0, 0, 0, 0, 0, 0,
+
+ /* 0xb8-0xbf: {,},tab,backspace,A-D */
+
+ 0, 0, 0, KEYCODE_BACKDEL, 0, 0, 0, 0,
+
+ /* 0xc0-0xc7: E-F,XOR,^,%,<,>,& */
+
+ 0, 0, 0, 0, 0, 0, 0, 0,
+
+ /* 0xc8-0xcf: &&,|,||,:,#, ,@,! */
+
+ 0, 0, 0, 0, 0, 0, 0, 0,
+
+ /* 0xd0-0xd7: Memory Store,Recall,Clear,Add,Subtract,Muliply,Divide,+/- */
+
+ KEYCODE_MEMSTORE, KEYCODE_MEMRECALL, KEYCODE_MEMCLEAR, KEYCODE_MEMADD, KEYCODE_MEMSUB, KEYCODE_MEMMUL, KEYCODE_MEMDIV, KEYCODE_NEGATE,
+
+ /* 0xd8-0xdd: Clear,ClearEntry,Binary,Octal,Decimal,Hexadecimal */
+
+ KEYCODE_CLEAR, KEYCODE_CLEARENTRY, KEYCODE_BINARY, KEYCODE_OCTAL, KEYCODE_DECIMAL, KEYCODE_HEXADECIMAL
+#endif
+};
+
+#endif
+
static const uint8_t ucmap[USBHID_NUMSCANCODES] =
{
0, 0, 0, 0, 'A', 'B', 'C', 'D', /* 0x00-0x07: Reserved, errors, A-D */
@@ -356,7 +519,7 @@ static const uint8_t ucmap[USBHID_NUMSCANCODES] =
'\n', '\033', '\177', 0, ' ', '_', '+', '{', /* 0x28-0x2f: Enter,escape,del,back-tab,space,_,+,{ */
'}', '|', 0, ':', '"', 0, '<', '>', /* 0x30-0x37: },|,Non-US tilde,:,",grave tidle,<,> */
'?', 0, 0, 0, 0, 0, 0, 0, /* 0x38-0x3f: /,CapsLock,F1,F2,F3,F4,F5,F6 */
- 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40-0x47: F7,F8,F9,F10,F11,F12,PrtScn,sScrollLock */
+ 0, 0, 0, 0, 0, 0, 0, 0, /* 0x40-0x47: F7,F8,F9,F10,F11,F12,PrtScn,ScrollLock */
0, 0, 0, 0, 0, 0, 0, 0, /* 0x48-0x4f: Pause,Insert,Home,PageUp,DeleteForward,End,PageDown,RightArrow */
0, 0, 0, 0, '/', '*', '-', '+', /* 0x50-0x57: LeftArrow,DownArrow,UpArrow,Num Lock,/,*,-,+ */
'\n', '1', '2', '3', '4', '4', '6', '7', /* 0x58-0x5f: Enter,1-7 */
@@ -368,7 +531,7 @@ static const uint8_t ucmap[USBHID_NUMSCANCODES] =
0, 0, 0, 0, 0, ',', 0, 0, /* 0x80-0x87: VolUp,VolDown,LCapsLock,lNumLock,LScrollLock,,,=,International1 */
0, 0, 0, 0, 0, 0, 0, 0, /* 0x88-0x8f: International 2-9 */
0, 0, 0, 0, 0, 0, 0, 0, /* 0x90-0x97: LAN 1-8 */
- 0, 0, 0, 0, 0, 0, '\n', 0, /* 0x98-0x9f: LAN 9,Ease,SysReq,Cancel,Clear,Prior,Return,Separator */
+ 0, 0, 0, 0, 0, 0, '\n', 0, /* 0x98-0x9f: LAN 9,Erase,SysReq,Cancel,Clear,Prior,Return,Separator */
0, 0, 0, 0, 0, 0, 0, 0, /* 0xa0-0xa7: Out,Oper,Clear,CrSel,Excel,(reserved) */
0, 0, 0, 0, 0, 0, 0, 0, /* 0xa8-0xaf: (reserved) */
0, 0, 0, 0, 0, 0, '(', ')', /* 0xb0-0xb7: 00,000,ThouSeparator,DecSeparator,CurrencyUnit,SubUnit,(,) */
@@ -403,7 +566,7 @@ static const uint8_t lcmap[USBHID_NUMSCANCODES] =
0, 0, 0, 0, 0, ',', 0, 0, /* 0x80-0x87: VolUp,VolDown,LCapsLock,lNumLock,LScrollLock,,,=,International1 */
0, 0, 0, 0, 0, 0, 0, 0, /* 0x88-0x8f: International 2-9 */
0, 0, 0, 0, 0, 0, 0, 0, /* 0x90-0x97: LAN 1-8 */
- 0, 0, 0, 0, 0, 0, '\n', 0, /* 0x98-0x9f: LAN 9,Ease,SysReq,Cancel,Clear,Prior,Return,Separator */
+ 0, 0, 0, 0, 0, 0, '\n', 0, /* 0x98-0x9f: LAN 9,Erase,SysReq,Cancel,Clear,Prior,Return,Separator */
0, 0, 0, 0, 0, 0, 0, 0, /* 0xa0-0xa7: Out,Oper,Clear,CrSel,Excel,(reserved) */
0, 0, 0, 0, 0, 0, 0, 0, /* 0xa8-0xaf: (reserved) */
0, 0, 0, 0, 0, 0, '(', ')', /* 0xb0-0xb7: 00,000,ThouSeparator,DecSeparator,CurrencyUnit,SubUnit,(,) */
@@ -637,6 +800,88 @@ static void usbhost_destroy(FAR void *arg)
usbhost_freeclass(priv);
}
+/****************************************************************************
+ * Name: usbhost_putbuffer
+ *
+ * Description:
+ * Add one character to the user buffer.
+ *
+ * Input Parameters:
+ * priv - Driver internal state
+ * keycode - The value to add to the user buffer
+ *
+ * Returned Values:
+ * None
+ *
+ ****************************************************************************/
+
+static void usbhost_putbuffer(FAR struct usbhost_state_s *priv,
+ uint8_t keycode)
+{
+ register unsigned int head;
+ register unsigned int tail;
+
+ /* Copy the next keyboard character into the user buffer. */
+
+ head = priv->headndx;
+ priv->kbdbuffer[head] = keycode;
+
+ /* Increment the head index */
+
+ if (++head >= CONFIG_HIDKBD_BUFSIZE)
+ {
+ head = 0;
+ }
+
+ /* If the buffer is full, then increment the tail index to make space. Is
+ * it better to lose old keystrokes or new?
+ */
+
+ tail = priv->tailndx;
+ if (tail == head)
+ {
+ if (++tail >= CONFIG_HIDKBD_BUFSIZE)
+ {
+ tail = 0;
+ }
+
+ /* Save the updated tail index */
+
+ priv->tailndx = tail;
+ }
+
+ /* Save the updated head index */
+
+ priv->headndx = head;
+}
+
+/****************************************************************************
+ * Name: usbhost_putstream
+ *
+ * Description:
+ * A wrapper for usbhost_putc that is compatibile with the lib_outstream_s
+ * putc methos.
+ *
+ * Input Parameters:
+ * stream - The struct lib_outstream_s reference
+ * ch - The character to add to the user buffer
+ *
+ * Returned Values:
+ * None
+ *
+ ****************************************************************************/
+
+#ifdef CONFIG_HIDKBD_ENCODED
+static void usbhost_putstream(FAR struct lib_outstream_s *stream, int ch)
+{
+ FAR struct usbhost_outstream_s *privstream = (FAR struct lib_outstream_s *)stream;
+
+ DEBUGASSERT(privstream && privstream->priv);
+ usbhost_putbuffer(privstream->priv), (uint8_t)ch);
+ stream->nput++;
+}
+#endif
+
/****************************************************************************
* Name: usbhost_mapscancode
*
@@ -679,6 +924,58 @@ static inline uint8_t usbhost_mapscancode(uint8_t scancode, uint8_t modifier)
#endif
}
+/****************************************************************************
+ * Name: usbhost_encodescancode
+ *
+ * Description:
+ * Check if the key has a special function encoding and, if it does, add
+ * the encoded value to the user buffer.
+ *
+ * Input Parameters:
+ * priv - Driver internal state
+ * scancode - Scan code to be mapped.
+ * modifier - Ctrl,Alt,Shift,GUI modifier bits
+ *
+ * Returned Values:
+ * None
+ *
+ ****************************************************************************/
+
+#ifdef CONFIG_HIDKBD_ENCODED
+static inline void usbhost_encodescancode(FAR struct usbhost_state_s *priv,
+ uint8_t scancode, uint8_t modifier)
+{
+ struct usbhost_outstream_s stream;
+ uint8_t encoded;
+
+ /* Check if the raw scancode is in a valid range */
+
+ if (scancode >= FIRST_ENCODING && scancode <= LAST_ENCODING)
+ {
+ /* Yes the value is within range */
+
+ encoded = encoding(scancode - FIRST_ENCODING);
+ ivdbg(" scancode: %02x modifier: %02x encoded: %d\n",
+ scancode, modifier, encoded);
+
+ if (encoded)
+ {
+ struct usbhost_outstream_s usbstream;
+
+ /* And it does correspond to a special function key */
+
+ usbstream->stream.put = usbhost_putstream;
+ usbstream->stream.nput = 0;
+ usbstream->priv = priv;
+
+ /* Add the special function value to the user buffer */
+
+ kbd_putspecial((enum kbd_keycode_e)encoded, &usbstream);
+ }
+ }
+}
+#endif
+
/****************************************************************************
* Name: usbhost_kbdpoll
*
@@ -704,6 +1001,8 @@ static int usbhost_kbdpoll(int argc, char *argv[])
unsigned int npolls = 0;
#endif
unsigned int nerrors = 0;
+ bool empty = true;
+ bool newstate;
int ret;
uvdbg("Started\n");
@@ -717,13 +1016,13 @@ static int usbhost_kbdpoll(int argc, char *argv[])
* running.
*/
- priv = g_priv;
- DEBUGASSERT(priv != NULL);
+ priv = g_priv;
+ DEBUGASSERT(priv != NULL);
- priv->polling = true;
- priv->crefs++;
- usbhost_givesem(&g_syncsem);
- sleep(1);
+ priv->polling = true;
+ priv->crefs++;
+ usbhost_givesem(&g_syncsem);
+ sleep(1);
/* Loop here until the device is disconnected */
@@ -784,17 +1083,12 @@ static int usbhost_kbdpoll(int argc, char *argv[])
else if (priv->open)
{
struct usbhid_kbdreport_s *rpt = (struct usbhid_kbdreport_s *)priv->tbuffer;
- unsigned int head;
- unsigned int tail;
- uint8_t ascii;
+ uint8_t keycode;
int i;
/* Add the newly received keystrokes to our internal buffer */
usbhost_takesem(&priv->exclsem);
- head = priv->headndx;
- tail = priv->tailndx;
-
for (i = 0; i < 6; i++)
{
/* Is this key pressed? But not pressed last time?
@@ -828,15 +1122,15 @@ static int usbhost_kbdpoll(int argc, char *argv[])
* or cursor controls in this version of the driver.
*/
- ascii = usbhost_mapscancode(rpt->key[i], rpt->modifier);
- uvdbg("Key %d: %02x ASCII:%c modifier: %02x\n",
- i, rpt->key[i], ascii ? ascii : ' ', rpt->modifier);
+ keycode = usbhost_mapscancode(rpt->key[i], rpt->modifier);
+ ivdbg("Key %d: %02x keycode:%c modifier: %02x\n",
+ i, rpt->key[i], keycode ? keycode : ' ', rpt->modifier);
/* Zero at this point means that the key does not map to a
* printable character.
*/
- if (ascii != 0)
+ if (keycode != 0)
{
/* Handle control characters. Zero after this means
* a valid, NUL character.
@@ -844,36 +1138,28 @@ static int usbhost_kbdpoll(int argc, char *argv[])
if ((rpt->modifier & (USBHID_MODIFER_LCTRL|USBHID_MODIFER_RCTRL)) != 0)
{
- ascii &= 0x1f;
+ keycode &= 0x1f;
}
/* Copy the next keyboard character into the user
* buffer.
*/
- priv->kbdbuffer[head] = ascii;
-
- /* Increment the head index */
-
- if (++head >= CONFIG_HIDKBD_BUFSIZE)
- {
- head = 0;
- }
-
- /* If the buffer is full, then increment the tail
- * index to make space. Is it better to lose old
- * keystrokes or new?
- */
-
- if (tail == head)
- {
- if (++tail >= CONFIG_HIDKBD_BUFSIZE)
- {
- tail = 0;
- }
- }
+ usbhost_putbuffer(priv, keycode);
}
+
+ /* The zero might, however, map to a special keyboard action (such as a
+ * cursor movement or function key). Attempt to encode the special key.
+ */
+
+#ifdef CONFIG_HIDKBD_ENCODED
+ else
+ {
+ usbhost_encodescancode(priv, rpt->key[i], rpt->modifier));
+ }
+#endif
}
+
/* Save the scancode (or lack thereof) for key debouncing on
* next keyboard report.
*/
@@ -885,7 +1171,8 @@ static int usbhost_kbdpoll(int argc, char *argv[])
/* Did we just transition from no data available to data available? */
- if (head != tail && priv->headndx == priv->tailndx)
+ newstate = (priv->headndx == priv->tailndx);
+ if (empty && !newstate)
{
/* Yes.. Is there a thread waiting for keyboard data now? */
@@ -902,10 +1189,7 @@ static int usbhost_kbdpoll(int argc, char *argv[])
usbhost_pollnotify(priv);
}
- /* Update the head/tail indices */
-
- priv->headndx = head;
- priv->tailndx = tail;
+ empty = newstate;
usbhost_givesem(&priv->exclsem);
}
@@ -958,6 +1242,7 @@ static int usbhost_kbdpoll(int argc, char *argv[])
usbhost_givesem(&priv->exclsem);
}
+
return 0;
}
diff --git a/nuttx/include/nuttx/input/kbd_codec.h b/nuttx/include/nuttx/input/kbd_codec.h
index b103d544ec..d374ed8d3a 100644
--- a/nuttx/include/nuttx/input/kbd_codec.h
+++ b/nuttx/include/nuttx/input/kbd_codec.h
@@ -113,7 +113,7 @@ enum kbd_keycode_e
KEYCODE_PAUSE, /* Pause */
KEYCODE_BREAK, /* Break */
KEYCODE_CANCEL, /* Cancel */
- KEYCODE_PRINTSCN, /* PrintScreen */
+ KEYCODE_PRTSCRN, /* PrintScreen */
KEYCODE_SYSREQ, /* SysReq/Attention */
/* Audio */
@@ -131,14 +131,15 @@ enum kbd_keycode_e
KEYCODE_CLEAR, /* Clear */
KEYCODE_CLEARENTRY, /* Clear entry */
+ KEYCODE_NEGATE, /* +/- */
- KEYCODE_MEMSET, /* Memory set */
+ KEYCODE_MEMSTORE, /* Memory store */
KEYCODE_MEMCLEAR, /* Memory clear */
KEYCODE_MEMRECALL, /* Memory recall */
KEYCODE_MEMADD, /* Memory add */
- KEYCODE_MEMSUBTRACT, /* Memory substract */
- KEYCODE_MEMMULTIPY, /* Memory multiply */
- KEYCODE_MEMDIVIDE, /* Memory divide */
+ KEYCODE_MEMSUB, /* Memory substract */
+ KEYCODE_MEMMUL, /* Memory multiply */
+ KEYCODE_MEMDIV, /* Memory divide */
KEYCODE_BINARY, /* Binary mode */
KEYCODE_OCTAL, /* Octal mode */
@@ -197,7 +198,7 @@ enum kbd_keycode_e
* Public Types
****************************************************************************/
-struct kget_getstate_s
+struct kbd_getstate_s
{
uint8_t nch; /* Number of characters in the buffer */
uint8_t ndx; /* Index to next character in the buffer */
@@ -225,7 +226,7 @@ extern "C"
* Put one byte of normal, "in-band" ASCII data into the output stream.
*
* Input Parameters:
- * ch - The character to be into the output stream.
+ * ch - The character to be added to the output stream.
* stream - An instance of lib_outstream_s to do the low-level put
* operation.
*
@@ -243,6 +244,9 @@ extern "C"
* Put one special, "out-of-band" command into the output stream.
*
* Input Parameters:
+ * keycode - The command to be added to the output stream.
+ * stream - An instance of lib_outstream_s to do the low-level put
+ * operation.
*
* Returned Value:
* None
@@ -261,7 +265,7 @@ void kbd_putspecial(enum kbd_keycode_e keycode,
* Name: kbd_get
*
* Description:
- * Put one byte of data or special command from the driver provided input
+ * Get one byte of data or special command from the driver provided input
* buffer.
*
* Input Parameters:
@@ -274,15 +278,17 @@ void kbd_putspecial(enum kbd_keycode_e keycode,
* should be cleared the first time that kbd_get is called.
*
* Returned Value:
- * 1 - Indicates the successful receipt of a special, "out-of-band" command
+ * 1 - Indicates the successful receipt of a special, "out-of-band" command.
+ * The returned value in pch is a value from enum kbd_getstate_s.
* 0 - Indicates the successful receipt of normal, "in-band" ASCII data.
+ * The returned value in pch is a simple byte of text or control data.
* EOF - An error has getting the next character (reported by the stream).
* Normally indicates the end of file.
*
****************************************************************************/
int kbd_get(FAR struct lib_instream_s *stream,
- FAR struct kget_getstate_s *state, FAR uint8_t *pch);
+ FAR struct kbd_getstate_s *state, FAR uint8_t *pch);
#ifdef __cplusplus
}
diff --git a/nuttx/libc/misc/lib_kbddecode.c b/nuttx/libc/misc/lib_kbddecode.c
index 046d570f90..cb57b52150 100644
--- a/nuttx/libc/misc/lib_kbddecode.c
+++ b/nuttx/libc/misc/lib_kbddecode.c
@@ -89,7 +89,7 @@
*
****************************************************************************/
-static int kbd_reget(FAR struct kget_getstate_s *state, FAR uint8_t *pch)
+static int kbd_reget(FAR struct kbd_getstate_s *state, FAR uint8_t *pch)
{
/* Return the next character */
@@ -107,7 +107,7 @@ static int kbd_reget(FAR struct kget_getstate_s *state, FAR uint8_t *pch)
* Name: kbd_get
*
* Description:
- * Put one byte of data or special command from the driver provided input
+ * Get one byte of data or special command from the driver provided input
* buffer.
*
* Input Parameters:
@@ -120,15 +120,17 @@ static int kbd_reget(FAR struct kget_getstate_s *state, FAR uint8_t *pch)
* should be cleared the first time that kbd_get is called.
*
* Returned Value:
- * 1 - Indicates the successful receipt of a special, "out-of-band" command
+ * 1 - Indicates the successful receipt of a special, "out-of-band" command.
+ * The returned value in pch is a value from enum kbd_getstate_s.
* 0 - Indicates the successful receipt of normal, "in-band" ASCII data.
+ * The returned value in pch is a simple byte of text or control data.
* EOF - An error has getting the next character (reported by the stream).
* Normally indicates the end of file.
*
****************************************************************************/
int kbd_get(FAR struct lib_instream_s *stream,
- FAR struct kget_getstate_s *state, FAR uint8_t *pch)
+ FAR struct kbd_getstate_s *state, FAR uint8_t *pch)
{
int ch;
diff --git a/nuttx/libc/misc/lib_kbdencode.c b/nuttx/libc/misc/lib_kbdencode.c
index 80bf147777..40a8805b11 100644
--- a/nuttx/libc/misc/lib_kbdencode.c
+++ b/nuttx/libc/misc/lib_kbdencode.c
@@ -62,6 +62,9 @@
* Put one special, "out-of-band" command into the output stream.
*
* Input Parameters:
+ * keycode - The command to be added to the output stream.
+ * stream - An instance of lib_outstream_s to do the low-level put
+ * operation.
*
* Returned Value:
* None
From 8ed19bb07d00a15e2f2c9893d57b1ef1261b2d23 Mon Sep 17 00:00:00 2001
From: patacongo
Date: Wed, 26 Dec 2012 20:04:57 +0000
Subject: [PATCH 015/118] Add UG_2965SWEG01 driver from Darcy Gong; fix logic
error in how waiters are reawakened in the USB HID keyboard driver
git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5462 42af7a65-404d-4744-a932-0658087f49c3
---
apps/examples/hidkbd/hidkbd_main.c | 1 +
nuttx/ChangeLog | 6 +
nuttx/configs/stm32f4discovery/README.txt | 2 +-
nuttx/configs/stm32f4discovery/src/Makefile | 4 +
.../src/stm32f4discovery-internal.h | 4 +-
.../stm32f4discovery/src/up_ug2864hsweg01.c | 161 +++
nuttx/drivers/lcd/Make.defs | 4 +
nuttx/drivers/lcd/ug-2864hsweg01.c | 1177 +++++++++++++++++
nuttx/drivers/usbhost/usbhost_hidkbd.c | 16 +-
nuttx/include/nuttx/lcd/ug-2864hsweg01.h | 245 ++++
10 files changed, 1613 insertions(+), 7 deletions(-)
create mode 100644 nuttx/configs/stm32f4discovery/src/up_ug2864hsweg01.c
create mode 100644 nuttx/drivers/lcd/ug-2864hsweg01.c
create mode 100644 nuttx/include/nuttx/lcd/ug-2864hsweg01.h
diff --git a/apps/examples/hidkbd/hidkbd_main.c b/apps/examples/hidkbd/hidkbd_main.c
index bc1eebed0b..8c9f6fa95f 100644
--- a/apps/examples/hidkbd/hidkbd_main.c
+++ b/apps/examples/hidkbd/hidkbd_main.c
@@ -227,5 +227,6 @@ int hidkbd_main(int argc, char *argv[])
close(fd);
}
}
+
return 0;
}
diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog
index 7e1c538d72..a7087656ae 100644
--- a/nuttx/ChangeLog
+++ b/nuttx/ChangeLog
@@ -3826,4 +3826,10 @@
encode special function keys.
* configs/olimex-lpc1766stk/hidkbd: This configuration has been
converted to use the kconfig-frontends configuration tool.
+ * drivers/lcd/ug-2864hsweg01.c and include/nuttx/lcd/ug-2864hsweg01.h:
+ Driver for UG-2864HSWEG01 OLED contributed by Darcy Gong.
+ * configs/stm32f4discovery/src/up_ug2864hsweg01.c: Support for the
+ UG-2864HSWEG01 OLED for the STM32F4Discovery board.
+ * drivers/usbhost/usbhost_hidkbd.c: Correct a logic error in how
+ tasks waiting for read data are awakened.
diff --git a/nuttx/configs/stm32f4discovery/README.txt b/nuttx/configs/stm32f4discovery/README.txt
index d824668cef..37dae7b9ea 100644
--- a/nuttx/configs/stm32f4discovery/README.txt
+++ b/nuttx/configs/stm32f4discovery/README.txt
@@ -711,7 +711,7 @@ pinout for the UG-2864AMBAG01 is specific to the theO.net display board
that I am using:
--------------------------+----------------------------------------------
- Connector CON10 J1: | STM32F4Discovery
+ Connector CON10 J1: | STM32F4Discovery
--------------+-----------+----------------------------------------------
CON10 J1: | CON20 J2: | P1/P2:
--------------+-----------+----------------------------------------------
diff --git a/nuttx/configs/stm32f4discovery/src/Makefile b/nuttx/configs/stm32f4discovery/src/Makefile
index 68419e5d0e..7ac27a7d0a 100644
--- a/nuttx/configs/stm32f4discovery/src/Makefile
+++ b/nuttx/configs/stm32f4discovery/src/Makefile
@@ -100,6 +100,10 @@ ifeq ($(CONFIG_LCD_UG2864AMBAG01),y)
CSRCS += up_ug2864ambag01.c
endif
+ifeq ($(CONFIG_LCD_UG2864HSWEG01),y)
+CSRCS += up_ug2864hsweg01.c
+endif
+
COBJS = $(CSRCS:.c=$(OBJEXT))
SRCS = $(ASRCS) $(CSRCS)
diff --git a/nuttx/configs/stm32f4discovery/src/stm32f4discovery-internal.h b/nuttx/configs/stm32f4discovery/src/stm32f4discovery-internal.h
index 00f17b58e9..eae09594c5 100644
--- a/nuttx/configs/stm32f4discovery/src/stm32f4discovery-internal.h
+++ b/nuttx/configs/stm32f4discovery/src/stm32f4discovery-internal.h
@@ -113,7 +113,7 @@
# define GPIO_OTGFS_OVER (GPIO_INPUT|GPIO_FLOAT|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTD|GPIO_PIN5)
#endif
-/* UG-2864AMBAG01 OLED Display:
+/* UG-2864AMBAG01 or UG-2864HSWEG01 OLED Display:
*
* --------------------------+----------------------------------------------
* Connector CON10 J1: | STM32F4Discovery
@@ -135,7 +135,7 @@
* -------------------------------------------------------------------------
*/
-#ifdef CONFIG_LCD_UG2864AMBAG01
+#if defined(CONFIG_LCD_UG2864AMBAG01) || defined(CONFIG_LCD_UG2864HSWEG01)
# define GPIO_OLED_RESET (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_50MHz|\
GPIO_OUTPUT_CLEAR|GPIO_PORTB|GPIO_PIN6)
# define GPIO_OLED_CS (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_50MHz|\
diff --git a/nuttx/configs/stm32f4discovery/src/up_ug2864hsweg01.c b/nuttx/configs/stm32f4discovery/src/up_ug2864hsweg01.c
new file mode 100644
index 0000000000..4eee077a14
--- /dev/null
+++ b/nuttx/configs/stm32f4discovery/src/up_ug2864hsweg01.c
@@ -0,0 +1,161 @@
+/****************************************************************************
+ * config/stm32f4discovery/src/up_ug2864hsweg01.c
+ * arch/arm/src/board/up_ug2864hsweg01.c
+ *
+ * Copyright (C) 2012 Gregory Nutt. All rights reserved.
+ * Author: Gregory Nutt
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ * 3. Neither the name NuttX nor the names of its contributors may be
+ * used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include
+
+#include
+
+#include
+#include
+#include
+
+#include "stm32_gpio.h"
+#include "stm32f4discovery-internal.h"
+
+#ifdef CONFIG_LCD_UG2864HSWEG01
+
+/****************************************************************************
+ * Pre-Processor Definitions
+ ****************************************************************************/
+/* Configuration ************************************************************/
+/* The pin configurations here require that SPI1 is selected */
+
+#ifndef CONFIG_STM32_SPI1
+# error "The OLED driver requires CONFIG_STM32_SPI1 in the configuration"
+#endif
+
+#ifndef CONFIG_SPI_CMDDATA
+# error "The OLED driver requires CONFIG_SPI_CMDDATA in the configuration"
+#endif
+
+/* Pin Configuration ********************************************************/
+/* UG-2864AMBAG01 or UG-2864HSWEG01 OLED Display:
+ *
+ * --------------------------+----------------------------------------------
+ * Connector CON10 J1: | STM32F4Discovery
+ * --------------+-----------+----------------------------------------------
+ * CON10 J1: | CON20 J2: | P1/P2:
+ * --------------+-----------+----------------------------------------------
+ * 1 3v3 | 3,4 3v3 | P2 3V
+ * 3 /RESET | 8 /RESET | P2 PB6 (Arbitrary selection)
+ * 5 /CS | 7 /CS | P2 PB7 (Arbitrary selection)(2)
+ * 7 A0 | 9 A0 | P2 PB8 (Arbitrary selection)(2)
+ * 9 LED+ (N/C) | ----- | -----
+ * 2 5V Vcc | 1,2 Vcc | P2 5V
+ * 4 DI | 18 D1/SI | P1 PA7 (GPIO_SPI1_MOSI == GPIO_SPI1_MOSI_1 (1))
+ * 6 SCLK | 19 D0/SCL | P1 PA5 (GPIO_SPI1_SCK == GPIO_SPI1_SCK_1 (2))
+ * 8 LED- (N/C) | ----- | ------
+ * 10 GND | 20 GND | P2 GND
+ * --------------+-----------+----------------------------------------------
+ * (1) Required because of on-board MEMS
+ * (2) Note that the OLED CS and A0 are managed in the up_spi.c file.
+ * -------------------------------------------------------------------------
+ */
+
+/* Definitions in stm32f4discovery-internal.h */
+
+/* Debug ********************************************************************/
+
+#ifdef CONFIG_DEBUG_LCD
+# define lcddbg(format, arg...) dbg(format, ##arg)
+# define lcdvdbg(format, arg...) vdbg(format, ##arg)
+#else
+# define lcddbg(x...)
+# define lcdvdbg(x...)
+#endif
+
+/****************************************************************************
+ * Public Functions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Name: up_nxdrvinit
+ *
+ * Description:
+ * Called by NX initialization logic to configure the OLED.
+ *
+ ****************************************************************************/
+
+FAR struct lcd_dev_s *up_nxdrvinit(unsigned int devno)
+{
+ FAR struct spi_dev_s *spi;
+ FAR struct lcd_dev_s *dev;
+
+ /* Configure the OLED GPIOs. This initial configuration is RESET low,
+ * putting the OLED into reset state.
+ */
+
+ (void)stm32_configgpio(GPIO_OLED_RESET);
+
+ /* Wait a bit then release the OLED from the reset state */
+
+ up_mdelay(20);
+ stm32_gpiowrite(GPIO_OLED_RESET, true);
+
+ /* Get the SPI1 port interface */
+
+ spi = up_spiinitialize(1);
+ if (!spi)
+ {
+ lcddbg("Failed to initialize SPI port 1\n");
+ }
+ else
+ {
+ /* Bind the SPI port to the OLED */
+
+ dev = ug2864hsweg01_initialize(spi, devno);
+ if (!dev)
+ {
+ lcddbg("Failed to bind SPI port 1 to OLED %d: %d\n", devno);
+ }
+ else
+ {
+ lcdvdbg("Bound SPI port 1 to OLED %d\n", devno);
+
+ /* And turn the OLED on */
+
+ (void)dev->setpower(dev, CONFIG_LCD_MAXPOWER);
+ return dev;
+ }
+ }
+
+ return NULL;
+}
+#endif /* CONFIG_LCD_UG2864AMBAG01 */
diff --git a/nuttx/drivers/lcd/Make.defs b/nuttx/drivers/lcd/Make.defs
index 1b445b6a78..067f76f4e3 100644
--- a/nuttx/drivers/lcd/Make.defs
+++ b/nuttx/drivers/lcd/Make.defs
@@ -51,6 +51,10 @@ ifeq ($(CONFIG_LCD_UG2864AMBAG01),y)
CSRCS += ug-2864ambag01.c
endif
+ifeq ($(CONFIG_LCD_UG2864HSWEG01),y)
+ CSRCS += ug-2864hsweg01.c
+endif
+
ifeq ($(CONFIG_LCD_UG9664HSWAG01),y)
CSRCS += ug-9664hswag01.c
endif
diff --git a/nuttx/drivers/lcd/ug-2864hsweg01.c b/nuttx/drivers/lcd/ug-2864hsweg01.c
new file mode 100644
index 0000000000..9f9f999066
--- /dev/null
+++ b/nuttx/drivers/lcd/ug-2864hsweg01.c
@@ -0,0 +1,1177 @@
+/**************************************************************************************
+ * drivers/lcd/ug-2864hsweg01.c
+ * Driver for Univision UG-2864HSWEG01 OLED display (wih SSD1306 controller) in SPI
+ * mode
+ *
+ * Copyright (C) 2012 Gregory Nutt. All rights reserved.
+ * Author: Gregory Nutt
+ *
+ * References:
+ * 1. Product Specification (Preliminary), Part Name: OEL Display Module, Part ID:
+ * UG-2864HSWEG01, Doc No: SAS1-9046-B, Univision Technology Inc.
+ * 2. SSD1306, 128 X 64 Dot Matrix OLED/PLED, Preliminary Segment/Common Driver with
+ * Controller, Solomon Systech
+ *
+ * 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.
+ *
+ **************************************************************************************/
+/**************************************************************************************
+ * Device memory organization:
+ *
+ * +----------------------------+
+ * | Column |
+ * --------+----+---+---+---+-...-+-----+
+ * Page | 0 | 1 | 2 | 3 | ... | 127 |
+ * --------+----+---+---+---+-...-+-----+
+ * Page 0 | D0 | X | | | | |
+ * | D1 | X | | | | |
+ * | D2 | X | | | | |
+ * | D3 | X | | | | |
+ * | D4 | X | | | | |
+ * | D5 | X | | | | |
+ * | D6 | X | | | | |
+ * | D7 | X | | | | |
+ * --------+----+---+---+---+-...-+-----+
+ * Page 1 | | | | | | |
+ * --------+----+---+---+---+-...-+-----+
+ * Page 2 | | | | | | |
+ * --------+----+---+---+---+-...-+-----+
+ * Page 3 | | | | | | |
+ * --------+----+---+---+---+-...-+-----+
+ * Page 4 | | | | | | |
+ * --------+----+---+---+---+-...-+-----+
+ * Page 5 | | | | | | |
+ * --------+----+---+---+---+-...-+-----+
+ * Page 6 | | | | | | |
+ * --------+----+---+---+---+-...-+-----+
+ * Page 7 | | | | | | |
+ * --------+----+---+---+---+-...-+-----+
+ *
+ * -----------------------------------+---------------------------------------
+ * Landscape Display: | Reverse Landscape Display:
+ * --------+-----------------------+ | --------+---------------------------+
+ * | Column | | | Column |
+ * --------+---+---+---+-...-+-----+ | --------+-----+-----+-----+-...-+---+
+ * Page 0 | 0 | 1 | 2 | | 127 | | Page 7 | 127 | 126 | 125 | | 0 |
+ * --------+---+---+---+-...-+-----+ | --------+-----+-----+-----+-...-+---+
+ * Page 1 | V | | Page 6 | ^ |
+ * --------+---+---+---+-...-+-----+ | --------+-----+-----+-----+-...-+---+
+ * Page 2 | V | | Page 5 | ^ |
+ * --------+---+---+---+-...-+-----+ | --------+-----+-----+-----+-...-+---+
+ * Page 3 | V | | Page 4 | ^ |
+ * --------+---+---+---+-...-+-----+ | --------+-----+-----+-----+-...-+---+
+ * Page 4 | V | | Page 3 | ^ |
+ * --------+---+---+---+-...-+-----+ | --------+-----+-----+-----+-...-+---+
+ * Page 5 | V | | Page 2 | ^ |
+ * --------+---+---+---+-...-+-----+ | --------+-----+-----+-----+-...-+---+
+ * Page 6 | V | | Page 1 | ^ |
+ * --------+---+---+---+-...-+-----+ | --------+-----+-----+-----+-...-+---+
+ * Page 7 | V | | Page 0 | ^ |
+ * --------+---+---+---+-...-+-----+ | --------+-----+-----+-----+-...-+---+
+ * -----------------------------------+---------------------------------------
+ *
+ * -----------------------------------+---------------------------------------
+ * Portrait Display: | Reverse Portrait Display:
+ * -----------+---------------------+ | -----------+---------------------+
+ * | Page | | | Page |
+ * -----------+---+---+---+-...-+---+ | -----------+---+---+---+-...-+---+
+ * Column 0 | 0 | 1 | 2 | | 7 | | Column 127 | 7 | 6 | 5 | | 0 |
+ * -----------+---+---+---+-...-+---+ | -----------+---+---+---+-...-+---+
+ * Column 1 | > > > > > | | Column 126 | |
+ * -----------+---+---+---+-...-+---+ | -----------+---+---+---+-...-+---+
+ * Column 2 | | | Column 125 | |
+ * -----------+---+---+---+-...-+---+ | -----------+---+---+---+-...-+---+
+ * ... | | | ... | |
+ * -----------+---+---+---+-...-+---+ | -----------+---+---+---+-...-+---+
+ * Column 127 | | | Column 0 | < < < < < |
+ * -----------+---+---+---+-...-+---+ | -----------+---+---+---+-...-+---+
+ * -----------------------------------+----------------------------------------
+ **************************************************************************************/
+
+/**************************************************************************************
+ * Included Files
+ **************************************************************************************/
+
+#include
+
+#include
+#include
+#include
+#include
+#include
+#include
+
+#include
+#include
+#include
+#include
+
+#include
+
+#ifdef CONFIG_LCD_UG2864HSWEG01
+
+/**************************************************************************************
+ * Pre-processor Definitions
+ **************************************************************************************/
+/* Configuration **********************************************************************/
+/* Limitations of the current configuration that I hope to fix someday */
+
+#if CONFIG_UG2864HSWEG01_NINTERFACES != 1
+# warning "This implementation supports only a single OLED device"
+# undef CONFIG_UG2864HSWEG01_NINTERFACES
+# define CONFIG_UG2864HSWEG01_NINTERFACES 1
+#endif
+
+#if defined(CONFIG_LCD_PORTRAIT) || defined(CONFIG_LCD_RPORTRAIT)
+# warning "No support yet for portrait modes"
+# define CONFIG_LCD_LANDSCAPE 1
+# undef CONFIG_LCD_PORTRAIT
+# undef CONFIG_LCD_RLANDSCAPE
+# undef CONFIG_LCD_RPORTRAIT
+#elif defined(CONFIG_LCD_RLANDSCAPE)
+# warning "Reverse landscape mode is untested and, hence, probably buggy"
+#endif
+
+/* SSD1306 Commands *******************************************************************/
+
+#define SSD1306_SETCOLL(ad) (0x00 | ((ad) & 0x0f)) /* Set Lower Column Address: (00h - 0fh) */
+#define SSD1306_SETCOLH(ad) (0x10 | ((ad) & 0x0f)) /* Set Higher Column Address: (10h - 1fh) */
+#define SSD1306_STARTLINE(ln) (0x40 | ((ln) & 0x3f)) /* Set Display Start Line: (40h - 7fh) */
+#define SSD1306_CONTRAST_MODE (0x81) /* Set Contrast Control Register: (Double Bytes Command) */
+# define SSD1306_CONTRAST(c) (c)
+#define SSD1306_SEGREMAP(m) (0xa0 | ((m) & 0x01)) /* Set Segment Re-map: (a0h - a1h) */
+# define SSD1306_REMAPRIGHT SSD1306_SEGREMAP(0) /* Right rotation */
+# define SSD1306_REMAPPLEFT SSD1306_SEGREMAP(1) /* Left rotation */
+#define SSD1306_EDISPOFFON(s) (0xa4 | ((s) & 0x01)) /* Set Entire Display OFF/ON: (a4h - a5h) */
+# define SSD1306_EDISPOFF SSD1306_EDISPOFFON(0) /* Display off */
+# define SSD1306_EDISPON SSD1306_EDISPOFFON(1) /* Display on */
+#define SSD1306_NORMREV(s) (0xa6 | ((s) & 0x01)) /* Set Normal/Reverse Display: (a6h -a7h) */
+# define SSD1306_NORMAL SSD1306_NORMREV(0) /* Normal display */
+# define SSD1306_REVERSE SSD1306_NORMREV(1) /* Reverse display */
+#define SSD1306_MRATIO_MODE (0xa8) /* Set Multiplex Ration: (Double Bytes Command) */
+# define SSD1306_MRATIO(d) ((d) & 0x3f)
+#define SSD1306_DCDC_MODE (0xad) /* Set DC-DC OFF/ON: (Double Bytes Command) */
+# define SSD1306_DCDC_OFF (0x8a)
+# define SSD1306_DCDC_ON (0x8b)
+
+#define SSD1306_DISPOFFON(s) (0xae | ((s) & 0x01)) /* Display OFF/ON: (aeh - afh) */
+# define SSD1306_DISPOFF SSD1306_DISPOFFON(0) /* Display off */
+# define SSD1306_DISPON SSD1306_DISPOFFON(1) /* Display on */
+#define SSD1306_PAGEADDR(a) (0xb0 | ((a) & 0x0f)) /* Set Page Address: (b0h - b7h) */
+#define SSD1306_SCANDIR(d) (0xc0 | ((d) & 0x08)) /* Set Common Output Scan Direction: (c0h - c8h) */
+# define SSD1306_SCANFROMCOM0 SSD1306_SCANDIR(0x00) /* Scan from COM[0] to COM[n-1]*/
+# define SSD1306_SCANTOCOM0 SSD1306_SCANDIR(0x08) /* Scan from COM[n-1] to COM[0] */
+#define SSD1306_DISPOFFS_MODE (0xd3) /* Set Display Offset: (Double Bytes Command) */
+# define SSD1306_DISPOFFS(o) ((o) & 0x3f)
+#define SSD1306_CLKDIV_SET (0xd5) /* Set Display Clock Divide Ratio/Oscillator Frequency: (Double Bytes Command) */
+# define SSD1306_CLKDIV(f,d) ((((f) & 0x0f) << 4) | ((d) & 0x0f))
+#define SSD1306_CHRGPER_SET (0xd9) /* Set Dis-charge/Pre-charge Period: (Double Bytes Command) */
+# define SSD1306_CHRGPER(d,p) ((((d) & 0x0f) << 4) | ((p) & 0x0f))
+#define SSD1306_CMNPAD_CONFIG (0xda) /* Set Common pads hardware configuration: (Double Bytes Command) */
+# define SSD1306_CMNPAD(c) ((0x02) | ((c) & 0x10))
+#define SSD1306_VCOM_SET (0xdb) /* Set VCOM Deselect Level: (Double Bytes Command) */
+# define SSD1306_VCOM(v) (v)
+
+#define SSD1306_CHRPUMP_SET (0x8d) /* Charge Pump Setting */
+# define SSD1306_CHRPUMP_ON (0x14)
+# define SSD1306_CHRPUMP_OFF (0x10)
+
+#define SSD1306_RMWSTART (0xe0) /* Read-Modify-Write: (e0h) */
+#define SSD1306_NOP (0xe3) /* NOP: (e3h) */
+#define SSD1306_END (0xee) /* End: (eeh) */
+
+#define SSD1306_WRDATA(d) (d) /* Write Display Data */
+#define SSD1306_STATUS_BUSY (0x80) /* Read Status */
+#define SSD1306_STATUS_ONOFF (0x40)
+#define SSD1306_RDDATA(d) (d) /* Read Display Data */
+
+/* Color Properties *******************************************************************/
+/* Display Resolution
+ *
+ * The SSD1306 display controller can handle a resolution of 132x64. The UG-2864HSWEG01
+ * on the base board is 128x64.
+ */
+
+#define UG2864HSWEG01_DEV_XRES 128 /* Only 128 of 131 columns used */
+#define UG2864HSWEG01_DEV_YRES 64 /* 8 pages each 8 rows */
+#define UG2864HSWEG01_DEV_XOFFSET 2 /* Offset to logical column 0 */
+#define UG2864HSWEG01_DEV_PAGES 8 /* 8 pages */
+
+#if defined(CONFIG_LCD_LANDSCAPE) || defined(CONFIG_LCD_RLANDSCAPE)
+# define UG2864HSWEG01_XRES UG2864HSWEG01_DEV_XRES
+# define UG2864HSWEG01_YRES UG2864HSWEG01_DEV_YRES
+#else
+# define UG2864HSWEG01_XRES UG2864HSWEG01_DEV_YRES
+# define UG2864HSWEG01_YRES UG2864HSWEG01_DEV_XRES
+#endif
+
+/* Color depth and format */
+
+#define UG2864HSWEG01_BPP 1
+#define UG2864HSWEG01_COLORFMT FB_FMT_Y1
+
+/* Bytes per logical row and actual device row */
+
+#define UG2864HSWEG01_XSTRIDE (UG2864HSWEG01_XRES >> 3)
+#define UG2864HSWEG01_YSTRIDE (UG2864HSWEG01_YRES >> 3)
+
+/* Default contrast */
+
+#define UG2864HSWEG01_CONTRAST (128)
+
+/* The size of the shadow frame buffer or one row buffer.
+ *
+ * Frame buffer size: 128 columns x 64 rows / 8 bits-per-pixel
+ * Row size: 128 columns x 8 rows-per-page / 8 bits-per-pixel
+ */
+
+#define UG2864HSWEG01_FBSIZE (UG2864HSWEG01_XSTRIDE * UG2864HSWEG01_YRES)
+#define UG2864HSWEG01_ROWSIZE (UG2864HSWEG01_XSTRIDE)
+
+/* Bit helpers */
+
+#define LS_BIT (1 << 0)
+#define MS_BIT (1 << 7)
+
+/* Debug ******************************************************************************/
+
+#ifdef CONFIG_DEBUG_LCD
+# define lcddbg(format, arg...) dbg(format, ##arg)
+# define lcdvdbg(format, arg...) vdbg(format, ##arg)
+#else
+# define lcddbg(x...)
+# define lcdvdbg(x...)
+#endif
+
+/**************************************************************************************
+ * Private Type Definition
+ **************************************************************************************/
+
+/* This structure describes the state of this driver */
+
+struct ug2864hsweg01_dev_s
+{
+ struct lcd_dev_s dev; /* Publically visible device structure */
+
+ /* Private LCD-specific information follows */
+
+ FAR struct spi_dev_s *spi; /* Cached SPI device reference */
+ uint8_t contrast; /* Current contrast setting */
+ bool on; /* true: display is on */
+
+
+ /* The SSD1306 does not support reading from the display memory in SPI mode.
+ * Since there is 1 BPP and access is byte-by-byte, it is necessary to keep
+ * a shadow copy of the framebuffer memory. At 128x64, this amounts to 1KB.
+ */
+
+ uint8_t fb[UG2864HSWEG01_FBSIZE];
+};
+
+/**************************************************************************************
+ * Private Function Protototypes
+ **************************************************************************************/
+
+/* Low-level SPI helpers */
+
+#ifdef CONFIG_SPI_OWNBUS
+static inline void ug2864hsweg01_configspi(FAR struct spi_dev_s *spi);
+# define ug2864hsweg01_lock(spi)
+# define ug2864hsweg01_unlock(spi)
+#else
+# define ug2864hsweg01_configspi(spi)
+static void ug2864hsweg01_lock(FAR struct spi_dev_s *spi);
+static void ug2864hsweg01_unlock(FAR struct spi_dev_s *spi);
+#endif
+
+/* LCD Data Transfer Methods */
+
+static int ug2864hsweg01_putrun(fb_coord_t row, fb_coord_t col,
+ FAR const uint8_t *buffer, size_t npixels);
+static int ug2864hsweg01_getrun(fb_coord_t row, fb_coord_t col, FAR uint8_t *buffer,
+ size_t npixels);
+
+/* LCD Configuration */
+
+static int ug2864hsweg01_getvideoinfo(FAR struct lcd_dev_s *dev,
+ FAR struct fb_videoinfo_s *vinfo);
+static int ug2864hsweg01_getplaneinfo(FAR struct lcd_dev_s *dev, unsigned int planeno,
+ FAR struct lcd_planeinfo_s *pinfo);
+
+/* LCD RGB Mapping */
+
+#ifdef CONFIG_FB_CMAP
+# error "RGB color mapping not supported by this driver"
+#endif
+
+/* Cursor Controls */
+
+#ifdef CONFIG_FB_HWCURSOR
+# error "Cursor control not supported by this driver"
+#endif
+
+/* LCD Specific Controls */
+
+static int ug2864hsweg01_getpower(struct lcd_dev_s *dev);
+static int ug2864hsweg01_setpower(struct lcd_dev_s *dev, int power);
+static int ug2864hsweg01_getcontrast(struct lcd_dev_s *dev);
+static int ug2864hsweg01_setcontrast(struct lcd_dev_s *dev, unsigned int contrast);
+
+/**************************************************************************************
+ * Private Data
+ **************************************************************************************/
+
+/* This is working memory allocated by the LCD driver for each LCD device
+ * and for each color plane. This memory will hold one raster line of data.
+ * The size of the allocated run buffer must therefore be at least
+ * (bpp * xres / 8). Actual alignment of the buffer must conform to the
+ * bitwidth of the underlying pixel type.
+ *
+ * If there are multiple planes, they may share the same working buffer
+ * because different planes will not be operate on concurrently. However,
+ * if there are multiple LCD devices, they must each have unique run buffers.
+ */
+
+static uint8_t g_runbuffer[UG2864HSWEG01_ROWSIZE];
+
+/* This structure describes the overall LCD video controller */
+
+static const struct fb_videoinfo_s g_videoinfo =
+{
+ .fmt = UG2864HSWEG01_COLORFMT, /* Color format: RGB16-565: RRRR RGGG GGGB BBBB */
+ .xres = UG2864HSWEG01_XRES, /* Horizontal resolution in pixel columns */
+ .yres = UG2864HSWEG01_YRES, /* Vertical resolution in pixel rows */
+ .nplanes = 1, /* Number of color planes supported */
+};
+
+/* This is the standard, NuttX Plane information object */
+
+static const struct lcd_planeinfo_s g_planeinfo =
+{
+ .putrun = ug2864hsweg01_putrun, /* Put a run into LCD memory */
+ .getrun = ug2864hsweg01_getrun, /* Get a run from LCD memory */
+ .buffer = (uint8_t*)g_runbuffer, /* Run scratch buffer */
+ .bpp = UG2864HSWEG01_BPP, /* Bits-per-pixel */
+};
+
+/* This is the OLED driver instance (only a single device is supported for now) */
+
+static struct ug2864hsweg01_dev_s g_oleddev =
+{
+ .dev =
+ {
+ /* LCD Configuration */
+
+ .getvideoinfo = ug2864hsweg01_getvideoinfo,
+ .getplaneinfo = ug2864hsweg01_getplaneinfo,
+
+ /* LCD RGB Mapping -- Not supported */
+ /* Cursor Controls -- Not supported */
+
+ /* LCD Specific Controls */
+
+ .getpower = ug2864hsweg01_getpower,
+ .setpower = ug2864hsweg01_setpower,
+ .getcontrast = ug2864hsweg01_getcontrast,
+ .setcontrast = ug2864hsweg01_setcontrast,
+ },
+};
+
+/**************************************************************************************
+ * Private Functions
+ **************************************************************************************/
+
+/**************************************************************************************
+ * Name: ug2864hsweg01_configspi
+ *
+ * Description:
+ * Configure the SPI for use with the UG-2864HSWEG01
+ *
+ * Input Parameters:
+ * spi - Reference to the SPI driver structure
+ *
+ * Returned Value:
+ * None
+ *
+ * Assumptions:
+ *
+ **************************************************************************************/
+
+#ifdef CONFIG_SPI_OWNBUS
+static inline void ug2864hsweg01_configspi(FAR struct spi_dev_s *spi)
+{
+ lcdvdbg("Mode: %d Bits: 8 Frequency: %d\n",
+ CONFIG_UG2864HSWEG01_SPIMODE, CONFIG_UG2864HSWEG01_FREQUENCY);
+
+ /* Configure SPI for the UG-2864HSWEG01. But only if we own the SPI bus. Otherwise,
+ * don't bother because it might change.
+ */
+
+ SPI_SETMODE(spi, CONFIG_UG2864HSWEG01_SPIMODE);
+ SPI_SETBITS(spi, 8);
+ SPI_SETFREQUENCY(spi, CONFIG_UG2864HSWEG01_FREQUENCY)
+}
+#endif
+
+/**************************************************************************************
+ * Name: ug2864hsweg01_lock
+ *
+ * Description:
+ * Select the SPI, locking and re-configuring if necessary
+ *
+ * Input Parameters:
+ * spi - Reference to the SPI driver structure
+ *
+ * Returned Value:
+ * None
+ *
+ * Assumptions:
+ *
+ **************************************************************************************/
+
+#ifndef CONFIG_SPI_OWNBUS
+static inline void ug2864hsweg01_lock(FAR struct spi_dev_s *spi)
+{
+ /* Lock the SPI bus if there are multiple devices competing for the SPI bus. */
+
+ SPI_LOCK(spi, true);
+
+ /* Now make sure that the SPI bus is configured for the UG-2864HSWEG01 (it
+ * might have gotten configured for a different device while unlocked)
+ */
+
+ SPI_SETMODE(spi, CONFIG_UG2864HSWEG01_SPIMODE);
+ SPI_SETBITS(spi, 8);
+ SPI_SETFREQUENCY(spi, CONFIG_UG2864HSWEG01_FREQUENCY);
+}
+#endif
+
+/**************************************************************************************
+ * Name: ug2864hsweg01_unlock
+ *
+ * Description:
+ * De-select the SPI
+ *
+ * Input Parameters:
+ * spi - Reference to the SPI driver structure
+ *
+ * Returned Value:
+ * None
+ *
+ * Assumptions:
+ *
+ **************************************************************************************/
+
+#ifndef CONFIG_SPI_OWNBUS
+static inline void ug2864hsweg01_unlock(FAR struct spi_dev_s *spi)
+{
+ /* De-select UG-2864HSWEG01 chip and relinquish the SPI bus. */
+
+ SPI_LOCK(spi, false);
+}
+#endif
+
+/**************************************************************************************
+ * Name: ug2864hsweg01_putrun
+ *
+ * Description:
+ * This method can be used to write a partial raster line to the LCD.
+ *
+ * Input Parameters:
+ * row - Starting row to write to (range: 0 <= row < yres)
+ * col - Starting column to write to (range: 0 <= col <= xres-npixels)
+ * buffer - The buffer containing the run to be written to the LCD
+ * npixels - The number of pixels to write to the LCD
+ * (range: 0 < npixels <= xres-col)
+ *
+ **************************************************************************************/
+
+#if defined(CONFIG_LCD_LANDSCAPE) || defined(CONFIG_LCD_RLANDSCAPE)
+static int ug2864hsweg01_putrun(fb_coord_t row, fb_coord_t col, FAR const uint8_t *buffer,
+ size_t npixels)
+{
+ /* Because of this line of code, we will only be able to support a single UG device */
+
+ FAR struct ug2864hsweg01_dev_s *priv = (FAR struct ug2864hsweg01_dev_s *)&g_oleddev;
+ FAR uint8_t *fbptr;
+ FAR uint8_t *ptr;
+ uint8_t devcol;
+ uint8_t fbmask;
+ uint8_t page;
+ uint8_t usrmask;
+ int pixlen;
+ uint8_t i;
+
+ lcdvdbg("row: %d col: %d npixels: %d\n", row, col, npixels);
+ DEBUGASSERT(buffer);
+
+ /* Clip the run to the display */
+
+ pixlen = npixels;
+ if ((unsigned int)col + (unsigned int)pixlen > (unsigned int)UG2864HSWEG01_XRES)
+ {
+ pixlen = (int)UG2864HSWEG01_XRES - (int)col;
+ }
+
+ /* Verify that some portion of the run remains on the display */
+
+ if (pixlen <= 0 || row > UG2864HSWEG01_YRES)
+ {
+ return OK;
+ }
+
+ /* Perform coordinate conversion for reverse landscape mode */
+
+#ifdef CONFIG_LCD_RLANDSCAPE
+ row = (UG2864HSWEG01_YRES-1) - row;
+ col = (UG2864HSWEG01_XRES-1) - col;
+#endif
+
+ /* Get the page number. The range of 64 lines is divided up into eight
+ * pages of 8 lines each.
+ */
+
+ page = row >> 3;
+
+ /* Update the shadow frame buffer memory. First determine the pixel
+ * position in the frame buffer memory. Pixels are organized like
+ * this:
+ *
+ * --------+---+---+---+---+-...-+-----+
+ * Segment | 0 | 1 | 2 | 3 | ... | 131 |
+ * --------+---+---+---+---+-...-+-----+
+ * D0 | | X | | | | |
+ * D1 | | X | | | | |
+ * D2 | | X | | | | |
+ * D3 | | X | | | | |
+ * D4 | | X | | | | |
+ * D5 | | X | | | | |
+ * D6 | | X | | | | |
+ * D7 | | X | | | | |
+ * --------+---+---+---+---+-...-+-----+
+ *
+ * So, in order to draw a white, horizontal line, at row 45. we
+ * would have to modify all of the bytes in page 45/8 = 5. We
+ * would have to set bit 45%8 = 5 in every byte in the page.
+ */
+
+ fbmask = 1 << (row & 7);
+ fbptr = &priv->fb[page * UG2864HSWEG01_XRES + col];
+#ifdef CONFIG_LCD_RLANDSCAPE
+ ptr = fbptr + pixlen - 1;
+#else
+ ptr = fbptr;
+#endif
+#ifdef CONFIG_NX_PACKEDMSFIRST
+ usrmask = MS_BIT;
+#else
+ usrmask = LS_BIT;
+#endif
+
+ for (i = 0; i < pixlen; i++)
+ {
+ /* Set or clear the corresponding bit */
+
+#ifdef CONFIG_LCD_RLANDSCAPE
+ if ((*buffer & usrmask) != 0)
+ {
+ *ptr-- |= fbmask;
+ }
+ else
+ {
+ *ptr-- &= ~fbmask;
+ }
+#else
+ if ((*buffer & usrmask) != 0)
+ {
+ *ptr++ |= fbmask;
+ }
+ else
+ {
+ *ptr++ &= ~fbmask;
+ }
+#endif
+
+ /* Inc/Decrement to the next source pixel */
+
+#ifdef CONFIG_NX_PACKEDMSFIRST
+ if (usrmask == LS_BIT)
+ {
+ buffer++;
+ usrmask = MS_BIT;
+ }
+ else
+ {
+ usrmask >>= 1;
+ }
+#else
+ if (usrmask == MS_BIT)
+ {
+ buffer++;
+ usrmask = LS_BIT;
+ }
+ else
+ {
+ usrmask <<= 1;
+ }
+#endif
+ }
+
+ /* Offset the column position to account for smaller horizontal
+ * display range.
+ */
+
+ devcol = col + UG2864HSWEG01_DEV_XOFFSET;
+
+ /* Lock and select device */
+
+ ug2864hsweg01_lock(priv->spi);
+ SPI_SELECT(priv->spi, SPIDEV_DISPLAY, true);
+
+ /* Select command transfer */
+
+ SPI_CMDDATA(priv->spi, SPIDEV_DISPLAY, true);
+
+ /* Set the starting position for the run */
+ /* Set the column address to the XOFFSET value */
+
+ SPI_SEND(priv->spi, SSD1306_SETCOLL(devcol & 0x0f));
+ SPI_SEND(priv->spi, SSD1306_SETCOLH(devcol >> 4));
+
+ /* Set the page address */
+
+ SPI_SEND(priv->spi, SSD1306_PAGEADDR(page));
+
+ /* Select data transfer */
+
+ SPI_CMDDATA(priv->spi, SPIDEV_DISPLAY, false);
+
+ /* Then transfer all of the data */
+
+ (void)SPI_SNDBLOCK(priv->spi, fbptr, pixlen);
+
+ /* De-select and unlock the device */
+
+ SPI_SELECT(priv->spi, SPIDEV_DISPLAY, false);
+ ug2864hsweg01_unlock(priv->spi);
+ return OK;
+}
+#else
+# error "Configuration not implemented"
+#endif
+
+/**************************************************************************************
+ * Name: ug2864hsweg01_getrun
+ *
+ * Description:
+ * This method can be used to read a partial raster line from the LCD:
+ *
+ * Description:
+ * This method can be used to write a partial raster line to the LCD.
+ *
+ * row - Starting row to read from (range: 0 <= row < yres)
+ * col - Starting column to read read (range: 0 <= col <= xres-npixels)
+ * buffer - The buffer in which to return the run read from the LCD
+ * npixels - The number of pixels to read from the LCD
+ * (range: 0 < npixels <= xres-col)
+ *
+ **************************************************************************************/
+
+#if defined(CONFIG_LCD_LANDSCAPE) || defined(CONFIG_LCD_RLANDSCAPE)
+static int ug2864hsweg01_getrun(fb_coord_t row, fb_coord_t col, FAR uint8_t *buffer,
+ size_t npixels)
+{
+ /* Because of this line of code, we will only be able to support a single UG device */
+
+ FAR struct ug2864hsweg01_dev_s *priv = &g_oleddev;
+ FAR uint8_t *fbptr;
+ uint8_t page;
+ uint8_t fbmask;
+ uint8_t usrmask;
+ int pixlen;
+ uint8_t i;
+
+ lcdvdbg("row: %d col: %d npixels: %d\n", row, col, npixels);
+ DEBUGASSERT(buffer);
+
+ /* Clip the run to the display */
+
+ pixlen = npixels;
+ if ((unsigned int)col + (unsigned int)pixlen > (unsigned int)UG2864HSWEG01_XRES)
+ {
+ pixlen = (int)UG2864HSWEG01_XRES - (int)col;
+ }
+
+ /* Verify that some portion of the run is actually the display */
+
+ if (pixlen <= 0 || row > UG2864HSWEG01_YRES)
+ {
+ return -EINVAL;
+ }
+
+ /* Perform coordinate conversion for reverse landscape mode */
+
+#ifdef CONFIG_LCD_RLANDSCAPE
+ row = (UG2864HSWEG01_YRES-1) - row;
+ col = (UG2864HSWEG01_XRES-1) - col;
+#endif
+
+ /* Then transfer the display data from the shadow frame buffer memory */
+ /* Get the page number. The range of 64 lines is divided up into eight
+ * pages of 8 lines each.
+ */
+
+ page = row >> 3;
+
+ /* Update the shadow frame buffer memory. First determine the pixel
+ * position in the frame buffer memory. Pixels are organized like
+ * this:
+ *
+ * --------+---+---+---+---+-...-+-----+
+ * Segment | 0 | 1 | 2 | 3 | ... | 131 |
+ * --------+---+---+---+---+-...-+-----+
+ * D0 | | X | | | | |
+ * D1 | | X | | | | |
+ * D2 | | X | | | | |
+ * D3 | | X | | | | |
+ * D4 | | X | | | | |
+ * D5 | | X | | | | |
+ * D6 | | X | | | | |
+ * D7 | | X | | | | |
+ * --------+---+---+---+---+-...-+-----+
+ *
+ * So, in order to draw a white, horizontal line, at row 45. we
+ * would have to modify all of the bytes in page 45/8 = 5. We
+ * would have to set bit 45%8 = 5 in every byte in the page.
+ */
+
+ fbmask = 1 << (row & 7);
+#ifdef CONFIG_LCD_RLANDSCAPE
+ fbptr = &priv->fb[page * (UG2864HSWEG01_XRES-1) + col + pixlen];
+#else
+ fbptr = &priv->fb[page * UG2864HSWEG01_XRES + col];
+#endif
+#ifdef CONFIG_NX_PACKEDMSFIRST
+ usrmask = MS_BIT;
+#else
+ usrmask = LS_BIT;
+#endif
+
+ *buffer = 0;
+ for (i = 0; i < pixlen; i++)
+ {
+ /* Set or clear the corresponding bit */
+
+#ifdef CONFIG_LCD_RLANDSCAPE
+ uint8_t byte = *fbptr--;
+#else
+ uint8_t byte = *fbptr++;
+#endif
+ if ((byte & fbmask) != 0)
+ {
+ *buffer |= usrmask;
+ }
+
+ /* Inc/Decrement to the next destination pixel. Hmmmm. It looks like
+ * this logic could write past the end of the user buffer. Revisit
+ * this!
+ */
+
+#ifdef CONFIG_NX_PACKEDMSFIRST
+ if (usrmask == LS_BIT)
+ {
+ buffer++;
+ *buffer = 0;
+ usrmask = MS_BIT;
+ }
+ else
+ {
+ usrmask >>= 1;
+ }
+#else
+ if (usrmask == MS_BIT)
+ {
+ buffer++;
+ *buffer = 0;
+ usrmask = LS_BIT;
+ }
+ else
+ {
+ usrmask <<= 1;
+ }
+#endif
+ }
+
+ return OK;
+}
+#else
+# error "Configuration not implemented"
+#endif
+
+/**************************************************************************************
+ * Name: ug2864hsweg01_getvideoinfo
+ *
+ * Description:
+ * Get information about the LCD video controller configuration.
+ *
+ **************************************************************************************/
+
+static int ug2864hsweg01_getvideoinfo(FAR struct lcd_dev_s *dev,
+ FAR struct fb_videoinfo_s *vinfo)
+{
+ DEBUGASSERT(dev && vinfo);
+ lcdvdbg("fmt: %d xres: %d yres: %d nplanes: %d\n",
+ g_videoinfo.fmt, g_videoinfo.xres, g_videoinfo.yres, g_videoinfo.nplanes);
+ memcpy(vinfo, &g_videoinfo, sizeof(struct fb_videoinfo_s));
+ return OK;
+}
+
+/**************************************************************************************
+ * Name: ug2864hsweg01_getplaneinfo
+ *
+ * Description:
+ * Get information about the configuration of each LCD color plane.
+ *
+ **************************************************************************************/
+
+static int ug2864hsweg01_getplaneinfo(FAR struct lcd_dev_s *dev, unsigned int planeno,
+ FAR struct lcd_planeinfo_s *pinfo)
+{
+ DEBUGASSERT(pinfo && planeno == 0);
+ lcdvdbg("planeno: %d bpp: %d\n", planeno, g_planeinfo.bpp);
+ memcpy(pinfo, &g_planeinfo, sizeof(struct lcd_planeinfo_s));
+ return OK;
+}
+
+/**************************************************************************************
+ * Name: ug2864hsweg01_getpower
+ *
+ * Description:
+ * Get the LCD panel power status (0: full off - CONFIG_LCD_MAXPOWER: full on. On
+ * backlit LCDs, this setting may correspond to the backlight setting.
+ *
+ **************************************************************************************/
+
+static int ug2864hsweg01_getpower(FAR struct lcd_dev_s *dev)
+{
+ FAR struct ug2864hsweg01_dev_s *priv = (FAR struct ug2864hsweg01_dev_s *)dev;
+ DEBUGASSERT(priv);
+
+ lcdvdbg("power: %s\n", priv->on ? "ON" : "OFF");
+ return priv->on ? CONFIG_LCD_MAXPOWER : 0;
+}
+
+/**************************************************************************************
+ * Name: ug2864hsweg01_setpower
+ *
+ * Description:
+ * Enable/disable LCD panel power (0: full off - CONFIG_LCD_MAXPOWER: full on). On
+ * backlit LCDs, this setting may correspond to the backlight setting.
+ *
+ **************************************************************************************/
+
+static int ug2864hsweg01_setpower(struct lcd_dev_s *dev, int power)
+{
+ struct ug2864hsweg01_dev_s *priv = (struct ug2864hsweg01_dev_s *)dev;
+ DEBUGASSERT(priv && (unsigned)power <= CONFIG_LCD_MAXPOWER && priv->spi);
+
+ lcdvdbg("power: %d [%d]\n", power, priv->on ? CONFIG_LCD_MAXPOWER : 0);
+
+ /* Lock and select device */
+
+ ug2864hsweg01_lock(priv->spi);
+ SPI_SELECT(priv->spi, SPIDEV_DISPLAY, true);
+
+ if (power <= 0)
+ {
+ /* Turn the display off */
+
+ (void)SPI_SEND(priv->spi, SSD1306_DISPOFF);
+ priv->on = false;
+ }
+ else
+ {
+ /* Turn the display on */
+
+ (void)SPI_SEND(priv->spi, SSD1306_DISPON); /* Display on, dim mode */
+ priv->on = true;
+ }
+
+ /* De-select and unlock the device */
+
+ SPI_SELECT(priv->spi, SPIDEV_DISPLAY, false);
+ ug2864hsweg01_unlock(priv->spi);
+ return OK;
+}
+
+/**************************************************************************************
+ * Name: ug2864hsweg01_getcontrast
+ *
+ * Description:
+ * Get the current contrast setting (0-CONFIG_LCD_MAXCONTRAST).
+ *
+ **************************************************************************************/
+
+static int ug2864hsweg01_getcontrast(struct lcd_dev_s *dev)
+{
+ struct ug2864hsweg01_dev_s *priv = (struct ug2864hsweg01_dev_s *)dev;
+ DEBUGASSERT(priv);
+
+ lcdvdbg("contrast: %d\n", priv->contrast);
+ return priv->contrast;
+}
+
+/**************************************************************************************
+ * Name: ug2864hsweg01_setcontrast
+ *
+ * Description:
+ * Set LCD panel contrast (0-CONFIG_LCD_MAXCONTRAST).
+ *
+ **************************************************************************************/
+
+static int ug2864hsweg01_setcontrast(struct lcd_dev_s *dev, unsigned int contrast)
+{
+ struct ug2864hsweg01_dev_s *priv = (struct ug2864hsweg01_dev_s *)dev;
+ unsigned int scaled;
+
+ lcdvdbg("contrast: %d\n", contrast);
+ DEBUGASSERT(priv);
+
+ /* Verify the contrast value */
+
+#ifdef CONFIG_DEBUG
+ if (contrast > CONFIG_LCD_MAXCONTRAST)
+ {
+ return -EINVAL;
+ }
+#endif
+
+ /* Scale contrast: newcontrast = 255 * contrast / CONFIG_LCD_MAXCONTRAST
+ * Where contrast is in the range {1,255}
+ */
+
+#if CONFIG_LCD_MAXCONTRAST != 255
+ scaled = ((contrast << 8) - 1) / CONFIG_LCD_MAXCONTRAST;
+#else
+ scaled = contrast;
+#endif
+
+ /* Lock and select device */
+
+ ug2864hsweg01_lock(priv->spi);
+ SPI_SELECT(priv->spi, SPIDEV_DISPLAY, true);
+
+ /* Select command transfer */
+
+ SPI_CMDDATA(priv->spi, SPIDEV_DISPLAY, true);
+
+ /* Set the contrast */
+
+ (void)SPI_SEND(priv->spi, SSD1306_CONTRAST_MODE); /* Set contrast control register */
+ (void)SPI_SEND(priv->spi, SSD1306_CONTRAST(scaled)); /* Data 1: Set 1 of 256 contrast steps */
+ priv->contrast = contrast;
+
+ /* De-select and unlock the device */
+
+ SPI_SELECT(priv->spi, SPIDEV_DISPLAY, false);
+ ug2864hsweg01_unlock(priv->spi);
+ return OK;
+}
+
+/**************************************************************************************
+ * Public Functions
+ **************************************************************************************/
+
+/**************************************************************************************
+ * Name: ug2864hsweg01_initialize
+ *
+ * Description:
+ * Initialize the UG-2864HSWEG01 video hardware. The initial state of the
+ * OLED is fully initialized, display memory cleared, and the OLED ready
+ * to use, but with the power setting at 0 (full off == sleep mode).
+ *
+ * Input Parameters:
+ *
+ * spi - A reference to the SPI driver instance.
+ * devno - A value in the range of 0 through CONFIG_UG2864HSWEG01_NINTERFACES-1.
+ * This allows support for multiple OLED devices.
+ *
+ * Returned Value:
+ *
+ * On success, this function returns a reference to the LCD object for
+ * the specified OLED. NULL is returned on any failure.
+ *
+ **************************************************************************************/
+
+FAR struct lcd_dev_s *ug2864hsweg01_initialize(FAR struct spi_dev_s *spi, unsigned int devno)
+{
+ FAR struct ug2864hsweg01_dev_s *priv = &g_oleddev;
+
+ lcdvdbg("Initializing\n");
+ DEBUGASSERT(spi && devno == 0);
+
+ /* Save the reference to the SPI device */
+
+ priv->spi = spi;
+
+ /* Configure the SPI */
+
+ ug2864hsweg01_configspi(spi)
+
+ /* Lock and select device */
+
+ ug2864hsweg01_lock(priv->spi);
+ SPI_SELECT(spi, SPIDEV_DISPLAY, true);
+
+ /* Select command transfer */
+
+ SPI_CMDDATA(spi, SPIDEV_DISPLAY, true);
+
+ /* Configure the device */
+
+ SPI_SEND(spi, SSD1306_DISPOFF); /* Display off 0xAE*/
+ SPI_SEND(spi, SSD1306_SETCOLL(0)); /* Set lower column address 0x00 */
+ SPI_SEND(spi, SSD1306_SETCOLH(0)); /* Set higher column address 0x10 */
+ SPI_SEND(spi, SSD1306_STARTLINE(0)); /* Set display start line 0x40*/
+ SPI_SEND(spi, SSD1306_PAGEADDR(0)); /* Set page address [¿ÉºöÂÔ] */
+ SPI_SEND(spi, SSD1306_CONTRAST_MODE); /* Contrast control 0x81*/
+ SPI_SEND(spi ,SSD1306_CONTRAST(UG2864HSWEG01_CONTRAST)); /* Default contrast 0xCF */
+ SPI_SEND(spi, SSD1306_REMAPPLEFT); /* Set segment remap left 95 to 0 | 0xA1*/
+ SPI_SEND(spi, SSD1306_EDISPOFF); /* Normal display :off 0xA4 [¶à³öµÄÒ»ÐÐ] */
+ SPI_SEND(spi, SSD1306_NORMAL); /* Normal (un-reversed) display mode 0xA6 */
+ SPI_SEND(spi, SSD1306_MRATIO_MODE); /* Multiplex ratio 0xA8*/
+ SPI_SEND(spi, SSD1306_MRATIO(0x3f)); /* Duty = 1/64 */
+ SPI_SEND(spi, SSD1306_SCANTOCOM0); /* Com scan direction: Scan from COM[n-1] to COM[0] [¿ÉºöÂÔ] */
+ SPI_SEND(spi, SSD1306_DISPOFFS_MODE); /* Set display offset 0xD3 */
+ SPI_SEND(spi, SSD1306_DISPOFFS(0));
+ SPI_SEND(spi, SSD1306_CLKDIV_SET); /* Set clock divider 0xD5*/
+ SPI_SEND(spi, SSD1306_CLKDIV(8,0)); /* 0x80 ? ¼ì²é ĬÈÏ0,0*/
+
+ SPI_SEND(spi, SSD1306_CHRGPER_SET); /* ++Set pre-charge period 0xD9*/
+ SPI_SEND(spi, SSD1306_CHRGPER(0x0f,1)); /* 0xf1 or 0x22£¨Ôöǿģʽ£¿£© */
+
+ SPI_SEND(spi, SSD1306_CMNPAD_CONFIG); /* Set common pads / set com pins hardware configuration 0xDA*/
+ SPI_SEND(spi, SSD1306_CMNPAD(0x12)); /* 0x12 ? ¼ì²é ĬÈÏ 0x10 */
+
+ SPI_SEND(spi, SSD1306_VCOM_SET); /* set vcomh 0xDB*/
+ SPI_SEND(spi, SSD1306_VCOM(0x40));
+
+ SPI_SEND(spi, SSD1306_CHRPUMP_SET); /* ++Set Charge Pump enable/disable 0x8D Ôö¼ÓµÄ*/
+ SPI_SEND(spi, SSD1306_CHRPUMP_ON); /* 0x14 */
+
+ //SPI_SEND(spi, SSD1306_DCDC_MODE); /* DC/DC control mode: on */
+ //SPI_SEND(spi, SSD1306_DCDC_ON);
+
+ SPI_SEND(spi, SSD1306_DISPON); /* display ON 0xAF */
+
+ /* De-select and unlock the device */
+
+ SPI_SELECT(spi, SPIDEV_DISPLAY, false);
+ ug2864hsweg01_unlock(priv->spi);
+
+ /* Clear the display */
+
+ up_mdelay(100);
+ ug2864hsweg01_fill(&priv->dev, UG_Y1_BLACK);
+ return &priv->dev;
+}
+
+/**************************************************************************************
+ * Name: ug2864hsweg01_fill
+ *
+ * Description:
+ * This non-standard method can be used to clear the entire display by writing one
+ * color to the display. This is much faster than writing a series of runs.
+ *
+ * Input Parameters:
+ * priv - Reference to private driver structure
+ *
+ * Assumptions:
+ * Caller has selected the OLED section.
+ *
+ **************************************************************************************/
+
+void ug2864hsweg01_fill(FAR struct lcd_dev_s *dev, uint8_t color)
+{
+ FAR struct ug2864hsweg01_dev_s *priv = &g_oleddev;
+ unsigned int page;
+
+ /* Make an 8-bit version of the selected color */
+
+ if (color & 1)
+ {
+ color = 0xff;
+ }
+ else
+ {
+ color = 0;
+ }
+
+ /* Initialize the framebuffer */
+
+ memset(priv->fb, color, UG2864HSWEG01_FBSIZE);
+
+ /* Lock and select device */
+
+ ug2864hsweg01_lock(priv->spi);
+ SPI_SELECT(priv->spi, SPIDEV_DISPLAY, true);
+
+ /* Visit each page */
+
+ for (page = 0; page < UG2864HSWEG01_DEV_PAGES; page++)
+ {
+ /* Select command transfer */
+
+ SPI_CMDDATA(priv->spi, SPIDEV_DISPLAY, true);
+
+ /* Set the column address to the XOFFSET value */
+
+ SPI_SEND(priv->spi, SSD1306_SETCOLL(UG2864HSWEG01_DEV_XOFFSET));
+ SPI_SEND(priv->spi, SSD1306_SETCOLH(0));
+
+ /* Set the page address */
+
+ SPI_SEND(priv->spi, SSD1306_PAGEADDR(page));
+
+ /* Select data transfer */
+
+ SPI_CMDDATA(priv->spi, SPIDEV_DISPLAY, false);
+
+ /* Transfer one page of the selected color */
+
+ (void)SPI_SNDBLOCK(priv->spi, &priv->fb[page * UG2864HSWEG01_XRES],
+ UG2864HSWEG01_XRES);
+ }
+
+ /* De-select and unlock the device */
+
+ SPI_SELECT(priv->spi, SPIDEV_DISPLAY, false);
+ ug2864hsweg01_unlock(priv->spi);
+}
+
+#endif /* CONFIG_LCD_UG2864HSWEG01 */
diff --git a/nuttx/drivers/usbhost/usbhost_hidkbd.c b/nuttx/drivers/usbhost/usbhost_hidkbd.c
index e0c4680ebb..5022793cac 100644
--- a/nuttx/drivers/usbhost/usbhost_hidkbd.c
+++ b/nuttx/drivers/usbhost/usbhost_hidkbd.c
@@ -1027,6 +1027,7 @@ static int usbhost_kbdpoll(int argc, char *argv[])
/* Loop here until the device is disconnected */
uvdbg("Entering poll loop\n");
+
while (!priv->disconnected)
{
/* Make sure that we have exclusive access to the private data
@@ -1169,10 +1170,10 @@ static int usbhost_kbdpoll(int argc, char *argv[])
#endif
}
- /* Did we just transition from no data available to data available? */
+ /* Is there data available? */
newstate = (priv->headndx == priv->tailndx);
- if (empty && !newstate)
+ if (!newstate)
{
/* Yes.. Is there a thread waiting for keyboard data now? */
@@ -1184,9 +1185,15 @@ static int usbhost_kbdpoll(int argc, char *argv[])
priv->waiting = false;
}
- /* And wake up any threads waiting for the POLLIN event */
+ /* Did we just transition from no data available to data
+ * available? If so, wake up any threads waiting for the
+ * POLLIN event.
+ */
- usbhost_pollnotify(priv);
+ if (empty)
+ {
+ usbhost_pollnotify(priv);
+ }
}
empty = newstate;
@@ -2146,6 +2153,7 @@ static ssize_t usbhost_read(FAR struct file *filep, FAR char *buffer, size_t len
/* Wait for data to be available */
uvdbg("Waiting...\n");
+
priv->waiting = true;
usbhost_givesem(&priv->exclsem);
usbhost_takesem(&priv->waitsem);
diff --git a/nuttx/include/nuttx/lcd/ug-2864hsweg01.h b/nuttx/include/nuttx/lcd/ug-2864hsweg01.h
new file mode 100644
index 0000000000..bbefd39be0
--- /dev/null
+++ b/nuttx/include/nuttx/lcd/ug-2864hsweg01.h
@@ -0,0 +1,245 @@
+/**************************************************************************************
+ * include/nuttx/lcd/ug-2864hsweg01.h
+ * Driver for Univision UG-2864HSWEG01 OLED display (wih SSD1306 controller) in SPI
+ * mode
+ *
+ * Copyright (C) 2012 Gregory Nutt. All rights reserved.
+ * Author: Gregory Nutt
+ *
+ * References:
+ * 1. Product Specification (Preliminary), Part Name: OEL Display Module, Part ID:
+ * UG-2864HSWEG01, Doc No: SAS1-9046-B, Univision Technology Inc.
+ * 2. SSD1306, 128 X 64 Dot Matrix OLED/PLED, Preliminary Segment/Common Driver with
+ * Controller, Solomon Systech
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ * 3. Neither the name NuttX nor the names of its contributors may be
+ * used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ **************************************************************************************/
+
+#ifndef __INCLUDE_NUTTX_UG_8264HSWEG01_H
+#define __INCLUDE_NUTTX_UG_8264HSWEG01_H
+
+/**************************************************************************************
+ * Included Files
+ **************************************************************************************/
+
+#include
+
+#include
+
+#include
+
+#ifdef CONFIG_LCD_UG2864HSWEG01
+
+/**************************************************************************************
+ * Pre-processor Definitions
+ **************************************************************************************/
+/* Configuration **********************************************************************/
+/* UG-2864HSWEG01 Configuration Settings:
+ *
+ * CONFIG_UG2864HSWEG01_SPIMODE - Controls the SPI mode
+ * CONFIG_UG2864HSWEG01_FREQUENCY - Define to use a different bus frequency
+ * CONFIG_UG2864HSWEG01_NINTERFACES - Specifies the number of physical UG-2864HSWEG01
+ * devices that will be supported.
+ *
+ * Required LCD driver settings:
+ *
+ * CONFIG_LCD_UG28HSWEG01 - Enable UG-2864HSWEG01 support
+ * CONFIG_LCD_MAXCONTRAST should be 255, but any value >0 and <=255 will be accepted.
+ * CONFIG_LCD_MAXPOWER must be 1
+ *
+ * Option LCD driver settings:
+ * CONFIG_LCD_LANDSCAPE, CONFIG_LCD_PORTRAIT, CONFIG_LCD_RLANDSCAPE, and
+ * CONFIG_LCD_RPORTRAIT - Display orientation.
+ *
+ * Required SPI driver settings:
+ * CONFIG_SPI_CMDDATA - Include support for cmd/data selection.
+ */
+
+/* SPI Interface
+ *
+ * "The serial interface consists of serial clock SCL, serial data SI, A0 and
+ * CS . SI is shifted into an 8-bit shift register on every rising edge of
+ * SCL in the order of D7, D6, … and D0. A0 is sampled on every eighth clock
+ * and the data byte in the shift register is written to the display data RAM
+ * or command register in the same clock."
+ *
+ * MODE 3:
+ * Clock polarity: High (CPOL=1)
+ * Clock phase: Sample on trailing (rising edge) (CPHA 1)
+ */
+
+#ifndef CONFIG_UG2864HSWEG01_SPIMODE
+# define CONFIG_UG2864HSWEG01_SPIMODE SPIDEV_MODE3
+#endif
+
+/* "This module determines whether the input data is interpreted as data or
+ * command. When A0 = “H”, the inputs at D7 - D0 are interpreted as data and be
+ * written to display RAM. When A0 = “L”, the inputs at D7 - D0 are interpreted
+ * as command, they will be decoded and be written to the corresponding command
+ * registers.
+ */
+
+#ifndef CONFIG_SPI_CMDDATA
+# error "CONFIG_SPI_CMDDATA must be defined in your NuttX configuration"
+#endif
+
+/* CONFIG_UG2864HSWEG01_NINTERFACES determines the number of physical interfaces
+ * that will be supported.
+ */
+
+#ifndef CONFIG_UG2864HSWEG01_NINTERFACES
+# define CONFIG_UG2864HSWEG01_NINTERFACES 1
+#endif
+
+/* Check contrast selection */
+
+#if !defined(CONFIG_LCD_MAXCONTRAST)
+# define CONFIG_LCD_MAXCONTRAST 255
+#endif
+
+#if CONFIG_LCD_MAXCONTRAST <= 0|| CONFIG_LCD_MAXCONTRAST > 255
+# error "CONFIG_LCD_MAXCONTRAST exceeds supported maximum"
+#endif
+
+#if CONFIG_LCD_MAXCONTRAST < 255
+# warning "Optimal setting of CONFIG_LCD_MAXCONTRAST is 255"
+#endif
+
+/* Check power setting */
+
+#if !defined(CONFIG_LCD_MAXPOWER)
+# define CONFIG_LCD_MAXPOWER 1
+#endif
+
+#if CONFIG_LCD_MAXPOWER != 1
+# warning "CONFIG_LCD_MAXPOWER exceeds supported maximum"
+# undef CONFIG_LCD_MAXPOWER
+# define CONFIG_LCD_MAXPOWER 1
+#endif
+
+/* Color is 1bpp monochrome with leftmost column contained in bits 0 */
+
+#ifdef CONFIG_NX_DISABLE_1BPP
+# warning "1 bit-per-pixel support needed"
+#endif
+
+/* Orientation */
+
+#if defined(CONFIG_LCD_LANDSCAPE)
+# undef CONFIG_LCD_PORTRAIT
+# undef CONFIG_LCD_RLANDSCAPE
+# undef CONFIG_LCD_RPORTRAIT
+#elif defined(CONFIG_LCD_PORTRAIT)
+# undef CONFIG_LCD_LANDSCAPE
+# undef CONFIG_LCD_RLANDSCAPE
+# undef CONFIG_LCD_RPORTRAIT
+#elif defined(CONFIG_LCD_RLANDSCAPE)
+# undef CONFIG_LCD_LANDSCAPE
+# undef CONFIG_LCD_PORTRAIT
+# undef CONFIG_LCD_RPORTRAIT
+#elif defined(CONFIG_LCD_RPORTRAIT)
+# undef CONFIG_LCD_LANDSCAPE
+# undef CONFIG_LCD_PORTRAIT
+# undef CONFIG_LCD_RLANDSCAPE
+#else
+# define CONFIG_LCD_LANDSCAPE 1
+# warning "Assuming landscape orientation"
+#endif
+
+/* Some important "colors" */
+
+#define UG_Y1_BLACK 0
+#define UG_Y1_WHITE 1
+
+/**************************************************************************************
+ * Public Types
+ **************************************************************************************/
+
+/**************************************************************************************
+ * Public Data
+ **************************************************************************************/
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+/**************************************************************************************
+ * Public Function Prototypes
+ **************************************************************************************/
+
+/**************************************************************************************
+ * Name: ug2864hsweg01_initialize
+ *
+ * Description:
+ * Initialize the UG-2864HSWEG01 video hardware. The initial state of the
+ * OLED is fully initialized, display memory cleared, and the OLED ready
+ * to use, but with the power setting at 0 (full off == sleep mode).
+ *
+ * Input Parameters:
+ *
+ * spi - A reference to the SPI driver instance.
+ * devno - A value in the range of 0 through CONFIG_UG2864HSWEG01_NINTERFACES-1.
+ * This allows support for multiple OLED devices.
+ *
+ * Returned Value:
+ *
+ * On success, this function returns a reference to the LCD object for
+ * the specified OLED. NULL is returned on any failure.
+ *
+ **************************************************************************************/
+
+struct lcd_dev_s; /* See include/nuttx/lcd/lcd.h */
+struct spi_dev_s; /* See include/nuttx/spi.h */
+FAR struct lcd_dev_s *ug2864hsweg01_initialize(FAR struct spi_dev_s *spi,
+ unsigned int devno);
+
+/************************************************************************************************
+ * Name: ug2864hsweg01_fill
+ *
+ * Description:
+ * This non-standard method can be used to clear the entire display by writing one
+ * color to the display. This is much faster than writing a series of runs.
+ *
+ * Input Parameters:
+ * priv - Reference to private driver structure
+ *
+ * Assumptions:
+ * Caller has selected the OLED section.
+ *
+ **************************************************************************************/
+
+void ug2864hsweg01_fill(FAR struct lcd_dev_s *dev, uint8_t color);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* CONFIG_LCD_UG2864HSWEG01 */
+#endif /* __INCLUDE_NUTTX_UG_8264HSWEG01_H */
From 88bccb641eccf8ca1a91ab0583976a211deb1ed5 Mon Sep 17 00:00:00 2001
From: patacongo
Date: Wed, 26 Dec 2012 21:37:50 +0000
Subject: [PATCH 016/118] Verified USB HID KBD driver encoding of special
characters; apps/examples/hidkbd now decodes encoded keyboar characters.
git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5463 42af7a65-404d-4744-a932-0658087f49c3
---
apps/ChangeLog.txt | 2 +
apps/examples/README.txt | 16 ++-
apps/examples/hidkbd/Kconfig | 31 +++++
apps/examples/hidkbd/hidkbd_main.c | 106 +++++++++++++++++-
.../olimex-lpc1766stk/hidkbd/defconfig | 20 +++-
nuttx/drivers/usbhost/Kconfig | 4 +-
nuttx/drivers/usbhost/usbhost_hidkbd.c | 34 +++---
nuttx/include/nuttx/input/kbd_codec.h | 5 +-
nuttx/libc/Kconfig | 28 +++++
nuttx/libc/math/Kconfig | 2 +-
nuttx/libc/misc/Make.defs | 8 +-
11 files changed, 233 insertions(+), 23 deletions(-)
diff --git a/apps/ChangeLog.txt b/apps/ChangeLog.txt
index ea1b247f51..d156b10657 100644
--- a/apps/ChangeLog.txt
+++ b/apps/ChangeLog.txt
@@ -453,4 +453,6 @@
in place early in the dependency generation phase to avoid warnings.
It is not important if they are only stubbed out header files at
this build phase.
+ * apps/examples/hidbkd: Now supports decoding of encoded special keys
+ if CONFIG_EXAMPLES_HIDKBD_ENCODED is defined.
diff --git a/apps/examples/README.txt b/apps/examples/README.txt
index e40a63be9e..7bfba721a6 100644
--- a/apps/examples/README.txt
+++ b/apps/examples/README.txt
@@ -540,9 +540,21 @@ examples/hidkbd
This is a simple test to debug/verify the USB host HID keyboard class
driver.
- CONFIG_EXAMPLES_HIDKBD_DEFPRIO - Priority of "waiter" thread.
- CONFIG_EXAMPLES_HIDKBD_STACKSIZE - Stacksize of "waiter" thread.
+ CONFIG_EXAMPLES_HIDKBD_DEFPRIO - Priority of "waiter" thread. Default:
+ 50
+ CONFIG_EXAMPLES_HIDKBD_STACKSIZE - Stacksize of "waiter" thread. Default
+ 1024
+ CONFIG_EXAMPLES_HIDKBD_DEVNAME - Name of keyboard device to be used.
+ Default: "/dev/kbda"
+ CONFIG_EXAMPLES_HIDKBD_ENCODED - Decode special key press events in the
+ user buffer. In this case, the example coded will use the interfaces
+ defined in include/nuttx/input/kbd_codec.h to decode the returned
+ keyboard data. These special keys include such things as up/down
+ arrows, home and end keys, etc. If this not defined, only 7-bit print-
+ able and control ASCII characters will be provided to the user.
+ Requires CONFIG_HIDKBD_ENCODED && CONFIG_LIB_KBDCODEC
+endif
examples/igmp
^^^^^^^^^^^^^
diff --git a/apps/examples/hidkbd/Kconfig b/apps/examples/hidkbd/Kconfig
index 503d9d9d9c..81f817ef9b 100644
--- a/apps/examples/hidkbd/Kconfig
+++ b/apps/examples/hidkbd/Kconfig
@@ -10,4 +10,35 @@ config EXAMPLES_HIDKBD
Enable the USB HID keyboard example
if EXAMPLES_HIDKBD
+
+config EXAMPLES_HIDKBD_DEFPRIO
+ int "Waiter Thread Priority"
+ default 50
+ ---help---
+ Priority of "waiter" thread. Default: 50
+
+config EXAMPLES_HIDKBD_STACKSIZE
+ int "Waiter Thread Stack Size"
+ default 1024
+ ---help---
+ Stacksize of "waiter" thread. Default 1024
+
+config EXAMPLES_HIDKBD_DEVNAME
+ string "Keyboard Device Name"
+ default "/dev/kbda"
+ ---help---
+ Name of keyboard device to be used. Default: "/dev/kbda"
+
+config EXAMPLES_HIDKBD_ENCODED
+ bool "Encode Special Keys"
+ default y
+ depends on HIDKBD_ENCODED && LIB_KBDCODEC
+ ---help---
+ Decode special key press events in the user buffer. In this case,
+ the example coded will use the interfaces defined in
+ include/nuttx/input/kbd_codec.h to decode the returned keyboard
+ data. These special keys include such things as up/down arrows,
+ home and end keys, etc. If this not defined, only 7-bit print-able
+ and control ASCII characters will be provided to the user.
+
endif
diff --git a/apps/examples/hidkbd/hidkbd_main.c b/apps/examples/hidkbd/hidkbd_main.c
index 8c9f6fa95f..8a632bab75 100644
--- a/apps/examples/hidkbd/hidkbd_main.c
+++ b/apps/examples/hidkbd/hidkbd_main.c
@@ -46,10 +46,18 @@
#include
#include
#include
+#include
+#include
+#include
#include
#include
+#ifdef CONFIG_EXAMPLES_HIDKBD_ENCODED
+# include
+# include
+#endif
+
/****************************************************************************
* Definitions
****************************************************************************/
@@ -83,10 +91,23 @@
# define CONFIG_EXAMPLES_HIDKBD_DEVNAME "/dev/kbda"
#endif
+#if !defined(CONFIG_HIDKBD_ENCODED) || !defined(CONFIG_LIB_KBDCODEC)
+# undef CONFIG_EXAMPLES_HIDKBD_ENCODED
+#endif
+
/****************************************************************************
* Private Types
****************************************************************************/
+#ifdef CONFIG_EXAMPLES_HIDKBD_ENCODED
+struct hidbkd_instream_s
+{
+ struct lib_instream_s stream;
+ FAR char *buffer;
+ ssize_t nbytes;
+};
+#endif
+
/****************************************************************************
* Private Data
****************************************************************************/
@@ -98,9 +119,84 @@ static struct usbhost_driver_s *g_drvr;
****************************************************************************/
/****************************************************************************
- * Public Functions
+ * Name: hidkbd_getstream
+ *
+ * Description:
+ * Get one character from the keyboard.
+ *
****************************************************************************/
+#ifdef CONFIG_EXAMPLES_HIDKBD_ENCODED
+static int hidkbd_getstream(FAR struct lib_instream_s *this)
+{
+ FAR struct hidbkd_instream_s *kbdstream = (FAR struct hidbkd_instream_s *)this;
+
+ DEBUGASSERT(kbdstream && kbdstream->buffer);
+ if (kbdstream->nbytes > 0)
+ {
+ kbdstream->nbytes--;
+ kbdstream->stream.nget++;
+ return (int)*kbdstream->buffer++;
+ }
+
+ return EOF;
+}
+#endif
+
+/****************************************************************************
+ * Name: hidkbd_decode
+ *
+ * Description:
+ * Decode encoded keyboard input
+ *
+ ****************************************************************************/
+
+#ifdef CONFIG_EXAMPLES_HIDKBD_ENCODED
+static void hidkbd_decode(FAR char *buffer, ssize_t nbytes)
+{
+ struct hidbkd_instream_s kbdstream;
+ struct kbd_getstate_s state;
+ uint8_t ch;
+ int ret;
+
+ /* Initialize */
+
+ memset(&state, 0, sizeof(struct kbd_getstate_s));
+ kbdstream.stream.get = hidkbd_getstream;
+ kbdstream.stream.nget = 0;
+ kbdstream.buffer = buffer;
+ kbdstream.nbytes = nbytes;
+
+ /* Loop until all of the bytes have been consumed. We implicitly assume
+ * that the the escaped sequences do not cross buffer boundaries. That
+ * might be true if the read buffer were small or the data rates high.
+ */
+
+ for (;;)
+ {
+ /* Decode the next thing from the buffer */
+
+ ret = kbd_get((FAR struct lib_instream_s *)&kbdstream, &state, &ch);
+ if (ret == KBD_ERROR)
+ {
+ break;
+ }
+
+ /* Normal data? Or special key? */
+
+ if (ret == KBD_NORMAL)
+ {
+ printf("Data: %c [%02x]\n", isprint(ch) ? ch : '.', ch);
+ }
+ else
+ {
+ DEBUGASSERT(ret == KBD_SPECIAL);
+ printf("Special: %d\n", ch);
+ }
+ }
+}
+#endif
+
/****************************************************************************
* Name: hidkbd_waiter
*
@@ -140,6 +236,10 @@ static int hidkbd_waiter(int argc, char *argv[])
return 0;
}
+/****************************************************************************
+ * Public Functions
+ ****************************************************************************/
+
/****************************************************************************
* Name: hidkbd_main
****************************************************************************/
@@ -217,7 +317,11 @@ int hidkbd_main(int argc, char *argv[])
{
/* On success, echo the buffer to stdout */
+#ifdef CONFIG_EXAMPLES_HIDKBD_ENCODED
+ hidkbd_decode(buffer, nbytes);
+#else
(void)write(1, buffer, nbytes);
+#endif
}
}
while (nbytes > 0);
diff --git a/nuttx/configs/olimex-lpc1766stk/hidkbd/defconfig b/nuttx/configs/olimex-lpc1766stk/hidkbd/defconfig
index 78e4115609..35a7bfc3db 100755
--- a/nuttx/configs/olimex-lpc1766stk/hidkbd/defconfig
+++ b/nuttx/configs/olimex-lpc1766stk/hidkbd/defconfig
@@ -316,7 +316,10 @@ CONFIG_DEV_NULL=y
# CONFIG_WATCHDOG is not set
# CONFIG_ANALOG is not set
# CONFIG_BCH is not set
-# CONFIG_INPUT is not set
+CONFIG_INPUT=y
+# CONFIG_INPUT_TSC2007 is not set
+# CONFIG_INPUT_ADS7843E is not set
+# CONFIG_INPUT_STMPE811 is not set
# CONFIG_LCD is not set
CONFIG_MMCSD=y
CONFIG_MMCSD_NSLOTS=1
@@ -364,7 +367,7 @@ CONFIG_HIDKBD_STACKSIZE=1024
CONFIG_HIDKBD_BUFSIZE=64
CONFIG_HIDKBD_NPOLLWAITERS=2
# CONFIG_HIDKBD_RAWSCANCODES is not set
-# CONFIG_HIDKBD_ENCODED is not set
+CONFIG_HIDKBD_ENCODED=y
# CONFIG_HIDKBD_ALLSCANCODES is not set
# CONFIG_HIDKBD_NODEBOUNCE is not set
# CONFIG_WIRELESS is not set
@@ -425,6 +428,10 @@ CONFIG_MM_REGIONS=2
#
# Library Routines
#
+
+#
+# Standard C Library Options
+#
CONFIG_STDIO_BUFFER_SIZE=256
CONFIG_STDIO_LINEBUFFER=y
CONFIG_NUNGET_CHARS=2
@@ -443,6 +450,11 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512
# CONFIG_ARCH_ROMGETC is not set
# CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set
+#
+# Non-standard Helper Functions
+#
+CONFIG_LIB_KBDCODEC=y
+
#
# Basic CXX Support
#
@@ -473,6 +485,10 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512
# CONFIG_EXAMPLES_HELLOXX is not set
# CONFIG_EXAMPLES_JSON is not set
CONFIG_EXAMPLES_HIDKBD=y
+CONFIG_EXAMPLES_HIDKBD_DEFPRIO=50
+CONFIG_EXAMPLES_HIDKBD_STACKSIZE=1024
+CONFIG_EXAMPLES_HIDKBD_DEVNAME="/dev/kbda"
+CONFIG_EXAMPLES_HIDKBD_ENCODED=y
# CONFIG_EXAMPLES_KEYPADTEST is not set
# CONFIG_EXAMPLES_IGMP is not set
# CONFIG_EXAMPLES_LCDRW is not set
diff --git a/nuttx/drivers/usbhost/Kconfig b/nuttx/drivers/usbhost/Kconfig
index de8469b41d..531e94442c 100644
--- a/nuttx/drivers/usbhost/Kconfig
+++ b/nuttx/drivers/usbhost/Kconfig
@@ -89,10 +89,10 @@ config HIDKBD_RAWSCANCODES
config HIDKBD_ENCODED
bool "Enocode Special Keys"
default n
- depends on !HIDKBD_RAWSCANCODES
+ depends on !HIDKBD_RAWSCANCODES && LIB_KBDCODEC
---help---
Encode special key press events in the user buffer. In this case,
- the use end must decode the encoded special key values using the
+ the user end must decode the encoded special key values using the
interfaces defined in include/nuttx/input/kbd_codec.h. These
special keys include such things as up/down arrows, home and end
keys, etc. If this not defined, only 7-bit print-able and control
diff --git a/nuttx/drivers/usbhost/usbhost_hidkbd.c b/nuttx/drivers/usbhost/usbhost_hidkbd.c
index 5022793cac..917ebfa3f2 100644
--- a/nuttx/drivers/usbhost/usbhost_hidkbd.c
+++ b/nuttx/drivers/usbhost/usbhost_hidkbd.c
@@ -131,6 +131,14 @@
# endif
#endif
+/* We cant support encoding of special characters of unless the Keyboard
+ * CODEC is enabled.
+ */
+
+#ifndef CONFIG_LIB_KBDCODEC
+# undef CONFIG_HIDKBD_ENCODED
+#endif
+
/* If we are using raw scancodes, then we cannot support encoding of
* special characters either.
*/
@@ -398,11 +406,11 @@ static struct usbhost_state_s *g_priv; /* Data passed to thread */
/* The first and last scancode values with encode-able values */
-#define FIRST_ENCODING USBHID_KBDUSE_ENTER /* 0x28 Keyboard Return (ENTER) */
-#ifdef CONFIG_HIDKBD_ALLSCANCODES
-# define LAST_ENCODING USBHID_KBDUSE_POWER /* 0x66 Keyboard Power */
+#define FIRST_ENCODING USBHID_KBDUSE_ENTER /* 0x28 Keyboard Return (ENTER) */
+#ifndef CONFIG_HIDKBD_ALLSCANCODES
+# define LAST_ENCODING USBHID_KBDUSE_POWER /* 0x66 Keyboard Power */
#else
-#define LAST_ENCODING USBHID_KBDUSE_KPDHEXADECIMAL /* 0xdd Keypad Hexadecimal */
+# define LAST_ENCODING USBHID_KBDUSE_KPDHEXADECIMAL /* 0xdd Keypad Hexadecimal */
#endif
#define USBHID_NUMENCODINGS (LAST_ENCODING - FIRST_ENCODING + 1)
@@ -874,10 +882,10 @@ static void usbhost_putbuffer(FAR struct usbhost_state_s *priv,
#ifdef CONFIG_HIDKBD_ENCODED
static void usbhost_putstream(FAR struct lib_outstream_s *stream, int ch)
{
- FAR struct usbhost_outstream_s *privstream = (FAR struct lib_outstream_s *)stream;
+ FAR struct usbhost_outstream_s *privstream = (FAR struct usbhost_outstream_s *)stream;
DEBUGASSERT(privstream && privstream->priv);
- usbhost_putbuffer(privstream->priv), (uint8_t)ch);
+ usbhost_putbuffer(privstream->priv, (uint8_t)ch);
stream->nput++;
}
#endif
@@ -945,7 +953,6 @@ static inline uint8_t usbhost_mapscancode(uint8_t scancode, uint8_t modifier)
static inline void usbhost_encodescancode(FAR struct usbhost_state_s *priv,
uint8_t scancode, uint8_t modifier)
{
- struct usbhost_outstream_s stream;
uint8_t encoded;
/* Check if the raw scancode is in a valid range */
@@ -954,7 +961,7 @@ static inline void usbhost_encodescancode(FAR struct usbhost_state_s *priv,
{
/* Yes the value is within range */
- encoded = encoding(scancode - FIRST_ENCODING);
+ encoded = encoding[scancode - FIRST_ENCODING];
ivdbg(" scancode: %02x modifier: %02x encoded: %d\n",
scancode, modifier, encoded);
@@ -964,13 +971,14 @@ static inline void usbhost_encodescancode(FAR struct usbhost_state_s *priv,
/* And it does correspond to a special function key */
- usbstream->stream.put = usbhost_putstream;
- usbstream->stream.nput = 0;
- usbstream->priv = priv;
+ usbstream.stream.put = usbhost_putstream;
+ usbstream.stream.nput = 0;
+ usbstream.priv = priv;
/* Add the special function value to the user buffer */
- kbd_putspecial((enum kbd_keycode_e)encoded, &usbstream);
+ kbd_putspecial((enum kbd_keycode_e)encoded,
+ (FAR struct lib_outstream_s *)&usbstream);
}
}
}
@@ -1156,7 +1164,7 @@ static int usbhost_kbdpoll(int argc, char *argv[])
#ifdef CONFIG_HIDKBD_ENCODED
else
{
- usbhost_encodescancode(priv, rpt->key[i], rpt->modifier));
+ usbhost_encodescancode(priv, rpt->key[i], rpt->modifier);
}
#endif
}
diff --git a/nuttx/include/nuttx/input/kbd_codec.h b/nuttx/include/nuttx/input/kbd_codec.h
index d374ed8d3a..0a3a54d2dc 100644
--- a/nuttx/include/nuttx/input/kbd_codec.h
+++ b/nuttx/include/nuttx/input/kbd_codec.h
@@ -44,6 +44,8 @@
#include
#include
+#ifdef CONFIG_LIB_KBDCODEC
+
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
@@ -87,7 +89,7 @@ enum kbd_keycode_e
KEYCODE_CUT, /* Cut */
KEYCODE_COPY, /* Copy */
KEYCODE_PASTE, /* Paste */
- KEYCODE_FIND , /* Find */
+ KEYCODE_FIND, /* Find */
/* Selection codes */
@@ -294,5 +296,6 @@ int kbd_get(FAR struct lib_instream_s *stream,
}
#endif
+#endif /* CONFIG_LIB_KBDCODEC */
#endif /* __INCLUDE_NUTTX_INPUT_KBD_CODEC_H */
diff --git a/nuttx/libc/Kconfig b/nuttx/libc/Kconfig
index bd470be7f5..a5ff7fd438 100644
--- a/nuttx/libc/Kconfig
+++ b/nuttx/libc/Kconfig
@@ -3,6 +3,8 @@
# see misc/tools/kconfig-language.txt.
#
+comment "Standard C Library Options"
+
config STDIO_BUFFER_SIZE
int "C STDIO buffer size"
default 64
@@ -273,3 +275,29 @@ config ARCH_BZERO
of bzero().
endif
+
+comment "Non-standard Helper Functions"
+
+config LIB_KBDCODEC
+ bool "Keyboard CODEC"
+ default y
+ ---help---
+ In NuttX, a keyboard/keypad driver is simply a character driver that
+ may have an (optional) encoding/decoding layer on the data returned
+ by the character driver. A keyboard may return simple text data
+ (alphabetic, numeric, and punctuaction) or control characters
+ (enter, control-C, etc.). We can think about this the normal
+ "in-band" keyboard data stream. However, in addition, most
+ keyboards support actions that cannot be represented as text data.
+ Such actions include things like cursor controls (home, up arrow,
+ page down, etc.), editing functions (insert, delete, etc.), volume
+ controls, (mute, volume up, etc.) and other special functions. We
+ can think about this as special, "out-of-band" keyboard commands.
+ In this case, some special encoding may be required to multiplex
+ the in-band text data and out-of-band command streams.
+
+ This option enables the functions that implement the encoding and
+ decoding of keyboard data. These are the interfaces prototyped in
+ include/nuttx/input/kbd_codec.h. While not correctly a part of
+ the C library, it is included here because the decoding side of this
+ interface must be accessible by end user programs.
diff --git a/nuttx/libc/math/Kconfig b/nuttx/libc/math/Kconfig
index c24bfd53f3..db9dfae638 100644
--- a/nuttx/libc/math/Kconfig
+++ b/nuttx/libc/math/Kconfig
@@ -4,7 +4,7 @@
#
config LIBM
- bool "Math library"
+ bool "Standard Math library"
default n
depends on !ARCH_MATH_H
---help---
diff --git a/nuttx/libc/misc/Make.defs b/nuttx/libc/misc/Make.defs
index c6af5f8604..ad0313346b 100644
--- a/nuttx/libc/misc/Make.defs
+++ b/nuttx/libc/misc/Make.defs
@@ -35,7 +35,7 @@
# Add the internal C files to the build
-CSRCS += lib_init.c lib_filesem.c lib_kbdencode.c lib_kbddecode.c
+CSRCS += lib_init.c lib_filesem.c
# Add C files that depend on file OR socket descriptors
@@ -63,6 +63,12 @@ CSRCS += lib_match.c
CSRCS += lib_crc32.c
CSRCS += lib_dbg.c lib_dumpbuffer.c
+# Keyboard driver encoder/decoder
+
+ifneq ($(CONFIG_LIB_KBDCODEC),0)
+CSRCS += lib_kbdencode.c lib_kbddecode.c
+endif
+
# Add the misc directory to the build
DEPPATH += --dep-path misc
From 954529e8c571cd7c2cc5963259d7eef46f6f5429 Mon Sep 17 00:00:00 2001
From: patacongo
Date: Thu, 27 Dec 2012 14:01:59 +0000
Subject: [PATCH 017/118] Add support for key release events
git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5464 42af7a65-404d-4744-a932-0658087f49c3
---
apps/ChangeLog.txt | 5 +-
apps/examples/hidkbd/hidkbd_main.c | 33 +++--
nuttx/ChangeLog | 4 +
nuttx/Documentation/NuttxPortingGuide.html | 140 ++++++++++++++++-----
nuttx/drivers/usbhost/usbhost_hidkbd.c | 8 +-
nuttx/include/nuttx/input/kbd_codec.h | 100 +++++++++++----
nuttx/libc/misc/lib_kbddecode.c | 99 ++++++++-------
nuttx/libc/misc/lib_kbdencode.c | 105 +++++++++++++---
8 files changed, 359 insertions(+), 135 deletions(-)
diff --git a/apps/ChangeLog.txt b/apps/ChangeLog.txt
index d156b10657..d6a2f9d907 100644
--- a/apps/ChangeLog.txt
+++ b/apps/ChangeLog.txt
@@ -455,4 +455,7 @@
this build phase.
* apps/examples/hidbkd: Now supports decoding of encoded special keys
if CONFIG_EXAMPLES_HIDKBD_ENCODED is defined.
-
+ * apps/examples/hidbkd: Add support for decoding key release events
+ as well. However, the USB HID keyboard drier has not yet been
+ updated to detect key release events. That is kind of tricky in
+ the USB HID keyboard report data.
diff --git a/apps/examples/hidkbd/hidkbd_main.c b/apps/examples/hidkbd/hidkbd_main.c
index 8a632bab75..d7e79b1216 100644
--- a/apps/examples/hidkbd/hidkbd_main.c
+++ b/apps/examples/hidkbd/hidkbd_main.c
@@ -176,7 +176,7 @@ static void hidkbd_decode(FAR char *buffer, ssize_t nbytes)
{
/* Decode the next thing from the buffer */
- ret = kbd_get((FAR struct lib_instream_s *)&kbdstream, &state, &ch);
+ ret = kbd_decode((FAR struct lib_instream_s *)&kbdstream, &state, &ch);
if (ret == KBD_ERROR)
{
break;
@@ -184,14 +184,31 @@ static void hidkbd_decode(FAR char *buffer, ssize_t nbytes)
/* Normal data? Or special key? */
- if (ret == KBD_NORMAL)
+ switch (ret)
{
- printf("Data: %c [%02x]\n", isprint(ch) ? ch : '.', ch);
- }
- else
- {
- DEBUGASSERT(ret == KBD_SPECIAL);
- printf("Special: %d\n", ch);
+ case KBD_PRESS: /* Key press event */
+ printf("Normal Press: %c [%02x]\n", isprint(ch) ? ch : '.', ch);
+ break;
+
+ case KBD_RELEASE: /* Key release event */
+ printf("Normal Release: %c [%02x]\n", isprint(ch) ? ch : '.', ch);
+ break;
+
+ case KBD_SPECPRESS: /* Special key press event */
+ printf("Special Press: %d\n", ch);
+ break;
+
+ case KBD_SPECREL: /* Special key release event */
+ printf("Special Release: %d\n", ch);
+ break;
+
+ case KBD_ERROR: /* Error or end-of-file */
+ printf("EOF: %d\n", ret);
+ break;
+
+ default:
+ printf("Unexpected: %d\n", ret);
+ break;
}
}
}
diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog
index a7087656ae..2e114af8c7 100644
--- a/nuttx/ChangeLog
+++ b/nuttx/ChangeLog
@@ -3832,4 +3832,8 @@
UG-2864HSWEG01 OLED for the STM32F4Discovery board.
* drivers/usbhost/usbhost_hidkbd.c: Correct a logic error in how
tasks waiting for read data are awakened.
+ * libc/misc/lib_kbdencode.c and lib_kbddecode.c: Now handles keypress
+ events too. However, the USB HID keyboard drier has not yet been
+ updated to detect key release events. That is kind of tricky in
+ the USB HID keyboard report data.
diff --git a/nuttx/Documentation/NuttxPortingGuide.html b/nuttx/Documentation/NuttxPortingGuide.html
index ebb3eff4bf..e626bf7a57 100644
--- a/nuttx/Documentation/NuttxPortingGuide.html
+++ b/nuttx/Documentation/NuttxPortingGuide.html
@@ -3623,20 +3623,27 @@ extern void up_ledoff(int led);
- "Out-of-Band" Commands.
- Keyboards and keypads are the same device for NuttX.
+ Keypads vs. Keyboards
+ Keyboards and keypads are really the same devices for NuttX.
A keypad is thought of as simply a keyboard with fewer keys.
+
+
+ Special Commands.
In NuttX, a keyboard/keypad driver is simply a character driver that may have an (optional) encoding/decoding layer on the data returned by the character driver.
- A keyboard may return simple text data (alphabetic, numeric, and punctuaction) or control characters (enter, control-C, etc.).
- We can think about this the normal "in-band" keyboard data stream.
- However, in addition, most keyboards support actions that cannot be represented as text data.
+ A keyboard may return simple text data (alphabetic, numeric, and punctuaction) or control characters (enter, control-C, etc.) when a key is pressed.
+ We can think about this the "normal" keyboard data stream.
+ However, in addition, most keyboards support actions that cannot be represented as text or control data.
Such actions include things like cursor controls (home, up arrow, page down, etc.), editing functions (insert, delete, etc.), volume controls, (mute, volume up, etc.) and other special functions.
- We can think about this as special, "out-of-band" keyboard commands.
- In this case, some special encoding may be required to multiplex the in-band text data and out-of-band command streams.
+ In this case, some special encoding may be required to multiplex the normal text data and special command key press data streams.
+
+
+ Key Press and Release Events
+ Sometimes the time that a key is released is needed by applications as well.
+ Thus, in addition to normal and special key press events, it may also be necessary to encode normal and special key release events.
Encoding/Decoding Layer.
- An optional encoding/decoding layer can be used with the basic character driver to encode the out-of-band commands into the text data stream.
+ An optional encoding/decoding layer can be used with the basic character driver to encode the keyboard events into the text data stream.
The function interfaces that comprise that encoding/decoding layer are defined in the header file include/nuttx/input/kbd_code.h.
These functions provide an matched set of (a) driver encoding interfaces, and (b) application decoding interfaces.
@@ -3644,21 +3651,23 @@ extern void up_ledoff(int led);
-
Driver Encoding Interfaces.
+ These are interfaces used by the keyboard/keypad driver to encode keyboard events and data.
-
- kbd_puttext()
+ kbd_press()
Function Prototype:
#include <nuttx/streams.h>
#include <nuttx/input/kbd_codec.h>
-void kbd_puttext(int ch, FAR struct lib_outstream_s *stream);
+void kbd_press(int ch, FAR struct lib_outstream_s *stream);
Description:
- Put one byte of normal, "in-band" ASCII data into the output stream.
+ Indicates a normal key press event.
+ Put one byte of normal keyboard data into the output stream.
Input Pameters:
@@ -3676,19 +3685,78 @@ void kbd_puttext(int ch, FAR struct lib_outstream_s *stream);
-
- kbd_putspecial()
+ kbd_release()
Function Prototype:
#include <nuttx/streams.h>
#include <nuttx/input/kbd_codec.h>
-void kbd_putspecial(enum kbd_keycode_e keycode, FAR struct lib_outstream_s *stream);
+void kbd_release(uint8_t ch, FAR struct lib_outstream_s *stream);
Description:
- Put one special, "out-of-band" command into the output stream.
+ Encode the release of a normal key.
Input Pameters:
+
+ -
+
ch: The character associated with the key that was releared.
+
+ -
+
stream: An instance of lib_outstream_s to perform the actual low-level put operation.
+
+
+ Returned Value:
+
+
+ -
+
+ kbd_specpress()
+
+ Function Prototype:
+
+#include <nuttx/streams.h>
+#include <nuttx/input/kbd_codec.h>
+void kbd_specpress(enum kbd_keycode_e keycode, FAR struct lib_outstream_s *stream);
+
+ Description:
+
+ Denotes a special key press event.
+ Put one special keyboard command into the output stream.
+
+ Input Pameters:
+
+ -
+
keycode: The command to be added to the output stream.
+ The enumeration enum kbd_keycode_e keycode identifies all commands known to the system.
+
+ -
+
stream: An instance of lib_outstream_s to perform the actual low-level put operation.
+
+
+ Returned Value:
+
+
+ -
+
+ kbd_specrel()
+
+ Function Prototype:
+
+#include <nuttx/streams.h>
+#include <nuttx/input/kbd_codec.h>
+void kbd_specrel(enum kbd_keycode_e keycode, FAR struct lib_outstream_s *stream);
+
+ Description:
+
+ Denotes a special key release event.
+ Put one special keyboard command into the output stream.
+
+ Input Pameters:
Returned Value:
-
- 1:
- Indicates the successful receipt of a special, "out-of-band" command.
- The returned value in
pch is a value from enum kbd_getstate_s.
-
- -
- 0:
- Indicates the successful receipt of normal, "in-band" ASCII data.
+
KBD_PRESS (0):
+ Indicates the successful receipt of normal, keyboard data.
+ This corresponds to a keypress event.
The returned value in pch is a simple byte of text or control data.
-
-
EOF:
- An error has getting the next character (reported by the stream).
- Normally indicates the end of file.
+ KBD_RELEASE (1):
+ Indicates a key release event.
+ The returned value in pch is the byte of text or control data corresponding to the released key.
+
+ -
+
KBD_SPECPRESS (2):
+ Indicates the successful receipt of a special keyboard command.
+ The returned value in pch is a value from enum kbd_getstate_s.
+
+ -
+
KBD_SPECREL (3):
+ Indicates a special command key release event.
+ The returned value in pch is a value from enum kbd_getstate_s.
+
+ -
+
KBD_ERROR (EOF):
+ An error has getting the next character (reported by the stream).
+ Normally indicates the end of file.
diff --git a/nuttx/drivers/usbhost/usbhost_hidkbd.c b/nuttx/drivers/usbhost/usbhost_hidkbd.c
index 917ebfa3f2..0bab89c284 100644
--- a/nuttx/drivers/usbhost/usbhost_hidkbd.c
+++ b/nuttx/drivers/usbhost/usbhost_hidkbd.c
@@ -530,7 +530,7 @@ static const uint8_t ucmap[USBHID_NUMSCANCODES] =
0, 0, 0, 0, 0, 0, 0, 0, /* 0x40-0x47: F7,F8,F9,F10,F11,F12,PrtScn,ScrollLock */
0, 0, 0, 0, 0, 0, 0, 0, /* 0x48-0x4f: Pause,Insert,Home,PageUp,DeleteForward,End,PageDown,RightArrow */
0, 0, 0, 0, '/', '*', '-', '+', /* 0x50-0x57: LeftArrow,DownArrow,UpArrow,Num Lock,/,*,-,+ */
- '\n', '1', '2', '3', '4', '4', '6', '7', /* 0x58-0x5f: Enter,1-7 */
+ '\n', '1', '2', '3', '4', '5', '6', '7', /* 0x58-0x5f: Enter,1-7 */
'8', '9', '0', '.', 0, 0, 0, '=', /* 0x60-0x67: 8-9,0,.,Non-US \,Application,Power,= */
#ifdef CONFIG_HIDKBD_ALLSCANCODES
0, 0, 0, 0, 0, 0, 0, 0, /* 0x68-0x6f: F13,F14,F15,F16,F17,F18,F19,F20 */
@@ -565,7 +565,7 @@ static const uint8_t lcmap[USBHID_NUMSCANCODES] =
0, 0, 0, 0, 0, 0, 0, 0, /* 0x40-0x47: F7,F8,F9,F10,F11,F12,PrtScn,ScrollLock */
0, 0, 0, 0, 0, 0, 0, 0, /* 0x48-0x4f: Pause,Insert,Home,PageUp,DeleteForward,End,PageDown,RightArrow */
0, 0, 0, 0, '/', '*', '-', '+', /* 0x50-0x57: LeftArrow,DownArrow,UpArrow,Num Lock,/,*,-,+ */
- '\n', '1', '2', '3', '4', '4', '6', '7', /* 0x58-0x5f: Enter,1-7 */
+ '\n', '1', '2', '3', '4', '5', '6', '7', /* 0x58-0x5f: Enter,1-7 */
'8', '9', '0', '.', 0, 0, 0, '=', /* 0x60-0x67: 8-9,0,.,Non-US \,Application,Power,= */
#ifdef CONFIG_HIDKBD_ALLSCANCODES
0, 0, 0, 0, 0, 0, 0, 0, /* 0x68-0x6f: F13,F14,F15,F16,F17,F18,F19,F20 */
@@ -977,8 +977,8 @@ static inline void usbhost_encodescancode(FAR struct usbhost_state_s *priv,
/* Add the special function value to the user buffer */
- kbd_putspecial((enum kbd_keycode_e)encoded,
- (FAR struct lib_outstream_s *)&usbstream);
+ kbd_specpress((enum kbd_keycode_e)encoded,
+ (FAR struct lib_outstream_s *)&usbstream);
}
}
}
diff --git a/nuttx/include/nuttx/input/kbd_codec.h b/nuttx/include/nuttx/input/kbd_codec.h
index 0a3a54d2dc..9a7c7c8e6d 100644
--- a/nuttx/include/nuttx/input/kbd_codec.h
+++ b/nuttx/include/nuttx/input/kbd_codec.h
@@ -1,6 +1,6 @@
/************************************************************************************
* include/nuttx/input/kbd_codec.h
- * Serialize and marshaling out-of-band keyboard data
+ * Serialize and marshaling keyboard data and events
*
* Copyright (C) 2012 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt
@@ -54,9 +54,7 @@
* Public Types
****************************************************************************/
-/* These are the special, "out-of-band" keyboard commands recognized by the
- * CODEC.
- */
+/* These are the special keyboard commands recognized by the CODEC. */
enum kbd_keycode_e
{
@@ -190,11 +188,13 @@ enum kbd_keycode_e
#define FIRST_KEYCODE KEYCODE_FWDDEL
#define LAST_KEYCODE KEYCODE_F24
-/* kbd_get return values */
+/* kbd_decode() return values */
-#define KBD_NORMAL 0
-#define KBD_SPECIAL 1
-#define KBD_ERROR EOF
+#define KBD_PRESS 0 /* Key press event */
+#define KBD_RELEASE 1 /* Key release event */
+#define KBD_SPECPRESS 2 /* Special key press event */
+#define KBD_SPECREL 3 /* Special key release event */
+#define KBD_ERROR EOF /* Error or end-of-file */
/****************************************************************************
* Public Types
@@ -222,10 +222,11 @@ extern "C"
****************************************************************************/
/****************************************************************************
- * Name: kbd_puttext
+ * Name: kbd_press
*
* Description:
- * Put one byte of normal, "in-band" ASCII data into the output stream.
+ * Indicates a normal key press event. Put one byte of normal keyboard
+ * data into the output stream.
*
* Input Parameters:
* ch - The character to be added to the output stream.
@@ -237,13 +238,32 @@ extern "C"
*
****************************************************************************/
-#define kbd_puttext(ch, stream) (stream)->put((stream), (int)(ch))
+#define kbd_press(ch, stream) (stream)->put((stream), (int)(ch))
/****************************************************************************
- * Name: kbd_putspecial
+ * Name: kbd_release
*
* Description:
- * Put one special, "out-of-band" command into the output stream.
+ * Encode the release of a normal key.
+ *
+ * Input Parameters:
+ * ch - The character associated with the key that was releared.
+ * stream - An instance of lib_outstream_s to do the low-level put
+ * operation.
+ *
+ * Returned Value:
+ * None
+ *
+ ****************************************************************************/
+
+void kbd_release(uint8_t ch, FAR struct lib_outstream_s *stream);
+
+/****************************************************************************
+ * Name: kbd_specpress
+ *
+ * Description:
+ * Denotes a special key press event. Put one special keyboard command
+ * into the output stream.
*
* Input Parameters:
* keycode - The command to be added to the output stream.
@@ -255,8 +275,28 @@ extern "C"
*
****************************************************************************/
-void kbd_putspecial(enum kbd_keycode_e keycode,
- FAR struct lib_outstream_s *stream);
+void kbd_specpress(enum kbd_keycode_e keycode,
+ FAR struct lib_outstream_s *stream);
+
+/****************************************************************************
+ * Name: kbd_specrel
+ *
+ * Description:
+ * Denotes a special key release event. Put one special keyboard
+ * command into the output stream.
+ *
+ * Input Parameters:
+ * keycode - The command to be added to the output stream.
+ * stream - An instance of lib_outstream_s to do the low-level put
+ * operation.
+ *
+ * Returned Value:
+ * None
+ *
+ ****************************************************************************/
+
+void kbd_specrel(enum kbd_keycode_e keycode,
+ FAR struct lib_outstream_s *stream);
/****************************************************************************
* The following functions are intended for use by "consumer" applications
@@ -264,7 +304,7 @@ void kbd_putspecial(enum kbd_keycode_e keycode,
****************************************************************************/
/****************************************************************************
- * Name: kbd_get
+ * Name: kbd_decode
*
* Description:
* Get one byte of data or special command from the driver provided input
@@ -273,24 +313,30 @@ void kbd_putspecial(enum kbd_keycode_e keycode,
* Input Parameters:
* stream - An instance of lib_instream_s to do the low-level get
* operation.
- * pch - The location character to save the returned value. This may be
- * either a normal, "in-band" ASCII characer or a special, "out-of-band"
- * command.
+ * pch - The location to save the returned value. This may be
+ * either a normal, character code or a special command from enum
+ * kbd_keycode_e
* state - A user provided buffer to support parsing. This structure
- * should be cleared the first time that kbd_get is called.
+ * should be cleared the first time that kbd_decode is called.
*
* Returned Value:
- * 1 - Indicates the successful receipt of a special, "out-of-band" command.
- * The returned value in pch is a value from enum kbd_getstate_s.
- * 0 - Indicates the successful receipt of normal, "in-band" ASCII data.
- * The returned value in pch is a simple byte of text or control data.
+ *
+ * KBD_PRESS - Indicates the successful receipt of normal, keyboard data.
+ * This corresponds to a keypress event. The returned value in pch is a
+ * simple byte of text or control data corresponding to the pressed key.
+ * KBD_RELEASE - Indicates a key release event. The returned value in pch
+ * is the byte of text or control data corresponding to the released key.
+ * KBD_SPECPRESS - Indicates the successful receipt of a special keyboard
+ * command. The returned value in pch is a value from enum kbd_getstate_s.
+ * KBD_SPECREL - Indicates a special key release event. The returned value
+ * in pch is a value from enum kbd_getstate_s.
* EOF - An error has getting the next character (reported by the stream).
- * Normally indicates the end of file.
+ * Normally indicates the end of file.
*
****************************************************************************/
-int kbd_get(FAR struct lib_instream_s *stream,
- FAR struct kbd_getstate_s *state, FAR uint8_t *pch);
+int kbd_decode(FAR struct lib_instream_s *stream,
+ FAR struct kbd_getstate_s *state, FAR uint8_t *pch);
#ifdef __cplusplus
}
diff --git a/nuttx/libc/misc/lib_kbddecode.c b/nuttx/libc/misc/lib_kbddecode.c
index cb57b52150..62554902c9 100644
--- a/nuttx/libc/misc/lib_kbddecode.c
+++ b/nuttx/libc/misc/lib_kbddecode.c
@@ -1,4 +1,4 @@
-/********************************************************************************************
+/****************************************************************************
* libc/msic/lib_kbddecode.c
* Decoding side of the Keyboard CODEC
*
@@ -32,38 +32,43 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
- ********************************************************************************************/
+ ****************************************************************************/
-/********************************************************************************************
+/****************************************************************************
* Included Files
- ********************************************************************************************/
+ ****************************************************************************/
#include
#include
#include
+#include
#include
#include
#include
-/********************************************************************************************
+/****************************************************************************
* Pre-Processor Definitions
- ********************************************************************************************/
+ ****************************************************************************/
-#define NDX_ESC 0
-#define NDX_BRACKET 1
-#define NDX_CODE 2
-#define NCX_SEMICOLON 3
+#define NDX_ESC 0
+#define NDX_BRACKET 1
+#define NDX_CODE 2
+#define NDX_TERMINATOR 3
-#define NCH_ESC 1
-#define NCH_BRACKET 2
-#define NCH_CODE 3
-#define NCH_SEMICOLON 4
+#define NCH_ESC 1
+#define NCH_BRACKET 2
+#define NCH_CODE 3
+#define NCH_TERMINATOR 4
-/********************************************************************************************
+#define TERM_MIN ('a' + KBD_RELEASE)
+#define TERM_MAX ('a' + KBD_SPECREL)
+#define TERM_RETURN(a) ((a) - 'a')
+
+/****************************************************************************
* Private Functions
- ********************************************************************************************/
+ ****************************************************************************/
/****************************************************************************
* Name: kbd_reget
@@ -76,16 +81,11 @@
* stream - An instance of lib_instream_s to do the low-level get
* operation.
* pch - The location character to save the returned value. This may be
- * either a normal, "in-band" ASCII characer or a special, "out-of-band"
- * command.
- * state - A user provided buffer to support parsing. This structure
- * should be cleared the first time that kbd_get is called.
+ * either a normal, character code or a special command from enum
+ * kbd_keycode_e
*
* Returned Value:
- * 2 - Indicates the successful receipt of a special, "out-of-band" command
- * 1 - Indicates the successful receipt of normal, "in-band" ASCII data.
- * 0 - Indicates end-of-file or that the stream has been closed
- * EOF - An error has getting the next character (reported by the stream).
+ * KBD_PRESS - Indicates the successful receipt of norma keyboard data.
*
****************************************************************************/
@@ -96,15 +96,15 @@ static int kbd_reget(FAR struct kbd_getstate_s *state, FAR uint8_t *pch)
*pch = state->buf[state->ndx];
state->ndx++;
state->nch--;
- return KBD_NORMAL;
+ return KBD_PRESS;
}
-/********************************************************************************************
+/****************************************************************************
* Public Functions
- ********************************************************************************************/
+ ****************************************************************************/
/****************************************************************************
- * Name: kbd_get
+ * Name: kbd_decode
*
* Description:
* Get one byte of data or special command from the driver provided input
@@ -113,24 +113,30 @@ static int kbd_reget(FAR struct kbd_getstate_s *state, FAR uint8_t *pch)
* Input Parameters:
* stream - An instance of lib_instream_s to do the low-level get
* operation.
- * pch - The location character to save the returned value. This may be
- * either a normal, "in-band" ASCII characer or a special, "out-of-band"
- * command.
+ * pch - The location to save the returned value. This may be
+ * either a normal, character code or a special command from enum
+ * kbd_keycode_e
* state - A user provided buffer to support parsing. This structure
- * should be cleared the first time that kbd_get is called.
+ * should be cleared the first time that kbd_decode is called.
*
* Returned Value:
- * 1 - Indicates the successful receipt of a special, "out-of-band" command.
- * The returned value in pch is a value from enum kbd_getstate_s.
- * 0 - Indicates the successful receipt of normal, "in-band" ASCII data.
- * The returned value in pch is a simple byte of text or control data.
+ *
+ * KBD_PRESS - Indicates the successful receipt of normal, keyboard data.
+ * This corresponds to a keypress event. The returned value in pch is a
+ * simple byte of text or control data corresponding to the pressed key.
+ * KBD_RELEASE - Indicates a key release event. The returned value in pch
+ * is the byte of text or control data corresponding to the released key.
+ * KBD_SPECPRESS - Indicates the successful receipt of a special keyboard
+ * command. The returned value in pch is a value from enum kbd_getstate_s.
+ * KBD_SPECREL - Indicates a special key release event. The returned value
+ * in pch is a value from enum kbd_getstate_s.
* EOF - An error has getting the next character (reported by the stream).
- * Normally indicates the end of file.
+ * Normally indicates the end of file.
*
****************************************************************************/
-int kbd_get(FAR struct lib_instream_s *stream,
- FAR struct kbd_getstate_s *state, FAR uint8_t *pch)
+int kbd_decode(FAR struct lib_instream_s *stream,
+ FAR struct kbd_getstate_s *state, FAR uint8_t *pch)
{
int ch;
@@ -147,7 +153,7 @@ int kbd_get(FAR struct lib_instream_s *stream,
state->ndx = 0;
- /* No, ungotten characters. Check for the beginning of an esc sequence. */
+ /* No, ungotten characters. Check for the beginning of an ESC sequence. */
ch = stream->get(stream);
if (ch == EOF)
@@ -195,7 +201,7 @@ int kbd_get(FAR struct lib_instream_s *stream,
}
}
- /* Get and verify the special, "out-of-band" command code */
+ /* Get and verify the special keyboard data to decode */
ch = stream->get(stream);
if (ch == EOF)
@@ -234,12 +240,12 @@ int kbd_get(FAR struct lib_instream_s *stream,
}
else
{
- state->buf[NCX_SEMICOLON] = (uint8_t)ch;
- state->nch = NCH_SEMICOLON;
+ state->buf[NDX_TERMINATOR] = (uint8_t)ch;
+ state->nch = NCH_TERMINATOR;
/* Check for a valid special command code */
- if (ch != ';')
+ if (ch < TERM_MIN || ch > TERM_MAX)
{
/* Not a special command code, return the ESC now and the next two
* characters later.
@@ -250,11 +256,12 @@ int kbd_get(FAR struct lib_instream_s *stream,
}
/* We have successfully parsed the the entire escape sequence. Return the
- * special code in pch and the value 2.
+ * keyboard value in pch and the value an indication determined by the
+ * terminating character.
*/
*pch = state->buf[NDX_CODE];
state->nch = 0;
- return KBD_SPECIAL;
+ return TERM_RETURN(state->buf[NDX_TERMINATOR]);
}
diff --git a/nuttx/libc/misc/lib_kbdencode.c b/nuttx/libc/misc/lib_kbdencode.c
index 40a8805b11..80138ca800 100644
--- a/nuttx/libc/misc/lib_kbdencode.c
+++ b/nuttx/libc/misc/lib_kbdencode.c
@@ -1,4 +1,4 @@
-/********************************************************************************************
+/****************************************************************************
* libc/msic/lib_kbdencode.c
* Encoding side of the Keyboard CODEC
*
@@ -32,11 +32,11 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
- ********************************************************************************************/
+ ****************************************************************************/
-/********************************************************************************************
+/****************************************************************************
* Included Files
- ********************************************************************************************/
+ ****************************************************************************/
#include
@@ -47,19 +47,67 @@
#include
#include
-/********************************************************************************************
+/****************************************************************************
* Pre-Processor Definitions
- ********************************************************************************************/
-
-/********************************************************************************************
- * Public Functions
- ********************************************************************************************/
+ ****************************************************************************/
/****************************************************************************
- * Name: kbd_putspecial
+ * Name: kbd_encode
*
* Description:
- * Put one special, "out-of-band" command into the output stream.
+ * Encode one special special sequence command into the output stream.
+ *
+ * Input Parameters:
+ * keycode - The command to be added to the output stream.
+ * stream - An instance of lib_outstream_s to do the low-level put
+ * operation.
+ * terminator - Escape sequence terminating character.
+ *
+ * Returned Value:
+ * None
+ *
+ ****************************************************************************/
+
+static void kbd_encode(uint8_t keycode, FAR struct lib_outstream_s *stream,
+ uint8_t terminator)
+{
+ stream->put(stream, ASCII_ESC);
+ stream->put(stream, '[');
+ stream->put(stream, (int)keycode);
+ stream->put(stream, terminator);
+}
+
+/****************************************************************************
+ * Public Functions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Name: kbd_release
+ *
+ * Description:
+ * Encode the release of a normal key.
+ *
+ * Input Parameters:
+ * ch - The character associated with the key that was releared.
+ * stream - An instance of lib_outstream_s to do the low-level put
+ * operation.
+ *
+ * Returned Value:
+ * None
+ *
+ ****************************************************************************/
+
+void kbd_release(uint8_t ch, FAR struct lib_outstream_s *stream)
+{
+ kbd_encode(ch, stream, ('a' + KBD_RELEASE));
+}
+
+/****************************************************************************
+ * Name: kbd_specpress
+ *
+ * Description:
+ * Denotes a special key press event. Put one special keyboard command
+ * into the output stream.
*
* Input Parameters:
* keycode - The command to be added to the output stream.
@@ -71,14 +119,33 @@
*
****************************************************************************/
-void kbd_putspecial(enum kbd_keycode_e keycode,
- FAR struct lib_outstream_s *stream)
+void kbd_specpress(enum kbd_keycode_e keycode,
+ FAR struct lib_outstream_s *stream)
{
DEBUGASSERT(stream && keycode >= KEYCODE_FWDDEL && keycode <= LAST_KEYCODE);
-
- stream->put(stream, ASCII_ESC);
- stream->put(stream, '[');
- stream->put(stream, (int)keycode);
- stream->put(stream, ';');
+ kbd_encode((uint8_t)keycode, stream, ('a' + KBD_SPECPRESS));
}
+/****************************************************************************
+ * Name: kbd_specrel
+ *
+ * Description:
+ * Denotes a special key release event. Put one special keyboard
+ * command into the output stream.
+ *
+ * Input Parameters:
+ * keycode - The command to be added to the output stream.
+ * stream - An instance of lib_outstream_s to do the low-level put
+ * operation.
+ *
+ * Returned Value:
+ * None
+ *
+ ****************************************************************************/
+
+void kbd_specrel(enum kbd_keycode_e keycode,
+ FAR struct lib_outstream_s *stream)
+{
+ DEBUGASSERT(stream && keycode >= KEYCODE_FWDDEL && keycode <= LAST_KEYCODE);
+ kbd_encode((uint8_t)keycode, stream, ('a' + KBD_SPECREL));
+}
From e0be95b9a02ebd38cc370b81586371bd93e6ac76 Mon Sep 17 00:00:00 2001
From: patacongo
Date: Fri, 28 Dec 2012 23:40:54 +0000
Subject: [PATCH 018/118] Add board support at configs/zp214xpa for the
The0.net ZP213X/4XPA board with the LPC2148; Add configurations sim/nxlines.
convert mcu123-lpc214x/nsh to use the kconfig-frontends.
git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5465 42af7a65-404d-4744-a932-0658087f49c3
---
apps/examples/hidkbd/hidkbd_main.c | 11 +-
nuttx/ChangeLog | 6 +
nuttx/Documentation/NuttX.html | 5 +-
nuttx/arch/arm/src/lpc214x/Kconfig | 134 +++
nuttx/configs/Kconfig | 14 +-
nuttx/configs/README.txt | 5 +
nuttx/configs/mcu123-lpc214x/README.txt | 18 +-
nuttx/configs/mcu123-lpc214x/nsh/defconfig | 764 ++++++++++++------
.../configs/mcu123-lpc214x/scripts/ld.script | 6 +-
nuttx/configs/sim/nxlines/Make.defs | 107 +++
nuttx/configs/sim/nxlines/defconfig | 591 ++++++++++++++
.../nsh/appconfig => sim/nxlines/setenv.sh} | 27 +-
nuttx/configs/zp214xpa/Kconfig | 7 +
nuttx/configs/zp214xpa/README.txt | 136 ++++
nuttx/configs/zp214xpa/include/board.h | 68 ++
nuttx/configs/zp214xpa/nsh/Make.defs | 128 +++
nuttx/configs/zp214xpa/nsh/defconfig | 574 +++++++++++++
nuttx/configs/zp214xpa/nsh/setenv.sh | 65 ++
nuttx/configs/zp214xpa/scripts/ld.script | 120 +++
nuttx/configs/zp214xpa/src/Makefile | 84 ++
nuttx/drivers/mmcsd/Kconfig | 1 +
nuttx/drivers/usbhost/usbhost_hidkbd.c | 6 +-
22 files changed, 2593 insertions(+), 284 deletions(-)
create mode 100644 nuttx/configs/sim/nxlines/Make.defs
create mode 100644 nuttx/configs/sim/nxlines/defconfig
rename nuttx/configs/{mcu123-lpc214x/nsh/appconfig => sim/nxlines/setenv.sh} (76%)
mode change 100644 => 100755
create mode 100644 nuttx/configs/zp214xpa/Kconfig
create mode 100644 nuttx/configs/zp214xpa/README.txt
create mode 100644 nuttx/configs/zp214xpa/include/board.h
create mode 100644 nuttx/configs/zp214xpa/nsh/Make.defs
create mode 100644 nuttx/configs/zp214xpa/nsh/defconfig
create mode 100755 nuttx/configs/zp214xpa/nsh/setenv.sh
create mode 100644 nuttx/configs/zp214xpa/scripts/ld.script
create mode 100644 nuttx/configs/zp214xpa/src/Makefile
diff --git a/apps/examples/hidkbd/hidkbd_main.c b/apps/examples/hidkbd/hidkbd_main.c
index d7e79b1216..abc942a446 100644
--- a/apps/examples/hidkbd/hidkbd_main.c
+++ b/apps/examples/hidkbd/hidkbd_main.c
@@ -177,12 +177,14 @@ static void hidkbd_decode(FAR char *buffer, ssize_t nbytes)
/* Decode the next thing from the buffer */
ret = kbd_decode((FAR struct lib_instream_s *)&kbdstream, &state, &ch);
- if (ret == KBD_ERROR)
+ if (ret == KBD_ERROR) /* Error or end-of-file */
{
+ /* Break out when all of the data has been processed */
+
break;
}
- /* Normal data? Or special key? */
+ /* Normal data? Or special key? Press? Or release? */
switch (ret)
{
@@ -202,10 +204,7 @@ static void hidkbd_decode(FAR char *buffer, ssize_t nbytes)
printf("Special Release: %d\n", ch);
break;
- case KBD_ERROR: /* Error or end-of-file */
- printf("EOF: %d\n", ret);
- break;
-
+ case KBD_ERROR: /* Error or end-of-file, already handled */
default:
printf("Unexpected: %d\n", ret);
break;
diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog
index 2e114af8c7..dcabb6c071 100644
--- a/nuttx/ChangeLog
+++ b/nuttx/ChangeLog
@@ -3836,4 +3836,10 @@
events too. However, the USB HID keyboard drier has not yet been
updated to detect key release events. That is kind of tricky in
the USB HID keyboard report data.
+ * configs/mcu123-214x/nsh: Converted to use the kconfig-frontends
+ configuration tool.
+ * configs/zp214xpa: Add basic support for the The0.net ZP213x/4xPA
+ board (with the LPC2148 and the UG_2864AMBAG01).
+ * configs/sim/nxlines: Add an nxlines configuration for the
+ simulator.
diff --git a/nuttx/Documentation/NuttX.html b/nuttx/Documentation/NuttX.html
index 84f298d3ac..dc454c0b61 100644
--- a/nuttx/Documentation/NuttX.html
+++ b/nuttx/Documentation/NuttX.html
@@ -8,7 +8,7 @@
NuttX RTOS
- Last Updated: December 20, 2012
+ Last Updated: December 28, 2012
|
@@ -1505,7 +1505,8 @@ svn checkout -r5447 http://svn.code.sf.net/p/nuttx/code/trunk nuttx-code
NXP LPC214x.
Support is provided for the NXP LPC214x family of processors. In particular,
- support is provided for the mcu123.com lpc214x evaluation board (LPC2148).
+ support is provided for (1) the mcu123.com lpc214x evaluation board (LPC2148)
+ and (1) the The0.net ZPA213X/4XPA development board (with the The0.net UG-2864AMBAG01 OLED)
This port also used the GNU arm-nuttx-elf toolchain* under Linux or Cygwin.
diff --git a/nuttx/arch/arm/src/lpc214x/Kconfig b/nuttx/arch/arm/src/lpc214x/Kconfig
index a26483ed9e..5d52eb0001 100644
--- a/nuttx/arch/arm/src/lpc214x/Kconfig
+++ b/nuttx/arch/arm/src/lpc214x/Kconfig
@@ -4,3 +4,137 @@
#
comment "LPC214x Configuration Options"
+
+# Fragments of LPC214x chip selection logic. The LPC2148 is the only chip
+# supported for now.
+
+config ARCH_CHIP_LPC2148
+ bool
+ default y
+
+comment "LPC214x Initialization Options"
+
+choice
+ prompt "Memory Execution Mode"
+ default DEFAULT_MODE
+
+config EXTMEM_MODE
+ bool "External Memory Mode"
+ ---help---
+ Code executes from external memory starting at address 0x8000:0000.
+
+config RAM_MODE
+ bool "RAM Memory Mode"
+ ---help---
+ Code executes from on-chip RAM at address 0x4000:0000.
+
+config DEFAULT_MODE
+ bool "Default Memory Mode"
+ ---help---
+ Executes from 0x0000:0000. In non-default modes, the MEMAP register
+ is set override the settings of the CPU configuration pins.
+
+endchoice
+
+config CODE_BASE
+ hex "Execuation Base Address"
+ default 0x00000000
+ ---help---
+ This must match the expected address for the selected "Memory
+ Execution Address":
+
+ EXTMEM_MODE: 0x8000:0000
+ RAM_MODE: 0x4000:0000
+ DEFAULT)MODE: 0x0000:0000
+
+config PLL_SETUP
+ bool "Configure the PLL"
+ default y
+
+config MAM_SETUP
+ bool "Configure the Memory Accelerator Module (MAM)"
+ default y
+
+config APBDIV_SETUP
+ bool "Configure the APB Divider"
+ default y
+
+config APBDIV_VALUE
+ int "APB Divisor"
+ default 1
+
+config EMC_SETUP
+ bool "Configure EMC"
+ default n
+
+config BCFG0_SETUP
+ bool "Configure BCFG0"
+ default n
+
+config BCFG1_SETUP
+ bool "Configure BCFG1"
+ default n
+
+config BCFG2_SETUP
+ bool "Configure BCFG2"
+ default n
+
+config BCFG3_SETUP
+ bool "Configure BCFG3"
+ default n
+
+config ADC_SETUP
+ bool "Configure ADC"
+ default y
+
+menu "LPC214x Peripheral Support"
+
+config LPC214X_UART0
+ bool
+ default y
+ select ARCH_HAVE_UART0
+
+config LPC214X_UART1
+ bool
+ default y
+ select ARCH_HAVE_UART1
+
+config LPC214X_USBDEV
+ bool "USB Device"
+ default y
+ depends on USBDEV
+
+endmenu
+
+config LPC214x_FIO
+ bool "Fast GPIO"
+ default n
+
+if LPC214X_USBDEV
+menu "LPC214x USB Device Configuration"
+
+config LPC214X_USBDEV_DMA
+ bool "USB Device DMA Support"
+ default n
+
+config CONFIG_LPC214X_USBDEV_NDMADESCRIPTORS
+ int "Number of USB DMA Descriptors"
+ default 8
+ depends on LPC214X_USBDEV_DMA
+
+config LPC214X_USBDEV_EPFAST_INTERRUPT
+ bool "USB Device Fast Endpoint Interrupts"
+ default n
+
+config LPC214X_USBDEV_FRAME_INTERRUPT
+ bool "USB Device Frame Interrupts"
+ default n
+
+config LPC214X_USBDEV_REGDEBUG
+ bool "USB Device Register-Level Debug Output"
+ default n
+ depends on DEBUG
+
+endmenu
+endif
+
diff --git a/nuttx/configs/Kconfig b/nuttx/configs/Kconfig
index bba1444c4d..cda5aa7bcd 100644
--- a/nuttx/configs/Kconfig
+++ b/nuttx/configs/Kconfig
@@ -619,6 +619,14 @@ config ARCH_BOARD_Z8F64200100KIT
development kit, Z8F6423 part, and the Zilog ZDS-II Windows command line
tools. The development environment is Cygwin under WinXP.
+config ARCH_BOARD_ZP214XPA
+ bool "The0.net LPC2148 Development Board"
+ depends on ARCH_CHIP_LPC2148
+ ---help---
+ This port is for the NXP LPC2148 as provided on the The0.net
+ ZPA213X/4XPA development board. Includes support for the
+ UG-2864AMBAG01 OLED also from The0.net
+
config ARCH_BOARD_SIM
bool "User mode simulation"
depends on ARCH_SIM
@@ -700,6 +708,7 @@ config ARCH_BOARD
default "z80sim" if ARCH_BOARD_Z80SIM
default "z8encore000zco" if ARCH_BOARD_Z8ENCORE000ZCO
default "z8f64200100kit" if ARCH_BOARD_Z8F64200100KIT
+ default "zp214xpa" if ARCH_BOARD_ZP214XPA
default "sim" if ARCH_BOARD_SIM
default "" if ARCH_BOARD_CUSTOM
@@ -709,7 +718,7 @@ config ARCH_HAVE_LEDS
bool
config ARCH_LEDS
- bool "Board LEDs support"
+ bool "Board LED support"
default y
depends on ARCH_HAVE_LEDS
---help---
@@ -935,6 +944,9 @@ endif
if ARCH_BOARD_Z8F64200100KIT
source "configs/z8f64200100kit/Kconfig"
endif
+if ARCH_BOARD_ZP214XPA
+source "configs/zp214xpa/Kconfig"
+endif
if ARCH_BOARD_SIM
source "configs/sim/Kconfig"
endif
diff --git a/nuttx/configs/README.txt b/nuttx/configs/README.txt
index 21aace2afe..4e9bcca146 100644
--- a/nuttx/configs/README.txt
+++ b/nuttx/configs/README.txt
@@ -1936,6 +1936,11 @@ configs/z8f64200100kit
development kit, Z8F6423 part, and the Zilog ZDS-II Windows command line
tools. The development environment is Cygwin under WinXP.
+configs/zp214xpa
+ This port is for the NXP LPC2148 as provided on the The0.net
+ ZPA213X/4XPA development board. Includes support for the
+ UG-2864AMBAG01 OLED also from The0.net
+
Configuring NuttX
^^^^^^^^^^^^^^^^^
diff --git a/nuttx/configs/mcu123-lpc214x/README.txt b/nuttx/configs/mcu123-lpc214x/README.txt
index 435f8647d4..4c7c608b7f 100644
--- a/nuttx/configs/mcu123-lpc214x/README.txt
+++ b/nuttx/configs/mcu123-lpc214x/README.txt
@@ -349,8 +349,22 @@ nsh:
Configures the NuttShell (nsh) located at examples/nsh. The
Configuration enables only the serial NSH interfaces.
- Default toolchain: Buildroot
- Output format: ELF and binary
+ NOTES:
+
+ 1. This configuration uses the mconf-based configuration tool. To
+ change this configuration using that tool, you should:
+
+ a. Build and install the mconf tool. See nuttx/README.txt and
+ misc/tools/
+
+ b. Execute 'make menuconfig' in nuttx/ in order to start the
+ reconfiguration process.
+
+ 2. Default platform/toolchain:
+
+ CONFIG_HOST_LINUX=y : Windows
+ CONFIG_ARM_TOOLCHAIN_GNU_EABI=y : Buildroot (arm-nuttx-elf-gcc)
+ CONFIG_RAW_BINARY=y : Output formats: ELF and raw binary
ostest:
-------
diff --git a/nuttx/configs/mcu123-lpc214x/nsh/defconfig b/nuttx/configs/mcu123-lpc214x/nsh/defconfig
index a8a53a3403..6ae163386a 100644
--- a/nuttx/configs/mcu123-lpc214x/nsh/defconfig
+++ b/nuttx/configs/mcu123-lpc214x/nsh/defconfig
@@ -1,169 +1,207 @@
-############################################################################
-# configs/mcu123-lpc214x/nsh/defconfig
#
-# Copyright (C) 2008-2010, 2012 Gregory Nutt. All rights reserved.
-# Author: Gregory Nutt
+# Automatically generated file; DO NOT EDIT.
+# Nuttx/ Configuration
#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in
-# the documentation and/or other materials provided with the
-# distribution.
-# 3. Neither the name NuttX nor the names of its contributors may be
-# used to endorse or promote products derived from this software
-# without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-#
-############################################################################
-#
-# Architecture selection
-#
-CONFIG_ARCH="arm"
-CONFIG_ARCH_ARM=y
-CONFIG_ARCH_ARM7TDMI=y
-CONFIG_ARCH_CHIP="lpc214x"
-CONFIG_ARCH_CHIP_LPC2148=y
-CONFIG_ARCH_BOARD="mcu123-lpc214x"
-CONFIG_ARCH_BOARD_MCU123=y
-CONFIG_BOARD_LOOPSPERMSEC=3270
-CONFIG_ARCH_LEDS=y
-CONFIG_DRAM_SIZE=32768
-CONFIG_DRAM_START=0x40000000
-CONFIG_ARCH_INTERRUPTSTACK=0
-CONFIG_ARCH_STACKDUMP=y
+CONFIG_NUTTX_NEWCONFIG=y
#
-# LPC2148 specific chip initialization
+# Build Setup
#
-CONFIG_EXTMEM_MODE=n
-CONFIG_RAM_MODE=n
+# 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_LM3S is not set
+# CONFIG_ARCH_CHIP_LPC17XX is not set
+CONFIG_ARCH_CHIP_LPC214X=y
+# CONFIG_ARCH_CHIP_LPC2378 is not set
+# CONFIG_ARCH_CHIP_LPC31XX is not set
+# CONFIG_ARCH_CHIP_LPC43XX is not set
+# CONFIG_ARCH_CHIP_SAM3U is not set
+# CONFIG_ARCH_CHIP_STM32 is not set
+# CONFIG_ARCH_CHIP_STR71X is not set
+CONFIG_ARCH_ARM7TDMI=y
+CONFIG_ARCH_FAMILY="arm"
+CONFIG_ARCH_CHIP="lpc214x"
+CONFIG_ARCH_HAVE_LOWVECTORS=y
+# CONFIG_ARCH_LOWVECTORS is not set
+CONFIG_BOARD_LOOPSPERMSEC=3270
+# CONFIG_ARCH_CALIBRATION is not set
+
+#
+# ARM Configuration Options
+#
+# CONFIG_ARM_TOOLCHAIN_BUILDROOT is not set
+# CONFIG_ARM_TOOLCHAIN_CODESOURCERYL is not set
+CONFIG_ARM_TOOLCHAIN_GNU_EABI=y
+
+#
+# LPC214x Configuration Options
+#
+CONFIG_ARCH_CHIP_LPC2148=y
+
+#
+# LPC214x Initialization Options
+#
+# CONFIG_EXTMEM_MODE is not set
+# CONFIG_RAM_MODE is not set
+CONFIG_DEFAULT_MODE=y
CONFIG_CODE_BASE=0x00000000
CONFIG_PLL_SETUP=y
CONFIG_MAM_SETUP=y
CONFIG_APBDIV_SETUP=y
-CONFIG_EMC_SETUP=n
-CONFIG_BCFG0_SETUP=n
-CONFIG_BCFG1_SETUP=n
-CONFIG_BCFG2_SETUP=n
-CONFIG_BCFG3_SETUP=n
+CONFIG_APBDIV_VALUE=1
+# CONFIG_EMC_SETUP is not set
+# CONFIG_BCFG0_SETUP is not set
+# CONFIG_BCFG1_SETUP is not set
+# CONFIG_BCFG2_SETUP is not set
+# CONFIG_BCFG3_SETUP is not set
CONFIG_ADC_SETUP=y
#
-# LPC214X specific device driver settings
+# LPC214x Peripheral Support
#
-CONFIG_UART0_SERIAL_CONSOLE=y
-CONFIG_UART1_SERIAL_CONSOLE=n
-CONFIG_UART0_TXBUFSIZE=256
-CONFIG_UART1_TXBUFSIZE=256
-CONFIG_UART0_RXBUFSIZE=256
-CONFIG_UART1_RXBUFSIZE=256
-CONFIG_UART0_BAUD=38400
-CONFIG_UART1_BAUD=38400
-CONFIG_UART0_BITS=8
-CONFIG_UART1_BITS=8
-CONFIG_UART0_PARITY=0
-CONFIG_UART1_PARITY=0
-CONFIG_UART0_2STOP=0
-CONFIG_UART1_2STOP=0
+CONFIG_LPC214X_UART0=y
+CONFIG_LPC214X_UART1=y
+# CONFIG_LPC214x_FIO is not set
+# CONFIG_SDIO_DMA is not set
+# CONFIG_SDIO_WIDTH_D1_ONLY is not set
#
-# General build options
+# Architecture Options
#
-CONFIG_RRLOAD_BINARY=n
-CONFIG_INTELHEX_BINARY=n
-CONFIG_MOTOROLA_SREC=n
-CONFIG_RAW_BINARY=y
+# CONFIG_ARCH_NOINTC is not set
+# CONFIG_ARCH_DMA is not set
+# CONFIG_ARCH_IRQPRIO is not set
+# CONFIG_CUSTOM_STACK is not set
+# CONFIG_ADDRENV is not set
+CONFIG_ARCH_STACKDUMP=y
+# CONFIG_ENDIAN_BIG is not set
#
-# General OS setup
+# Board Settings
#
-CONFIG_USER_ENTRYPOINT="nsh_main"
-CONFIG_DEBUG=n
-CONFIG_DEBUG_VERBOSE=n
-CONFIG_DEBUG_SYMBOLS=n
-CONFIG_MM_REGIONS=1
-CONFIG_ARCH_LOWPUTC=y
+CONFIG_DRAM_START=0x40000000
+CONFIG_DRAM_SIZE=32768
+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_MCU123=y
+# CONFIG_ARCH_BOARD_ZP214XPA is not set
+# CONFIG_ARCH_BOARD_CUSTOM is not set
+CONFIG_ARCH_BOARD="mcu123-lpc214x"
+
+#
+# Common Board Options
+#
+CONFIG_ARCH_HAVE_LEDS=y
+CONFIG_ARCH_LEDS=y
+CONFIG_NSH_MMCSDMINOR=0
+CONFIG_NSH_MMCSDSLOTNO=0
+CONFIG_NSH_MMCSDSPIPORTNO=1
+
+#
+# Board-Specific Options
+#
+
+#
+# RTOS Features
+#
+CONFIG_MSEC_PER_TICK=10
CONFIG_RR_INTERVAL=0
-CONFIG_SCHED_INSTRUMENTATION=n
+# CONFIG_SCHED_INSTRUMENTATION is not set
CONFIG_TASK_NAME_SIZE=0
+# CONFIG_JULIAN_TIME is not set
CONFIG_START_YEAR=2008
CONFIG_START_MONTH=10
CONFIG_START_DAY=1
-CONFIG_JULIAN_TIME=n
CONFIG_DEV_CONSOLE=y
-CONFIG_DEV_LOWCONSOLE=n
-CONFIG_MUTEX_TYPES=n
-CONFIG_PRIORITY_INHERITANCE=n
-CONFIG_SEM_PREALLOCHOLDERS=0
-CONFIG_SEM_NNESTPRIO=0
-CONFIG_FDCLONE_DISABLE=n
-CONFIG_FDCLONE_STDIO=n
+# CONFIG_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_NXFLAT=n
-
-#
-# The following can be used to disable categories of
-# APIs supported by the OS. If the compiler supports
-# weak functions, then it should not be necessary to
-# disable functions unless you want to restrict usage
-# of those APIs.
-#
-# There are certain dependency relationships in these
-# features.
-#
-# o mq_notify logic depends on signals to awaken tasks
-# waiting for queues to become full or empty.
-# o pthread_condtimedwait() depends on signals to wake
-# up waiting tasks.
-#
-CONFIG_DISABLE_CLOCK=n
-CONFIG_DISABLE_POSIX_TIMERS=n
-CONFIG_DISABLE_PTHREAD=n
-CONFIG_DISABLE_SIGNALS=n
-CONFIG_DISABLE_MQUEUE=n
-CONFIG_DISABLE_MOUNTPOINT=n
-CONFIG_DISABLE_ENVIRON=n
+# CONFIG_SCHED_WORKQUEUE is not set
+# CONFIG_SCHED_WAITPID is not set
+# CONFIG_SCHED_ATEXIT is not set
+# CONFIG_SCHED_ONEXIT is not set
+CONFIG_USER_ENTRYPOINT="nsh_main"
+CONFIG_DISABLE_OS_API=y
+# CONFIG_DISABLE_CLOCK is not set
+# CONFIG_DISABLE_POSIX_TIMERS is not set
+# CONFIG_DISABLE_PTHREAD is not set
+# CONFIG_DISABLE_SIGNALS is not set
+# CONFIG_DISABLE_MQUEUE is not set
+# CONFIG_DISABLE_MOUNTPOINT is not set
+# CONFIG_DISABLE_ENVIRON is not set
CONFIG_DISABLE_POLL=y
-#
-# Misc libc settings
-#
-CONFIG_NOPRINTF_FIELDWIDTH=n
-
-#
-# Allow for architecture optimized implementations
-#
-# The architecture can provide optimized versions of the
-# following to improve system performance
-#
-CONFIG_ARCH_MEMCPY=n
-CONFIG_ARCH_MEMCMP=n
-CONFIG_ARCH_MEMMOVE=n
-CONFIG_ARCH_MEMSET=n
-CONFIG_ARCH_STRCMP=n
-CONFIG_ARCH_STRCPY=n
-CONFIG_ARCH_STRNCPY=n
-CONFIG_ARCH_STRLEN=n
-CONFIG_ARCH_STRNLEN=n
-CONFIG_ARCH_BZERO=n
-
#
# Sizes of configurable things (0 disables)
#
@@ -173,8 +211,6 @@ CONFIG_NPTHREAD_KEYS=4
CONFIG_NFILE_DESCRIPTORS=8
CONFIG_NFILE_STREAMS=8
CONFIG_NAME_MAX=32
-CONFIG_STDIO_BUFFER_SIZE=256
-CONFIG_NUNGET_CHARS=2
CONFIG_PREALLOC_MQ_MSGS=4
CONFIG_MQ_MAXMSGSIZE=32
CONFIG_MAX_WDOGPARMS=2
@@ -182,168 +218,380 @@ CONFIG_PREALLOC_WDOGS=4
CONFIG_PREALLOC_TIMERS=4
#
-# Filesystem configuration
+# Stack and heap information
+#
+CONFIG_IDLETHREAD_STACKSIZE=2048
+CONFIG_USERMAIN_STACKSIZE=2048
+CONFIG_PTHREAD_STACK_MIN=256
+CONFIG_PTHREAD_STACK_DEFAULT=2048
+
+#
+# Device Drivers
+#
+CONFIG_DEV_NULL=y
+# CONFIG_DEV_ZERO is not set
+# CONFIG_LOOP is not set
+# CONFIG_RAMDISK is not set
+# CONFIG_CAN is not set
+# CONFIG_PWM is not set
+# CONFIG_I2C is not set
+CONFIG_SPI=y
+# CONFIG_SPI_OWNBUS is not set
+# CONFIG_SPI_EXCHANGE is not set
+# CONFIG_SPI_CMDDATA is not set
+# CONFIG_RTC is not set
+# CONFIG_WATCHDOG is not set
+# CONFIG_ANALOG is not set
+# CONFIG_BCH is not set
+# CONFIG_INPUT is not set
+# CONFIG_LCD is not set
+CONFIG_MMCSD=y
+CONFIG_MMCSD_NSLOTS=1
+# CONFIG_MMCSD_READONLY is not set
+# CONFIG_MMCSD_MULTIBLOCK_DISABLE is not set
+CONFIG_MMCSD_MMCSUPPORT=y
+CONFIG_MMCSD_HAVECARDDETECT=y
+CONFIG_MMCSD_SPI=y
+CONFIG_MMCSD_SPICLOCK=20000000
+# CONFIG_MMCSD_SDIO is not set
+# CONFIG_SDIO_MUXBUS is not set
+# CONFIG_MTD is not set
+# CONFIG_PIPES is not set
+# CONFIG_PM is not set
+# CONFIG_POWER is not set
+# CONFIG_SENSORS is not set
+# CONFIG_SERCOMM_CONSOLE is not set
+CONFIG_SERIAL=y
+# CONFIG_DEV_LOWCONSOLE is not set
+# CONFIG_16550_UART is not set
+CONFIG_ARCH_HAVE_UART0=y
+CONFIG_ARCH_HAVE_UART1=y
+CONFIG_MCU_SERIAL=y
+CONFIG_STANDARD_SERIAL=y
+CONFIG_UART0_SERIAL_CONSOLE=y
+# CONFIG_UART1_SERIAL_CONSOLE is not set
+# CONFIG_NO_SERIAL_CONSOLE is not set
+
+#
+# UART0 Configuration
+#
+CONFIG_UART0_RXBUFSIZE=256
+CONFIG_UART0_TXBUFSIZE=256
+CONFIG_UART0_BAUD=38400
+CONFIG_UART0_BITS=8
+CONFIG_UART0_PARITY=0
+CONFIG_UART0_2STOP=0
+
+#
+# UART1 Configuration
+#
+CONFIG_UART1_RXBUFSIZE=256
+CONFIG_UART1_TXBUFSIZE=256
+CONFIG_UART1_BAUD=38400
+CONFIG_UART1_BITS=8
+CONFIG_UART1_PARITY=0
+CONFIG_UART1_2STOP=0
+# CONFIG_USBDEV is not set
+# CONFIG_USBHOST is not set
+# CONFIG_WIRELESS is not set
+
+#
+# System Logging Device Options
+#
+
+#
+# System Logging
+#
+# CONFIG_RAMLOG is not set
+
+#
+# Networking Support
+#
+# CONFIG_NET is not set
+
+#
+# File Systems
+#
+
+#
+# File system configuration
#
CONFIG_FS_FAT=y
CONFIG_FAT_LCNAMES=y
CONFIG_FAT_LFN=y
CONFIG_FAT_MAXFNAME=32
-CONFIG_FS_NXFFS=n
-CONFIG_FS_ROMFS=n
+# CONFIG_FS_FATTIME is not set
+# CONFIG_FAT_DMAMEMORY is not set
+# CONFIG_FS_RAMMAP is not set
+# CONFIG_FS_NXFFS is not set
+# CONFIG_FS_ROMFS is not set
#
-# Maintain legacy build behavior (revisit)
+# System Logging
#
-
-CONFIG_MMCSD=y
-CONFIG_MMCSD_SPI=y
-CONFIG_MMCSD_SDIO=y
+# CONFIG_SYSLOG is not set
#
-# SPI-based MMC/SD driver
+# Graphics Support
#
-CONFIG_MMCSD_NSLOTS=1
-CONFIG_MMCSD_READONLY=n
-#CONFIG_MMCSD_SPICLOCK=20000000
+# CONFIG_NX is not set
#
-# SPI-based MMC/SD driver
+# Memory Management
#
-CONFIG_MMCSD_NSLOTS=1
-CONFIG_MMCSD_READONLY=n
+# CONFIG_MM_SMALL is not set
+CONFIG_MM_REGIONS=1
+# CONFIG_GRAN is not set
#
-# TCP/IP and UDP support via uIP
+# Binary Formats
#
-CONFIG_NET=n
-CONFIG_NET_IPv6=n
-CONFIG_NSOCKET_DESCRIPTORS=0
-CONFIG_NET_SOCKOPTS=y
-CONFIG_NET_BUFSIZE=420
-CONFIG_NET_TCP=n
-CONFIG_NET_TCP_CONNS=40
-CONFIG_NET_MAX_LISTENPORTS=40
-CONFIG_NET_UDP=n
-CONFIG_NET_UDP_CHECKSUMS=y
-#CONFIG_NET_UDP_CONNS=10
-CONFIG_NET_ICMP=n
-CONFIG_NET_ICMP_PING=n
-#CONFIG_NET_PINGADDRCONF=0
-CONFIG_NET_STATISTICS=y
-#CONFIG_NET_RECEIVE_WINDOW=
-#CONFIG_NET_ARPTAB_SIZE=8
-CONFIG_NET_BROADCAST=n
+# CONFIG_BINFMT_DISABLE is not set
+# CONFIG_BINFMT_EXEPATH is not set
+# CONFIG_NXFLAT is not set
+# CONFIG_ELF is not set
+# CONFIG_PIC is not set
+# CONFIG_SYMTAB_ORDEREDBYNAME is not set
#
-# UIP Network Utilities
+# Library Routines
#
-CONFIG_NET_DHCP_LIGHT=n
-CONFIG_NET_RESOLV_ENTRIES=4
#
-# USB Device Configuration
+# Standard C Library Options
#
-CONFIG_USBDEV=n
-CONFIG_USBDEV_ISOCHRONOUS=n
-CONFIG_USBDEV_DUALSPEED=n
-CONFIG_USBDEV_SELFPOWERED=y
-CONFIG_USBDEV_REMOTEWAKEUP=n
-CONFIG_USBDEV_MAXPOWER=100
-CONFIG_USBDEV_TRACE=n
-CONFIG_USBDEV_TRACE_NRECORDS=128
+CONFIG_STDIO_BUFFER_SIZE=256
+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
+# CONFIG_EOL_IS_CR is not set
+# CONFIG_EOL_IS_LF is not set
+# CONFIG_EOL_IS_BOTH_CRLF is not set
+CONFIG_EOL_IS_EITHER_CRLF=y
+# CONFIG_LIBC_STRERROR is not set
+# CONFIG_LIBC_PERROR_STDOUT is not set
+CONFIG_ARCH_LOWPUTC=y
+CONFIG_LIB_SENDFILE_BUFSIZE=512
+# CONFIG_ARCH_ROMGETC is not set
+# CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set
#
-# LPC214X USB Configuration
+# Non-standard Helper Functions
#
-CONFIG_LPC214X_USBDEV_FRAME_INTERRUPT=n
-CONFIG_LPC214X_USBDEV_EPFAST_INTERRUPT=n
-CONFIG_LPC214X_USBDEV_DMA=n
-CONFIG_LPC214X_USBDEV_NDMADESCRIPTORS=0
-CONFIG_LPC214X_USBDEV_DMAINTMASK=0
+CONFIG_LIB_KBDCODEC=y
#
-# USB Serial Device Configuration
+# Basic CXX Support
#
-CONFIG_PL2303=n
-CONFIG_PL2303_EPINTIN=1
-CONFIG_PL2303_EPBULKOUT=2
-CONFIG_PL2303_EPBULKIN=5
-CONFIG_PL2303_NWRREQS=4
-CONFIG_PL2303_NRDREQS=4
-CONFIG_PL2303_VENDORID=0x067b
-CONFIG_PL2303_PRODUCTID=0x2303
-CONFIG_PL2303_VENDORSTR="Nuttx"
-CONFIG_PL2303_PRODUCTSTR="USBdev Serial"
-CONFIG_PL2303_RXBUFSIZE=512
-CONFIG_PL2303_TXBUFSIZE=512
+# CONFIG_C99_BOOL8 is not set
+# CONFIG_HAVE_CXX is not set
#
-# USB Storage Device Configuration
+# Application Configuration
#
-CONFIG_USBMSC=n
-CONFIG_USBMSC_EP0MAXPACKET=64
-CONFIG_USBMSC_EPBULKOUT=2
-CONFIG_USBMSC_EPBULKIN=5
-CONFIG_USBMSC_NRDREQS=2
-CONFIG_USBMSC_NWRREQS=2
-CONFIG_USBMSC_BULKINREQLEN=256
-CONFIG_USBMSC_BULKOUTREQLEN=256
-CONFIG_USBMSC_VENDORID=0x584e
-CONFIG_USBMSC_VENDORSTR="NuttX"
-CONFIG_USBMSC_PRODUCTID=0x5342
-CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
-CONFIG_USBMSC_VERSIONNO=0x0399
-CONFIG_USBMSC_REMOVABLE=y
#
-# Settings for examples/ostest
-CONFIG_EXAMPLES_OSTEST_LOOPS=1
-CONFIG_EXAMPLES_OSTEST_STACKSIZE=4096
-CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=3
+# Built-In Applications
+#
+# CONFIG_BUILTIN is not set
#
-# Settings for apps/nshlib
+# Examples
#
+# CONFIG_EXAMPLES_BUTTONS is not set
+# CONFIG_EXAMPLES_CAN is not set
+# CONFIG_EXAMPLES_CDCACM is not set
+# CONFIG_EXAMPLES_COMPOSITE is not set
+# CONFIG_EXAMPLES_DHCPD is not set
+# CONFIG_EXAMPLES_ELF is not set
+# CONFIG_EXAMPLES_FTPC is not set
+# CONFIG_EXAMPLES_FTPD is not set
+# CONFIG_EXAMPLES_HELLO is not set
+# CONFIG_EXAMPLES_HELLOXX is not set
+# CONFIG_EXAMPLES_JSON is not set
+# CONFIG_EXAMPLES_HIDKBD is not set
+# CONFIG_EXAMPLES_KEYPADTEST is not set
+# CONFIG_EXAMPLES_IGMP is not set
+# CONFIG_EXAMPLES_LCDRW is not set
+# CONFIG_EXAMPLES_MM is not set
+# CONFIG_EXAMPLES_MOUNT is not set
+# CONFIG_EXAMPLES_MODBUS is not set
+# CONFIG_EXAMPLES_NETTEST is not set
+CONFIG_EXAMPLES_NSH=y
+# CONFIG_EXAMPLES_NULL is not set
+# CONFIG_EXAMPLES_NX is not set
+# CONFIG_EXAMPLES_NXCONSOLE is not set
+# CONFIG_EXAMPLES_NXFFS is not set
+# CONFIG_EXAMPLES_NXFLAT is not set
+# CONFIG_EXAMPLES_NXHELLO is not set
+# CONFIG_EXAMPLES_NXIMAGE is not set
+# CONFIG_EXAMPLES_NXLINES is not set
+# CONFIG_EXAMPLES_NXTEXT is not set
+# CONFIG_EXAMPLES_OSTEST is not set
+# CONFIG_EXAMPLES_PASHELLO is not set
+# CONFIG_EXAMPLES_PIPE is not set
+# CONFIG_EXAMPLES_POLL is not set
+# CONFIG_EXAMPLES_QENCODER is not set
+# CONFIG_EXAMPLES_RGMP is not set
+# CONFIG_EXAMPLES_ROMFS is not set
+# CONFIG_EXAMPLES_SENDMAIL is not set
+# CONFIG_EXAMPLES_SERLOOP is not set
+# CONFIG_EXAMPLES_TELNETD is not set
+# CONFIG_EXAMPLES_THTTPD is not set
+# CONFIG_EXAMPLES_TIFF is not set
+# CONFIG_EXAMPLES_TOUCHSCREEN is not set
+# CONFIG_EXAMPLES_UDP is not set
+# CONFIG_EXAMPLES_UIP is not set
+# CONFIG_EXAMPLES_USBSERIAL is not set
+# CONFIG_EXAMPLES_USBMSC is not set
+# CONFIG_EXAMPLES_USBTERM is not set
+# CONFIG_EXAMPLES_WATCHDOG is not set
+# CONFIG_EXAMPLES_WLAN is not set
+
+#
+# Interpreters
+#
+
+#
+# Interpreters
+#
+# CONFIG_INTERPRETERS_FICL is not set
+# CONFIG_INTERPRETERS_PCODE is not set
+
+#
+# Network Utilities
+#
+
+#
+# Networking Utilities
+#
+# CONFIG_NETUTILS_CODECS is not set
+# CONFIG_NETUTILS_DHCPC is not set
+# CONFIG_NETUTILS_DHCPD is not set
+# CONFIG_NETUTILS_FTPC is not set
+# CONFIG_NETUTILS_FTPD is not set
+# CONFIG_NETUTILS_JSON is not set
+# CONFIG_NETUTILS_RESOLV is not set
+# CONFIG_NETUTILS_SMTP is not set
+# CONFIG_NETUTILS_TELNETD is not set
+# CONFIG_NETUTILS_TFTPC is not set
+# CONFIG_NETUTILS_THTTPD is not set
+# CONFIG_NETUTILS_UIPLIB is not set
+# CONFIG_NETUTILS_WEBCLIENT is not set
+
+#
+# ModBus
+#
+
+#
+# FreeModbus
+#
+# CONFIG_MODBUS is not set
+
+#
+# NSH Library
+#
+CONFIG_NSH_LIBRARY=y
+
+#
+# Disable Individual commands
+#
+# CONFIG_NSH_DISABLE_CAT is not set
+# CONFIG_NSH_DISABLE_CD is not set
+# CONFIG_NSH_DISABLE_CP is not set
+# CONFIG_NSH_DISABLE_DD is not set
+# CONFIG_NSH_DISABLE_ECHO is not set
+# CONFIG_NSH_DISABLE_EXEC is not set
+# CONFIG_NSH_DISABLE_EXIT is not set
+# CONFIG_NSH_DISABLE_FREE is not set
+# CONFIG_NSH_DISABLE_GET is not set
+# CONFIG_NSH_DISABLE_HELP is not set
+# CONFIG_NSH_DISABLE_HEXDUMP is not set
+# CONFIG_NSH_DISABLE_IFCONFIG is not set
+# CONFIG_NSH_DISABLE_KILL is not set
+# CONFIG_NSH_DISABLE_LOSETUP is not set
+# CONFIG_NSH_DISABLE_LS is not set
+# CONFIG_NSH_DISABLE_MB is not set
+# CONFIG_NSH_DISABLE_MKDIR is not set
+# CONFIG_NSH_DISABLE_MKFATFS is not set
+# CONFIG_NSH_DISABLE_MKFIFO is not set
+# CONFIG_NSH_DISABLE_MKRD is not set
+# CONFIG_NSH_DISABLE_MH is not set
+# CONFIG_NSH_DISABLE_MOUNT is not set
+# CONFIG_NSH_DISABLE_MW is not set
+# CONFIG_NSH_DISABLE_NSFMOUNT is not set
+# CONFIG_NSH_DISABLE_PS is not set
+# CONFIG_NSH_DISABLE_PING is not set
+# CONFIG_NSH_DISABLE_PUT is not set
+# CONFIG_NSH_DISABLE_PWD is not set
+# CONFIG_NSH_DISABLE_RM is not set
+# CONFIG_NSH_DISABLE_RMDIR is not set
+# CONFIG_NSH_DISABLE_SET is not set
+# CONFIG_NSH_DISABLE_SH is not set
+# CONFIG_NSH_DISABLE_SLEEP is not set
+# CONFIG_NSH_DISABLE_TEST is not set
+# CONFIG_NSH_DISABLE_UMOUNT is not set
+# CONFIG_NSH_DISABLE_UNSET is not set
+# CONFIG_NSH_DISABLE_USLEEP is not set
+# CONFIG_NSH_DISABLE_WGET is not set
+# CONFIG_NSH_DISABLE_XD is not set
+CONFIG_NSH_CODECS_BUFSIZE=128
CONFIG_NSH_FILEIOSIZE=512
-CONFIG_NSH_STRERROR=n
CONFIG_NSH_LINELEN=64
CONFIG_NSH_NESTDEPTH=3
-CONFIG_NSH_DISABLESCRIPT=n
-CONFIG_NSH_DISABLEBG=n
-CONFIG_NSH_ROMFSETC=n
+# CONFIG_NSH_DISABLESCRIPT is not set
+# CONFIG_NSH_DISABLEBG is not set
CONFIG_NSH_CONSOLE=y
-CONFIG_NSH_TELNET=n
+# CONFIG_NSH_CONDEV is not set
CONFIG_NSH_ARCHINIT=y
-CONFIG_NSH_IOBUFFER_SIZE=512
-CONFIG_NSH_DHCPC=n
-CONFIG_NSH_NOMAC=n
-CONFIG_NSH_IPADDR=0x0a000002
-CONFIG_NSH_DRIPADDR=0x0a000001
-CONFIG_NSH_NETMASK=0xffffff00
-CONFIG_NSH_ROMFSMOUNTPT="/etc"
-CONFIG_NSH_INITSCRIPT="init.d/rcS"
-CONFIG_NSH_ROMFSDEVNO=0
-CONFIG_NSH_ROMFSSECTSIZE=64
-CONFIG_NSH_FATDEVNO=1
-CONFIG_NSH_FATSECTSIZE=512
-CONFIG_NSH_FATNSECTORS=1024
-CONFIG_NSH_FATMOUNTPT="/tmp"
#
-# Architecture-specific NSH options
-CONFIG_NSH_MMCSDSPIPORTNO=1
-CONFIG_NSH_MMCSDSLOTNO=0
-CONFIG_NSH_MMCSDMINOR=0
+# NxWidgets/NxWM
+#
#
-# Stack and heap information
+# System NSH Add-Ons
#
-CONFIG_BOOT_RUNFROMFLASH=n
-CONFIG_BOOT_COPYTORAM=n
-CONFIG_CUSTOM_STACK=n
-CONFIG_IDLETHREAD_STACKSIZE=2048
-CONFIG_USERMAIN_STACKSIZE=2048
-CONFIG_PTHREAD_STACK_MIN=256
-CONFIG_PTHREAD_STACK_DEFAULT=2048
-CONFIG_HEAP_BASE=
-CONFIG_HEAP_SIZE=
+
+#
+# Custom Free Memory Command
+#
+# CONFIG_SYSTEM_FREE is not set
+
+#
+# I2C tool
+#
+
+#
+# FLASH Program Installation
+#
+# CONFIG_SYSTEM_INSTALL is not set
+
+#
+# readline()
+#
+CONFIG_SYSTEM_READLINE=y
+CONFIG_READLINE_ECHO=y
+
+#
+# Power Off
+#
+# CONFIG_SYSTEM_POWEROFF is not set
+
+#
+# RAMTRON
+#
+# CONFIG_SYSTEM_RAMTRON is not set
+
+#
+# SD Card
+#
+# CONFIG_SYSTEM_SDCARD is not set
+
+#
+# Sysinfo
+#
+# CONFIG_SYSTEM_SYSINFO is not set
diff --git a/nuttx/configs/mcu123-lpc214x/scripts/ld.script b/nuttx/configs/mcu123-lpc214x/scripts/ld.script
index 8ce83748f9..bc025dfb7f 100644
--- a/nuttx/configs/mcu123-lpc214x/scripts/ld.script
+++ b/nuttx/configs/mcu123-lpc214x/scripts/ld.script
@@ -35,12 +35,12 @@
/* FLASH:
* The lpc2148 has 512Kb of non-volatile memory beginning at address
- * 0x00000000. The OS entry point is via the reset vector at address
- * 0x00000000 (default MEMMAP mode assumed)
+ * 0x0000:0000. The OS entry point is via the reset vector at address
+ * 0x0000:0000 (default MEMMAP mode assumed)
*
* SRAM:
* The lpc2148 has 32Kb of on-chip static RAM beginning at address
- * 0x40000000. The .data section will be relocated from _eronly
+ * 0x4000:0000. The .data section will be relocated from _eronly
* to _sdata at boot time.
*/
diff --git a/nuttx/configs/sim/nxlines/Make.defs b/nuttx/configs/sim/nxlines/Make.defs
new file mode 100644
index 0000000000..18c8bf5375
--- /dev/null
+++ b/nuttx/configs/sim/nxlines/Make.defs
@@ -0,0 +1,107 @@
+############################################################################
+# configs/sim/nxlines/Make.defs
+#
+# Copyright (C) 2012 Gregory Nutt. All rights reserved.
+# Author: Gregory Nutt
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+# 3. Neither the name NuttX nor the names of its contributors may be
+# used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+#
+############################################################################
+
+include ${TOPDIR}/.config
+include ${TOPDIR}/tools/Config.mk
+
+HOSTOS = ${shell uname -o 2>/dev/null || echo "Other"}
+
+ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
+ ARCHOPTIMIZATION = -g
+else
+ ARCHOPTIMIZATION = -O2
+endif
+
+ARCHCPUFLAGS = -fno-builtin
+ARCHCPUFLAGSXX = -fno-builtin -fno-exceptions -fno-rtti
+ARCHPICFLAGS = -fpic
+ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow
+ARCHWARNINGSXX = -Wall -Wshadow
+ARCHDEFINES =
+ARCHINCLUDES = -I. -isystem $(TOPDIR)/include
+ARCHINCLUDESXX = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
+ARCHSCRIPT =
+
+ifeq ($(CONFIG_SIM_M32),y)
+ ARCHCPUFLAGS += -m32
+ ARCHCPUFLAGSXX += -m32
+endif
+
+CROSSDEV =
+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
+
+CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe
+CXXFLAGS = $(ARCHWARNINGSXX) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGSXX) $(ARCHINCLUDESXX) $(ARCHDEFINES) $(EXTRADEFINES) -pipe
+CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
+AFLAGS = $(CFLAGS) -D__ASSEMBLY__
+
+OBJEXT = .o
+LIBEXT = .a
+
+ifeq ($(HOSTOS),Cygwin)
+ EXEEXT = .exe
+else
+ EXEEXT =
+endif
+
+LDLINKFLAGS = $(ARCHSCRIPT) # Link flags used with $(LD)
+CCLINKFLAGS = $(ARCHSCRIPT) # Link flags used with $(CC)
+LDFLAGS = $(ARCHSCRIPT) # For backward compatibility, same as CCLINKFLAGS
+
+ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
+ LDLINKFLAGS += -g
+ CCLINKFLAGS += -g
+ LDFLAGS += -g
+endif
+
+ifeq ($(CONFIG_SIM_M32),y)
+ LDLINKFLAGS += -melf_i386
+ CCLINKFLAGS += -m32
+ LDFLAGS += -m32
+endif
+
+MKDEP = $(TOPDIR)/tools/mkdeps.sh
+
+HOSTCC = gcc
+HOSTINCLUDES = -I.
+HOSTCFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(HOSTINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe
+HOSTLDFLAGS =
diff --git a/nuttx/configs/sim/nxlines/defconfig b/nuttx/configs/sim/nxlines/defconfig
new file mode 100644
index 0000000000..c023af6743
--- /dev/null
+++ b/nuttx/configs/sim/nxlines/defconfig
@@ -0,0 +1,591 @@
+#
+# Automatically generated file; DO NOT EDIT.
+# Nuttx/ Configuration
+#
+CONFIG_NUTTX_NEWCONFIG=y
+
+#
+# Build Setup
+#
+# CONFIG_EXPERIMENTAL is not set
+# CONFIG_HOST_LINUX is not set
+# CONFIG_HOST_OSX is not set
+CONFIG_HOST_WINDOWS=y
+# CONFIG_HOST_OTHER is not set
+# CONFIG_WINDOWS_NATIVE is not set
+CONFIG_WINDOWS_CYGWIN=y
+# CONFIG_WINDOWS_MSYS is not set
+# CONFIG_WINDOWS_OTHER is not set
+
+#
+# Build Configuration
+#
+CONFIG_APPS_DIR="../apps"
+# CONFIG_BUILD_2PASS is not set
+
+#
+# Binary Output Formats
+#
+# CONFIG_RRLOAD_BINARY is not set
+# CONFIG_INTELHEX_BINARY is not set
+# CONFIG_MOTOROLA_SREC is not set
+# CONFIG_RAW_BINARY is not set
+
+#
+# Customize Header Files
+#
+# CONFIG_ARCH_STDBOOL_H is not set
+# CONFIG_ARCH_MATH_H is not set
+# CONFIG_ARCH_FLOAT_H is not set
+# CONFIG_ARCH_STDARG_H is not set
+
+#
+# Debug Options
+#
+# CONFIG_DEBUG is not set
+CONFIG_DEBUG_SYMBOLS=y
+
+#
+# System Type
+#
+# CONFIG_ARCH_8051 is not set
+# CONFIG_ARCH_ARM is not set
+# CONFIG_ARCH_AVR is not set
+# CONFIG_ARCH_HC is not set
+# CONFIG_ARCH_MIPS is not set
+# CONFIG_ARCH_RGMP is not set
+# CONFIG_ARCH_SH is not set
+CONFIG_ARCH_SIM=y
+# CONFIG_ARCH_X86 is not set
+# CONFIG_ARCH_Z16 is not set
+# CONFIG_ARCH_Z80 is not set
+CONFIG_ARCH="sim"
+CONFIG_BOARD_LOOPSPERMSEC=
+
+#
+# Simulation Configuration Options
+#
+# CONFIG_SIM_M32 is not set
+# CONFIG_SIM_WALLTIME is not set
+CONFIG_SIM_FRAMEBUFFER=y
+CONFIG_SIM_X11FB=y
+# CONFIG_SIM_X11NOSHM is not set
+CONFIG_SIM_FBHEIGHT=240
+CONFIG_SIM_FBWIDTH=480
+CONFIG_SIM_FBBPP=32
+
+#
+# Architecture Options
+#
+# CONFIG_ARCH_NOINTC is not set
+# CONFIG_ARCH_DMA is not set
+# CONFIG_ARCH_IRQPRIO is not set
+# CONFIG_CUSTOM_STACK is not set
+# CONFIG_ADDRENV is not set
+# CONFIG_ARCH_STACKDUMP is not set
+# CONFIG_ENDIAN_BIG is not set
+
+#
+# Board Settings
+#
+CONFIG_DRAM_START=
+CONFIG_DRAM_SIZE=
+
+#
+# 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_SIM=y
+# CONFIG_ARCH_BOARD_CUSTOM is not set
+CONFIG_ARCH_BOARD="sim"
+
+#
+# Common Board Options
+#
+CONFIG_NSH_MMCSDMINOR=0
+
+#
+# Board-Specific Options
+#
+
+#
+# RTOS Features
+#
+CONFIG_MSEC_PER_TICK=10
+CONFIG_RR_INTERVAL=0
+# CONFIG_SCHED_INSTRUMENTATION is not set
+CONFIG_TASK_NAME_SIZE=32
+# CONFIG_JULIAN_TIME is not set
+CONFIG_START_YEAR=2012
+CONFIG_START_MONTH=5
+CONFIG_START_DAY=1
+CONFIG_DEV_CONSOLE=y
+# CONFIG_MUTEX_TYPES is not set
+# CONFIG_PRIORITY_INHERITANCE is not set
+# CONFIG_FDCLONE_DISABLE is not set
+# CONFIG_FDCLONE_STDIO is not set
+CONFIG_SDCLONE_DISABLE=y
+# CONFIG_SCHED_WORKQUEUE is not set
+CONFIG_SCHED_WAITPID=y
+# CONFIG_SCHED_ATEXIT is not set
+CONFIG_SCHED_ONEXIT=y
+CONFIG_SCHED_ONEXIT_MAX=1
+CONFIG_USER_ENTRYPOINT="nxlines_main"
+CONFIG_DISABLE_OS_API=y
+# CONFIG_DISABLE_CLOCK is not set
+CONFIG_DISABLE_POSIX_TIMERS=y
+# CONFIG_DISABLE_PTHREAD is not set
+# CONFIG_DISABLE_SIGNALS is not set
+# CONFIG_DISABLE_MQUEUE is not set
+# CONFIG_DISABLE_MOUNTPOINT is not set
+# CONFIG_DISABLE_ENVIRON is not set
+CONFIG_DISABLE_POLL=y
+
+#
+# Sizes of configurable things (0 disables)
+#
+CONFIG_MAX_TASKS=16
+CONFIG_MAX_TASK_ARGS=4
+CONFIG_NPTHREAD_KEYS=4
+CONFIG_NFILE_DESCRIPTORS=16
+CONFIG_NFILE_STREAMS=16
+CONFIG_NAME_MAX=32
+CONFIG_PREALLOC_MQ_MSGS=32
+CONFIG_MQ_MAXMSGSIZE=48
+CONFIG_MAX_WDOGPARMS=4
+CONFIG_PREALLOC_WDOGS=32
+CONFIG_PREALLOC_TIMERS=8
+
+#
+# Stack and heap information
+#
+CONFIG_IDLETHREAD_STACKSIZE=8192
+CONFIG_USERMAIN_STACKSIZE=16384
+CONFIG_PTHREAD_STACK_MIN=256
+CONFIG_PTHREAD_STACK_DEFAULT=8192
+
+#
+# Device Drivers
+#
+CONFIG_DEV_NULL=y
+# CONFIG_DEV_ZERO is not set
+# CONFIG_LOOP is not set
+# CONFIG_RAMDISK is not set
+# CONFIG_CAN is not set
+# CONFIG_PWM is not set
+# CONFIG_I2C is not set
+# CONFIG_SPI is not set
+# CONFIG_RTC is not set
+# CONFIG_WATCHDOG is not set
+# CONFIG_ANALOG is not set
+# CONFIG_BCH is not set
+# CONFIG_INPUT is not set
+# CONFIG_LCD is not set
+# CONFIG_MMCSD is not set
+# CONFIG_MTD is not set
+# CONFIG_PIPES is not set
+# CONFIG_PM is not set
+# CONFIG_POWER is not set
+# CONFIG_SENSORS is not set
+# CONFIG_SERCOMM_CONSOLE is not set
+CONFIG_SERIAL=y
+# CONFIG_DEV_LOWCONSOLE is not set
+# CONFIG_16550_UART is not set
+# CONFIG_STANDARD_SERIAL 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_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_RAMMAP is not set
+# CONFIG_FS_NXFFS is not set
+CONFIG_FS_ROMFS=y
+
+#
+# System Logging
+#
+# CONFIG_SYSLOG is not set
+
+#
+# Graphics Support
+#
+CONFIG_NX=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=y
+CONFIG_NX_DISABLE_24BPP=y
+# CONFIG_NX_DISABLE_32BPP is not set
+# 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=0x005a96bd
+CONFIG_NXTK_BORDERCOLOR2=0x00233a49
+CONFIG_NXTK_BORDERCOLOR3=0x00f8f8f8
+# CONFIG_NXTK_AUTORAISE is not set
+
+#
+# Font Selections
+#
+CONFIG_NXFONTS_CHARBITS=7
+# 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=y
+# 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
+
+#
+# Memory Management
+#
+# CONFIG_MM_SMALL is not set
+CONFIG_MM_REGIONS=1
+# CONFIG_GRAN is not set
+
+#
+# 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_PIC is not set
+# CONFIG_SYMTAB_ORDEREDBYNAME is not set
+
+#
+# Library Routines
+#
+
+#
+# Standard C Library Options
+#
+CONFIG_STDIO_BUFFER_SIZE=256
+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
+# CONFIG_EOL_IS_CR is not set
+# CONFIG_EOL_IS_LF is not set
+# CONFIG_EOL_IS_BOTH_CRLF is not set
+CONFIG_EOL_IS_EITHER_CRLF=y
+# CONFIG_LIBC_STRERROR is not set
+# CONFIG_LIBC_PERROR_STDOUT is not set
+CONFIG_ARCH_LOWPUTC=y
+CONFIG_LIB_SENDFILE_BUFSIZE=512
+# CONFIG_ARCH_ROMGETC is not set
+# CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set
+
+#
+# Non-standard Helper Functions
+#
+CONFIG_LIB_KBDCODEC=y
+
+#
+# Basic CXX Support
+#
+# CONFIG_C99_BOOL8 is not set
+CONFIG_HAVE_CXX=y
+# CONFIG_HAVE_CXXINITIALIZE is not set
+# CONFIG_CXX_NEWLONG is not set
+
+#
+# uClibc++ Standard C++ Library
+#
+# CONFIG_UCLIBCXX is not set
+
+#
+# Application Configuration
+#
+
+#
+# Built-In Applications
+#
+# CONFIG_BUILTIN is not set
+
+#
+# Examples
+#
+# CONFIG_EXAMPLES_BUTTONS is not set
+# CONFIG_EXAMPLES_CAN is not set
+# CONFIG_EXAMPLES_CDCACM is not set
+# CONFIG_EXAMPLES_COMPOSITE is not set
+# CONFIG_EXAMPLES_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_MOUNT is not set
+# CONFIG_EXAMPLES_MODBUS is not set
+# CONFIG_EXAMPLES_NETTEST is not set
+# CONFIG_EXAMPLES_NSH is not set
+# CONFIG_EXAMPLES_NULL is not set
+# CONFIG_EXAMPLES_NX is not set
+# CONFIG_EXAMPLES_NXCONSOLE is not set
+# CONFIG_EXAMPLES_NXFFS is not set
+# CONFIG_EXAMPLES_NXFLAT is not set
+# CONFIG_EXAMPLES_NXHELLO is not set
+# CONFIG_EXAMPLES_NXIMAGE is not set
+CONFIG_EXAMPLES_NXLINES=y
+CONFIG_EXAMPLES_NXLINES_VPLANE=0
+CONFIG_EXAMPLES_NXLINES_DEVNO=0
+CONFIG_EXAMPLES_NXLINES_BGCOLOR=0x00006400
+CONFIG_EXAMPLES_NXLINES_LINEWIDTH=16
+CONFIG_EXAMPLES_NXLINES_LINECOLOR=0x00ffff00
+CONFIG_EXAMPLES_NXLINES_BORDERWIDTH=16
+CONFIG_EXAMPLES_NXLINES_BORDERCOLOR=0x00ffff00
+CONFIG_EXAMPLES_NXLINES_CIRCLECOLOR=0x00f5f5dc
+CONFIG_EXAMPLES_NXLINES_BPP=32
+# CONFIG_EXAMPLES_NXLINES_EXTERNINIT is not set
+# CONFIG_EXAMPLES_NXTEXT is not set
+# CONFIG_EXAMPLES_OSTEST is not set
+# CONFIG_EXAMPLES_PASHELLO is not set
+# CONFIG_EXAMPLES_PIPE is not set
+# CONFIG_EXAMPLES_POLL is not set
+# CONFIG_EXAMPLES_QENCODER is not set
+# CONFIG_EXAMPLES_RGMP is not set
+# CONFIG_EXAMPLES_ROMFS is not set
+# CONFIG_EXAMPLES_SENDMAIL is not set
+# CONFIG_EXAMPLES_SERLOOP is not set
+# CONFIG_EXAMPLES_TELNETD is not set
+# CONFIG_EXAMPLES_THTTPD is not set
+# CONFIG_EXAMPLES_TIFF is not set
+# CONFIG_EXAMPLES_TOUCHSCREEN is not set
+# CONFIG_EXAMPLES_UDP is not set
+# CONFIG_EXAMPLES_UIP is not set
+# CONFIG_EXAMPLES_USBSERIAL is not set
+# CONFIG_EXAMPLES_USBMSC is not set
+# CONFIG_EXAMPLES_USBTERM is not set
+# CONFIG_EXAMPLES_WATCHDOG is not set
+# CONFIG_EXAMPLES_WLAN is not set
+
+#
+# Interpreters
+#
+
+#
+# Interpreters
+#
+# CONFIG_INTERPRETERS_FICL is not set
+# CONFIG_INTERPRETERS_PCODE is not set
+
+#
+# Network Utilities
+#
+
+#
+# Networking Utilities
+#
+# CONFIG_NETUTILS_CODECS is not set
+# CONFIG_NETUTILS_DHCPC is not set
+# CONFIG_NETUTILS_DHCPD is not set
+# CONFIG_NETUTILS_FTPC is not set
+# CONFIG_NETUTILS_FTPD is not set
+# CONFIG_NETUTILS_JSON is not set
+# CONFIG_NETUTILS_RESOLV is not set
+# CONFIG_NETUTILS_SMTP is not set
+# CONFIG_NETUTILS_TELNETD is not set
+# CONFIG_NETUTILS_TFTPC is not set
+# CONFIG_NETUTILS_THTTPD is not set
+# CONFIG_NETUTILS_UIPLIB is not set
+# CONFIG_NETUTILS_WEBCLIENT is not set
+
+#
+# ModBus
+#
+
+#
+# FreeModbus
+#
+# CONFIG_MODBUS is not set
+
+#
+# NSH Library
+#
+CONFIG_NSH_LIBRARY=y
+
+#
+# Disable Individual commands
+#
+# CONFIG_NSH_DISABLE_CAT is not set
+# CONFIG_NSH_DISABLE_CD is not set
+# CONFIG_NSH_DISABLE_CP is not set
+# CONFIG_NSH_DISABLE_DD is not set
+# CONFIG_NSH_DISABLE_ECHO is not set
+# CONFIG_NSH_DISABLE_EXEC is not set
+# CONFIG_NSH_DISABLE_EXIT is not set
+# CONFIG_NSH_DISABLE_FREE is not set
+# CONFIG_NSH_DISABLE_GET is not set
+# CONFIG_NSH_DISABLE_HELP is not set
+# CONFIG_NSH_DISABLE_HEXDUMP is not set
+# CONFIG_NSH_DISABLE_IFCONFIG is not set
+# CONFIG_NSH_DISABLE_KILL is not set
+# CONFIG_NSH_DISABLE_LOSETUP is not set
+# CONFIG_NSH_DISABLE_LS is not set
+# CONFIG_NSH_DISABLE_MB is not set
+# CONFIG_NSH_DISABLE_MKDIR is not set
+# CONFIG_NSH_DISABLE_MKFATFS is not set
+# CONFIG_NSH_DISABLE_MKFIFO is not set
+# CONFIG_NSH_DISABLE_MKRD is not set
+# CONFIG_NSH_DISABLE_MH is not set
+# CONFIG_NSH_DISABLE_MOUNT is not set
+# CONFIG_NSH_DISABLE_MW is not set
+# CONFIG_NSH_DISABLE_NSFMOUNT is not set
+# CONFIG_NSH_DISABLE_PS is not set
+# CONFIG_NSH_DISABLE_PING is not set
+# CONFIG_NSH_DISABLE_PUT is not set
+# CONFIG_NSH_DISABLE_PWD is not set
+# CONFIG_NSH_DISABLE_RM is not set
+# CONFIG_NSH_DISABLE_RMDIR is not set
+# CONFIG_NSH_DISABLE_SET is not set
+# CONFIG_NSH_DISABLE_SH is not set
+# CONFIG_NSH_DISABLE_SLEEP is not set
+# CONFIG_NSH_DISABLE_TEST is not set
+# CONFIG_NSH_DISABLE_UMOUNT is not set
+# CONFIG_NSH_DISABLE_UNSET is not set
+# CONFIG_NSH_DISABLE_USLEEP is not set
+# CONFIG_NSH_DISABLE_WGET is not set
+# CONFIG_NSH_DISABLE_XD is not set
+CONFIG_NSH_CODECS_BUFSIZE=128
+CONFIG_NSH_FILEIOSIZE=1024
+CONFIG_NSH_LINELEN=80
+CONFIG_NSH_NESTDEPTH=3
+# CONFIG_NSH_DISABLESCRIPT is not set
+# CONFIG_NSH_DISABLEBG is not set
+CONFIG_NSH_ROMFSETC=y
+CONFIG_NSH_ROMFSMOUNTPT="/etc"
+CONFIG_NSH_INITSCRIPT="init.d/rcS"
+CONFIG_NSH_ROMFSDEVNO=1
+CONFIG_NSH_ROMFSSECTSIZE=64
+CONFIG_NSH_FATDEVNO=2
+CONFIG_NSH_FATSECTSIZE=512
+CONFIG_NSH_FATNSECTORS=1024
+CONFIG_NSH_FATMOUNTPT="/tmp"
+CONFIG_NSH_CONSOLE=y
+# CONFIG_NSH_CONDEV is not set
+# CONFIG_NSH_ARCHINIT is not set
+
+#
+# NxWidgets/NxWM
+#
+# CONFIG_NXWIDGETS is not set
+
+#
+# System NSH Add-Ons
+#
+
+#
+# Custom Free Memory Command
+#
+# CONFIG_SYSTEM_FREE is not set
+
+#
+# I2C tool
+#
+
+#
+# FLASH Program Installation
+#
+# CONFIG_SYSTEM_INSTALL is not set
+
+#
+# readline()
+#
+CONFIG_SYSTEM_READLINE=y
+CONFIG_READLINE_ECHO=y
+
+#
+# Power Off
+#
+# CONFIG_SYSTEM_POWEROFF is not set
+
+#
+# RAMTRON
+#
+# CONFIG_SYSTEM_RAMTRON is not set
+
+#
+# SD Card
+#
+# CONFIG_SYSTEM_SDCARD is not set
+
+#
+# Sysinfo
+#
+# CONFIG_SYSTEM_SYSINFO is not set
diff --git a/nuttx/configs/mcu123-lpc214x/nsh/appconfig b/nuttx/configs/sim/nxlines/setenv.sh
old mode 100644
new mode 100755
similarity index 76%
rename from nuttx/configs/mcu123-lpc214x/nsh/appconfig
rename to nuttx/configs/sim/nxlines/setenv.sh
index f8e2d51652..0722cbc2ee
--- a/nuttx/configs/mcu123-lpc214x/nsh/appconfig
+++ b/nuttx/configs/sim/nxlines/setenv.sh
@@ -1,7 +1,7 @@
-############################################################################
-# configs/mcu123-lpc214x/nsh/appconfig
+#!/bin/bash
+# sim/nxlines/setenv.sh
#
-# Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
+# Copyright (C) 2012 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt
#
# Redistribution and use in source and binary forms, with or without
@@ -31,14 +31,23 @@
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
-############################################################################
-# Path to example in apps/examples containing the user_start entry point
+if [ "$_" = "$0" ] ; then
+ echo "You must source this script, not run it!" 1>&2
+ exit 1
+fi
-CONFIGURED_APPS += examples/nsh
+WD=`pwd`
+if [ ! -x "setenv.sh" ]; then
+ echo "This script must be executed from the top-level NuttX build directory"
+ exit 1
+fi
-# The NSH library
+if [ -z "${PATH_ORIG}" ]; then
+ export PATH_ORIG="${PATH}"
+fi
-CONFIGURED_APPS += system/readline
-CONFIGURED_APPS += nshlib
+#export NUTTX_BIN=
+#export PATH=${NUTTX_BIN}:/sbin:/usr/sbin:${PATH_ORIG}
+echo "PATH : ${PATH}"
diff --git a/nuttx/configs/zp214xpa/Kconfig b/nuttx/configs/zp214xpa/Kconfig
new file mode 100644
index 0000000000..d8d04ca5cf
--- /dev/null
+++ b/nuttx/configs/zp214xpa/Kconfig
@@ -0,0 +1,7 @@
+#
+# For a description of the syntax of this configuration file,
+# see misc/tools/kconfig-language.txt.
+#
+
+if ARCH_BOARD_ZP214XPA
+endif
diff --git a/nuttx/configs/zp214xpa/README.txt b/nuttx/configs/zp214xpa/README.txt
new file mode 100644
index 0000000000..6fd7bfba9d
--- /dev/null
+++ b/nuttx/configs/zp214xpa/README.txt
@@ -0,0 +1,136 @@
+zp214xpa README FILE
+====================
+
+The ZP213X/4XPA board from the0.net with LPC2148 installed.
+Includes support for the UG-2864AMBAG01 OLED from The0.net.
+
+Contents
+========
+
+ o MCU Connections
+ o Serial Console
+ o Configurations
+
+MCU Connections:
+================
+
+Module Socket:
+--------------
+PIN NAME PIN NAME
+ 1 VBAT 56 VCC
+ 2 3V3 55 Vusb
+ 3 VREF 54 3V3
+ 4 P0.0 53 RESET
+ 5 P0.1 52 P1.31
+ 6 P0.2 51 P1.30
+ 7 P0.3 50 P1.29
+ 8 P0.4 49 P1.28
+ 9 P0.5 48 P1.27
+10 P0.6 47 P1.26
+11 P0.7 46 P1.25
+12 P0.8 45 P1.24
+13 P0.9 44 P1.23
+14 P0.10 43 P1.22
+15 P0.11 42 P1.21
+16 P0.12 41 P1.20
+17 P0.13 40 P1.19
+18 P0.14 39 P1.18
+19 P0.15 38 P1.17
+20 P0.16 37 P1.16
+21 P0.17 36 P0.31
+22 P0.18 35 P0.30
+23 P0.19 34 P0.29
+24 P0.20 33 P0.28
+25 P0.21 32 P0.27
+26 P0.22 31 P0.26
+27 P0.23 30 P0.25
+28 GND 29 GND
+
+JTAG Debug:
+-----------
+PIN NAME PIN NAME
+ 1 VCC1 2 3V3
+ 3 P1.31 NTRST 4 GND
+ 5 P1.28 TDI 6 GND
+ 7 P1.30 TMS 8 GND
+ 9 P1.29 TCK 10 GND
+11 P1.26 RTCK 12 GND
+13 P1.27 TDO 14 GND
+15 RESET NRTS 16 GND
+17 N/C NC0 18 GND
+19 N/C NC1 20 GND
+
+Z28160 Net Module:
+------------------
+PIN NAME PIN NAME
+ 1 P0.7 /CS 10 3V3 VCC
+ 2 P0.4 SCK 9 P1.24 RST
+ 3 P0.6 SI 8 N/C CLKOUT
+ 4 P0.5 SO 7 INT P1.25
+ 5 GND 6 N/C WOL
+
+SPI LCD:
+--------
+PIN NAME
+ 1 3V3 3V3
+ 2 VCC 5V
+ 3 P0.18 RESET(DO)
+ 4 P0.19 DI
+ 5 P0.20 CS
+ 6 P0.17 SCK
+ 7 P0.23 A0(RESET)
+ 8 N/C LED-
+ 9 N/C LED+(BL)
+10 GND GND
+
+USB Interface:
+--------------
+Vusb, P0.26, P0.27
+
+Serial Console:
+===============
+
+Both UART0 and UART1 are always enabled. UART0 is configured to be the
+serial console in these configurations.
+
+P0.0/TXD0/PWM1 Module Socket, Pin 4
+P0.1/RxD0/PWM3/EINT0 Module Socket, Pin 5
+
+P0.8/TXD1/PWM4/AD1.1 Module Socket, Pin 12
+P0.9/RxD1/PWM6/EINT3 Module Socket, Pin 13
+
+Configurations:
+===============
+
+Each NXP LPC214x configuration is maintained in a sudirectory and
+can be selected as follow:
+
+ cd tools
+ ./configure.sh zp214xpa/
+ cd -
+ . ./setenv.sh
+
+Where is one of the following:
+
+nsh:
+----
+
+ Configures the NuttShell (nsh) located at examples/nsh. The
+ Configuration enables only the serial NSH interfaces.
+
+ NOTES:
+
+ 1. This configuration uses the mconf-based configuration tool. To
+ change this configuration using that tool, you should:
+
+ a. Build and install the mconf tool. See nuttx/README.txt and
+ misc/tools/
+
+ b. Execute 'make menuconfig' in nuttx/ in order to start the
+ reconfiguration process.
+
+ 2. Default platform/toolchain:
+
+ CONFIG_HOST_LINUX=y : Windows
+ CONFIG_ARM_TOOLCHAIN_GNU_EABI=y : Buildroot (arm-nuttx-elf-gcc)
+ CONFIG_RAW_BINARY=y : Output formats: ELF and raw binary
diff --git a/nuttx/configs/zp214xpa/include/board.h b/nuttx/configs/zp214xpa/include/board.h
new file mode 100644
index 0000000000..111d8ad550
--- /dev/null
+++ b/nuttx/configs/zp214xpa/include/board.h
@@ -0,0 +1,68 @@
+/****************************************************************************
+ * configs/zp214xpa/include/board.h
+ *
+ * Copyright (C) 2012 Gregory Nutt. All rights reserved.
+ * Author: Gregory Nutt
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ * 3. Neither the name NuttX nor the names of its contributors may be
+ * used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ ****************************************************************************/
+
+#ifndef __CONFIGS_ZP214XPA_INCLUDE_BOARD_H
+#define __CONFIGS_ZP214XPA_INCLUDE_BOARD_H
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+/****************************************************************************
+ * Definitions
+ ****************************************************************************/
+
+/* Clocking *****************************************************************/
+
+/* Oscillator frequency */
+
+#define LPC214X_FOSC 12000000
+
+/* PLL0 settings CCLK = PLL_M * FOSC PCLK = CCLK/APBDIV */
+
+#define LPC214X_PLL_M 5
+#define LPC214X_PLL_P 2
+#define LPC214X_APB_DIV 1
+
+/* USB Pll settings -- 48 MHz needed. FUSB = PLL_M FOSC */
+
+#define LPC214X_USBPLL_M 4
+#define LPC214X_USBPLL_P 2
+
+/****************************************************************************
+ * Inline Functions
+ ****************************************************************************/
+
+#endif /* __CONFIGS_ZP214XPA_INCLUDE_BOARD_H */
diff --git a/nuttx/configs/zp214xpa/nsh/Make.defs b/nuttx/configs/zp214xpa/nsh/Make.defs
new file mode 100644
index 0000000000..f55e766d32
--- /dev/null
+++ b/nuttx/configs/zp214xpa/nsh/Make.defs
@@ -0,0 +1,128 @@
+##############################################################################
+# configs/zp214xpa/nsh/Make.defs
+#
+# Copyright (C) 2012 Gregory Nutt. All rights reserved.
+# Author: Gregory Nutt
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+# 3. Neither the name NuttX nor the names of its contributors may be
+# used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+#
+##############################################################################
+
+include ${TOPDIR}/.config
+include ${TOPDIR}/tools/Config.mk
+
+# The default value for CROSSDEV can be overridden from the make command line:
+# make -- Will build for the NuttX buildroot toolchain
+# make CROSSDEV=arm-eabi- -- Will build for the devkitARM toolchain
+# make CROSSDEV=arm-none-eabi- -- Will build for the CodeSourcery toolchain
+# make CROSSDEV=arm-nuttx-elf- -- Will build for the NuttX buildroot toolchain
+
+CROSSDEV = arm-nuttx-elf-
+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
+
+HOSTOS = ${shell uname -o 2>/dev/null || echo "Other"}
+
+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 ($(ARCHCCMAJOR),4)
+ifneq ($(HOSTOS),Cygwin)
+OBJCOPYARGS = -R .note -R .note.gnu.build-id -R .comment
+endif
+endif
+
+ifeq ($(CROSSDEV),arm-nuttx-elf-)
+ 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
+ MAXOPTIMIZATION = -Os
+else
+ WINTOOL = y
+ 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
+endif
+
+ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
+ ARCHOPTIMIZATION = -g
+else
+ ARCHOPTIMIZATION = $(MAXOPTIMIZATION) -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer
+endif
+
+ifeq ($(ARCHCCMAJOR),4)
+ ARCHCPUFLAGS = -mcpu=arm7tdmi -mfloat-abi=soft
+else
+ ARCHCPUFLAGS = -mapcs-32 -mcpu=arm7tdmi -msoft-float
+endif
+
+ARCHCFLAGS = -fno-builtin
+ARCHCXXFLAGS = -fno-builtin -fno-exceptions
+ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10
+ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow
+ARCHWARNINGSXX = -Wall -Wshadow
+ARCHDEFINES =
+
+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-gotoff.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/zp214xpa/nsh/defconfig b/nuttx/configs/zp214xpa/nsh/defconfig
new file mode 100644
index 0000000000..7c7d9d06cf
--- /dev/null
+++ b/nuttx/configs/zp214xpa/nsh/defconfig
@@ -0,0 +1,574 @@
+#
+# 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_LM3S is not set
+# CONFIG_ARCH_CHIP_LPC17XX is not set
+CONFIG_ARCH_CHIP_LPC214X=y
+# CONFIG_ARCH_CHIP_LPC2378 is not set
+# CONFIG_ARCH_CHIP_LPC31XX is not set
+# CONFIG_ARCH_CHIP_LPC43XX is not set
+# CONFIG_ARCH_CHIP_SAM3U is not set
+# CONFIG_ARCH_CHIP_STM32 is not set
+# CONFIG_ARCH_CHIP_STR71X is not set
+CONFIG_ARCH_ARM7TDMI=y
+CONFIG_ARCH_FAMILY="arm"
+CONFIG_ARCH_CHIP="lpc214x"
+CONFIG_ARCH_HAVE_LOWVECTORS=y
+# CONFIG_ARCH_LOWVECTORS is not set
+CONFIG_BOARD_LOOPSPERMSEC=3270
+# CONFIG_ARCH_CALIBRATION is not set
+
+#
+# ARM Configuration Options
+#
+# CONFIG_ARM_TOOLCHAIN_BUILDROOT is not set
+# CONFIG_ARM_TOOLCHAIN_CODESOURCERYL is not set
+CONFIG_ARM_TOOLCHAIN_GNU_EABI=y
+
+#
+# LPC214x Configuration Options
+#
+CONFIG_ARCH_CHIP_LPC2148=y
+
+#
+# LPC214x Initialization Options
+#
+# CONFIG_EXTMEM_MODE is not set
+# CONFIG_RAM_MODE is not set
+CONFIG_DEFAULT_MODE=y
+CONFIG_CODE_BASE=0x00000000
+CONFIG_PLL_SETUP=y
+CONFIG_MAM_SETUP=y
+CONFIG_APBDIV_SETUP=y
+CONFIG_APBDIV_VALUE=1
+# CONFIG_EMC_SETUP is not set
+# CONFIG_BCFG0_SETUP is not set
+# CONFIG_BCFG1_SETUP is not set
+# CONFIG_BCFG2_SETUP is not set
+# CONFIG_BCFG3_SETUP is not set
+CONFIG_ADC_SETUP=y
+
+#
+# LPC214x Peripheral Support
+#
+CONFIG_LPC214X_UART0=y
+CONFIG_LPC214X_UART1=y
+# CONFIG_LPC214x_FIO is not set
+
+#
+# Architecture Options
+#
+# CONFIG_ARCH_NOINTC is not set
+# CONFIG_ARCH_DMA is not set
+# CONFIG_ARCH_IRQPRIO is not set
+# CONFIG_CUSTOM_STACK is not set
+# CONFIG_ADDRENV is not set
+CONFIG_ARCH_STACKDUMP=y
+# CONFIG_ENDIAN_BIG is not set
+
+#
+# Board Settings
+#
+CONFIG_DRAM_START=0x40000000
+CONFIG_DRAM_SIZE=32768
+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_MCU123 is not set
+CONFIG_ARCH_BOARD_ZP214XPA=y
+# CONFIG_ARCH_BOARD_CUSTOM is not set
+CONFIG_ARCH_BOARD="zp214xpa"
+
+#
+# Common Board Options
+#
+CONFIG_NSH_MMCSDMINOR=0
+
+#
+# Board-Specific Options
+#
+
+#
+# RTOS Features
+#
+CONFIG_MSEC_PER_TICK=10
+CONFIG_RR_INTERVAL=0
+# CONFIG_SCHED_INSTRUMENTATION is not set
+CONFIG_TASK_NAME_SIZE=0
+# CONFIG_JULIAN_TIME is not set
+CONFIG_START_YEAR=2008
+CONFIG_START_MONTH=10
+CONFIG_START_DAY=1
+CONFIG_DEV_CONSOLE=y
+# CONFIG_MUTEX_TYPES is not set
+# CONFIG_PRIORITY_INHERITANCE is not set
+# CONFIG_FDCLONE_DISABLE is not set
+# CONFIG_FDCLONE_STDIO is not set
+CONFIG_SDCLONE_DISABLE=y
+# CONFIG_SCHED_WORKQUEUE is not set
+# CONFIG_SCHED_WAITPID is not set
+# CONFIG_SCHED_ATEXIT is not set
+# CONFIG_SCHED_ONEXIT is not set
+CONFIG_USER_ENTRYPOINT="nsh_main"
+CONFIG_DISABLE_OS_API=y
+# CONFIG_DISABLE_CLOCK is not set
+# CONFIG_DISABLE_POSIX_TIMERS is not set
+# CONFIG_DISABLE_PTHREAD is not set
+# CONFIG_DISABLE_SIGNALS is not set
+# CONFIG_DISABLE_MQUEUE is not set
+# CONFIG_DISABLE_MOUNTPOINT is not set
+# CONFIG_DISABLE_ENVIRON is not set
+CONFIG_DISABLE_POLL=y
+
+#
+# Sizes of configurable things (0 disables)
+#
+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=2048
+CONFIG_USERMAIN_STACKSIZE=2048
+CONFIG_PTHREAD_STACK_MIN=256
+CONFIG_PTHREAD_STACK_DEFAULT=2048
+
+#
+# Device Drivers
+#
+CONFIG_DEV_NULL=y
+# CONFIG_DEV_ZERO is not set
+# CONFIG_LOOP is not set
+# CONFIG_RAMDISK is not set
+# CONFIG_CAN is not set
+# CONFIG_PWM is not set
+# CONFIG_I2C is not set
+# CONFIG_SPI is not set
+# CONFIG_RTC is not set
+# CONFIG_WATCHDOG is not set
+# CONFIG_ANALOG is not set
+# CONFIG_BCH is not set
+# CONFIG_INPUT is not set
+# CONFIG_LCD is not set
+# CONFIG_MMCSD is not set
+# CONFIG_MTD is not set
+# CONFIG_PIPES is not set
+# CONFIG_PM is not set
+# CONFIG_POWER is not set
+# CONFIG_SENSORS is not set
+# CONFIG_SERCOMM_CONSOLE is not set
+CONFIG_SERIAL=y
+# CONFIG_DEV_LOWCONSOLE is not set
+# CONFIG_16550_UART is not set
+CONFIG_ARCH_HAVE_UART0=y
+CONFIG_ARCH_HAVE_UART1=y
+CONFIG_MCU_SERIAL=y
+CONFIG_STANDARD_SERIAL=y
+CONFIG_UART0_SERIAL_CONSOLE=y
+# CONFIG_UART1_SERIAL_CONSOLE is not set
+# CONFIG_NO_SERIAL_CONSOLE is not set
+
+#
+# UART0 Configuration
+#
+CONFIG_UART0_RXBUFSIZE=256
+CONFIG_UART0_TXBUFSIZE=256
+CONFIG_UART0_BAUD=38400
+CONFIG_UART0_BITS=8
+CONFIG_UART0_PARITY=0
+CONFIG_UART0_2STOP=0
+
+#
+# UART1 Configuration
+#
+CONFIG_UART1_RXBUFSIZE=256
+CONFIG_UART1_TXBUFSIZE=256
+CONFIG_UART1_BAUD=38400
+CONFIG_UART1_BITS=8
+CONFIG_UART1_PARITY=0
+CONFIG_UART1_2STOP=0
+# CONFIG_USBDEV is not set
+# CONFIG_USBHOST is not set
+# CONFIG_WIRELESS is not set
+
+#
+# System Logging Device Options
+#
+
+#
+# System Logging
+#
+# CONFIG_RAMLOG is not set
+
+#
+# Networking Support
+#
+# CONFIG_NET is not set
+
+#
+# File Systems
+#
+
+#
+# File system configuration
+#
+# CONFIG_FS_FAT is not set
+# CONFIG_FS_RAMMAP is not set
+# CONFIG_FS_NXFFS is not set
+# CONFIG_FS_ROMFS is not set
+
+#
+# System Logging
+#
+# CONFIG_SYSLOG is not set
+
+#
+# Graphics Support
+#
+# CONFIG_NX is not set
+
+#
+# Memory Management
+#
+# CONFIG_MM_SMALL is not set
+CONFIG_MM_REGIONS=1
+# CONFIG_GRAN is not set
+
+#
+# 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_PIC is not set
+# CONFIG_SYMTAB_ORDEREDBYNAME is not set
+
+#
+# Library Routines
+#
+
+#
+# Standard C Library Options
+#
+CONFIG_STDIO_BUFFER_SIZE=256
+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
+# CONFIG_EOL_IS_CR is not set
+# CONFIG_EOL_IS_LF is not set
+# CONFIG_EOL_IS_BOTH_CRLF is not set
+CONFIG_EOL_IS_EITHER_CRLF=y
+# CONFIG_LIBC_STRERROR is not set
+# CONFIG_LIBC_PERROR_STDOUT is not set
+CONFIG_ARCH_LOWPUTC=y
+CONFIG_LIB_SENDFILE_BUFSIZE=512
+# CONFIG_ARCH_ROMGETC is not set
+# CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set
+
+#
+# Non-standard Helper Functions
+#
+CONFIG_LIB_KBDCODEC=y
+
+#
+# Basic CXX Support
+#
+# CONFIG_C99_BOOL8 is not set
+# CONFIG_HAVE_CXX is not set
+
+#
+# Application Configuration
+#
+
+#
+# Built-In Applications
+#
+# CONFIG_BUILTIN is not set
+
+#
+# Examples
+#
+# CONFIG_EXAMPLES_BUTTONS is not set
+# CONFIG_EXAMPLES_CAN is not set
+# CONFIG_EXAMPLES_CDCACM is not set
+# CONFIG_EXAMPLES_COMPOSITE is not set
+# CONFIG_EXAMPLES_DHCPD is not set
+# CONFIG_EXAMPLES_ELF is not set
+# CONFIG_EXAMPLES_FTPC is not set
+# CONFIG_EXAMPLES_FTPD is not set
+# CONFIG_EXAMPLES_HELLO is not set
+# CONFIG_EXAMPLES_HELLOXX is not set
+# CONFIG_EXAMPLES_JSON is not set
+# CONFIG_EXAMPLES_HIDKBD is not set
+# CONFIG_EXAMPLES_KEYPADTEST is not set
+# CONFIG_EXAMPLES_IGMP is not set
+# CONFIG_EXAMPLES_LCDRW is not set
+# CONFIG_EXAMPLES_MM is not set
+# CONFIG_EXAMPLES_MOUNT is not set
+# CONFIG_EXAMPLES_MODBUS is not set
+# CONFIG_EXAMPLES_NETTEST is not set
+CONFIG_EXAMPLES_NSH=y
+# CONFIG_EXAMPLES_NULL is not set
+# CONFIG_EXAMPLES_NX is not set
+# CONFIG_EXAMPLES_NXCONSOLE is not set
+# CONFIG_EXAMPLES_NXFFS is not set
+# CONFIG_EXAMPLES_NXFLAT is not set
+# CONFIG_EXAMPLES_NXHELLO is not set
+# CONFIG_EXAMPLES_NXIMAGE is not set
+# CONFIG_EXAMPLES_NXLINES is not set
+# CONFIG_EXAMPLES_NXTEXT is not set
+# CONFIG_EXAMPLES_OSTEST is not set
+# CONFIG_EXAMPLES_PASHELLO is not set
+# CONFIG_EXAMPLES_PIPE is not set
+# CONFIG_EXAMPLES_POLL is not set
+# CONFIG_EXAMPLES_QENCODER is not set
+# CONFIG_EXAMPLES_RGMP is not set
+# CONFIG_EXAMPLES_ROMFS is not set
+# CONFIG_EXAMPLES_SENDMAIL is not set
+# CONFIG_EXAMPLES_SERLOOP is not set
+# CONFIG_EXAMPLES_TELNETD is not set
+# CONFIG_EXAMPLES_THTTPD is not set
+# CONFIG_EXAMPLES_TIFF is not set
+# CONFIG_EXAMPLES_TOUCHSCREEN is not set
+# CONFIG_EXAMPLES_UDP is not set
+# CONFIG_EXAMPLES_UIP is not set
+# CONFIG_EXAMPLES_USBSERIAL is not set
+# CONFIG_EXAMPLES_USBMSC is not set
+# CONFIG_EXAMPLES_USBTERM is not set
+# CONFIG_EXAMPLES_WATCHDOG is not set
+# CONFIG_EXAMPLES_WLAN is not set
+
+#
+# Interpreters
+#
+
+#
+# Interpreters
+#
+# CONFIG_INTERPRETERS_FICL is not set
+# CONFIG_INTERPRETERS_PCODE is not set
+
+#
+# Network Utilities
+#
+
+#
+# Networking Utilities
+#
+# CONFIG_NETUTILS_CODECS is not set
+# CONFIG_NETUTILS_DHCPC is not set
+# CONFIG_NETUTILS_DHCPD is not set
+# CONFIG_NETUTILS_FTPC is not set
+# CONFIG_NETUTILS_FTPD is not set
+# CONFIG_NETUTILS_JSON is not set
+# CONFIG_NETUTILS_RESOLV is not set
+# CONFIG_NETUTILS_SMTP is not set
+# CONFIG_NETUTILS_TELNETD is not set
+# CONFIG_NETUTILS_TFTPC is not set
+# CONFIG_NETUTILS_THTTPD is not set
+# CONFIG_NETUTILS_UIPLIB is not set
+# CONFIG_NETUTILS_WEBCLIENT is not set
+
+#
+# ModBus
+#
+
+#
+# FreeModbus
+#
+# CONFIG_MODBUS is not set
+
+#
+# NSH Library
+#
+CONFIG_NSH_LIBRARY=y
+
+#
+# Disable Individual commands
+#
+# CONFIG_NSH_DISABLE_CAT is not set
+# CONFIG_NSH_DISABLE_CD is not set
+# CONFIG_NSH_DISABLE_CP is not set
+# CONFIG_NSH_DISABLE_DD is not set
+# CONFIG_NSH_DISABLE_ECHO is not set
+# CONFIG_NSH_DISABLE_EXEC is not set
+# CONFIG_NSH_DISABLE_EXIT is not set
+# CONFIG_NSH_DISABLE_FREE is not set
+# CONFIG_NSH_DISABLE_GET is not set
+# CONFIG_NSH_DISABLE_HELP is not set
+# CONFIG_NSH_DISABLE_HEXDUMP is not set
+# CONFIG_NSH_DISABLE_IFCONFIG is not set
+# CONFIG_NSH_DISABLE_KILL is not set
+# CONFIG_NSH_DISABLE_LOSETUP is not set
+# CONFIG_NSH_DISABLE_LS is not set
+# CONFIG_NSH_DISABLE_MB is not set
+# CONFIG_NSH_DISABLE_MKDIR is not set
+# CONFIG_NSH_DISABLE_MKFATFS is not set
+# CONFIG_NSH_DISABLE_MKFIFO is not set
+# CONFIG_NSH_DISABLE_MKRD is not set
+# CONFIG_NSH_DISABLE_MH is not set
+# CONFIG_NSH_DISABLE_MOUNT is not set
+# CONFIG_NSH_DISABLE_MW is not set
+# CONFIG_NSH_DISABLE_NSFMOUNT is not set
+# CONFIG_NSH_DISABLE_PS is not set
+# CONFIG_NSH_DISABLE_PING is not set
+# CONFIG_NSH_DISABLE_PUT is not set
+# CONFIG_NSH_DISABLE_PWD is not set
+# CONFIG_NSH_DISABLE_RM is not set
+# CONFIG_NSH_DISABLE_RMDIR is not set
+# CONFIG_NSH_DISABLE_SET is not set
+# CONFIG_NSH_DISABLE_SH is not set
+# CONFIG_NSH_DISABLE_SLEEP is not set
+# CONFIG_NSH_DISABLE_TEST is not set
+# CONFIG_NSH_DISABLE_UMOUNT is not set
+# CONFIG_NSH_DISABLE_UNSET is not set
+# CONFIG_NSH_DISABLE_USLEEP is not set
+# CONFIG_NSH_DISABLE_WGET is not set
+# CONFIG_NSH_DISABLE_XD is not set
+CONFIG_NSH_CODECS_BUFSIZE=128
+CONFIG_NSH_FILEIOSIZE=512
+CONFIG_NSH_LINELEN=64
+CONFIG_NSH_NESTDEPTH=3
+# CONFIG_NSH_DISABLESCRIPT is not set
+# CONFIG_NSH_DISABLEBG is not set
+CONFIG_NSH_CONSOLE=y
+# 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
+
+#
+# readline()
+#
+CONFIG_SYSTEM_READLINE=y
+CONFIG_READLINE_ECHO=y
+
+#
+# Power Off
+#
+# CONFIG_SYSTEM_POWEROFF is not set
+
+#
+# RAMTRON
+#
+# CONFIG_SYSTEM_RAMTRON is not set
+
+#
+# SD Card
+#
+# CONFIG_SYSTEM_SDCARD is not set
+
+#
+# Sysinfo
+#
+# CONFIG_SYSTEM_SYSINFO is not set
diff --git a/nuttx/configs/zp214xpa/nsh/setenv.sh b/nuttx/configs/zp214xpa/nsh/setenv.sh
new file mode 100755
index 0000000000..724dab7064
--- /dev/null
+++ b/nuttx/configs/zp214xpa/nsh/setenv.sh
@@ -0,0 +1,65 @@
+#!/bin/bash
+# configs/zp214xpa/nsh/setenv.sh
+#
+# Copyright (C) 2012 Gregory Nutt. All rights reserved.
+# Author: Gregory Nutt
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+# 3. Neither the name NuttX nor the names of its contributors may be
+# used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+#
+
+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"
+
+# The zp214xpa/tools directory
+export LPCTOOL_DIR="${WD}/configs/zp214xpa/tools"
+
+# Add the path to the toolchain and tools directory to the PATH varialble
+export PATH="${TOOLCHAIN_BIN}:${LPCTOOL_DIR}:/sbin:/usr/sbin:${PATH_ORIG}"
+
+echo "PATH : ${PATH}"
diff --git a/nuttx/configs/zp214xpa/scripts/ld.script b/nuttx/configs/zp214xpa/scripts/ld.script
new file mode 100644
index 0000000000..ba6ff8f2c1
--- /dev/null
+++ b/nuttx/configs/zp214xpa/scripts/ld.script
@@ -0,0 +1,120 @@
+/****************************************************************************
+ * configs/zp214xpa/scripts/ld.script
+ *
+ * Copyright (C) 2012 Gregory Nutt. All rights reserved.
+ * Author: Gregory Nutt
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ * 3. Neither the name NuttX nor the names of its contributors may be
+ * used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ ****************************************************************************/
+
+/* FLASH:
+ * The lpc2148 has 512Kb of non-volatile memory beginning at address
+ * 0x0000:0000. The OS entry point is via the reset vector at address
+ * 0x0000:0000 (default MEMMAP mode assumed)
+ *
+ * SRAM:
+ * The lpc2148 has 32Kb of on-chip static RAM beginning at address
+ * 0x4000:0000. The .data section will be relocated from _eronly
+ * to _sdata at boot time.
+ */
+
+MEMORY
+{
+ flash (rx) : ORIGIN = 0x00000000, LENGTH = 500K
+ sram (rw) : ORIGIN = 0x40000000, LENGTH = 32K - 32
+}
+
+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(.);
+
+ _eronly = ABSOLUTE(.);
+
+ .data : {
+ _sdata = ABSOLUTE(.);
+ *(.data .data.*)
+ *(.gnu.linkonce.d.*)
+ CONSTRUCTORS
+ _edata = ABSOLUTE(.);
+ } > sram AT > flash
+
+ .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/zp214xpa/src/Makefile b/nuttx/configs/zp214xpa/src/Makefile
new file mode 100644
index 0000000000..8f1e1c05d9
--- /dev/null
+++ b/nuttx/configs/zp214xpa/src/Makefile
@@ -0,0 +1,84 @@
+############################################################################
+# configs/zp214xpa/src/Makefile
+#
+# Copyright (C) 2012 Gregory Nutt. All rights reserved.
+# Author: Gregory Nutt
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+# 3. Neither the name NuttX nor the names of its contributors may be
+# used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+#
+############################################################################
+
+-include $(TOPDIR)/Make.defs
+
+ARCH_SRCDIR = $(TOPDIR)/arch/$(CONFIG_ARCH)/src
+ifeq ($(WINTOOL),y)
+ CFLAGS += -I "${shell cygpath -w $(ARCH_SRCDIR)/chip}" \
+ -I "${shell cygpath -w $(ARCH_SRCDIR)/common}" \
+ -I "${shell cygpath -w $(ARCH_SRCDIR)/arm}" \
+ -I "${shell cygpath -w $(ARCH_SRCDIR)/sched}"
+else
+ CFLAGS += -I$(ARCH_SRCDIR)/chip -I$(ARCH_SRCDIR)/common -I$(ARCH_SRCDIR)/arm -I$(TOPDIR)/sched
+endif
+
+ASRCS =
+AOBJS = $(ASRCS:.S=$(OBJEXT))
+CSRCS =
+
+COBJS = $(CSRCS:.c=$(OBJEXT))
+
+SRCS = $(ASRCS) $(CSRCS)
+OBJS = $(AOBJS) $(COBJS)
+
+CFLAGS += -I $(TOPDIR)/arch/$(CONFIG_ARCH)/src
+
+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/drivers/mmcsd/Kconfig b/nuttx/drivers/mmcsd/Kconfig
index c224f220af..f3a64be6ce 100644
--- a/nuttx/drivers/mmcsd/Kconfig
+++ b/nuttx/drivers/mmcsd/Kconfig
@@ -2,6 +2,7 @@
# For a description of the syntax of this configuration file,
# see misc/tools/kconfig-language.txt.
#
+
config MMCSD_NSLOTS
int "Number of MMC/SD slots"
default 1
diff --git a/nuttx/drivers/usbhost/usbhost_hidkbd.c b/nuttx/drivers/usbhost/usbhost_hidkbd.c
index 0bab89c284..d6a9ceda31 100644
--- a/nuttx/drivers/usbhost/usbhost_hidkbd.c
+++ b/nuttx/drivers/usbhost/usbhost_hidkbd.c
@@ -421,7 +421,7 @@ static const uint8_t encoding[USBHID_NUMENCODINGS] =
KEYCODE_ENTER, 0, KEYCODE_FWDDEL, KEYCODE_BACKDEL, 0, 0, 0, 0,
- /* 0x30-0x37: },|,Non-US tilde,:,",grave tidle,<,> */
+ /* 0x30-0x37: },|,Non-US tilde,:,",grave tilde,<,> */
0, 0, 0, 0, 0, 0, 0, 0,
@@ -525,7 +525,7 @@ static const uint8_t ucmap[USBHID_NUMSCANCODES] =
'U', 'V', 'W', 'X', 'Y', 'Z', '!', '@', /* 0x18-0x1f: U-Z,!,@ */
'#', '$', '%', '^', '&', '*', '(', ')', /* 0x20-0x27: #,$,%,^,&,*,(,) */
'\n', '\033', '\177', 0, ' ', '_', '+', '{', /* 0x28-0x2f: Enter,escape,del,back-tab,space,_,+,{ */
- '}', '|', 0, ':', '"', 0, '<', '>', /* 0x30-0x37: },|,Non-US tilde,:,",grave tidle,<,> */
+ '}', '|', 0, ':', '"', '~', '<', '>', /* 0x30-0x37: },|,Non-US tilde,:,",grave tilde,<,> */
'?', 0, 0, 0, 0, 0, 0, 0, /* 0x38-0x3f: /,CapsLock,F1,F2,F3,F4,F5,F6 */
0, 0, 0, 0, 0, 0, 0, 0, /* 0x40-0x47: F7,F8,F9,F10,F11,F12,PrtScn,ScrollLock */
0, 0, 0, 0, 0, 0, 0, 0, /* 0x48-0x4f: Pause,Insert,Home,PageUp,DeleteForward,End,PageDown,RightArrow */
@@ -560,7 +560,7 @@ static const uint8_t lcmap[USBHID_NUMSCANCODES] =
'u', 'v', 'w', 'x', 'y', 'z', '1', '2', /* 0x18-0x1f: u-z,1-2 */
'3', '4', '5', '6', '7', '8', '9', '0', /* 0x20-0x27: 3-9,0 */
'\n', '\033', '\177', '\t', ' ', '-', '=', '[', /* 0x28-0x2f: Enter,escape,del,tab,space,-,=,[ */
- ']', '\\', '\234', ';', '\'', 0, ',', '.', /* 0x30-0x37: ],\,Non-US pound,;,',grave accent,,,. */
+ ']', '\\', '\234', ';', '\'', '`', ',', '.', /* 0x30-0x37: ],\,Non-US pound,;,',grave accent,,,. */
'/', 0, 0, 0, 0, 0, 0, 0, /* 0x38-0x3f: /,CapsLock,F1,F2,F3,F4,F5,F6 */
0, 0, 0, 0, 0, 0, 0, 0, /* 0x40-0x47: F7,F8,F9,F10,F11,F12,PrtScn,ScrollLock */
0, 0, 0, 0, 0, 0, 0, 0, /* 0x48-0x4f: Pause,Insert,Home,PageUp,DeleteForward,End,PageDown,RightArrow */
From e1eacb2254652f35e0eacc8b9a733bbad7976111 Mon Sep 17 00:00:00 2001
From: patacongo
Date: Sun, 30 Dec 2012 16:39:25 +0000
Subject: [PATCH 019/118] Add ZP213X/4XPA nxlines configuration (needs a little
more work)
git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5466 42af7a65-404d-4744-a932-0658087f49c3
---
.../configs/arm7tdmi-defconfig-4.3.3 | 7 +
nuttx/ChangeLog | 5 +-
nuttx/configs/mcu123-lpc214x/src/Makefile | 2 +-
.../src/{up_spi.c => up_spi1.c} | 4 +-
nuttx/configs/olimex-lpc1766stk/README.txt | 10 +-
nuttx/configs/sim/README.txt | 15 +
nuttx/configs/zp214xpa/README.txt | 368 +++++++---
nuttx/configs/zp214xpa/nxlines/Make.defs | 128 ++++
nuttx/configs/zp214xpa/nxlines/defconfig | 606 ++++++++++++++++
nuttx/configs/zp214xpa/nxlines/setenv.sh | 65 ++
nuttx/configs/zp214xpa/src/Makefile | 4 +
nuttx/configs/zp214xpa/src/up_spi1.c | 644 ++++++++++++++++++
nuttx/configs/zp214xpa/src/up_ug2864ambag01.c | 177 +++++
nuttx/configs/zp214xpa/tools/olimex.cfg | 62 ++
nuttx/configs/zp214xpa/tools/oocd.sh | 52 ++
nuttx/configs/zp214xpa/tools/usb-repair.txt | 25 +
nuttx/graphics/Kconfig | 6 +
nuttx/include/nuttx/nx/nxfonts.h | 5 +
18 files changed, 2094 insertions(+), 91 deletions(-)
rename nuttx/configs/mcu123-lpc214x/src/{up_spi.c => up_spi1.c} (99%)
create mode 100644 nuttx/configs/zp214xpa/nxlines/Make.defs
create mode 100644 nuttx/configs/zp214xpa/nxlines/defconfig
create mode 100755 nuttx/configs/zp214xpa/nxlines/setenv.sh
create mode 100644 nuttx/configs/zp214xpa/src/up_spi1.c
create mode 100644 nuttx/configs/zp214xpa/src/up_ug2864ambag01.c
create mode 100755 nuttx/configs/zp214xpa/tools/olimex.cfg
create mode 100755 nuttx/configs/zp214xpa/tools/oocd.sh
create mode 100644 nuttx/configs/zp214xpa/tools/usb-repair.txt
diff --git a/misc/buildroot/configs/arm7tdmi-defconfig-4.3.3 b/misc/buildroot/configs/arm7tdmi-defconfig-4.3.3
index 7e97a77d67..c027c8a8c9 100644
--- a/misc/buildroot/configs/arm7tdmi-defconfig-4.3.3
+++ b/misc/buildroot/configs/arm7tdmi-defconfig-4.3.3
@@ -14,6 +14,7 @@ BR2_arm=y
# BR2_m68k is not set
# BR2_m68hc11 is not set
# BR2_m68hc12 is not set
+# BR2_m9s12x is not set
# BR2_mips is not set
# BR2_mipsel is not set
# BR2_nios2 is not set
@@ -71,8 +72,11 @@ BR2_GNU_TARGET_SUFFIX="nuttx-elf"
# Binutils Options
#
# BR2_BINUTILS_VERSION_2_17 is not set
+# BR2_BINUTILS_VERSION_2_18 is not set
# BR2_BINUTILS_VERSION_2_19 is not set
BR2_BINUTILS_VERSION_2_19_1=y
+# BR2_BINUTILS_VERSION_2_21_1 is not set
+# BR2_BINUTILS_VERSION_2_22 is not set
BR2_BINUTILS_VERSION="2.19.1"
BR2_EXTRA_BINUTILS_CONFIG_OPTIONS=""
@@ -80,9 +84,12 @@ BR2_EXTRA_BINUTILS_CONFIG_OPTIONS=""
# GCC Options
#
BR2_PACKAGE_GCC=y
+# BR2_GCC_VERSION_3_3_6 is not set
# BR2_GCC_VERSION_3_4_6 is not set
# BR2_GCC_VERSION_4_2_4 is not set
BR2_GCC_VERSION_4_3_3=y
+# BR2_GCC_VERSION_4_5_2 is not set
+# BR2_GCC_VERSION_4_6_3 is not set
BR2_GCC_SUPPORTS_SYSROOT=y
BR2_GCC_VERSION="4.3.3"
# BR2_GCC_USE_SJLJ_EXCEPTIONS is not set
diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog
index dcabb6c071..56cc5515dc 100644
--- a/nuttx/ChangeLog
+++ b/nuttx/ChangeLog
@@ -3842,4 +3842,7 @@
board (with the LPC2148 and the UG_2864AMBAG01).
* configs/sim/nxlines: Add an nxlines configuration for the
simulator.
-
+ * configs/zp214xpa/nxlines: Add an nxlines configuration for the
+ ZP213x/4xPA (with the LPC2148 and the UG_2864AMBAG01). As of this
+ writing (2012-12-30), I see only garbage on the display each time
+ the display is updated.
diff --git a/nuttx/configs/mcu123-lpc214x/src/Makefile b/nuttx/configs/mcu123-lpc214x/src/Makefile
index 5ddcebe424..79f767fffc 100644
--- a/nuttx/configs/mcu123-lpc214x/src/Makefile
+++ b/nuttx/configs/mcu123-lpc214x/src/Makefile
@@ -47,7 +47,7 @@ endif
ASRCS =
AOBJS = $(ASRCS:.S=$(OBJEXT))
-CSRCS = up_spi.c up_leds.c
+CSRCS = up_spi1.c up_leds.c
ifeq ($(CONFIG_NSH_ARCHINIT),y)
CSRCS += up_nsh.c
diff --git a/nuttx/configs/mcu123-lpc214x/src/up_spi.c b/nuttx/configs/mcu123-lpc214x/src/up_spi1.c
similarity index 99%
rename from nuttx/configs/mcu123-lpc214x/src/up_spi.c
rename to nuttx/configs/mcu123-lpc214x/src/up_spi1.c
index b58c8d6670..61abee20a9 100644
--- a/nuttx/configs/mcu123-lpc214x/src/up_spi.c
+++ b/nuttx/configs/mcu123-lpc214x/src/up_spi1.c
@@ -1,6 +1,6 @@
/****************************************************************************
- * config/mcu123-lpc214x/src/up_spi.c
- * arch/arm/src/board/up_spi.c
+ * config/mcu123-lpc214x/src/up_spi1.c
+ * arch/arm/src/board/up_spi1.c
*
* Copyright (C) 2008-2010, 2012 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt
diff --git a/nuttx/configs/olimex-lpc1766stk/README.txt b/nuttx/configs/olimex-lpc1766stk/README.txt
index e2c940bac5..35f00e9f2e 100644
--- a/nuttx/configs/olimex-lpc1766stk/README.txt
+++ b/nuttx/configs/olimex-lpc1766stk/README.txt
@@ -439,12 +439,12 @@ LEDs
that interrupt). So a brighter LED1 means that the processor is spending
less time sleeping.
- When my STM32 sits IDLE -- doing absolutely nothing but processing timer interrupts --
+ When my LPC1766 sits IDLE -- doing absolutely nothing but processing timer interrupts --
I see the following:
1. LED1 glows dimly due to the timer interrupts.
2. But LED2 is even more dim! The LED ON time excludes the time processing the
- interrupt that re-awakens the processing. So this tells me that the STM32 is
+ interrupt that re-awakens the processing. So this tells me that the LPC1766 is
spending more time processing timer interrupts than doing any other kind of
processing. That, of course, makes sense if the system is truly idle and only
processing timer interrupts.
@@ -913,9 +913,9 @@ Where is one of the following:
2. Default platform/toolchain: This is how the build is configured by
be default. These options can easily be re-confured, however.
- CONFIG_HOST_WINDOWS=y : Windows
- CONFIG_WINDOWS_CYGWIN=y : Cygwin environment on Windows
- CONFIG_STM32_CODESOURCERYW=y : CodeSourcery under Windows
+ CONFIG_HOST_WINDOWS=y : Windows
+ CONFIG_WINDOWS_CYGWIN=y : Cygwin environment on Windows
+ CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYW=y : CodeSourcery under Windows
nettest:
This configuration directory may be used to enable networking using the
diff --git a/nuttx/configs/sim/README.txt b/nuttx/configs/sim/README.txt
index 03f163ea5a..ff756fb4b6 100644
--- a/nuttx/configs/sim/README.txt
+++ b/nuttx/configs/sim/README.txt
@@ -446,6 +446,21 @@ nx11
See apps/examples/README.txt for further details.
+nxlines
+
+ This is the apps/examples/nxlines test.
+
+ NOTES:
+ ------
+ 1. This configuration uses the mconf-based configuration tool. To
+ change this configuration using that tool, you should:
+
+ a. Build and install the mconf tool. See nuttx/README.txt and
+ misc/tools/
+
+ b. Execute 'make menuconfig' in nuttx/ in order to start the
+ reconfiguration process.
+
nxwm
This is a special configuration setup for the NxWM window manager
diff --git a/nuttx/configs/zp214xpa/README.txt b/nuttx/configs/zp214xpa/README.txt
index 6fd7bfba9d..9f577b98d5 100644
--- a/nuttx/configs/zp214xpa/README.txt
+++ b/nuttx/configs/zp214xpa/README.txt
@@ -9,114 +9,294 @@ Contents
o MCU Connections
o Serial Console
+ o Using OpenOCD and GDB with an FT2232 JTAG emulator
o Configurations
MCU Connections:
================
-Module Socket:
---------------
-PIN NAME PIN NAME
- 1 VBAT 56 VCC
- 2 3V3 55 Vusb
- 3 VREF 54 3V3
- 4 P0.0 53 RESET
- 5 P0.1 52 P1.31
- 6 P0.2 51 P1.30
- 7 P0.3 50 P1.29
- 8 P0.4 49 P1.28
- 9 P0.5 48 P1.27
-10 P0.6 47 P1.26
-11 P0.7 46 P1.25
-12 P0.8 45 P1.24
-13 P0.9 44 P1.23
-14 P0.10 43 P1.22
-15 P0.11 42 P1.21
-16 P0.12 41 P1.20
-17 P0.13 40 P1.19
-18 P0.14 39 P1.18
-19 P0.15 38 P1.17
-20 P0.16 37 P1.16
-21 P0.17 36 P0.31
-22 P0.18 35 P0.30
-23 P0.19 34 P0.29
-24 P0.20 33 P0.28
-25 P0.21 32 P0.27
-26 P0.22 31 P0.26
-27 P0.23 30 P0.25
-28 GND 29 GND
+The ZP213X/4XPA board is no more than an LPC2148, crystals,
+USB device and several connectors.
-JTAG Debug:
------------
-PIN NAME PIN NAME
- 1 VCC1 2 3V3
- 3 P1.31 NTRST 4 GND
- 5 P1.28 TDI 6 GND
- 7 P1.30 TMS 8 GND
- 9 P1.29 TCK 10 GND
-11 P1.26 RTCK 12 GND
-13 P1.27 TDO 14 GND
-15 RESET NRTS 16 GND
-17 N/C NC0 18 GND
-19 N/C NC1 20 GND
+ Module Socket:
+ --------------
+ PIN NAME PIN NAME
+ 1 VBAT 56 VCC
+ 2 3V3 55 Vusb
+ 3 VREF 54 3V3
+ 4 P0.0 53 RESET
+ 5 P0.1 52 P1.31
+ 6 P0.2 51 P1.30
+ 7 P0.3 50 P1.29
+ 8 P0.4 49 P1.28
+ 9 P0.5 48 P1.27
+ 10 P0.6 47 P1.26
+ 11 P0.7 46 P1.25
+ 12 P0.8 45 P1.24
+ 13 P0.9 44 P1.23
+ 14 P0.10 43 P1.22
+ 15 P0.11 42 P1.21
+ 16 P0.12 41 P1.20
+ 17 P0.13 40 P1.19
+ 18 P0.14 39 P1.18
+ 19 P0.15 38 P1.17
+ 20 P0.16 37 P1.16
+ 21 P0.17 36 P0.31
+ 22 P0.18 35 P0.30
+ 23 P0.19 34 P0.29
+ 24 P0.20 33 P0.28
+ 25 P0.21 32 P0.27
+ 26 P0.22 31 P0.26
+ 27 P0.23 30 P0.25
+ 28 GND 29 GND
-Z28160 Net Module:
-------------------
-PIN NAME PIN NAME
- 1 P0.7 /CS 10 3V3 VCC
- 2 P0.4 SCK 9 P1.24 RST
- 3 P0.6 SI 8 N/C CLKOUT
- 4 P0.5 SO 7 INT P1.25
- 5 GND 6 N/C WOL
+ JTAG Debug:
+ -----------
+ PIN NAME PIN NAME
+ 1 VCC1 2 3V3
+ 3 P1.31 NTRST 4 GND
+ 5 P1.28 TDI 6 GND
+ 7 P1.30 TMS 8 GND
+ 9 P1.29 TCK 10 GND
+ 11 P1.26 RTCK 12 GND
+ 13 P1.27 TDO 14 GND
+ 15 RESET NRTS 16 GND
+ 17 N/C NC0 18 GND
+ 19 N/C NC1 20 GND
-SPI LCD:
---------
-PIN NAME
- 1 3V3 3V3
- 2 VCC 5V
- 3 P0.18 RESET(DO)
- 4 P0.19 DI
- 5 P0.20 CS
- 6 P0.17 SCK
- 7 P0.23 A0(RESET)
- 8 N/C LED-
- 9 N/C LED+(BL)
-10 GND GND
+ Z28160 Net Module:
+ ------------------
+ PIN NAME PIN NAME
+ 1 P0.7 /CS 10 3V3 VCC
+ 2 P0.4 SCK 9 P1.24 RST
+ 3 P0.6 SI 8 N/C CLKOUT
+ 4 P0.5 SO 7 INT P1.25
+ 5 GND 6 N/C WOL
-USB Interface:
---------------
-Vusb, P0.26, P0.27
+ SPI LCD:
+ --------
+ PIN NAME
+ 1 3V3 3V3
+ 2 VCC 5V
+ 3 P0.18 RESET(DO)
+ 4 P0.19 DI
+ 5 P0.20 CS
+ 6 P0.17 SCK
+ 7 P0.23 A0(RESET)
+ 8 N/C LED-
+ 9 N/C LED+(BL)
+ 10 GND GND
+
+ USB Interface:
+ --------------
+ Vusb, P0.26, P0.27
Serial Console:
===============
-Both UART0 and UART1 are always enabled. UART0 is configured to be the
-serial console in these configurations.
+ Both UART0 and UART1 are always enabled. UART0 is configured to be the
+ serial console in these configurations.
-P0.0/TXD0/PWM1 Module Socket, Pin 4
-P0.1/RxD0/PWM3/EINT0 Module Socket, Pin 5
+ P0.0/TXD0/PWM1 Module Socket, Pin 4
+ P0.1/RxD0/PWM3/EINT0 Module Socket, Pin 5
-P0.8/TXD1/PWM4/AD1.1 Module Socket, Pin 12
-P0.9/RxD1/PWM6/EINT3 Module Socket, Pin 13
+ P0.8/TXD1/PWM4/AD1.1 Module Socket, Pin 12
+ P0.9/RxD1/PWM6/EINT3 Module Socket, Pin 13
+
+LCD Interface
+=============
+
+ PIN NAME PIN CONFIGURATION
+ 3 RESET P0.18/CAP1.3/MISO1/MAT1.3P0.18 RESET - General purpose output
+ 4 DI P0.19/MAT1.2/MOSI1/CAP1.2P0.19 DI - Alternate function 2
+ 5 CS P0.20/MAT1.3/SSEL1/EINT3 - General purpose output
+ 6 SCK P0.17/CAP1.2/SCK1/MAT1.2 - Alternate function 2
+ 7 A0 P0.23/VBUS - General purpose output
+
+ENC29J60 Interface
+==================
+
+ PIN NAME PIN CONFIGURATION
+ 1 /CS P0.7/SSEL0/PWM2/EINT2 - General purpose output
+ 2 SCK P0.4/SCK0/CAP0.1/AD0.6 - Alternate function 1
+ 3 SI P0.6/MOSI0/CAP0.2/AD1.0 - Alternate function 1
+ 4 SO P0.5/MISO0/MAT0.1/AD0.7 - Alternate function 1
+ 7 INT P1.25/EXTIN0 - Alternal function 1
+ 9 RST P1.24/TRACECLK - General purpose output
+
+Using OpenOCD and GDB with an FT2232 JTAG emulator
+==================================================
+
+ Downloading OpenOCD
+
+ You can get information about OpenOCD here: http://openocd.berlios.de/web/
+ and you can download it from here. http://sourceforge.net/projects/openocd/files/.
+ To get the latest OpenOCD with more mature lpc214x, you have to download
+ from the GIT archive.
+
+ git clone git://openocd.git.sourceforge.net/gitroot/openocd/openocd
+
+ At present, there is only the older, frozen 0.4.0 version. These, of course,
+ may have changed since I wrote this.
+
+ Building OpenOCD under Cygwin:
+
+ You can build OpenOCD for Windows using the Cygwin tools. Below are a
+ few notes that worked as of November 7, 2010. Things may have changed
+ by the time you read this, but perhaps the following will be helpful to
+ you:
+
+ 1. Install Cygwin (http://www.cygwin.com/). My recommendation is to install
+ everything. There are many tools you will need and it is best just to
+ waste a little disk space and have everthing you need. Everything will
+ require a couple of gigbytes of disk space.
+
+ 2. Create a directory /home/OpenOCD.
+
+ 3. Get the FT2232 drivr from http://www.ftdichip.com/Drivers/D2XX.htm and
+ extract it into /home/OpenOCD/ftd2xx
+
+ $ pwd
+ /home/OpenOCD
+ $ ls
+ CDM20802 WHQL Certified.zip
+ $ mkdir ftd2xx
+ $ cd ftd2xx
+ $ unzip ..CDM20802\ WHQL\ Certified.zip
+ Archive: CDM20802 WHQL Certified.zip
+ ...
+
+ 3. Get the latest OpenOCD source
+
+ $ pwd
+ /home/OpenOCD
+ $ git clone git://openocd.git.sourceforge.net/gitroot/openocd/openocd
+
+ You will then have the source code in /home/OpenOCD/openocd
+
+ 4. Build OpenOCD for the FT22322 interface
+
+ $ pwd
+ /home/OpenOCD/openocd
+ $ ./bootstrap
+
+ Jim is a tiny version of the Tcl scripting language. It is needed
+ by more recent versions of OpenOCD. Build libjim.a using the following
+ instructions:
+
+ $ git submodule init
+ $ git submodule update
+ $ cd jimtcl
+ $ ./configure --with-jim-ext=nvp
+ $ make
+ $ make install
+
+ Configure OpenOCD:
+
+ $ ./configure --enable-maintainer-mode --disable-werror --disable-shared \
+ --enable-ft2232_ftd2xx --with-ftd2xx-win32-zipdir=/home/OpenOCD/ftd2xx \
+ LDFLAGS="-L/home/OpenOCD/openocd/jimtcl"
+
+ Then build OpenOCD and its HTML documentation:
+
+ $ make
+ $ make html
+
+ The result of the first make will be the "openocd.exe" will be
+ created in the folder /home/openocd/src. The following command
+ will install OpenOCD to a standard location (/usr/local/bin)
+ using using this command:
+
+ $ make install
+
+ Helper Scripts.
+
+ I have been using the Olimex ARM-USB-OCD JTAG debugger with the
+ ZP213X/4XPA. OpenOCD requires a configuration file. I keep the
+ one I used last here:
+
+ configs/zpa214xpa/tools/olimex.cfg
+
+ However, the "correct" configuration script to use with OpenOCD may
+ change as the features of OpenOCD evolve. So you should at least
+ compare that olimex.cfg file with configuration files in
+ /usr/local/share/openocd/scripts/target (or /home/OpenOCD/openocd/tcl/target).
+
+ There is also a script on the tools/ directory that I use to start
+ the OpenOCD daemon on my system called oocd.sh. That script will
+ probably require some modifications to work in another environment:
+
+ - Possibly the value of OPENOCD_PATH and TARGET_PATH
+ - It assumes that the correct script to use is the one at
+ configs/zp214xpa/tools/olimex.cfg
+
+ Starting OpenOCD
+
+ Then you should be able to start the OpenOCD daemon like:
+
+ configs/zp214xpa/tools/oocd.sh $PWD
+
+ If you use the setenv.sh file, that the path to oocd.sh will be added
+ to your PATH environment variabl. So, in that case, the command simplifies
+ to just:
+
+ oocd.sh $PWD
+
+ Where it is assumed that you are executing oocd.sh from the top-level
+ directory where NuttX is installed. $PWD will be the path to the
+ top-level NuttX directory.
+
+ Connecting GDB
+
+ Once the OpenOCD daemon has been started, you can connect to it via
+ GDB using the following GDB command:
+
+ arm-nuttx-elf-gdb
+ (gdb) target remote localhost:3333
+
+ NOTE: The name of your GDB program may differ. For example, with the
+ CodeSourcery toolchain, the ARM GDB would be called arm-none-eabi-gdb.
+
+ After starting GDB, you can load the NuttX ELF file:
+
+ (gdb) symbol-file nuttx
+ (gdb) load nuttx
+
+ NOTES:
+ 1. Loading the symbol-file is only useful if you have built NuttX to
+ include debug symbols (by setting CONFIG_DEBUG_SYMBOLS=y in the
+ .config file).
+
+ OpenOCD will support several special 'monitor' commands. These
+ GDB commands will send comments to the OpenOCD monitor. Here
+ are a couple that you will need to use:
+
+ (gdb) monitor reset
+ (gdb) monitor halt
+
+ NOTES:
+ 1. The MCU must be halted using 'mon halt' prior to loading code.
+ 2. Reset will restart the processor after loading code.
+ 3. The 'monitor' command can be abbreviated as just 'mon'.
Configurations:
===============
-Each NXP LPC214x configuration is maintained in a sudirectory and
-can be selected as follow:
+ Each NXP LPC214x configuration is maintained in a sudirectory and
+ can be selected as follow:
cd tools
./configure.sh zp214xpa/
cd -
. ./setenv.sh
-Where is one of the following:
+ Where is one of the following:
-nsh:
-----
+ nsh:
+ ----
- Configures the NuttShell (nsh) located at examples/nsh. The
- Configuration enables only the serial NSH interfaces.
+ Configures the NuttShell (nsh) located at examples/nsh. The
+ Configuration enables only the serial NSH interfaces.
NOTES:
@@ -131,6 +311,30 @@ nsh:
2. Default platform/toolchain:
- CONFIG_HOST_LINUX=y : Windows
+ CONFIG_HOST_LINUX=y : Linux (Cygwin under Windows okay too).
+ CONFIG_ARM_TOOLCHAIN_GNU_EABI=y : Buildroot (arm-nuttx-elf-gcc)
+ CONFIG_RAW_BINARY=y : Output formats: ELF and raw binary
+
+ nxlines:
+ --------
+
+ This is the apps/examples/nxlines test using the UG_2864AMBAG01 board
+ from The0.net that plugs into the "SPI LCD" connector on the ZP3X4XPA
+ board.
+
+ NOTES:
+
+ 1. This configuration uses the mconf-based configuration tool. To
+ change this configuration using that tool, you should:
+
+ a. Build and install the mconf tool. See nuttx/README.txt and
+ misc/tools/
+
+ b. Execute 'make menuconfig' in nuttx/ in order to start the
+ reconfiguration process.
+
+ 2. Default platform/toolchain:
+
+ CONFIG_HOST_LINUX=y : Linux (Cygwin under Windows okay too).
CONFIG_ARM_TOOLCHAIN_GNU_EABI=y : Buildroot (arm-nuttx-elf-gcc)
CONFIG_RAW_BINARY=y : Output formats: ELF and raw binary
diff --git a/nuttx/configs/zp214xpa/nxlines/Make.defs b/nuttx/configs/zp214xpa/nxlines/Make.defs
new file mode 100644
index 0000000000..274eb8d72d
--- /dev/null
+++ b/nuttx/configs/zp214xpa/nxlines/Make.defs
@@ -0,0 +1,128 @@
+##############################################################################
+# configs/zp214xpa/nxlines/Make.defs
+#
+# Copyright (C) 2012 Gregory Nutt. All rights reserved.
+# Author: Gregory Nutt
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+# 3. Neither the name NuttX nor the names of its contributors may be
+# used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+#
+##############################################################################
+
+include ${TOPDIR}/.config
+include ${TOPDIR}/tools/Config.mk
+
+# The default value for CROSSDEV can be overridden from the make command line:
+# make -- Will build for the NuttX buildroot toolchain
+# make CROSSDEV=arm-eabi- -- Will build for the devkitARM toolchain
+# make CROSSDEV=arm-none-eabi- -- Will build for the CodeSourcery toolchain
+# make CROSSDEV=arm-nuttx-elf- -- Will build for the NuttX buildroot toolchain
+
+CROSSDEV = arm-nuttx-elf-
+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
+
+HOSTOS = ${shell uname -o 2>/dev/null || echo "Other"}
+
+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 ($(ARCHCCMAJOR),4)
+ifneq ($(HOSTOS),Cygwin)
+OBJCOPYARGS = -R .note -R .note.gnu.build-id -R .comment
+endif
+endif
+
+ifeq ($(CROSSDEV),arm-nuttx-elf-)
+ 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
+ MAXOPTIMIZATION = -Os
+else
+ WINTOOL = y
+ 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
+endif
+
+ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
+ ARCHOPTIMIZATION = -g
+else
+ ARCHOPTIMIZATION = $(MAXOPTIMIZATION) -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer
+endif
+
+ifeq ($(ARCHCCMAJOR),4)
+ ARCHCPUFLAGS = -mcpu=arm7tdmi -mfloat-abi=soft
+else
+ ARCHCPUFLAGS = -mapcs-32 -mcpu=arm7tdmi -msoft-float
+endif
+
+ARCHCFLAGS = -fno-builtin
+ARCHCXXFLAGS = -fno-builtin -fno-exceptions
+ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10
+ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow
+ARCHWARNINGSXX = -Wall -Wshadow
+ARCHDEFINES =
+
+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-gotoff.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/zp214xpa/nxlines/defconfig b/nuttx/configs/zp214xpa/nxlines/defconfig
new file mode 100644
index 0000000000..03a6bf72cd
--- /dev/null
+++ b/nuttx/configs/zp214xpa/nxlines/defconfig
@@ -0,0 +1,606 @@
+#
+# 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_LM3S is not set
+# CONFIG_ARCH_CHIP_LPC17XX is not set
+CONFIG_ARCH_CHIP_LPC214X=y
+# CONFIG_ARCH_CHIP_LPC2378 is not set
+# CONFIG_ARCH_CHIP_LPC31XX is not set
+# CONFIG_ARCH_CHIP_LPC43XX is not set
+# CONFIG_ARCH_CHIP_SAM3U is not set
+# CONFIG_ARCH_CHIP_STM32 is not set
+# CONFIG_ARCH_CHIP_STR71X is not set
+CONFIG_ARCH_ARM7TDMI=y
+CONFIG_ARCH_FAMILY="arm"
+CONFIG_ARCH_CHIP="lpc214x"
+CONFIG_ARCH_HAVE_LOWVECTORS=y
+# CONFIG_ARCH_LOWVECTORS is not set
+CONFIG_BOARD_LOOPSPERMSEC=3270
+# CONFIG_ARCH_CALIBRATION is not set
+
+#
+# ARM Configuration Options
+#
+# CONFIG_ARM_TOOLCHAIN_BUILDROOT is not set
+# CONFIG_ARM_TOOLCHAIN_CODESOURCERYL is not set
+CONFIG_ARM_TOOLCHAIN_GNU_EABI=y
+
+#
+# LPC214x Configuration Options
+#
+CONFIG_ARCH_CHIP_LPC2148=y
+
+#
+# LPC214x Initialization Options
+#
+# CONFIG_EXTMEM_MODE is not set
+# CONFIG_RAM_MODE is not set
+CONFIG_DEFAULT_MODE=y
+CONFIG_CODE_BASE=0x00000000
+CONFIG_PLL_SETUP=y
+CONFIG_MAM_SETUP=y
+CONFIG_APBDIV_SETUP=y
+CONFIG_APBDIV_VALUE=1
+# CONFIG_EMC_SETUP is not set
+# CONFIG_BCFG0_SETUP is not set
+# CONFIG_BCFG1_SETUP is not set
+# CONFIG_BCFG2_SETUP is not set
+# CONFIG_BCFG3_SETUP is not set
+CONFIG_ADC_SETUP=y
+
+#
+# LPC214x Peripheral Support
+#
+CONFIG_LPC214X_UART0=y
+CONFIG_LPC214X_UART1=y
+# CONFIG_LPC214x_FIO is not set
+
+#
+# Architecture Options
+#
+# CONFIG_ARCH_NOINTC is not set
+# CONFIG_ARCH_DMA is not set
+# CONFIG_ARCH_IRQPRIO is not set
+# CONFIG_CUSTOM_STACK is not set
+# CONFIG_ADDRENV is not set
+CONFIG_ARCH_STACKDUMP=y
+# CONFIG_ENDIAN_BIG is not set
+
+#
+# Board Settings
+#
+CONFIG_DRAM_START=0x40000000
+CONFIG_DRAM_SIZE=32768
+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_MCU123 is not set
+CONFIG_ARCH_BOARD_ZP214XPA=y
+# CONFIG_ARCH_BOARD_CUSTOM is not set
+CONFIG_ARCH_BOARD="zp214xpa"
+
+#
+# Common Board Options
+#
+
+#
+# Board-Specific Options
+#
+
+#
+# RTOS Features
+#
+CONFIG_MSEC_PER_TICK=10
+CONFIG_RR_INTERVAL=0
+# CONFIG_SCHED_INSTRUMENTATION is not set
+CONFIG_TASK_NAME_SIZE=0
+# CONFIG_JULIAN_TIME is not set
+CONFIG_START_YEAR=2008
+CONFIG_START_MONTH=10
+CONFIG_START_DAY=1
+CONFIG_DEV_CONSOLE=y
+# CONFIG_MUTEX_TYPES is not set
+# CONFIG_PRIORITY_INHERITANCE is not set
+# CONFIG_FDCLONE_DISABLE is not set
+# CONFIG_FDCLONE_STDIO is not set
+CONFIG_SDCLONE_DISABLE=y
+# CONFIG_SCHED_WORKQUEUE is not set
+# CONFIG_SCHED_WAITPID is not set
+# CONFIG_SCHED_ATEXIT is not set
+# CONFIG_SCHED_ONEXIT is not set
+CONFIG_USER_ENTRYPOINT="nxlines_main"
+CONFIG_DISABLE_OS_API=y
+# CONFIG_DISABLE_CLOCK is not set
+# CONFIG_DISABLE_POSIX_TIMERS is not set
+# CONFIG_DISABLE_PTHREAD is not set
+# CONFIG_DISABLE_SIGNALS is not set
+# CONFIG_DISABLE_MQUEUE is not set
+# CONFIG_DISABLE_MOUNTPOINT is not set
+# CONFIG_DISABLE_ENVIRON is not set
+CONFIG_DISABLE_POLL=y
+
+#
+# Sizes of configurable things (0 disables)
+#
+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=2048
+CONFIG_USERMAIN_STACKSIZE=2048
+CONFIG_PTHREAD_STACK_MIN=256
+CONFIG_PTHREAD_STACK_DEFAULT=2048
+
+#
+# Device Drivers
+#
+CONFIG_DEV_NULL=y
+# CONFIG_DEV_ZERO is not set
+# CONFIG_LOOP is not set
+# CONFIG_RAMDISK is not set
+# CONFIG_CAN is not set
+# CONFIG_PWM is not set
+# CONFIG_I2C is not set
+CONFIG_SPI=y
+# CONFIG_SPI_OWNBUS is not set
+# CONFIG_SPI_EXCHANGE is not set
+CONFIG_SPI_CMDDATA=y
+# CONFIG_RTC is not set
+# CONFIG_WATCHDOG is not set
+# CONFIG_ANALOG is not set
+# CONFIG_BCH is not set
+# CONFIG_INPUT is not set
+CONFIG_LCD=y
+# CONFIG_LCD_NOGETRUN is not set
+CONFIG_LCD_MAXCONTRAST=255
+CONFIG_LCD_MAXPOWER=1
+# CONFIG_LCD_P14201 is not set
+# CONFIG_LCD_NOKIA6100 is not set
+# CONFIG_LCD_UG9664HSWAG01 is not set
+CONFIG_LCD_UG2864AMBAG01=y
+CONFIG_UG2864AMBAG01_SPIMODE=3
+CONFIG_UG2864AMBAG01_FREQUENCY=3500000
+CONFIG_UG2864AMBAG01_NINTERFACES=1
+# CONFIG_LCD_SSD1289 is not set
+CONFIG_LCD_LANDSCAPE=y
+# CONFIG_LCD_PORTRAIT is not set
+# CONFIG_LCD_RPORTRAIT is not set
+# CONFIG_LCD_RLANDSCAPE is not set
+# CONFIG_MMCSD is not set
+# CONFIG_MTD is not set
+# CONFIG_PIPES is not set
+# CONFIG_PM is not set
+# CONFIG_POWER is not set
+# CONFIG_SENSORS is not set
+# CONFIG_SERCOMM_CONSOLE is not set
+CONFIG_SERIAL=y
+CONFIG_DEV_LOWCONSOLE=y
+# CONFIG_16550_UART is not set
+CONFIG_ARCH_HAVE_UART0=y
+CONFIG_ARCH_HAVE_UART1=y
+CONFIG_MCU_SERIAL=y
+CONFIG_UART0_SERIAL_CONSOLE=y
+# CONFIG_UART1_SERIAL_CONSOLE is not set
+# CONFIG_NO_SERIAL_CONSOLE is not set
+
+#
+# UART0 Configuration
+#
+CONFIG_UART0_RXBUFSIZE=256
+CONFIG_UART0_TXBUFSIZE=256
+CONFIG_UART0_BAUD=38400
+CONFIG_UART0_BITS=8
+CONFIG_UART0_PARITY=0
+CONFIG_UART0_2STOP=0
+
+#
+# UART1 Configuration
+#
+CONFIG_UART1_RXBUFSIZE=256
+CONFIG_UART1_TXBUFSIZE=256
+CONFIG_UART1_BAUD=38400
+CONFIG_UART1_BITS=8
+CONFIG_UART1_PARITY=0
+CONFIG_UART1_2STOP=0
+# CONFIG_USBDEV is not set
+# CONFIG_USBHOST is not set
+# CONFIG_WIRELESS is not set
+
+#
+# System Logging Device Options
+#
+
+#
+# System Logging
+#
+# CONFIG_RAMLOG is not set
+
+#
+# Networking Support
+#
+# CONFIG_NET is not set
+
+#
+# File Systems
+#
+
+#
+# File system configuration
+#
+# CONFIG_FS_FAT is not set
+# CONFIG_FS_RAMMAP is not set
+# CONFIG_FS_NXFFS is not set
+# CONFIG_FS_ROMFS is not set
+
+#
+# System Logging
+#
+# CONFIG_SYSLOG is not set
+
+#
+# Graphics Support
+#
+CONFIG_NX=y
+CONFIG_NX_LCDDRIVER=y
+CONFIG_NX_NPLANES=1
+CONFIG_NX_WRITEONLY=y
+
+#
+# Supported Pixel Depths
+#
+# CONFIG_NX_DISABLE_1BPP is not set
+CONFIG_NX_DISABLE_2BPP=y
+CONFIG_NX_DISABLE_4BPP=y
+CONFIG_NX_DISABLE_8BPP=y
+CONFIG_NX_DISABLE_16BPP=y
+CONFIG_NX_DISABLE_24BPP=y
+CONFIG_NX_DISABLE_32BPP=y
+CONFIG_NX_PACKEDMSFIRST=y
+
+#
+# Input Devices
+#
+# CONFIG_NX_MOUSE is not set
+# CONFIG_NX_KBD is not set
+
+#
+# Framed Window Borders
+#
+CONFIG_NXTK_BORDERWIDTH=2
+CONFIG_NXTK_BORDERCOLOR1=0x01
+CONFIG_NXTK_BORDERCOLOR2=0x01
+CONFIG_NXTK_BORDERCOLOR3=0x01
+# CONFIG_NXTK_AUTORAISE is not set
+
+#
+# Font Selections
+#
+CONFIG_NXFONTS_CHARBITS=7
+CONFIG_NXFONT_MONO5X8=y
+# CONFIG_NXFONT_SANS17X22 is not set
+# CONFIG_NXFONT_SANS20X26 is not set
+# CONFIG_NXFONT_SANS23X27 is not set
+# 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
+
+#
+# Memory Management
+#
+# CONFIG_MM_SMALL is not set
+CONFIG_MM_REGIONS=1
+# CONFIG_GRAN is not set
+
+#
+# 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_PIC is not set
+# CONFIG_SYMTAB_ORDEREDBYNAME is not set
+
+#
+# Library Routines
+#
+
+#
+# Standard C Library Options
+#
+CONFIG_STDIO_BUFFER_SIZE=256
+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
+# CONFIG_EOL_IS_CR is not set
+# CONFIG_EOL_IS_LF is not set
+# CONFIG_EOL_IS_BOTH_CRLF is not set
+CONFIG_EOL_IS_EITHER_CRLF=y
+# CONFIG_LIBC_STRERROR is not set
+# CONFIG_LIBC_PERROR_STDOUT is not set
+CONFIG_ARCH_LOWPUTC=y
+CONFIG_LIB_SENDFILE_BUFSIZE=512
+# CONFIG_ARCH_ROMGETC is not set
+# CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set
+
+#
+# Non-standard Helper Functions
+#
+CONFIG_LIB_KBDCODEC=y
+
+#
+# Basic CXX Support
+#
+# CONFIG_C99_BOOL8 is not set
+# CONFIG_HAVE_CXX is not set
+
+#
+# Application Configuration
+#
+
+#
+# Built-In Applications
+#
+# CONFIG_BUILTIN is not set
+
+#
+# Examples
+#
+# CONFIG_EXAMPLES_BUTTONS is not set
+# CONFIG_EXAMPLES_CAN is not set
+# CONFIG_EXAMPLES_CDCACM is not set
+# CONFIG_EXAMPLES_COMPOSITE is not set
+# CONFIG_EXAMPLES_DHCPD is not set
+# CONFIG_EXAMPLES_ELF is not set
+# CONFIG_EXAMPLES_FTPC is not set
+# CONFIG_EXAMPLES_FTPD is not set
+# CONFIG_EXAMPLES_HELLO is not set
+# CONFIG_EXAMPLES_HELLOXX is not set
+# CONFIG_EXAMPLES_JSON is not set
+# CONFIG_EXAMPLES_HIDKBD is not set
+# CONFIG_EXAMPLES_KEYPADTEST is not set
+# CONFIG_EXAMPLES_IGMP is not set
+# CONFIG_EXAMPLES_LCDRW is not set
+# CONFIG_EXAMPLES_MM is not set
+# CONFIG_EXAMPLES_MOUNT is not set
+# CONFIG_EXAMPLES_MODBUS is not set
+# CONFIG_EXAMPLES_NETTEST is not set
+# CONFIG_EXAMPLES_NSH is not set
+# CONFIG_EXAMPLES_NULL is not set
+# CONFIG_EXAMPLES_NX is not set
+# CONFIG_EXAMPLES_NXCONSOLE is not set
+# CONFIG_EXAMPLES_NXFFS is not set
+# CONFIG_EXAMPLES_NXFLAT is not set
+# CONFIG_EXAMPLES_NXHELLO is not set
+# CONFIG_EXAMPLES_NXIMAGE is not set
+CONFIG_EXAMPLES_NXLINES=y
+CONFIG_EXAMPLES_NXLINES_VPLANE=0
+CONFIG_EXAMPLES_NXLINES_DEVNO=0
+CONFIG_EXAMPLES_NXLINES_BGCOLOR=0x00
+CONFIG_EXAMPLES_NXLINES_LINEWIDTH=4
+CONFIG_EXAMPLES_NXLINES_LINECOLOR=0x01
+CONFIG_EXAMPLES_NXLINES_BORDERWIDTH=4
+CONFIG_EXAMPLES_NXLINES_BORDERCOLOR=0x01
+CONFIG_EXAMPLES_NXLINES_CIRCLECOLOR=0x00
+CONFIG_EXAMPLES_NXLINES_BPP=1
+CONFIG_EXAMPLES_NXLINES_EXTERNINIT=y
+# CONFIG_EXAMPLES_NXTEXT is not set
+# CONFIG_EXAMPLES_OSTEST is not set
+# CONFIG_EXAMPLES_PASHELLO is not set
+# CONFIG_EXAMPLES_PIPE is not set
+# CONFIG_EXAMPLES_POLL is not set
+# CONFIG_EXAMPLES_QENCODER is not set
+# CONFIG_EXAMPLES_RGMP is not set
+# CONFIG_EXAMPLES_ROMFS is not set
+# CONFIG_EXAMPLES_SENDMAIL is not set
+# CONFIG_EXAMPLES_SERLOOP is not set
+# CONFIG_EXAMPLES_TELNETD is not set
+# CONFIG_EXAMPLES_THTTPD is not set
+# CONFIG_EXAMPLES_TIFF is not set
+# CONFIG_EXAMPLES_TOUCHSCREEN is not set
+# CONFIG_EXAMPLES_UDP is not set
+# CONFIG_EXAMPLES_UIP is not set
+# CONFIG_EXAMPLES_USBSERIAL is not set
+# CONFIG_EXAMPLES_USBMSC is not set
+# CONFIG_EXAMPLES_USBTERM is not set
+# CONFIG_EXAMPLES_WATCHDOG is not set
+# CONFIG_EXAMPLES_WLAN is not set
+
+#
+# Interpreters
+#
+
+#
+# Interpreters
+#
+# CONFIG_INTERPRETERS_FICL is not set
+# CONFIG_INTERPRETERS_PCODE is not set
+
+#
+# Network Utilities
+#
+
+#
+# Networking Utilities
+#
+# CONFIG_NETUTILS_CODECS is not set
+# CONFIG_NETUTILS_DHCPC is not set
+# CONFIG_NETUTILS_DHCPD is not set
+# CONFIG_NETUTILS_FTPC is not set
+# CONFIG_NETUTILS_FTPD is not set
+# CONFIG_NETUTILS_JSON is not set
+# CONFIG_NETUTILS_RESOLV is not set
+# CONFIG_NETUTILS_SMTP is not set
+# CONFIG_NETUTILS_TELNETD is not set
+# CONFIG_NETUTILS_TFTPC is not set
+# CONFIG_NETUTILS_THTTPD is not set
+# CONFIG_NETUTILS_UIPLIB is not set
+# CONFIG_NETUTILS_WEBCLIENT is not set
+
+#
+# ModBus
+#
+
+#
+# FreeModbus
+#
+# CONFIG_MODBUS is not set
+
+#
+# NSH Library
+#
+# CONFIG_NSH_LIBRARY is not set
+
+#
+# NxWidgets/NxWM
+#
+
+#
+# System NSH Add-Ons
+#
+
+#
+# Custom Free Memory Command
+#
+# CONFIG_SYSTEM_FREE is not set
+
+#
+# I2C tool
+#
+
+#
+# FLASH Program Installation
+#
+# CONFIG_SYSTEM_INSTALL is not set
+
+#
+# readline()
+#
+# CONFIG_SYSTEM_READLINE is not set
+
+#
+# Power Off
+#
+# CONFIG_SYSTEM_POWEROFF is not set
+
+#
+# RAMTRON
+#
+# CONFIG_SYSTEM_RAMTRON is not set
+
+#
+# SD Card
+#
+# CONFIG_SYSTEM_SDCARD is not set
+
+#
+# Sysinfo
+#
+# CONFIG_SYSTEM_SYSINFO is not set
diff --git a/nuttx/configs/zp214xpa/nxlines/setenv.sh b/nuttx/configs/zp214xpa/nxlines/setenv.sh
new file mode 100755
index 0000000000..77f1425e58
--- /dev/null
+++ b/nuttx/configs/zp214xpa/nxlines/setenv.sh
@@ -0,0 +1,65 @@
+#!/bin/bash
+# configs/zp214xpa/nxlines/setenv.sh
+#
+# Copyright (C) 2012 Gregory Nutt. All rights reserved.
+# Author: Gregory Nutt
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+# 3. Neither the name NuttX nor the names of its contributors may be
+# used to endorse or promote products derived from this software
+# without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+#
+
+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"
+
+# The zp214xpa/tools directory
+export LPCTOOL_DIR="${WD}/configs/zp214xpa/tools"
+
+# Add the path to the toolchain and tools directory to the PATH varialble
+export PATH="${TOOLCHAIN_BIN}:${LPCTOOL_DIR}:/sbin:/usr/sbin:${PATH_ORIG}"
+
+echo "PATH : ${PATH}"
diff --git a/nuttx/configs/zp214xpa/src/Makefile b/nuttx/configs/zp214xpa/src/Makefile
index 8f1e1c05d9..571b43b078 100644
--- a/nuttx/configs/zp214xpa/src/Makefile
+++ b/nuttx/configs/zp214xpa/src/Makefile
@@ -49,6 +49,10 @@ ASRCS =
AOBJS = $(ASRCS:.S=$(OBJEXT))
CSRCS =
+ifeq ($(CONFIG_LCD_UG2864AMBAG01),y)
+CSRCS += up_ug2864ambag01.c up_spi1.c
+endif
+
COBJS = $(CSRCS:.c=$(OBJEXT))
SRCS = $(ASRCS) $(CSRCS)
diff --git a/nuttx/configs/zp214xpa/src/up_spi1.c b/nuttx/configs/zp214xpa/src/up_spi1.c
new file mode 100644
index 0000000000..563d63589c
--- /dev/null
+++ b/nuttx/configs/zp214xpa/src/up_spi1.c
@@ -0,0 +1,644 @@
+/****************************************************************************
+ * config/zp214xpa/src/up_spi1.c
+ * arch/arm/src/board/up_spi1.c
+ *
+ * Copyright (C) 2008-2010, 2012 Gregory Nutt. All rights reserved.
+ * Author: Gregory Nutt
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ * 3. Neither the name NuttX nor the names of its contributors may be
+ * used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ ****************************************************************************/
+
+/****************************************************************************
+ * LCD Interface
+ *
+ * PIN NAME PIN CONFIGURATION
+ * 3 RESET P0.18/CAP1.3/MISO1/MAT1.3P0.18 - General purpose output
+ * 4 DI P0.19/MAT1.2/MOSI1/CAP1.2P0.19 - Alternate function 2
+ * 5 CS P0.20/MAT1.3/SSEL1/EINT3 - General purpose output
+ * 6 SCK P0.17/CAP1.2/SCK1/MAT1.2 - Alternate function 2
+ * 7 A0 P0.23/VBUS - General purpose output
+ *
+ * ENC29J60 Interface
+ *
+ * PIN NAME PIN CONFIGURATION
+ * 1 /CS P0.7/SSEL0/PWM2/EINT2 - General purpose output
+ * 2 SCK P0.4/SCK0/CAP0.1/AD0.6 - Alternate function 1
+ * 3 SI P0.6/MOSI0/CAP0.2/AD1.0 - Alternate function 1
+ * 4 SO P0.5/MISO0/MAT0.1/AD0.7 - Alternate function 1
+ * 7 INT P1.25/EXTIN0 - Alternal function 1
+ * 9 RST P1.24/TRACECLK
+ *
+ * This file provides support only for the LCD interface on SPI1.
+ *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include
+
+#include
+#include
+#include
+#include
+#include
+
+#include
+#include
+#include
+
+#include "up_internal.h"
+#include "up_arch.h"
+
+#include "chip.h"
+#include "lpc214x_power.h"
+#include "lpc214x_pinsel.h"
+#include "lpc214x_spi.h"
+
+/****************************************************************************
+ * Definitions
+ ****************************************************************************/
+
+/* Enables debug output from this file (needs CONFIG_DEBUG too) */
+
+#undef SPI_DEBUG /* Define to enable debug */
+#undef SPI_VERBOSE /* Define to enable verbose debug */
+
+#ifdef SPI_DEBUG
+# define spidbg lldbg
+# ifdef SPI_VERBOSE
+# define spivdbg lldbg
+# else
+# define spivdbg(x...)
+# endif
+#else
+# undef SPI_VERBOSE
+# define spidbg(x...)
+# define spivdbg(x...)
+#endif
+
+/* Clocking */
+
+#define LPC214X_CCLKFREQ (LPC214X_FOSC*LPC214X_PLL_M)
+#define LPC214X_PCLKFREQ (LPC214X_CCLKFREQ/LPC214X_APB_DIV)
+
+/* Use either FIO or legacy GPIO */
+
+#ifdef CONFIG_LPC214x_FIO
+# define CS_SET_REGISTER (LPC214X_FIO0_BASE+LPC214X_FIO_SET_OFFSET)
+# define CS_CLR_REGISTER (LPC214X_FIO0_BASE+LPC214X_FIO_CLR_OFFSET)
+# define CS_DIR_REGISTER (LPC214X_FIO0_BASE+LPC214X_FIO_DIR_OFFSET)
+#else
+# define CS_SET_REGISTER (LPC214X_GPIO0_BASE+LPC214X_GPIO_SET_OFFSET)
+# define CS_CLR_REGISTER (LPC214X_GPIO0_BASE+LPC214X_GPIO_CLR_OFFSET)
+# define CS_DIR_REGISTER (LPC214X_GPIO0_BASE+LPC214X_GPIO_DIR_OFFSET)
+#endif
+
+/****************************************************************************
+ * Private Function Prototypes
+ ****************************************************************************/
+
+#ifndef CONFIG_SPI_OWNBUS
+static int spi_lock(FAR struct spi_dev_s *dev, bool lock);
+#endif
+static void spi_select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected);
+static uint32_t spi_setfrequency(FAR struct spi_dev_s *dev, uint32_t frequency);
+static uint8_t spi_status(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
+#ifdef CONFIG_SPI_CMDDATA
+static int spi_cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
+#endif
+static uint16_t spi_send(FAR struct spi_dev_s *dev, uint16_t ch);
+static void spi_sndblock(FAR struct spi_dev_s *dev, FAR const void *buffer, size_t nwords);
+static void spi_recvblock(FAR struct spi_dev_s *dev, FAR void *buffer, size_t nwords);
+
+/****************************************************************************
+ * Private Data
+ ****************************************************************************/
+
+static const struct spi_ops_s g_spiops =
+{
+#ifndef CONFIG_SPI_OWNBUS
+ .lock = spi_lock,
+#endif
+ .select = spi_select,
+ .setfrequency = spi_setfrequency,
+ .status = spi_status,
+#ifdef CONFIG_SPI_CMDDATA
+ .cmddata = spi_cmddata,
+#endif
+ .send = spi_send,
+ .sndblock = spi_sndblock,
+ .recvblock = spi_recvblock,
+ .registercallback = 0, /* Not implemented */
+};
+
+static struct spi_dev_s g_spidev = { &g_spiops };
+
+/****************************************************************************
+ * Public Data
+ ****************************************************************************/
+
+/****************************************************************************
+ * Private Functions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Name: spi_lock
+ *
+ * Description:
+ * On SPI busses where there are multiple devices, it will be necessary to
+ * lock SPI to have exclusive access to the busses for a sequence of
+ * transfers. The bus should be locked before the chip is selected. After
+ * locking the SPI bus, the caller should then also call the setfrequency,
+ * setbits, and setmode methods to make sure that the SPI is properly
+ * configured for the device. If the SPI buss is being shared, then it
+ * may have been left in an incompatible state.
+ *
+ * Input Parameters:
+ * dev - Device-specific state data
+ * lock - true: Lock spi bus, false: unlock SPI bus
+ *
+ * Returned Value:
+ * None
+ *
+ ****************************************************************************/
+
+#ifndef CONFIG_SPI_OWNBUS
+static int spi_lock(FAR struct spi_dev_s *dev, bool lock)
+{
+ /* Not implemented */
+
+ return -ENOSYS;
+}
+#endif
+
+/****************************************************************************
+ * Name: spi_select
+ *
+ * Description:
+ * Enable/disable the SPI slave select. The implementation of this method
+ * must include handshaking: If a device is selected, it must hold off
+ * all other attempts to select the device until the device is deselecte.
+ *
+ * Input Parameters:
+ * dev - Device-specific state data
+ * devid - Identifies the device to select
+ * selected - true: slave selected, false: slave de-selected
+ *
+ * Returned Value:
+ * None
+ *
+ ****************************************************************************/
+
+static void spi_select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
+{
+ uint32_t bit = 1 << 20;
+
+ /* We do not bother to check if devid == SPIDEV_DISPLAY because that is the
+ * only thing on the bus.
+ */
+
+ if (selected)
+ {
+ /* Enable slave select (low enables) */
+
+ spidbg("CD asserted\n");
+ putreg32(bit, CS_CLR_REGISTER);
+ }
+ else
+ {
+ /* Disable slave select (low enables) */
+
+ spidbg("CD de-asserted\n");
+ putreg32(bit, CS_SET_REGISTER);
+
+ /* Wait for the TX FIFO not full indication */
+
+ while (!(getreg8(LPC214X_SPI1_SR) & LPC214X_SPI1SR_TNF));
+ putreg16(0xff, LPC214X_SPI1_DR);
+
+ /* Wait until TX FIFO and TX shift buffer are empty */
+
+ while (getreg8(LPC214X_SPI1_SR) & LPC214X_SPI1SR_BSY);
+
+ /* Wait until RX FIFO is not empty */
+
+ while (!(getreg8(LPC214X_SPI1_SR) & LPC214X_SPI1SR_RNE));
+
+ /* Then read and discard bytes until the RX FIFO is empty */
+
+ do
+ {
+ (void)getreg16(LPC214X_SPI1_DR);
+ }
+ while (getreg8(LPC214X_SPI1_SR) & LPC214X_SPI1SR_RNE);
+ }
+}
+
+/****************************************************************************
+ * Name: spi_setfrequency
+ *
+ * Description:
+ * Set the SPI frequency.
+ *
+ * Input Parameters:
+ * dev - Device-specific state data
+ * frequency - The SPI frequency requested
+ *
+ * Returned Value:
+ * Returns the actual frequency selected
+ *
+ ****************************************************************************/
+
+static uint32_t spi_setfrequency(FAR struct spi_dev_s *dev, uint32_t frequency)
+{
+ uint32_t divisor = LPC214X_PCLKFREQ / frequency;
+
+ if (divisor < 2)
+ {
+ divisor = 2;
+ }
+ else if (divisor > 254)
+ {
+ divisor = 254;
+ }
+
+ divisor = (divisor + 1) & ~1;
+ putreg8(divisor, LPC214X_SPI1_CPSR);
+
+ spidbg("Frequency %d->%d\n", frequency, LPC214X_PCLKFREQ / divisor);
+ return LPC214X_PCLKFREQ / divisor;
+}
+
+/****************************************************************************
+ * Name: spi_status
+ *
+ * Description:
+ * Get SPI/MMC status
+ *
+ * Input Parameters:
+ * dev - Device-specific state data
+ * devid - Identifies the device to report status on
+ *
+ * Returned Value:
+ * Returns a bitset of status values (see SPI_STATUS_* defines
+ *
+ ****************************************************************************/
+
+static uint8_t spi_status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
+{
+ spidbg("Return 0\n");
+ return 0;
+}
+
+/****************************************************************************
+ * Name: spi_cmddata
+ *
+ * Description:
+ * Some devices require and additional out-of-band bit to specify if the
+ * next word sent to the device is a command or data. This is typical, for
+ * example, in "9-bit" displays where the 9th bit is the CMD/DATA bit.
+ * This function provides selection of command or data.
+ *
+ * This "latches" the CMD/DATA state. It does not have to be called before
+ * every word is transferred; only when the CMD/DATA state changes. This
+ * method is required if CONFIG_SPI_CMDDATA is selected in the NuttX
+ * configuration
+ *
+ * Input Parameters:
+ * dev - Device-specific state data
+ * cmd - TRUE: The following word is a command; FALSE: the following words
+ * are data.
+ *
+ * Returned Value:
+ * OK unless an error occurs. Then a negated errno value is returned
+ *
+ ****************************************************************************/
+
+#ifdef CONFIG_SPI_CMDDATA
+static int spi_cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
+{
+ uint32_t bit = 1 << 23;
+
+ /* We do not bother to check if devid == SPIDEV_DISPLAY because that is the
+ * only thing on the bus.
+ */
+
+ /* "This is the Data/Command control pad which determines whether the
+ * data bits are data or a command.
+ *
+ * A0 = H: the inputs at D0 to D7 are treated as display data.
+ * A0 = L: the inputs at D0 to D7 are transferred to the command registers."
+ */
+
+ if (cmd)
+ {
+ /* L: the inputs at D0 to D7 are transferred to the command registers */
+
+ spidbg("Command\n");
+ putreg32(bit, CS_CLR_REGISTER);
+ }
+ else
+ {
+ /* H: the inputs at D0 to D7 are treated as display data. */
+
+ spidbg("CD de-asserted\n");
+ putreg32(bit, CS_SET_REGISTER);
+ }
+
+ return OK;
+}
+#endif
+
+/****************************************************************************
+ * Name: spi_send
+ *
+ * Description:
+ * Exchange one word on SPI
+ *
+ * Input Parameters:
+ * dev - Device-specific state data
+ * wd - The word to send. the size of the data is determined by the
+ * number of bits selected for the SPI interface.
+ *
+ * Returned Value:
+ * response
+ *
+ ****************************************************************************/
+
+static uint16_t spi_send(FAR struct spi_dev_s *dev, uint16_t wd)
+{
+ register uint16_t regval;
+
+ /* Wait while the TX FIFO is full */
+
+ while (!(getreg8(LPC214X_SPI1_SR) & LPC214X_SPI1SR_TNF));
+
+ /* Write the byte to the TX FIFO */
+
+ putreg16((uint8_t)wd, LPC214X_SPI1_DR);
+
+ /* Wait for the RX FIFO not empty */
+
+ while (!(getreg8(LPC214X_SPI1_SR) & LPC214X_SPI1SR_RNE));
+
+ /* Get the value from the RX FIFO and return it */
+
+ regval = getreg16(LPC214X_SPI1_DR);
+ spidbg("%04x->%04x\n", wd, regval);
+ return regval;
+}
+
+/*************************************************************************
+ * Name: spi_sndblock
+ *
+ * Description:
+ * Send a block of data on SPI
+ *
+ * Input Parameters:
+ * dev - Device-specific state data
+ * buffer - A pointer to the buffer of data to be sent
+ * nwords - the length of data to send from the buffer in number of words.
+ * The wordsize is determined by the number of bits-per-word
+ * selected for the SPI interface. If nbits <= 8, the data is
+ * packed into uint8_t's; if nbits >8, the data is packed into uint16_t's
+ *
+ * Returned Value:
+ * None
+ *
+ ****************************************************************************/
+
+static void spi_sndblock(FAR struct spi_dev_s *dev, FAR const void *buffer, size_t nwords)
+{
+ FAR const uint8_t *ptr = (FAR const uint8_t *)buffer;
+ uint8_t sr;
+
+ /* Loop while thre are bytes remaining to be sent */
+
+ spidbg("nwords: %d\n", nwords);
+ while (nwords > 0)
+ {
+ /* While the TX FIFO is not full and there are bytes left to send */
+
+ while ((getreg8(LPC214X_SPI1_SR) & LPC214X_SPI1SR_TNF) && nwords)
+ {
+ /* Send the data */
+
+ putreg16((uint16_t)*ptr, LPC214X_SPI1_DR);
+ ptr++;
+ nwords--;
+ }
+ }
+
+ /* Then discard all card responses until the RX & TX FIFOs are emptied. */
+
+ spidbg("discarding\n");
+ do
+ {
+ /* Is there anything in the RX fifo? */
+
+ sr = getreg8(LPC214X_SPI1_SR);
+ if ((sr & LPC214X_SPI1SR_RNE) != 0)
+ {
+ /* Yes.. Read and discard */
+
+ (void)getreg16(LPC214X_SPI1_DR);
+ }
+
+ /* There is a race condition where TFE may go true just before
+ * RNE goes true and this loop terminates prematurely. The nasty little
+ * delay in the following solves that (it could probably be tuned
+ * to improve performance).
+ */
+
+ else if ((sr & LPC214X_SPI1SR_TFE) != 0)
+ {
+ up_udelay(100);
+ sr = getreg8(LPC214X_SPI1_SR);
+ }
+ }
+ while ((sr & LPC214X_SPI1SR_RNE) != 0 || (sr & LPC214X_SPI1SR_TFE) == 0);
+}
+
+/****************************************************************************
+ * Name: spi_recvblock
+ *
+ * Description:
+ * Revice a block of data from SPI
+ *
+ * Input Parameters:
+ * dev - Device-specific state data
+ * buffer - A pointer to the buffer in which to recieve data
+ * nwords - the length of data that can be received in the buffer in number
+ * of words. The wordsize is determined by the number of bits-per-word
+ * selected for the SPI interface. If nbits <= 8, the data is
+ * packed into uint8_t's; if nbits >8, the data is packed into uint16_t's
+ *
+ * Returned Value:
+ * None
+ *
+ ****************************************************************************/
+
+static void spi_recvblock(FAR struct spi_dev_s *dev, FAR void *buffer, size_t nwords)
+{
+ FAR uint8_t *ptr = (FAR uint8_t*)buffer;
+ uint32_t rxpending = 0;
+
+ /* While there is remaining to be sent (and no synchronization error has occurred) */
+
+ spidbg("nwords: %d\n", nwords);
+ while (nwords || rxpending)
+ {
+ /* Fill the transmit FIFO with 0xff...
+ * Write 0xff to the data register while (1) the TX FIFO is
+ * not full, (2) we have not exceeded the depth of the TX FIFO,
+ * and (3) there are more bytes to be sent.
+ */
+
+ spivdbg("TX: rxpending: %d nwords: %d\n", rxpending, nwords);
+ while ((getreg8(LPC214X_SPI1_SR) & LPC214X_SPI1SR_TNF) &&
+ (rxpending < LPC214X_SPI1_FIFOSZ) && nwords)
+ {
+ putreg16(0xff, LPC214X_SPI1_DR);
+ nwords--;
+ rxpending++;
+ }
+
+ /* Now, read the RX data from the RX FIFO while the RX FIFO is not empty */
+
+ spivdbg("RX: rxpending: %d\n", rxpending);
+ while (getreg8(LPC214X_SPI1_SR) & LPC214X_SPI1SR_RNE)
+ {
+ *ptr++ = (uint8_t)getreg16(LPC214X_SPI1_DR);
+ rxpending--;
+ }
+ }
+}
+
+/****************************************************************************
+ * Public Functions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Name: up_spiinitialize
+ *
+ * Description:
+ * Initialize the selected SPI port
+ *
+ * Input Parameter:
+ * Port number (for hardware that has mutiple SPI interfaces)
+ *
+ * Returned Value:
+ * Valid SPI device structre reference on succcess; a NULL on failure
+ *
+ ****************************************************************************/
+
+FAR struct spi_dev_s *up_spiinitialize(int port)
+{
+ uint32_t regval32;
+ uint8_t regval8;
+ int i;
+
+ /* Only the SPI1 interface is supported */
+
+#ifdef CONFIG_DEBUG
+ if (port != 1)
+ {
+ return NULL;
+ }
+#endif
+
+ /* Configure multiplexed pins as connected on the ZP213X/4XPA board:
+ *
+ * PINSEL1 P0.17/CAP1.2/SCK1/MAT1.2 Bits 2-3=10 for SCK1
+ * PINSEL1 P0.18/CAP1.3/MISO1/MAT1.3 Bits 4-5=10 for MISO1
+ * (This is the RESET line for the UG_2864AMBAG01,
+ * although it is okay to configure it as an input too)
+ * PINSEL1 P0.19/MAT1.2/MOSI1/CAP1.2 Bits 6-7=10 for MOSI1
+ * PINSEL1 P0.20/MAT1.3/SSEL1/EINT3 Bits 8-9=00 for P0.20 (we'll control it via GPIO or FIO)
+ * PINSEL1 P0.23/VBUS Bits 12-13=00 for P0.21 (we'll control it via GPIO or FIO)
+ */
+
+ regval32 = getreg32(LPC214X_PINSEL1);
+#ifdef CONFIG_LCD_UG2864AMBAG01
+ regval32 &= ~(LPC214X_PINSEL1_P017_MASK|LPC214X_PINSEL1_P019_MASK|
+ LPC214X_PINSEL1_P020_MASK|LPC214X_PINSEL1_P023_MASK);
+ regval32 |= (LPC214X_PINSEL1_P017_SCK1|LPC214X_PINSEL1_P019_MOSI1|
+ LPC214X_PINSEL1_P020_GPIO|LPC214X_PINSEL1_P023_GPIO);
+#else
+ regval32 &= ~(LPC214X_PINSEL1_P017_MASK|LPC214X_PINSEL1_P018_MASK
+ LPC214X_PINSEL1_P019_MASK|LPC214X_PINSEL1_P020_MASK|
+ LPC214X_PINSEL1_P023_MASK);
+ regval32 |= (LPC214X_PINSEL1_P017_SCK1|LPC214X_PINSEL1_P018_MISO1|
+ LPC214X_PINSEL1_P019_MOSI1|LPC214X_PINSEL1_P020_GPIO|
+ LPC214X_PINSEL1_P023_GPIO);
+#endif
+ putreg32(regval32, LPC214X_PINSEL1);
+
+ /* De-select chip select using P0.20 (SSEL1) (low enables) and select A0
+ * for commands (also low)
+ */
+
+ regval32 = (1 << 20) || (1 << 23);
+ putreg32(regval32, CS_SET_REGISTER);
+ regval32 |= getreg32(CS_DIR_REGISTER);
+ putreg32(regval32, CS_DIR_REGISTER);
+
+ /* Enable peripheral clocking to SPI1 */
+
+ regval32 = getreg32(LPC214X_PCON_PCONP);
+ regval32 |= LPC214X_PCONP_PCSPI1;
+ putreg32(regval32, LPC214X_PCON_PCONP);
+
+ /* Configure 8-bit SPI mode */
+
+ putreg16(LPC214X_SPI1CR0_DSS8BIT|LPC214X_SPI1CR0_FRFSPI, LPC214X_SPI1_CR0);
+
+ /* Disable the SSP and all interrupts (we'll poll for all data) */
+
+ putreg8(0, LPC214X_SPI1_CR1);
+ putreg8(0, LPC214X_SPI1_IMSC);
+
+ /* Set the initial clock frequency for indentification mode < 400kHz */
+
+ spi_setfrequency(NULL, 400000);
+
+ /* Enable the SPI */
+
+ regval8 = getreg8(LPC214X_SPI1_CR1);
+ putreg8(regval8 | LPC214X_SPI1CR1_SSE, LPC214X_SPI1_CR1);
+
+ for (i = 0; i < 8; i++)
+ {
+ (void)getreg16(LPC214X_SPI1_DR);
+ }
+
+ return &g_spidev;
+}
diff --git a/nuttx/configs/zp214xpa/src/up_ug2864ambag01.c b/nuttx/configs/zp214xpa/src/up_ug2864ambag01.c
new file mode 100644
index 0000000000..164518db36
--- /dev/null
+++ b/nuttx/configs/zp214xpa/src/up_ug2864ambag01.c
@@ -0,0 +1,177 @@
+/****************************************************************************
+ * config/zp214xpa/src/up_ug2864ambag01.c
+ * arch/arm/src/board/up_ug2864ambag01.c
+ *
+ * Copyright (C) 2012 Gregory Nutt. All rights reserved.
+ * Author: Gregory Nutt
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ * 3. Neither the name NuttX nor the names of its contributors may be
+ * used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include
+
+#include
+
+#include
+#include
+#include
+
+#include "up_arch.h"
+#include "chip.h"
+#include "lpc214x_pinsel.h"
+
+#ifdef CONFIG_LCD_UG2864AMBAG01
+
+/****************************************************************************
+ * Pre-Processor Definitions
+ ****************************************************************************/
+/* Configuration ************************************************************/
+/* The pin configurations here requires that SPI1 is avaialable */
+
+/* SPI should be configured with CMD/DATA support (and no transfer methods) */
+
+#ifndef CONFIG_SPI_CMDDATA
+# error "The OLED driver requires CONFIG_SPI_CMDDATA in the configuration"
+#endif
+
+/* Pin Configuration ********************************************************/
+/* UG-2864AMBAG01 OLED Display:
+ *
+ * PIN NAME PIN CONFIGURATION
+ * 1 3V3
+ * 2 5V
+ * 3 RESET P0.18/CAP1.3/MISO1/MAT1.3P0.18 RESET - General purpose output
+ * 4 DI P0.19/MAT1.2/MOSI1/CAP1.2P0.19 DI - Alternate function 2
+ * 5 CS P0.20/MAT1.3/SSEL1/EINT3 - General purpose output
+ * 6 SCK P0.17/CAP1.2/SCK1/MAT1.2 - Alternate function 2
+ * 7 A0 P0.23/VBUS - General purpose output
+ * 8 N/C LED-
+ * 9 N/C LED+ (BL)
+ * 10 GND
+ *
+ * Definitions and configuration for DO, DI, CS, in up_spi1.c
+ */
+
+/* Use either FIO or legacy GPIO */
+
+#ifdef CONFIG_LPC214x_FIO
+# define CS_SET_REGISTER (LPC214X_FIO0_BASE+LPC214X_FIO_SET_OFFSET)
+# define CS_CLR_REGISTER (LPC214X_FIO0_BASE+LPC214X_FIO_CLR_OFFSET)
+# define CS_DIR_REGISTER (LPC214X_FIO0_BASE+LPC214X_FIO_DIR_OFFSET)
+#else
+# define CS_SET_REGISTER (LPC214X_GPIO0_BASE+LPC214X_GPIO_SET_OFFSET)
+# define CS_CLR_REGISTER (LPC214X_GPIO0_BASE+LPC214X_GPIO_CLR_OFFSET)
+# define CS_DIR_REGISTER (LPC214X_GPIO0_BASE+LPC214X_GPIO_DIR_OFFSET)
+#endif
+
+/* Debug ********************************************************************/
+
+#ifdef CONFIG_DEBUG_LCD
+# define lcddbg(format, arg...) dbg(format, ##arg)
+# define lcdvdbg(format, arg...) vdbg(format, ##arg)
+#else
+# define lcddbg(x...)
+# define lcdvdbg(x...)
+#endif
+
+/****************************************************************************
+ * Public Functions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Name: up_nxdrvinit
+ *
+ * Description:
+ * Called by NX initialization logic to configure the OLED.
+ *
+ ****************************************************************************/
+
+FAR struct lcd_dev_s *up_nxdrvinit(unsigned int devno)
+{
+ FAR struct spi_dev_s *spi;
+ FAR struct lcd_dev_s *dev;
+ uint32_t regval32;
+ uint32_t bits32;
+
+ /* Configure multiplexed pins as connected on the ZP213X/4XPA board:
+ *
+ * PINSEL1 P0.18/CAP1.3/MISO1/MAT1.3 Bits 4-5=00 for P0.18
+ */
+
+ regval32 = getreg32(LPC214X_PINSEL1);
+ regval32 &= ~LPC214X_PINSEL1_P018_MASK;
+ regval32 |= LPC214X_PINSEL1_P018_GPIO;
+ putreg32(regval32, LPC214X_PINSEL1);
+
+ /* Set the RESET line low, putting the OLED into the reset state. */
+
+ bits32 = (1 << 18);
+ putreg32(bits32, CS_CLR_REGISTER);
+ regval32 = getreg32(CS_DIR_REGISTER);
+ putreg32(regval32 | bits32, CS_DIR_REGISTER);
+
+ /* Wait a bit then release the OLED from the reset state */
+
+ up_mdelay(20);
+ putreg32(bits32, CS_SET_REGISTER);
+
+ /* Get the SPI1 port interface */
+
+ spi = up_spiinitialize(1);
+ if (!spi)
+ {
+ lcddbg("Failed to initialize SPI port 1\n");
+ }
+ else
+ {
+ /* Bind the SPI port to the OLED */
+
+ dev = ug2864ambag01_initialize(spi, devno);
+ if (!dev)
+ {
+ lcddbg("Failed to bind SPI port 1 to OLED %d: %d\n", devno);
+ }
+ else
+ {
+ lcdvdbg("Bound SPI port 1 to OLED %d\n", devno);
+
+ /* And turn the OLED on */
+
+ (void)dev->setpower(dev, CONFIG_LCD_MAXPOWER);
+ return dev;
+ }
+ }
+
+ return NULL;
+}
+#endif /* CONFIG_LCD_UG2864AMBAG01 */
diff --git a/nuttx/configs/zp214xpa/tools/olimex.cfg b/nuttx/configs/zp214xpa/tools/olimex.cfg
new file mode 100755
index 0000000000..09f373993b
--- /dev/null
+++ b/nuttx/configs/zp214xpa/tools/olimex.cfg
@@ -0,0 +1,62 @@
+# NXP LPC2148 ARM7TDMI
+
+#daemon configuration
+telnet_port 4444
+gdb_port 3333
+
+#interface
+interface ft2232
+ft2232_device_desc "Olimex OpenOCD JTAG A"
+ft2232_layout "olimex-jtag"
+ft2232_vid_pid 0x15BA 0x0003
+
+# Use RCLK. If RCLK is not available fall back to 500kHz.
+#
+# Depending on cabling you might be able to eek this up to 2000kHz.
+jtag_rclk 500
+
+if { [info exists CHIPNAME] } {
+ set _CHIPNAME $CHIPNAME
+} else {
+ set _CHIPNAME lpc2148
+}
+
+if { [info exists CPUTAPID ] } {
+ set _CPUTAPID $CPUTAPID
+} else {
+ set _CPUTAPID 0x4f1f0f0f
+}
+
+adapter_nsrst_delay 200
+jtag_ntrst_delay 200
+
+# NOTE!!! LPCs need reset pulled while RTCK is low. 0 to activate
+# JTAG, power-on reset is not enough, i.e. you need to perform a
+# reset before being able to talk to the LPC2148, attach is not possible.
+
+reset_config trst_and_srst
+
+jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID
+
+set _TARGETNAME $_CHIPNAME.cpu
+target create $_TARGETNAME arm7tdmi -chain-position $_TARGETNAME
+
+$_TARGETNAME configure -work-area-phys 0x40000000 -work-area-size 0x4000 -work-area-backup 0
+
+$_TARGETNAME configure -event reset-init {
+ # Force target into ARM state
+ arm core_state arm
+
+ # Do not remap 0x0000-0x0020 to anything but the flash (i.e. select
+ # "User Flash Mode" where interrupt vectors are _not_ remapped,
+ # and reside in flash instead).
+ #
+ # See section 7.1 on page 32 ("Memory Mapping control register") in
+ # "UM10139: Volume 1: LPC214x User Manual", Rev. 02 -- 25 July 2006.
+ # http://www.standardics.nxp.com/support/documents/microcontrollers/pdf/user.manual.lpc2141.lpc2142.lpc2144.lpc2146.lpc2148.pdf
+ mwb 0xE01FC040 0x01
+}
+
+# flash bank lpc2000 0 0 [calc checksum]
+set _FLASHNAME $_CHIPNAME.flash
+flash bank $_FLASHNAME lpc2000 0x0 0x7d000 0 0 $_TARGETNAME lpc2000_v2 14765 calc_checksum
diff --git a/nuttx/configs/zp214xpa/tools/oocd.sh b/nuttx/configs/zp214xpa/tools/oocd.sh
new file mode 100755
index 0000000000..f1e49344d2
--- /dev/null
+++ b/nuttx/configs/zp214xpa/tools/oocd.sh
@@ -0,0 +1,52 @@
+#!/bin/sh
+#
+# See configs/zp214xpa/README.txt for information about
+# this file.
+
+TOPDIR=$1
+USAGE="$0 [-d]"
+if [ -z "${TOPDIR}" ]; then
+ echo "Missing argument"
+ echo $USAGE
+ exit 1
+fi
+
+# Assume that OpenOCD was installed and at /usr/local/bin. Uncomment
+# the following to run directly from the build directory
+#OPENOCD_PATH="/home/OpenOCD/openocd/src"
+#TARGET_PATH="/home/OpenOCD/openocd/tcl"
+OPENOCD_PATH="/usr/local/bin"
+TARGET_PATH="/usr/local/share/openocd/scripts"
+
+OPENOCD_EXE=openocd.exe
+OPENOCD_CFG="${TOPDIR}/configs/zp214xpa/tools/olimex.cfg"
+OPENOCD_ARGS="-f ${OPENOCD_CFG} -s ${TARGET_PATH}"
+
+if [ "X$2" = "X-d" ]; then
+ OPENOCD_ARGS=$OPENOCD_ARGS" -d3"
+ set -x
+fi
+
+if [ ! -d ${OPENOCD_PATH} ]; then
+ echo "OpenOCD path does not exist: ${OPENOCD_PATH}"
+ exit 1
+fi
+if [ ! -x ${OPENOCD_PATH}/${OPENOCD_EXE} ]; then
+ echo "OpenOCD does not exist: ${OPENOCD_PATH}/${OPENOCD_EXE}"
+ exit 1
+fi
+if [ ! -f ${OPENOCD_CFG} ]; then
+ echo "OpenOCD config file does not exist: ${OPENOCD_CFG}"
+ exit 1
+fi
+
+echo "Starting OpenOCD"
+cd ${OPENOCD_PATH} || { echo "Failed to CD to ${OPENOCD_PATH}"; exit 1; }
+${OPENOCD_EXE} ${OPENOCD_ARGS} &
+echo "OpenOCD daemon started"
+ps -ef | grep openocd
+echo "In GDB: target remote localhost:3333"
+
+
+
+
diff --git a/nuttx/configs/zp214xpa/tools/usb-repair.txt b/nuttx/configs/zp214xpa/tools/usb-repair.txt
new file mode 100644
index 0000000000..83d7598a55
--- /dev/null
+++ b/nuttx/configs/zp214xpa/tools/usb-repair.txt
@@ -0,0 +1,25 @@
+https://www.olimex.com/dev/pdf/ARM/JTAG/Repair%20Procedure%20for%20OpenOcd-Rev.%20G%20drivers.pdf
+
+Repair procedure for ARM-USB-OCD drivers
+
+1. Uninstalling ARM-USB-OCD drivers
+-------------------------------------
+1.1. Connect your programmer/debugger to your computer, open Device Manager
+ and uninstall the drivers for ARM-USB-OCD.
+1.2. After you have uninstalled ARM-USB-TINY driver from Device Manager,
+ disconnect the programmer from your computer.
+1.3. Now you should download FTClean.exe from here:
+ http://www.ftdichip.com/Support/Utilities/FTClean.zip.
+1.4. After download is complete extract the "*.zip" file, open folder FTClean,
+ and run FTClean.exe
+1.5. Ror VID (Hex) select "Other". And after that fill the first box with 15ba
+ and "PID (Hex)" with 0004.
+1.6. Press "Clean System" button. Make sure that all FTDI devices are
+ disconnected. (My require administrator privileges).
+
+2. Re-installing the ARM-USB-OCD driver
+---------------------------------------
+2.1 Connect the programmer/debugger to the computer.
+2.2 When prompted, browse to the C:\gccfd\DRIVERS\ARM-USB-OCD-DRIVER
+ directory and install. (A different driver is required for OpenOCD
+ 0.4.0. That driver is available from the olimex.com web site).
diff --git a/nuttx/graphics/Kconfig b/nuttx/graphics/Kconfig
index 18b1e1ab97..b56a6cb5c0 100644
--- a/nuttx/graphics/Kconfig
+++ b/nuttx/graphics/Kconfig
@@ -178,6 +178,12 @@ config NXFONTS_CHARBITS
The number of bits in the character set. Current options are only 7 and 8.
The default is 7.
+config NXFONT_MONO5X8
+ bool "Mono 5x8"
+ default n
+ ---help---
+ Tiny mono-spaced 5x8 font (font ID FONTID_MONO5X8 = 18)
+
config NXFONT_SANS17X22
bool "Sans 17x22"
default n
diff --git a/nuttx/include/nuttx/nx/nxfonts.h b/nuttx/include/nuttx/nx/nxfonts.h
index 8e7289b2a6..91bce0036b 100644
--- a/nuttx/include/nuttx/nx/nxfonts.h
+++ b/nuttx/include/nuttx/nx/nxfonts.h
@@ -113,6 +113,11 @@
#elif defined(CONFIG_NXFONT_SERIF38X49B)
# define NXFONT_DEFAULT FONTID_SERIF38X49B
+/* Mono-space fonts */
+
+#elif defined(CONFIG_NXFONT_MONO5X8)
+# define NXFONT_DEFAULT FONTID_MONO5X8
+
#endif
/****************************************************************************
From e88ff3cdfaf26f8dec8f2d634cb3bc4390c6c464 Mon Sep 17 00:00:00 2001
From: patacongo
Date: Sun, 30 Dec 2012 21:12:43 +0000
Subject: [PATCH 020/118] Fix the nxlines configuration for the zp214xpa board
git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5467 42af7a65-404d-4744-a932-0658087f49c3
---
apps/examples/nxlines/nxlines_main.c | 1 +
nuttx/ChangeLog | 6 +--
nuttx/configs/mcu123-lpc214x/src/up_spi1.c | 26 +++++------
nuttx/configs/zp214xpa/README.txt | 2 +
nuttx/configs/zp214xpa/src/up_spi1.c | 44 +++++++++++++------
nuttx/configs/zp214xpa/src/up_ug2864ambag01.c | 29 +++++++-----
nuttx/drivers/lcd/ug-2864ambag01.c | 4 +-
7 files changed, 68 insertions(+), 44 deletions(-)
diff --git a/apps/examples/nxlines/nxlines_main.c b/apps/examples/nxlines/nxlines_main.c
index 331fab6317..e4632bb21d 100644
--- a/apps/examples/nxlines/nxlines_main.c
+++ b/apps/examples/nxlines/nxlines_main.c
@@ -191,6 +191,7 @@ static inline int nxlines_initialize(void)
g_nxlines.code = NXEXIT_NXOPEN;
return ERROR;
}
+
return OK;
}
diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog
index 56cc5515dc..daa1e068c4 100644
--- a/nuttx/ChangeLog
+++ b/nuttx/ChangeLog
@@ -3843,6 +3843,6 @@
* configs/sim/nxlines: Add an nxlines configuration for the
simulator.
* configs/zp214xpa/nxlines: Add an nxlines configuration for the
- ZP213x/4xPA (with the LPC2148 and the UG_2864AMBAG01). As of this
- writing (2012-12-30), I see only garbage on the display each time
- the display is updated.
+ ZP213x/4xPA (with the LPC2148 and the UG_2864AMBAG01). Working
+ as of 2012-12-30.
+
diff --git a/nuttx/configs/mcu123-lpc214x/src/up_spi1.c b/nuttx/configs/mcu123-lpc214x/src/up_spi1.c
index 61abee20a9..c10144d888 100644
--- a/nuttx/configs/mcu123-lpc214x/src/up_spi1.c
+++ b/nuttx/configs/mcu123-lpc214x/src/up_spi1.c
@@ -85,20 +85,16 @@
* Definitions
****************************************************************************/
-/* Enables debug output from this file (needs CONFIG_DEBUG too) */
+/* Enables debug output from this file */
-#undef SPI_DEBUG /* Define to enable debug */
-#undef SPI_VERBOSE /* Define to enable verbose debug */
-
-#ifdef SPI_DEBUG
+#ifdef CONFIG_DEBUG_SPI
# define spidbg lldbg
-# ifdef SPI_VERBOSE
+# ifdef CONFIG_DEBUG_VERBOSE
# define spivdbg lldbg
# else
# define spivdbg(x...)
# endif
#else
-# undef SPI_VERBOSE
# define spidbg(x...)
# define spivdbg(x...)
#endif
@@ -125,17 +121,17 @@
****************************************************************************/
#ifndef CONFIG_SPI_OWNBUS
-static int spi_lock(FAR struct spi_dev_s *dev, bool lock);
+static int spi_lock(FAR struct spi_dev_s *dev, bool lock);
#endif
-static void spi_select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected);
+static void spi_select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected);
static uint32_t spi_setfrequency(FAR struct spi_dev_s *dev, uint32_t frequency);
-static uint8_t spi_status(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
+static uint8_t spi_status(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
#ifdef CONFIG_SPI_CMDDATA
-static int spi_cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
+static int spi_cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
#endif
static uint16_t spi_send(FAR struct spi_dev_s *dev, uint16_t ch);
-static void spi_sndblock(FAR struct spi_dev_s *dev, FAR const void *buffer, size_t nwords);
-static void spi_recvblock(FAR struct spi_dev_s *dev, FAR void *buffer, size_t nwords);
+static void spi_sndblock(FAR struct spi_dev_s *dev, FAR const void *buffer, size_t nwords);
+static void spi_recvblock(FAR struct spi_dev_s *dev, FAR void *buffer, size_t nwords);
/****************************************************************************
* Private Data
@@ -224,14 +220,14 @@ static void spi_select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool sel
{
/* Enable slave select (low enables) */
- spidbg("CD asserted\n");
+ spidbg("CS asserted\n");
putreg32(bit, CS_CLR_REGISTER);
}
else
{
/* Disable slave select (low enables) */
- spidbg("CD de-asserted\n");
+ spidbg("CS de-asserted\n");
putreg32(bit, CS_SET_REGISTER);
/* Wait for the TX FIFO not full indication */
diff --git a/nuttx/configs/zp214xpa/README.txt b/nuttx/configs/zp214xpa/README.txt
index 9f577b98d5..58a2242d07 100644
--- a/nuttx/configs/zp214xpa/README.txt
+++ b/nuttx/configs/zp214xpa/README.txt
@@ -338,3 +338,5 @@ Configurations:
CONFIG_HOST_LINUX=y : Linux (Cygwin under Windows okay too).
CONFIG_ARM_TOOLCHAIN_GNU_EABI=y : Buildroot (arm-nuttx-elf-gcc)
CONFIG_RAW_BINARY=y : Output formats: ELF and raw binary
+
+ 3. Verified as of this writing (2012-12-30).
diff --git a/nuttx/configs/zp214xpa/src/up_spi1.c b/nuttx/configs/zp214xpa/src/up_spi1.c
index 563d63589c..1ee1cac326 100644
--- a/nuttx/configs/zp214xpa/src/up_spi1.c
+++ b/nuttx/configs/zp214xpa/src/up_spi1.c
@@ -86,20 +86,16 @@
* Definitions
****************************************************************************/
-/* Enables debug output from this file (needs CONFIG_DEBUG too) */
+/* Enables debug output from this file */
-#undef SPI_DEBUG /* Define to enable debug */
-#undef SPI_VERBOSE /* Define to enable verbose debug */
-
-#ifdef SPI_DEBUG
+#ifdef CONFIG_DEBUG_SPI
# define spidbg lldbg
-# ifdef SPI_VERBOSE
+# ifdef CONFIG_DEBUG_VERBOSE
# define spivdbg lldbg
# else
# define spivdbg(x...)
# endif
#else
-# undef SPI_VERBOSE
# define spidbg(x...)
# define spivdbg(x...)
#endif
@@ -112,10 +108,12 @@
/* Use either FIO or legacy GPIO */
#ifdef CONFIG_LPC214x_FIO
+# define CS_PIN_REGISTER (LPC214X_FIO0_BASE+LPC214X_FIO_PIN_OFFSET)
# define CS_SET_REGISTER (LPC214X_FIO0_BASE+LPC214X_FIO_SET_OFFSET)
# define CS_CLR_REGISTER (LPC214X_FIO0_BASE+LPC214X_FIO_CLR_OFFSET)
# define CS_DIR_REGISTER (LPC214X_FIO0_BASE+LPC214X_FIO_DIR_OFFSET)
#else
+# define CS_PIN_REGISTER (LPC214X_GPIO0_BASE+LPC214X_GPIO_PIN_OFFSET)
# define CS_SET_REGISTER (LPC214X_GPIO0_BASE+LPC214X_GPIO_SET_OFFSET)
# define CS_CLR_REGISTER (LPC214X_GPIO0_BASE+LPC214X_GPIO_CLR_OFFSET)
# define CS_DIR_REGISTER (LPC214X_GPIO0_BASE+LPC214X_GPIO_DIR_OFFSET)
@@ -130,7 +128,7 @@ static int spi_lock(FAR struct spi_dev_s *dev, bool lock);
#endif
static void spi_select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected);
static uint32_t spi_setfrequency(FAR struct spi_dev_s *dev, uint32_t frequency);
-static uint8_t spi_status(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
+static uint8_t spi_status(FAR struct spi_dev_s *dev, enum spi_dev_e devid);
#ifdef CONFIG_SPI_CMDDATA
static int spi_cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd);
#endif
@@ -193,7 +191,7 @@ static struct spi_dev_s g_spidev = { &g_spiops };
#ifndef CONFIG_SPI_OWNBUS
static int spi_lock(FAR struct spi_dev_s *dev, bool lock)
{
- /* Not implemented */
+ /* Not implemented -- the UG_2864AMBAG01 is the only device on SPI1 */
return -ENOSYS;
}
@@ -219,25 +217,32 @@ static int spi_lock(FAR struct spi_dev_s *dev, bool lock)
static void spi_select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
{
+#ifdef CONFIG_DEBUG_SPI
+ uint32_t regval;
+#endif
uint32_t bit = 1 << 20;
/* We do not bother to check if devid == SPIDEV_DISPLAY because that is the
* only thing on the bus.
*/
+#ifdef CONFIG_DEBUG_SPI
+ regval = getreg32(CS_PIN_REGISTER);
+#endif
+
if (selected)
{
/* Enable slave select (low enables) */
- spidbg("CD asserted\n");
putreg32(bit, CS_CLR_REGISTER);
+ spidbg("CS asserted: %08x->%08x\n", regval, getreg32(CS_PIN_REGISTER));
}
else
{
/* Disable slave select (low enables) */
- spidbg("CD de-asserted\n");
putreg32(bit, CS_SET_REGISTER);
+ spidbg("CS de-asserted: %08x->%08x\n", regval, getreg32(CS_PIN_REGISTER));
/* Wait for the TX FIFO not full indication */
@@ -345,6 +350,9 @@ static uint8_t spi_status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
#ifdef CONFIG_SPI_CMDDATA
static int spi_cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
{
+#ifdef CONFIG_DEBUG_SPI
+ uint32_t regval;
+#endif
uint32_t bit = 1 << 23;
/* We do not bother to check if devid == SPIDEV_DISPLAY because that is the
@@ -358,19 +366,23 @@ static int spi_cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd
* A0 = L: the inputs at D0 to D7 are transferred to the command registers."
*/
+#ifdef CONFIG_DEBUG_SPI
+ regval = getreg32(CS_PIN_REGISTER);
+#endif
+
if (cmd)
{
/* L: the inputs at D0 to D7 are transferred to the command registers */
- spidbg("Command\n");
putreg32(bit, CS_CLR_REGISTER);
+ spidbg("Command: %08x->%08x\n", regval, getreg32(CS_PIN_REGISTER));
}
else
{
/* H: the inputs at D0 to D7 are treated as display data. */
- spidbg("CD de-asserted\n");
putreg32(bit, CS_SET_REGISTER);
+ spidbg("Data: %08x->%08x\n", regval, getreg32(CS_PIN_REGISTER));
}
return OK;
@@ -606,11 +618,15 @@ FAR struct spi_dev_s *up_spiinitialize(int port)
* for commands (also low)
*/
- regval32 = (1 << 20) || (1 << 23);
+ regval32 = (1 << 20) | (1 << 23);
putreg32(regval32, CS_SET_REGISTER);
regval32 |= getreg32(CS_DIR_REGISTER);
putreg32(regval32, CS_DIR_REGISTER);
+ spidbg("CS Pin Config: PINSEL1: %08x PIN: %08x DIR: %08x\n",
+ getreg32(LPC214X_PINSEL1), getreg32(CS_PIN_REGISTER),
+ getreg32(CS_DIR_REGISTER));
+
/* Enable peripheral clocking to SPI1 */
regval32 = getreg32(LPC214X_PCON_PCONP);
diff --git a/nuttx/configs/zp214xpa/src/up_ug2864ambag01.c b/nuttx/configs/zp214xpa/src/up_ug2864ambag01.c
index 164518db36..236f9fa411 100644
--- a/nuttx/configs/zp214xpa/src/up_ug2864ambag01.c
+++ b/nuttx/configs/zp214xpa/src/up_ug2864ambag01.c
@@ -85,13 +85,15 @@
/* Use either FIO or legacy GPIO */
#ifdef CONFIG_LPC214x_FIO
-# define CS_SET_REGISTER (LPC214X_FIO0_BASE+LPC214X_FIO_SET_OFFSET)
-# define CS_CLR_REGISTER (LPC214X_FIO0_BASE+LPC214X_FIO_CLR_OFFSET)
-# define CS_DIR_REGISTER (LPC214X_FIO0_BASE+LPC214X_FIO_DIR_OFFSET)
+# define RESET_PIN_REGISTER (LPC214X_FIO0_BASE+LPC214X_FIO_PIN_OFFSET)
+# define RESET_SET_REGISTER (LPC214X_FIO0_BASE+LPC214X_FIO_SET_OFFSET)
+# define RESET_CLR_REGISTER (LPC214X_FIO0_BASE+LPC214X_FIO_CLR_OFFSET)
+# define RESET_DIR_REGISTER (LPC214X_FIO0_BASE+LPC214X_FIO_DIR_OFFSET)
#else
-# define CS_SET_REGISTER (LPC214X_GPIO0_BASE+LPC214X_GPIO_SET_OFFSET)
-# define CS_CLR_REGISTER (LPC214X_GPIO0_BASE+LPC214X_GPIO_CLR_OFFSET)
-# define CS_DIR_REGISTER (LPC214X_GPIO0_BASE+LPC214X_GPIO_DIR_OFFSET)
+# define RESET_PIN_REGISTER (LPC214X_GPIO0_BASE+LPC214X_GPIO_PIN_OFFSET)
+# define RESET_SET_REGISTER (LPC214X_GPIO0_BASE+LPC214X_GPIO_SET_OFFSET)
+# define RESET_CLR_REGISTER (LPC214X_GPIO0_BASE+LPC214X_GPIO_CLR_OFFSET)
+# define RESET_DIR_REGISTER (LPC214X_GPIO0_BASE+LPC214X_GPIO_DIR_OFFSET)
#endif
/* Debug ********************************************************************/
@@ -136,14 +138,21 @@ FAR struct lcd_dev_s *up_nxdrvinit(unsigned int devno)
/* Set the RESET line low, putting the OLED into the reset state. */
bits32 = (1 << 18);
- putreg32(bits32, CS_CLR_REGISTER);
- regval32 = getreg32(CS_DIR_REGISTER);
- putreg32(regval32 | bits32, CS_DIR_REGISTER);
+ putreg32(bits32, RESET_CLR_REGISTER);
+ regval32 = getreg32(RESET_DIR_REGISTER);
+ putreg32(regval32 | bits32, RESET_DIR_REGISTER);
+
+ lcdvdbg("RESET Pin Config: PINSEL1: %08x PIN: %08x DIR: %08x\n",
+ getreg32(LPC214X_PINSEL1), getreg32(RESET_PIN_REGISTER),
+ getreg32(RESET_DIR_REGISTER));
/* Wait a bit then release the OLED from the reset state */
up_mdelay(20);
- putreg32(bits32, CS_SET_REGISTER);
+ putreg32(bits32, RESET_SET_REGISTER);
+
+ lcdvdbg("RESET release: PIN: %08x DIR: %08x\n",
+ getreg32(RESET_PIN_REGISTER), getreg32(RESET_DIR_REGISTER));
/* Get the SPI1 port interface */
diff --git a/nuttx/drivers/lcd/ug-2864ambag01.c b/nuttx/drivers/lcd/ug-2864ambag01.c
index 2a47b38eb7..ca1d4c1234 100644
--- a/nuttx/drivers/lcd/ug-2864ambag01.c
+++ b/nuttx/drivers/lcd/ug-2864ambag01.c
@@ -1148,8 +1148,8 @@ void ug2864ambag01_fill(FAR struct lcd_dev_s *dev, uint8_t color)
/* Transfer one page of the selected color */
- (void)SPI_SNDBLOCK(priv->spi, &priv->fb[page * UG2864AMBAG01_XRES],
- UG2864AMBAG01_XRES);
+ (void)SPI_SNDBLOCK(priv->spi, &priv->fb[page * UG2864AMBAG01_XRES],
+ UG2864AMBAG01_XRES);
}
/* De-select and unlock the device */
From 167854a980facb6f611e2610a1754903dfc12ce4 Mon Sep 17 00:00:00 2001
From: patacongo
Date: Mon, 31 Dec 2012 13:44:36 +0000
Subject: [PATCH 021/118] Remove non-functional WLAN examples, configurations
git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5468 42af7a65-404d-4744-a932-0658087f49c3
---
apps/ChangeLog.txt | 2 +
apps/examples/Kconfig | 1 -
apps/examples/Make.defs | 4 -
apps/examples/Makefile | 2 +-
apps/examples/wlan/Kconfig | 13 -
apps/examples/wlan/Makefile | 98 ----
apps/examples/wlan/wlan_main.c | 306 -----------
nuttx/ChangeLog | 6 +-
.../configs/olimex-lpc1766stk/wlan/Make.defs | 109 ----
.../configs/olimex-lpc1766stk/wlan/appconfig | 42 --
.../configs/olimex-lpc1766stk/wlan/defconfig | 498 ------------------
.../configs/olimex-lpc1766stk/wlan/setenv.sh | 73 ---
12 files changed, 7 insertions(+), 1147 deletions(-)
delete mode 100644 apps/examples/wlan/Kconfig
delete mode 100644 apps/examples/wlan/Makefile
delete mode 100644 apps/examples/wlan/wlan_main.c
delete mode 100644 nuttx/configs/olimex-lpc1766stk/wlan/Make.defs
delete mode 100644 nuttx/configs/olimex-lpc1766stk/wlan/appconfig
delete mode 100755 nuttx/configs/olimex-lpc1766stk/wlan/defconfig
delete mode 100755 nuttx/configs/olimex-lpc1766stk/wlan/setenv.sh
diff --git a/apps/ChangeLog.txt b/apps/ChangeLog.txt
index d6a2f9d907..0464c61988 100644
--- a/apps/ChangeLog.txt
+++ b/apps/ChangeLog.txt
@@ -459,3 +459,5 @@
as well. However, the USB HID keyboard drier has not yet been
updated to detect key release events. That is kind of tricky in
the USB HID keyboard report data.
+ * apps/examples/wlan: Remove non-functional example.
+
diff --git a/apps/examples/Kconfig b/apps/examples/Kconfig
index ae5f0a61a1..b0cbd70886 100644
--- a/apps/examples/Kconfig
+++ b/apps/examples/Kconfig
@@ -58,5 +58,4 @@ source "$APPSDIR/examples/usbterm/Kconfig"
source "$APPSDIR/examples/watchdog/Kconfig"
source "$APPSDIR/examples/wget/Kconfig"
source "$APPSDIR/examples/wgetjson/Kconfig"
-source "$APPSDIR/examples/wlan/Kconfig"
source "$APPSDIR/examples/xmlrpc/Kconfig"
diff --git a/apps/examples/Make.defs b/apps/examples/Make.defs
index 91f1331dfc..de2b8939fe 100644
--- a/apps/examples/Make.defs
+++ b/apps/examples/Make.defs
@@ -254,10 +254,6 @@ ifeq ($(CONFIG_EXAMPLES_WGETJSON),y)
CONFIGURED_APPS += examples/wgetjson
endif
-ifeq ($(CONFIG_EXAMPLES_WLAN),y)
-CONFIGURED_APPS += examples/wlan
-endif
-
ifeq ($(CONFIG_EXAMPLES_XMLRPC),y)
CONFIGURED_APPS += examples/xmlrpc
endif
diff --git a/apps/examples/Makefile b/apps/examples/Makefile
index 50e9596d78..99312af7ab 100644
--- a/apps/examples/Makefile
+++ b/apps/examples/Makefile
@@ -42,7 +42,7 @@ SUBDIRS += ftpd hello helloxx hidkbd igmp json keypadtest lcdrw mm modbus mount
SUBDIRS += nettest nsh null nx nxconsole nxffs nxflat nxhello nximage
SUBDIRS += nxlines nxtext ostest pashello pipe poll pwm qencoder relays
SUBDIRS += rgmp romfs serloop telnetd thttpd tiff touchscreen udp uip
-SUBDIRS += usbserial sendmail usbstorage usbterm watchdog wget wgetjson wlan
+SUBDIRS += usbserial sendmail usbstorage usbterm watchdog wget wgetjson
# Sub-directories that might need context setup. Directories may need
# context setup for a variety of reasons, but the most common is because
diff --git a/apps/examples/wlan/Kconfig b/apps/examples/wlan/Kconfig
deleted file mode 100644
index 7f8fb526a5..0000000000
--- a/apps/examples/wlan/Kconfig
+++ /dev/null
@@ -1,13 +0,0 @@
-#
-# For a description of the syntax of this configuration file,
-# see misc/tools/kconfig-language.txt.
-#
-
-config EXAMPLES_WLAN
- bool "WLAN example"
- default n
- ---help---
- Enable the WLAN example
-
-if EXAMPLES_WLAN
-endif
diff --git a/apps/examples/wlan/Makefile b/apps/examples/wlan/Makefile
deleted file mode 100644
index 1da79736f1..0000000000
--- a/apps/examples/wlan/Makefile
+++ /dev/null
@@ -1,98 +0,0 @@
-############################################################################
-# apps/examples/wlan/Makefile
-#
-# Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
-# Authors: Gregory Nutt
-# Rafael Noronha
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in
-# the documentation and/or other materials provided with the
-# distribution.
-# 3. Neither the name NuttX nor the names of its contributors may be
-# used to endorse or promote products derived from this software
-# without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-#
-############################################################################
-
--include $(TOPDIR)/.config
--include $(TOPDIR)/Make.defs
-include $(APPDIR)/Make.defs
-
-# WLAN Test
-
-ASRCS =
-CSRCS = wlan_main.c
-
-AOBJS = $(ASRCS:.S=$(OBJEXT))
-COBJS = $(CSRCS:.c=$(OBJEXT))
-
-SRCS = $(ASRCS) $(CSRCS)
-OBJS = $(AOBJS) $(COBJS)
-
-ifeq ($(CONFIG_WINDOWS_NATIVE),y)
- BIN = ..\..\libapps$(LIBEXT)
-else
-ifeq ($(WINTOOL),y)
- BIN = ..\\..\\libapps$(LIBEXT)
-else
- BIN = ../../libapps$(LIBEXT)
-endif
-endif
-
-ROOTDEPPATH = --dep-path .
-
-# Common build
-
-VPATH =
-
-all: .built
-.PHONY: clean depend distclean
-
-$(AOBJS): %$(OBJEXT): %.S
- $(call ASSEMBLE, $<, $@)
-
-$(COBJS): %$(OBJEXT): %.c
- $(call COMPILE, $<, $@)
-
-.built: $(OBJS)
- $(call ARCHIVE, $(BIN), $(OBJS))
- @touch .built
-
-context:
-
-.depend: Makefile $(SRCS)
- @$(MKDEP) $(ROOTDEPPATH) "$(CC)" -- $(CFLAGS) -- $(SRCS) >Make.dep
- @touch $@
-
-depend: .depend
-
-clean:
- $(call DELFILE, .built)
- $(call CLEAN)
-
-distclean: clean
- $(call DELFILE, Make.dep)
- $(call DELFILE, .depend)
-
--include Make.dep
-
diff --git a/apps/examples/wlan/wlan_main.c b/apps/examples/wlan/wlan_main.c
deleted file mode 100644
index aa48a02382..0000000000
--- a/apps/examples/wlan/wlan_main.c
+++ /dev/null
@@ -1,306 +0,0 @@
-/****************************************************************************
- * examples/wlan/wlan_main.c
- *
- * Copyright (C) 2011 Gregory Nutt. All rights reserved.
- * Authors: Gregory Nutt
- * Rafael Noronha
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- * 3. Neither the name Gregory Nutt nor the names of its contributors may be
- * used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
- *
- ****************************************************************************/
-
-/****************************************************************************
- * Included Files
- ****************************************************************************/
-
-#include
-
-#include
-#include
-#include
-
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-#include
-
-#include
-
-#include
-#include
-#include
-
-#include
-
-/* DHCPC may be used in conjunction with any other feature (or not) */
-
-#ifdef CONFIG_EXAMPLES_WLAN_DHCPC
-# include
-# include
-# include
-#endif
-
-/****************************************************************************
- * Definitions
- ****************************************************************************/
-/* Configuration ************************************************************/
-
-/* Sanity checking */
-
-#ifndef CONFIG_USBHOST
-# error "CONFIG_USBHOST is not defined"
-#endif
-
-#ifdef CONFIG_USBHOST_BULK_DISABLE
-# error "Bulk endpoints are disabled (CONFIG_USBHOST_BULK_DISABLE)"
-#endif
-
-#ifndef CONFIG_NFILE_DESCRIPTORS
-# error "CONFIG_NFILE_DESCRIPTORS > 0 needed"
-#endif
-
-/* Provide some default values for other configuration settings */
-
-#ifndef CONFIG_EXAMPLES_WLAN_DEFPRIO
-# define CONFIG_EXAMPLES_WLAN_DEFPRIO 50
-#endif
-
-#ifndef CONFIG_EXAMPLES_WLAN_STACKSIZE
-# define CONFIG_EXAMPLES_WLAN_STACKSIZE 1024
-#endif
-
-#ifndef CONFIG_EXAMPLES_WLAN_DEVNAME
-# define CONFIG_EXAMPLES_WLAN_DEVNAME "wlan0"
-#endif
-
-/****************************************************************************
- * Private Types
- ****************************************************************************/
-
-/****************************************************************************
- * Private Data
- ****************************************************************************/
-
-static struct usbhost_driver_s *g_drvr;
-
-/****************************************************************************
- * Private Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
-/****************************************************************************
- * Name: wlan_bringup
- *
- * Description:
- * Wait for USB devices to be connected.
- *
- ****************************************************************************/
-
-static inline void wlan_bringup(void)
-{
-#if defined(CONFIG_EXAMPLES_WLAN_DHCPC) || defined(CONFIG_EXAMPLES_WLAN_NOMAC)
- uint8_t mac[IFHWADDRLEN];
-#endif
- struct in_addr addr;
-#ifdef CONFIG_EXAMPLES_WLAN_DHCPC
- void *handle;
-#endif
-
- /* Many embedded network interfaces must have a software assigned
- * MAC
- */
-
-#ifdef CONFIG_EXAMPLES_WLAN_NOMAC
- mac[0] = 0x00;
- mac[1] = 0xe0;
- mac[2] = 0xde;
- mac[3] = 0xad;
- mac[4] = 0xbe;
- mac[5] = 0xef;
- uip_setmacaddr("eth0", mac);
-#endif
-
- /* Set up the default router address */
-
- addr.s_addr = HTONL(CONFIG_EXAMPLES_WLAN_DRIPADDR);
- uip_setdraddr("eth0", &addr);
-
- /* Setup the subnet mask */
-
- addr.s_addr = HTONL(CONFIG_EXAMPLES_WLAN_NETMASK);
- uip_setnetmask("eth0", &addr);
-
- /* Set up our host address */
-
-#ifdef CONFIG_EXAMPLES_WLAN_DHCPC
- addr.s_addr = 0;
-#else
- addr.s_addr = HTONL(CONFIG_EXAMPLES_WLAN_IPADDR);
-#endif
- uip_sethostaddr("eth0", &addr);
-
-#ifdef CONFIG_EXAMPLES_WLAN_DHCPC
- /* Set up the resolver */
-
- resolv_init();
-
- /* Get the MAC address of the NIC */
-
- uip_getmacaddr("eth0", mac);
-
- /* Set up the DHCPC modules */
-
- handle = dhcpc_open(&mac, IFHWADDRLEN);
-
- /* Get an IP address. Note: there is no logic here for renewing
- * the address in this example. The address should be renewed in
- * ds.lease_time/2 seconds.
- */
-
- printf("Getting IP address\n");
- if (handle)
- {
- struct dhcpc_state ds;
- (void)dhcpc_request(handle, &ds);
- uip_sethostaddr("eth1", &ds.ipaddr);
- if (ds.netmask.s_addr != 0)
- {
- uip_setnetmask("eth0", &ds.netmask);
- }
- if (ds.default_router.s_addr != 0)
- {
- uip_setdraddr("eth0", &ds.default_router);
- }
- if (ds.dnsaddr.s_addr != 0)
- {
- resolv_conf(&ds.dnsaddr);
- }
- dhcpc_close(handle);
- printf("IP: %s\n", inet_ntoa(ds.ipaddr));
- }
-#endif
-}
-
-/****************************************************************************
- * Name: wlan_waiter
- *
- * Description:
- * Wait for USB devices to be connected.
- *
- ****************************************************************************/
-
-static int wlan_waiter(int argc, char *argv[])
-{
- bool connected = false;
- int ret;
-
- printf("wlan_waiter: Running\n");
- for (;;)
- {
- /* Wait for the device to change state */
-
- ret = DRVR_WAIT(g_drvr, connected);
- DEBUGASSERT(ret == OK);
-
- connected = !connected;
- printf("wlan_waiter: %s\n", connected ? "connected" : "disconnected");
-
- /* Did we just become connected? */
-
- if (connected)
- {
- /* Yes.. enumerate the newly connected device */
-
- ret = DRVR_ENUMERATE(g_drvr);
-
- /* If the enumeration was successful, then bring up the interface */
-
- wlan_bringup();
- }
- }
-
- /* Keep the compiler from complaining */
-
- return 0;
-}
-
-/****************************************************************************
- * Name: wlan_main
- ****************************************************************************/
-
-int wlan_main(int argc, char *argv[])
-{
- pid_t pid;
- int ret;
-
- /* First, register all of the USB host Wireless LAN drivers */
-
- printf("wlan_main: Register drivers\n");
- ret = usbhost_wlaninit();
- if (ret != OK)
- {
- printf("wlan_main: Failed to register the WLAN driver\n");
- }
-
- /* Then get an instance of the USB host interface */
-
- printf("wlan_main: Initialize USB host WLAN driver\n");
- g_drvr = usbhost_initialize(0);
- if (g_drvr)
- {
- /* Start a thread to handle device connection. */
-
- printf("wlan_main: Start wlan_waiter\n");
-
-#ifndef CONFIG_CUSTOM_STACK
- pid = task_create("usbhost", CONFIG_EXAMPLES_WLAN_DEFPRIO,
- CONFIG_EXAMPLES_WLAN_STACKSIZE,
- (main_t)wlan_waiter, (const char **)NULL);
-#else
- pid = task_create("usbhost", CONFIG_EXAMPLES_WLAN_DEFPRIO,
- (main_t)wlan_waiter, (const char **)NULL);
-#endif
-
- /* Now just sleep. Eventually logic here will perform the device test. */
-
- for (;;)
- {
- sleep(5);
- printf("usert_start: Still alive\n");
- }
- }
- return 0;
-}
diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog
index daa1e068c4..80b4bde1dd 100644
--- a/nuttx/ChangeLog
+++ b/nuttx/ChangeLog
@@ -1452,7 +1452,7 @@
complex: 'uname -o 2>/dev/null || echo "Other"'
* drivers/usbhost/usbhost_enumerate.c: Add logic to get the VID and PID. This
is necessary in order to support vendor-specific USB devices.
- * examplex/wlan, configs/olimex-lpc1766stk/wlan, drivers/usbhost/usbhost_rtl8187.c,
+ * examples/wlan, configs/olimex-lpc1766stk/wlan, drivers/usbhost/usbhost_rtl8187.c,
Add infrastructure to support RTL18187 wireless USB.
* configs/nucleus2g: backed out USB host changes... wrong board.
* Renamed arc/hc/include/mc9s12ne64 and src/mc9s12ne64 to m9s12. That name is
@@ -1920,7 +1920,7 @@
CONFIG_FAT_LCNAMES is not selected, all filenames are strictly upper
case.
* configs/stm3210e-eval/nsh2: Console is back on UART1; Added
- examplex/nx as an NSH "built-in" command as a demonstration.
+ examples/nx as an NSH "built-in" command as a demonstration.
* fs/fat/fs_fat32dirent.c: Fix an important bug in the directory
allocation (fat_allocatedirentry()). I looks like it could be
initializing the wrong sectors! NOTE: This function was in
@@ -3845,4 +3845,6 @@
* configs/zp214xpa/nxlines: Add an nxlines configuration for the
ZP213x/4xPA (with the LPC2148 and the UG_2864AMBAG01). Working
as of 2012-12-30.
+ * config/olimex-lpc1766stk/wlan: Remove non-functional
+ configuration.
diff --git a/nuttx/configs/olimex-lpc1766stk/wlan/Make.defs b/nuttx/configs/olimex-lpc1766stk/wlan/Make.defs
deleted file mode 100644
index f99c88f53d..0000000000
--- a/nuttx/configs/olimex-lpc1766stk/wlan/Make.defs
+++ /dev/null
@@ -1,109 +0,0 @@
-############################################################################
-# configs/olimex-lpc1766stk/wlan/Make.defs
-#
-# Copyright (C) 2011, 2012 Gregory Nutt. All rights reserved.
-# Author: Gregory Nutt
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in
-# the documentation and/or other materials provided with the
-# distribution.
-# 3. Neither the name NuttX nor the names of its contributors may be
-# used to endorse or promote products derived from this software
-# without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-#
-############################################################################
-
-include ${TOPDIR}/.config
-include ${TOPDIR}/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/olimex-lpc1766stk/wlan/appconfig b/nuttx/configs/olimex-lpc1766stk/wlan/appconfig
deleted file mode 100644
index 7fb2871aaf..0000000000
--- a/nuttx/configs/olimex-lpc1766stk/wlan/appconfig
+++ /dev/null
@@ -1,42 +0,0 @@
-############################################################################
-# configs/olimex-lpc1766stk/wlan/appconfig
-#
-# Copyright (C) 2011 Gregory Nutt. All rights reserved.
-# Author: Gregory Nutt
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in
-# the documentation and/or other materials provided with the
-# distribution.
-# 3. Neither the name NuttX nor the names of its contributors may be
-# used to endorse or promote products derived from this software
-# without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-#
-############################################################################
-
-# Path to example in apps/examples containing the user_start entry point
-
-CONFIGURED_APPS += examples/wlan
-
-# Networking support
-
-CONFIGURED_APPS += netutils/uiplib
diff --git a/nuttx/configs/olimex-lpc1766stk/wlan/defconfig b/nuttx/configs/olimex-lpc1766stk/wlan/defconfig
deleted file mode 100755
index 009191f654..0000000000
--- a/nuttx/configs/olimex-lpc1766stk/wlan/defconfig
+++ /dev/null
@@ -1,498 +0,0 @@
-############################################################################
-# configs/olimex-lpc1766stk/wlan/defconfig
-#
-# Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
-# Author: Gregory Nutt
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in
-# the documentation and/or other materials provided with the
-# distribution.
-# 3. Neither the name NuttX nor the names of its contributors may be
-# used to endorse or promote products derived from this software
-# without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-#
-############################################################################
-#
-# Architecture Selection
-#
-CONFIG_ARCH="arm"
-CONFIG_ARCH_ARM=y
-CONFIG_ARCH_CORTEXM3=y
-CONFIG_ARCH_CHIP="lpc17xx"
-CONFIG_ARCH_CHIP_LPC17XX=y
-CONFIG_ARCH_CHIP_LPC1766=y
-CONFIG_ARCH_BOARD="olimex-lpc1766stk"
-CONFIG_ARCH_BOARD_LPC1766STK=y
-CONFIG_BOARD_LOOPSPERMSEC=8111
-CONFIG_DRAM_SIZE=32768
-CONFIG_DRAM_START=0x10000000
-CONFIG_ARCH_IRQPRIO=y
-CONFIG_ARCH_INTERRUPTSTACK=0
-CONFIG_ARCH_STACKDUMP=y
-CONFIG_ARCH_BOOTLOADER=n
-CONFIG_ARCH_LEDS=y
-CONFIG_ARCH_BUTTONS=n
-CONFIG_ARCH_CALIBRATION=n
-CONFIG_ARCH_DMA=n
-
-#
-# Identify toolchain and linker options
-#
-CONFIG_LPC17_CODESOURCERYW=n
-CONFIG_LPC17_CODESOURCERYL=n
-CONFIG_LPC17_DEVKITARM=n
-CONFIG_LPC17_BUILDROOT=y
-
-#
-# Individual subsystems can be enabled:
-#
-CONFIG_LPC17_ETHERNET=n
-CONFIG_LPC17_USBHOST=y
-CONFIG_LPC17_USBOTG=n
-CONFIG_LPC17_USBDEV=n
-CONFIG_LPC17_UART0=y
-CONFIG_LPC17_UART1=n
-CONFIG_LPC17_UART2=n
-CONFIG_LPC17_UART3=n
-CONFIG_LPC17_CAN1=n
-CONFIG_LPC17_CAN2=n
-CONFIG_LPC17_SPI=n
-CONFIG_LPC17_SSP0=n
-CONFIG_LPC17_SSP1=n
-CONFIG_LPC17_I2C0=n
-CONFIG_LPC17_I2C1=n
-CONFIG_LPC17_I2S=n
-CONFIG_LPC17_TMR0=n
-CONFIG_LPC17_TMR1=n
-CONFIG_LPC17_TMR2=n
-CONFIG_LPC17_TMR3=n
-CONFIG_LPC17_RIT=n
-CONFIG_LPC17_PWM=n
-CONFIG_LPC17_MCPWM=n
-CONFIG_LPC17_QEI=n
-CONFIG_LPC17_RTC=n
-CONFIG_LPC17_WDT=n
-CONFIG_LPC17_ADC=n
-CONFIG_LPC17_DAC=n
-CONFIG_LPC17_GPDMA=n
-
-#
-# LPC17xx specific serial device driver settings
-#
-CONFIG_UART0_SERIAL_CONSOLE=y
-CONFIG_UART1_SERIAL_CONSOLE=n
-CONFIG_UART2_SERIAL_CONSOLE=n
-CONFIG_UART3_SERIAL_CONSOLE=n
-
-CONFIG_UART0_TXBUFSIZE=256
-CONFIG_UART1_TXBUFSIZE=256
-CONFIG_UART2_TXBUFSIZE=256
-CONFIG_UART3_TXBUFSIZE=256
-
-CONFIG_UART0_RXBUFSIZE=256
-CONFIG_UART1_RXBUFSIZE=256
-CONFIG_UART2_RXBUFSIZE=256
-CONFIG_UART3_RXBUFSIZE=256
-
-CONFIG_UART0_BAUD=57600
-CONFIG_UART2_BAUD=57600
-CONFIG_UART3_BAUD=57600
-CONFIG_UART1_BAUD=57600
-
-CONFIG_UART0_BITS=8
-CONFIG_UART1_BITS=8
-CONFIG_UART2_BITS=8
-CONFIG_UART3_BITS=8
-
-CONFIG_UART0_PARITY=0
-CONFIG_UART1_PARITY=0
-CONFIG_UART2_PARITY=0
-CONFIG_UART3_PARITY=0
-
-CONFIG_UART0_2STOP=0
-CONFIG_UART1_2STOP=0
-CONFIG_UART2_2STOP=0
-CONFIG_UART3_2STOP=0
-
-#
-# LPC17xx specific PHY/Ethernet device driver settings
-#
-CONFIG_PHY_KS8721=y
-CONFIG_PHY_AUTONEG=y
-CONFIG_PHY_SPEED100=n
-CONFIG_PHY_FDUPLEX=y
-CONFIG_NET_REGDEBUG=n
-
-#
-# General build options
-#
-CONFIG_RRLOAD_BINARY=n
-CONFIG_INTELHEX_BINARY=y
-CONFIG_MOTOROLA_SREC=n
-CONFIG_RAW_BINARY=n
-
-#
-# General OS setup
-#
-CONFIG_USER_ENTRYPOINT="wlan_main"
-CONFIG_DEBUG=n
-CONFIG_DEBUG_VERBOSE=n
-CONFIG_DEBUG_SYMBOLS=n
-CONFIG_DEBUG_NET=n
-CONFIG_DEBUG_USB=n
-CONFIG_MM_REGIONS=2
-CONFIG_ARCH_LOWPUTC=y
-CONFIG_RR_INTERVAL=200
-CONFIG_SCHED_INSTRUMENTATION=n
-CONFIG_TASK_NAME_SIZE=0
-CONFIG_START_YEAR=2011
-CONFIG_START_MONTH=3
-CONFIG_START_DAY=8
-CONFIG_GREGORIAN_TIME=n
-CONFIG_JULIAN_TIME=n
-CONFIG_DEV_CONSOLE=y
-CONFIG_DEV_LOWCONSOLE=n
-CONFIG_MUTEX_TYPES=n
-CONFIG_PRIORITY_INHERITANCE=n
-CONFIG_SEM_PREALLOCHOLDERS=0
-CONFIG_SEM_NNESTPRIO=0
-CONFIG_FDCLONE_DISABLE=n
-CONFIG_FDCLONE_STDIO=n
-CONFIG_SDCLONE_DISABLE=y
-CONFIG_NXFLAT=n
-CONFIG_SCHED_WORKQUEUE=y
-CONFIG_SCHED_WORKPRIORITY=192
-CONFIG_SCHED_WORKPERIOD=50000
-CONFIG_SCHED_WORKSTACKSIZE=1024
-CONFIG_SIG_SIGWORK=4
-
-#
-# The following can be used to disable categories of
-# APIs supported by the OS. If the compiler supports
-# weak functions, then it should not be necessary to
-# disable functions unless you want to restrict usage
-# of those APIs.
-#
-# There are certain dependency relationships in these
-# features.
-#
-# o mq_notify logic depends on signals to awaken tasks
-# waiting for queues to become full or empty.
-# o pthread_condtimedwait() depends on signals to wake
-# up waiting tasks.
-#
-CONFIG_DISABLE_CLOCK=n
-CONFIG_DISABLE_POSIX_TIMERS=n
-CONFIG_DISABLE_PTHREAD=n
-CONFIG_DISABLE_SIGNALS=n
-CONFIG_DISABLE_MQUEUE=n
-CONFIG_DISABLE_MOUNTPOINT=n
-CONFIG_DISABLE_ENVIRON=n
-CONFIG_DISABLE_POLL=n
-
-#
-# Misc libc settings
-#
-CONFIG_NOPRINTF_FIELDWIDTH=n
-
-#
-# Allow for architecture optimized implementations
-#
-# The architecture can provide optimized versions of the
-# following to improve system performance
-#
-CONFIG_ARCH_MEMCPY=n
-CONFIG_ARCH_MEMCMP=n
-CONFIG_ARCH_MEMMOVE=n
-CONFIG_ARCH_MEMSET=n
-CONFIG_ARCH_STRCMP=n
-CONFIG_ARCH_STRCPY=n
-CONFIG_ARCH_STRNCPY=n
-CONFIG_ARCH_STRLEN=n
-CONFIG_ARCH_STRNLEN=n
-CONFIG_ARCH_BZERO=n
-
-#
-# Sizes of configurable things (0 disables)
-#
-CONFIG_MAX_TASKS=16
-CONFIG_MAX_TASK_ARGS=4
-CONFIG_NPTHREAD_KEYS=4
-CONFIG_NFILE_DESCRIPTORS=8
-CONFIG_NFILE_STREAMS=8
-CONFIG_NAME_MAX=32
-CONFIG_STDIO_BUFFER_SIZE=256
-CONFIG_NUNGET_CHARS=2
-CONFIG_PREALLOC_MQ_MSGS=4
-CONFIG_MQ_MAXMSGSIZE=32
-CONFIG_MAX_WDOGPARMS=2
-CONFIG_PREALLOC_WDOGS=4
-CONFIG_PREALLOC_TIMERS=4
-
-#
-# Filesystem configuration
-#
-CONFIG_FS_FAT=n
-CONFIG_FAT_LCNAMES=n
-CONFIG_FAT_LFN=n
-CONFIG_FAT_MAXFNAME=32
-CONFIG_FS_NXFFS=n
-CONFIG_FS_ROMFS=n
-
-#
-# Maintain legacy build behavior (revisit)
-#
-
-CONFIG_MMCSD=y
-CONFIG_MMCSD_SPI=y
-CONFIG_MMCSD_SDIO=y
-
-#
-# SPI-based MMC/SD driver
-#
-CONFIG_MMCSD_NSLOTS=1
-CONFIG_MMCSD_READONLY=n
-CONFIG_MMCSD_SPICLOCK=12500000
-
-#
-# Block driver buffering
-#
-CONFIG_FS_READAHEAD=n
-CONFIG_FS_WRITEBUFFER=n
-
-#
-# SDIO-based MMC/SD driver
-#
-CONFIG_SDIO_DMA=n
-CONFIG_MMCSD_MMCSUPPORT=n
-CONFIG_MMCSD_HAVECARDDETECT=n
-
-#
-# TCP/IP and UDP support via uIP
-#
-CONFIG_NET=y
-CONFIG_NET_NOINTS=y
-CONFIG_NET_MULTIBUFFER=y
-CONFIG_NET_IPv6=n
-CONFIG_NSOCKET_DESCRIPTORS=2
-CONFIG_NET_SOCKOPTS=y
-CONFIG_NET_BUFSIZE=420
-CONFIG_NET_TCP=y
-CONFIG_NET_TCP_CONNS=40
-CONFIG_NET_MAX_LISTENPORTS=40
-CONFIG_NET_UDP=y
-CONFIG_NET_UDP_CHECKSUMS=y
-#CONFIG_NET_UDP_CONNS=10
-CONFIG_NET_ICMP=n
-CONFIG_NET_ICMP_PING=n
-#CONFIG_NET_PINGADDRCONF=0
-CONFIG_NET_STATISTICS=y
-#CONFIG_NET_RECEIVE_WINDOW=
-#CONFIG_NET_ARPTAB_SIZE=8
-CONFIG_NET_BROADCAST=n
-CONFIG_NET_WLAN=y
-
-#
-# UIP Network Utilities
-#
-CONFIG_NET_DHCP_LIGHT=n
-CONFIG_NET_RESOLV_ENTRIES=4
-
-#
-# USB Device Configuration
-#
-CONFIG_USBDEV=n
-CONFIG_USBDEV_ISOCHRONOUS=n
-CONFIG_USBDEV_DUALSPEED=n
-CONFIG_USBDEV_SELFPOWERED=y
-CONFIG_USBDEV_REMOTEWAKEUP=n
-CONFIG_USBDEV_MAXPOWER=100
-CONFIG_USBDEV_TRACE=n
-CONFIG_USBDEV_TRACE_NRECORDS=128
-
-#
-# USB Host Configuration
-#
-CONFIG_USBHOST=y
-CONFIG_USBHOST_NPREALLOC=0
-CONFIG_USBHOST_BULK_DISABLE=n
-CONFIG_USBHOST_INT_DISABLE=y
-CONFIG_USBHOST_ISOC_DISABLE=y
-
-#
-# LPC17xx USB Device Configuration
-#
-CONFIG_LPC17_USBDEV_FRAME_INTERRUPT=n
-CONFIG_LPC17_USBDEV_EPFAST_INTERRUPT=n
-CONFIG_LPC17_USBDEV_DMA=n
-CONFIG_LPC17_USBDEV_NDMADESCRIPTORS=0
-CONFIG_LPC17_USBDEV_DMAINTMASK=0
-
-#
-# LPC17xx USB Host Configuration
-#
-# OHCI RAM layout:
-#
-CONFIG_USBHOST_OHCIRAM_SIZE=2048
-CONFIG_USBHOST_NEDS=3
-CONFIG_USBHOST_NTDS=2
-CONFIG_USBHOST_TDBUFFERS=4
-CONFIG_USBHOST_TDBUFSIZE=128
-CONFIG_USBHOST_IOBUFSIZE=448
-
-#
-# USB Serial Device Configuration
-#
-CONFIG_PL2303=n
-CONFIG_PL2303_EPINTIN=1
-CONFIG_PL2303_EPBULKOUT=2
-CONFIG_PL2303_EPBULKIN=5
-CONFIG_PL2303_NWRREQS=4
-CONFIG_PL2303_NRDREQS=4
-CONFIG_PL2303_VENDORID=0x067b
-CONFIG_PL2303_PRODUCTID=0x2303
-CONFIG_PL2303_VENDORSTR="Nuttx"
-CONFIG_PL2303_PRODUCTSTR="USBdev Serial"
-CONFIG_PL2303_RXBUFSIZE=512
-CONFIG_PL2303_TXBUFSIZE=512
-
-#
-# USB Storage Device Configuration
-#
-CONFIG_USBMSC=n
-CONFIG_USBMSC_EP0MAXPACKET=64
-CONFIG_USBMSC_EPBULKOUT=2
-CONFIG_USBMSC_EPBULKIN=5
-CONFIG_USBMSC_NRDREQS=2
-CONFIG_USBMSC_NWRREQS=2
-CONFIG_USBMSC_BULKINREQLEN=256
-CONFIG_USBMSC_BULKOUTREQLEN=256
-CONFIG_USBMSC_VENDORID=0x584e
-CONFIG_USBMSC_VENDORSTR="NuttX"
-CONFIG_USBMSC_PRODUCTID=0x5342
-CONFIG_USBMSC_PRODUCTSTR="USBdev Storage"
-CONFIG_USBMSC_VERSIONNO=0x0399
-CONFIG_USBMSC_REMOVABLE=y
-
-#
-# Settings for examples/uip
-#
-CONFIG_EXAMPLES_UIP_IPADDR=0x0a000002
-CONFIG_EXAMPLES_UIP_DRIPADDR=0x0a000001
-CONFIG_EXAMPLES_UIP_NETMASK=0xffffff00
-CONFIG_EXAMPLES_UIP_DHCPC=n
-
-#
-# Settings for examples/nettest
-#
-CONFIG_EXAMPLES_NETTEST_SERVER=n
-CONFIG_EXAMPLES_NETTEST_PERFORMANCE=n
-CONFIG_EXAMPLES_NETTEST_NOMAC=n
-CONFIG_EXAMPLES_NETTEST_IPADDR=0x0a000002
-CONFIG_EXAMPLES_NETTEST_DRIPADDR=0x0a000001
-CONFIG_EXAMPLES_NETTEST_NETMASK=0xffffff00
-CONFIG_EXAMPLES_NETTEST_CLIENTIP=0x0a000001
-
-#
-# Settings for apps/examples/wlan
-#
-CONFIG_EXAMPLES_WLAN_DHCPC=n
-CONFIG_EXAMPLES_WLAN_NOMAC=n
-CONFIG_EXAMPLES_WLAN_IPADDR=0xc0a800c9
-CONFIG_EXAMPLES_WLAN_DRIPADDR=0xc0a80001
-CONFIG_EXAMPLES_WLAN_NETMASK=0xffffff00
-
-#
-# Settings for examples/ostest
-#
-CONFIG_EXAMPLES_OSTEST_LOOPS=1
-CONFIG_EXAMPLES_OSTEST_STACKSIZE=2048
-CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=3
-
-#
-# Settings for apps/nshlib
-#
-CONFIG_NSH_FILEIOSIZE=512
-CONFIG_NSH_STRERROR=n
-CONFIG_NSH_LINELEN=64
-CONFIG_NSH_NESTDEPTH=3
-CONFIG_NSH_DISABLESCRIPT=n
-CONFIG_NSH_DISABLEBG=n
-CONFIG_NSH_ROMFSETC=n
-CONFIG_NSH_CONSOLE=y
-CONFIG_NSH_TELNET=n
-CONFIG_NSH_ARCHINIT=n
-CONFIG_NSH_IOBUFFER_SIZE=512
-CONFIG_NSH_DHCPC=n
-CONFIG_NSH_NOMAC=n
-CONFIG_NSH_IPADDR=0x0a000002
-CONFIG_NSH_DRIPADDR=0x0a000001
-CONFIG_NSH_NETMASK=0xffffff00
-CONFIG_NSH_ROMFSMOUNTPT="/etc"
-CONFIG_NSH_INITSCRIPT="init.d/rcS"
-CONFIG_NSH_ROMFSDEVNO=0
-CONFIG_NSH_ROMFSSECTSIZE=64
-CONFIG_NSH_FATDEVNO=1
-CONFIG_NSH_FATSECTSIZE=512
-CONFIG_NSH_FATNSECTORS=1024
-CONFIG_NSH_FATMOUNTPT="/tmp"
-
-#
-# Architecture-specific NSH options
-#
-CONFIG_NSH_MMCSDSPIPORTNO=0
-CONFIG_NSH_MMCSDSLOTNO=0
-CONFIG_NSH_MMCSDMINOR=0
-
-#
-# Settings for examples/usbserial
-#
-CONFIG_EXAMPLES_USBSERIAL_INONLY=n
-CONFIG_EXAMPLES_USBSERIAL_OUTONLY=n
-CONFIG_EXAMPLES_USBSERIAL_ONLYSMALL=n
-CONFIG_EXAMPLES_USBSERIAL_ONLYBIG=n
-
-CONFIG_EXAMPLES_USBSERIAL_TRACEINIT=n
-CONFIG_EXAMPLES_USBSERIAL_TRACECLASS=n
-CONFIG_EXAMPLES_USBSERIAL_TRACETRANSFERS=n
-CONFIG_EXAMPLES_USBSERIAL_TRACECONTROLLER=n
-CONFIG_EXAMPLES_USBSERIAL_TRACEINTERRUPTS=n
-
-#
-# Stack and heap information
-#
-CONFIG_BOOT_RUNFROMFLASH=n
-CONFIG_BOOT_COPYTORAM=n
-CONFIG_CUSTOM_STACK=n
-CONFIG_IDLETHREAD_STACKSIZE=1024
-CONFIG_USERMAIN_STACKSIZE=2048
-CONFIG_PTHREAD_STACK_MIN=256
-CONFIG_PTHREAD_STACK_DEFAULT=2048
-CONFIG_HEAP_BASE=
-CONFIG_HEAP_SIZE=
-
-#
-# USB WLAN device identification
-#
-CONFIG_USB_WLAN_VID=0x0bda
-CONFIG_USB_WLAN_PID=0x8189
diff --git a/nuttx/configs/olimex-lpc1766stk/wlan/setenv.sh b/nuttx/configs/olimex-lpc1766stk/wlan/setenv.sh
deleted file mode 100755
index 767614612b..0000000000
--- a/nuttx/configs/olimex-lpc1766stk/wlan/setenv.sh
+++ /dev/null
@@ -1,73 +0,0 @@
-#!/bin/bash
-# configs/olimex-lpc1766stk/wlan/setenv.sh
-#
-# Copyright (C) 2011 Gregory Nutt. All rights reserved.
-# Author: Gregory Nutt
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in
-# the documentation and/or other materials provided with the
-# distribution.
-# 3. Neither the name NuttX nor the names of its contributors may be
-# used to endorse or promote products derived from this software
-# without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-#
-
-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"
-
-# These are the Cygwin paths to the locations where I installed the Atollic
-# toolchain under windows. You will also have to edit this if you install
-# the Atollic toolchain in any other location. /usr/bin is added before
-# the Atollic bin path because there is are binaries named gcc.exe and g++.exe
-# at those locations as well.
-#export TOOLCHAIN_BIN="/usr/bin:/cygdrive/c/Program Files (x86)/Atollic/TrueSTUDIO for ARM Pro 2.3.0/ARMTools/bin"
-#export TOOLCHAIN_BIN="/usr/bin:/cygdrive/c/Program Files (x86)/Atollic/TrueSTUDIO for STMicroelectronics STM32 Lite 2.3.0/ARMTools/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"
-
-# The Olimex-lpc1766stk/tools directory
-export LPCTOOL_DIR="${WD}/configs/olimex-lpc1766stk/tools"
-
-# Add the path to the toolchain and tools directory to the PATH varialble
-export PATH="${TOOLCHAIN_BIN}:${LPCTOOL_DIR}:/sbin:/usr/sbin:${PATH_ORIG}"
-
-echo "PATH : ${PATH}"
From 29da58a677ffc192c61b29f8c1d53216b1c68ebe Mon Sep 17 00:00:00 2001
From: patacongo
Date: Tue, 1 Jan 2013 14:55:01 +0000
Subject: [PATCH 022/118] Updates from Darcy Gong for UG-2864SWEG01 OLED
git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5469 42af7a65-404d-4744-a932-0658087f49c3
---
nuttx/ChangeLog | 4 +-
nuttx/configs/stm32f4discovery/README.txt | 21 ++++--
.../src/stm32f4discovery-internal.h | 5 +-
nuttx/configs/stm32f4discovery/src/up_spi.c | 28 ++++---
.../stm32f4discovery/src/up_ug2864ambag01.c | 2 +-
.../stm32f4discovery/src/up_ug2864hsweg01.c | 6 +-
nuttx/drivers/lcd/ug-2864ambag01.c | 4 +-
nuttx/drivers/lcd/ug-2864hsweg01.c | 73 +++++++++++++++----
8 files changed, 101 insertions(+), 42 deletions(-)
diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog
index 80b4bde1dd..9fd5619fdd 100644
--- a/nuttx/ChangeLog
+++ b/nuttx/ChangeLog
@@ -3845,6 +3845,8 @@
* configs/zp214xpa/nxlines: Add an nxlines configuration for the
ZP213x/4xPA (with the LPC2148 and the UG_2864AMBAG01). Working
as of 2012-12-30.
- * config/olimex-lpc1766stk/wlan: Remove non-functional
+ * configs/olimex-lpc1766stk/wlan: Remove non-functional
configuration.
+ * configs/stm32f4discovery/src and nuttx/drivers/lcd/ug-2864hsweg01.c:
+ Updates and correctinos for the UG-2864HSWEG01 from Darcy Gong.
diff --git a/nuttx/configs/stm32f4discovery/README.txt b/nuttx/configs/stm32f4discovery/README.txt
index 37dae7b9ea..571385abb3 100644
--- a/nuttx/configs/stm32f4discovery/README.txt
+++ b/nuttx/configs/stm32f4discovery/README.txt
@@ -20,7 +20,7 @@ Contents
- FPU
- FSMC SRAM
- SSD1289
- - UG-2864AMBAG01
+ - UG-2864AMBAG01 / UG-2964SWEG01
- STM32F4Discovery-specific Configuration Options
- Configurations
@@ -696,10 +696,10 @@ The following summarize the bit banging oprations:
WriteData(data);
}
-UG-2864AMBAG01
-==============
+UG-2864AMBAG01 / UG-2964SWEG01
+==============================
-I purchased an OLED display on eBay. The OLDE is 128x64 monochrome and
+I purchased an OLED display on eBay. The OLED is 128x64 monochrome and
is based on an UG-2864AMBAG01 OLED controller. The OLED can run in either
parallel or SPI mode. I am using SPI mode. In SPI mode, the OLED is
write only so the driver keeps a 128*64/8 = 1KB framebuffer to remember
@@ -729,6 +729,10 @@ that I am using:
(1) Required because of on-board MEMS
-------------------------------------------------------------------------
+Darcy Gong recently added support for the UG-2964SWEG01 OLED which is also
+an option with this configuratin. I have little technical information about
+the UG-2964SWEG01 interface (see configs/stm32f4discovery/src/up_ug2864sweg01.c).
+
STM32F4Discovery-specific Configuration Options
===============================================
@@ -1347,9 +1351,10 @@ Where is one of the following:
b. Execute 'make menuconfig' in nuttx/ in order to start the
reconfiguration process.
- 3. This configured can be re-configured to use the UG-2864AMBAG01
- 0.96 inch OLED by adding or changing the following items int
- the configuration (using 'make menuconfig'):
+ 3. This configured can be re-configured to use either the
+ UG-2864AMBAG01 or UG-2864SWEG01 0.96 inch OLEDs by adding
+ or changing the following items in the configuration (using
+ 'make menuconfig'):
+CONFIG_SPI_CMDDATA=y
@@ -1360,7 +1365,7 @@ Where is one of the following:
-CONFIG_LCD_SSD1289=y
-CONFIG_SSD1289_PROFILE1=y
- +CONFIG_LCD_UG2864AMBAG01=y
+ +CONFIG_LCD_UG2864AMBAG01=y : For the UG-2964AMBAG01
+CONFIG_UG2864AMBAG01_SPIMODE=3
+CONFIG_UG2864AMBAG01_FREQUENCY=3500000
+CONFIG_UG2864AMBAG01_NINTERFACES=1
diff --git a/nuttx/configs/stm32f4discovery/src/stm32f4discovery-internal.h b/nuttx/configs/stm32f4discovery/src/stm32f4discovery-internal.h
index eae09594c5..7027b639b8 100644
--- a/nuttx/configs/stm32f4discovery/src/stm32f4discovery-internal.h
+++ b/nuttx/configs/stm32f4discovery/src/stm32f4discovery-internal.h
@@ -113,7 +113,7 @@
# define GPIO_OTGFS_OVER (GPIO_INPUT|GPIO_FLOAT|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTD|GPIO_PIN5)
#endif
-/* UG-2864AMBAG01 or UG-2864HSWEG01 OLED Display:
+/* UG-2864AMBAG01 or UG-2864HSWEG01 OLED Display (SPI 4-wire):
*
* --------------------------+----------------------------------------------
* Connector CON10 J1: | STM32F4Discovery
@@ -123,7 +123,7 @@
* 1 3v3 | 3,4 3v3 | P2 3V
* 3 /RESET | 8 /RESET | P2 PB6 (Arbitrary selection)
* 5 /CS | 7 /CS | P2 PB7 (Arbitrary selection)
- * 7 A0 | 9 A0 | P2 PB8 (Arbitrary selection)
+ * 7 A0|D/C | 9 A0|D/C | P2 PB8 (Arbitrary selection)
* 9 LED+ (N/C) | ----- | -----
* 2 5V Vcc | 1,2 Vcc | P2 5V
* 4 DI | 18 D1/SI | P1 PA7 (GPIO_SPI1_MOSI == GPIO_SPI1_MOSI_1 (1))
@@ -142,6 +142,7 @@
GPIO_OUTPUT_SET|GPIO_PORTB|GPIO_PIN7)
# define GPIO_OLED_A0 (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_50MHz|\
GPIO_OUTPUT_CLEAR|GPIO_PORTB|GPIO_PIN8)
+# define GPIO_OLED_DC GPIO_OLED_A0
#endif
/****************************************************************************************************
diff --git a/nuttx/configs/stm32f4discovery/src/up_spi.c b/nuttx/configs/stm32f4discovery/src/up_spi.c
index 7ef3138fdd..5b812d50c5 100644
--- a/nuttx/configs/stm32f4discovery/src/up_spi.c
+++ b/nuttx/configs/stm32f4discovery/src/up_spi.c
@@ -96,11 +96,16 @@
void weak_function stm32_spiinitialize(void)
{
#ifdef CONFIG_STM32_SPI1
- (void)stm32_configgpio(GPIO_CS_MEMS);
+ (void)stm32_configgpio(GPIO_CS_MEMS); /* MEMS chip select */
#endif
-#ifdef CONFIG_LCD_UG2864AMBAG01
+#if defined(CONFIG_LCD_UG2864AMBAG01) || defined(CONFIG_LCD_UG2864HSWEG01)
(void)stm32_configgpio(GPIO_OLED_CS); /* OLED chip select */
+# if defined(CONFIG_LCD_UG2864AMBAG01)
(void)stm32_configgpio(GPIO_OLED_A0); /* OLED Command/Data */
+# endif
+# if defined(CONFIG_LCD_UG2864HSWEG01)
+ (void)stm32_configgpio(GPIO_OLED_DC); /* OLED Command/Data */
+# endif
#endif
}
@@ -134,7 +139,7 @@ void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool sele
{
spidbg("devid: %d CS: %s\n", (int)devid, selected ? "assert" : "de-assert");
-#ifdef CONFIG_LCD_UG2864AMBAG01
+#if defined(CONFIG_LCD_UG2864AMBAG01) || defined(CONFIG_LCD_UG2864HSWEG01)
if (devid == SPIDEV_DISPLAY)
{
stm32_gpiowrite(GPIO_OLED_CS, !selected);
@@ -180,9 +185,9 @@ uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
* Name: stm32_spi1cmddata
*
* Description:
- * Set or clear the SD1329 D/Cn bit to select data (true) or command
- * (false). This function must be provided by platform-specific logic.
- * This is an implementation of the cmddata method of the SPI
+ * Set or clear the SH1101A A0 or SD1306 D/C n bit to select data (true)
+ * or command (false). This function must be provided by platform-specific
+ * logic. This is an implementation of the cmddata method of the SPI
* interface defined by struct spi_ops_s (see include/nuttx/spi.h).
*
* Input Parameters:
@@ -203,18 +208,23 @@ uint8_t stm32_spi3status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
#ifdef CONFIG_STM32_SPI1
int stm32_spi1cmddata(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool cmd)
{
-#ifdef CONFIG_LCD_UG2864AMBAG01
+#if defined(CONFIG_LCD_UG2864AMBAG01) || defined(CONFIG_LCD_UG2864HSWEG01)
if (devid == SPIDEV_DISPLAY)
{
/* "This is the Data/Command control pad which determines whether the
* data bits are data or a command.
*
- * A0 = “H”: the inputs at D0 to D7 are treated as display data.
- * A0 = “L”: the inputs at D0 to D7 are transferred to the command
+ * A0 = "H": the inputs at D0 to D7 are treated as display data.
+ * A0 = "L": the inputs at D0 to D7 are transferred to the command
* registers."
*/
+# if defined(CONFIG_LCD_UG2864AMBAG01)
(void)stm32_gpiowrite(GPIO_OLED_A0, !cmd);
+# endif
+# if defined(CONFIG_LCD_UG2864HSWEG01)
+ (void)stm32_gpiowrite(GPIO_OLED_DC, !cmd);
+# endif
return OK;
}
#endif
diff --git a/nuttx/configs/stm32f4discovery/src/up_ug2864ambag01.c b/nuttx/configs/stm32f4discovery/src/up_ug2864ambag01.c
index 2f21331168..42ad0c2a5e 100644
--- a/nuttx/configs/stm32f4discovery/src/up_ug2864ambag01.c
+++ b/nuttx/configs/stm32f4discovery/src/up_ug2864ambag01.c
@@ -66,7 +66,7 @@
#endif
/* Pin Configuration ********************************************************/
-/* UG-2864AMBAG01 OLED Display:
+/* UG-2864AMBAG01 OLED Display (SPI 4-wire):
*
* --------------------------+----------------------------------------------
* Connector CON10 J1: | STM32F4Discovery
diff --git a/nuttx/configs/stm32f4discovery/src/up_ug2864hsweg01.c b/nuttx/configs/stm32f4discovery/src/up_ug2864hsweg01.c
index 4eee077a14..b6fe354d30 100644
--- a/nuttx/configs/stm32f4discovery/src/up_ug2864hsweg01.c
+++ b/nuttx/configs/stm32f4discovery/src/up_ug2864hsweg01.c
@@ -66,7 +66,7 @@
#endif
/* Pin Configuration ********************************************************/
-/* UG-2864AMBAG01 or UG-2864HSWEG01 OLED Display:
+/* UG-2864HSWEG01 OLED Display (SPI 4-wire):
*
* --------------------------+----------------------------------------------
* Connector CON10 J1: | STM32F4Discovery
@@ -76,7 +76,7 @@
* 1 3v3 | 3,4 3v3 | P2 3V
* 3 /RESET | 8 /RESET | P2 PB6 (Arbitrary selection)
* 5 /CS | 7 /CS | P2 PB7 (Arbitrary selection)(2)
- * 7 A0 | 9 A0 | P2 PB8 (Arbitrary selection)(2)
+ * 7 D/C | 9 D/C | P2 PB8 (Arbitrary selection)(2)
* 9 LED+ (N/C) | ----- | -----
* 2 5V Vcc | 1,2 Vcc | P2 5V
* 4 DI | 18 D1/SI | P1 PA7 (GPIO_SPI1_MOSI == GPIO_SPI1_MOSI_1 (1))
@@ -85,7 +85,7 @@
* 10 GND | 20 GND | P2 GND
* --------------+-----------+----------------------------------------------
* (1) Required because of on-board MEMS
- * (2) Note that the OLED CS and A0 are managed in the up_spi.c file.
+ * (2) Note that the OLED CS and D/C are managed in the up_spi.c file.
* -------------------------------------------------------------------------
*/
diff --git a/nuttx/drivers/lcd/ug-2864ambag01.c b/nuttx/drivers/lcd/ug-2864ambag01.c
index ca1d4c1234..6b3d6d5a84 100644
--- a/nuttx/drivers/lcd/ug-2864ambag01.c
+++ b/nuttx/drivers/lcd/ug-2864ambag01.c
@@ -428,7 +428,7 @@ static inline void ug2864ambag01_configspi(FAR struct spi_dev_s *spi)
SPI_SETMODE(spi, CONFIG_UG2864AMBAG01_SPIMODE);
SPI_SETBITS(spi, 8);
- SPI_SETFREQUENCY(spi, CONFIG_UG2864AMBAG01_FREQUENCY)
+ SPI_SETFREQUENCY(spi, CONFIG_UG2864AMBAG01_FREQUENCY);
}
#endif
@@ -1035,7 +1035,7 @@ FAR struct lcd_dev_s *ug2864ambag01_initialize(FAR struct spi_dev_s *spi, unsign
/* Configure the SPI */
- ug2864ambag01_configspi(spi)
+ ug2864ambag01_configspi(spi);
/* Lock and select device */
diff --git a/nuttx/drivers/lcd/ug-2864hsweg01.c b/nuttx/drivers/lcd/ug-2864hsweg01.c
index 9f9f999066..02a59b104e 100644
--- a/nuttx/drivers/lcd/ug-2864hsweg01.c
+++ b/nuttx/drivers/lcd/ug-2864hsweg01.c
@@ -434,7 +434,7 @@ static inline void ug2864hsweg01_configspi(FAR struct spi_dev_s *spi)
SPI_SETMODE(spi, CONFIG_UG2864HSWEG01_SPIMODE);
SPI_SETBITS(spi, 8);
- SPI_SETFREQUENCY(spi, CONFIG_UG2864HSWEG01_FREQUENCY)
+ SPI_SETFREQUENCY(spi, CONFIG_UG2864HSWEG01_FREQUENCY);
}
#endif
@@ -1041,7 +1041,7 @@ FAR struct lcd_dev_s *ug2864hsweg01_initialize(FAR struct spi_dev_s *spi, unsign
/* Configure the SPI */
- ug2864hsweg01_configspi(spi)
+ ug2864hsweg01_configspi(spi);
/* Lock and select device */
@@ -1052,40 +1052,81 @@ FAR struct lcd_dev_s *ug2864hsweg01_initialize(FAR struct spi_dev_s *spi, unsign
SPI_CMDDATA(spi, SPIDEV_DISPLAY, true);
+ /* Configure OLED SPI or I/O, must be delayed 1-10ms */
+
+ up_mdelay(5);
+
/* Configure the device */
+//#define OLED_WriteCmd(v) SPI_SEND(spi,v)
+//
+// /* Module manufacturers to provide initialization code Ä£¿é³§¼ÒÌṩ³õʼ»¯´úÂë */
+//
+// OLED_WriteCmd(0xAE); /* ¹Ø±ÕOLEDÃæ°åÏÔʾ(ÐÝÃß) */
+// OLED_WriteCmd(0x00); /* ÉèÖÃÁеØÖ·µÍ4bit */
+// OLED_WriteCmd(0x10); /* ÉèÖÃÁеØÖ·¸ß4bit */
+// OLED_WriteCmd(0x40); /* ÉèÖÃÆðʼÐеØÖ·£¨µÍ5bit 0-63£©£¬ Ó²¼þÏà¹Ø*/
+//
+// OLED_WriteCmd(0x81); /* ÉèÖöԱȶÈÃüÁî(Ë«×Ö½ÚÃüÁ£¬µÚ1¸ö×Ö½ÚÊÇÃüÁµÚ2¸ö×Ö½ÚÊǶԱȶȲÎÊý0-255 */
+// OLED_WriteCmd(0xCF); /* ÉèÖöԱȶȲÎÊý */
+//
+// OLED_WriteCmd(0xA1); /* A0 £ºÁеØÖ·0Ó³Éäµ½SEG0; A1 £ºÁеØÖ·127Ó³Éäµ½SEG0 */
+// OLED_WriteCmd(0xA6); /* A6 : ÉèÖÃÕý³£ÏÔʾģʽ; A7 : ÉèÖÃΪ·´ÏÔģʽ */
+//
+// OLED_WriteCmd(0xA8); /* ÉèÖÃCOM·Êý */
+// OLED_WriteCmd(0x3F); /* 1 ->£¨63+1£©Â· */
+//
+// OLED_WriteCmd(0xD3); /* ÉèÖÃÏÔÊ¾Æ«ÒÆ£¨Ë«×Ö½ÚÃüÁ*/
+// OLED_WriteCmd(0x00); /* ÎÞÆ«ÒÆ */
+//
+// OLED_WriteCmd(0xD5); /* ÉèÖÃÏÔʾʱÖÓ·ÖÆµÏµÊý/Õñµ´ÆµÂÊ */
+// OLED_WriteCmd(0x80); /* ÉèÖÃ·ÖÆµÏµÊý,¸ß4bitÊÇ·ÖÆµÏµÊý£¬µÍ4bitÊÇÕñµ´ÆµÂÊ */
+//
+// OLED_WriteCmd(0xD9); /* ÉèÖÃÔ¤³äµçÖÜÆÚ */
+// OLED_WriteCmd(0xF1); /* [3:0],PHASE 1; [7:4],PHASE 2; */
+//
+// OLED_WriteCmd(0xDA); /* ÉèÖÃCOM½ÅÓ²¼þ½ÓÏß·½Ê½ */
+// OLED_WriteCmd(0x12);
+//
+// OLED_WriteCmd(0xDB); /* ÉèÖà vcomh µçѹ±¶ÂÊ */
+// OLED_WriteCmd(0x40); /* [6:4] 000 = 0.65 x VCC; 0.77 x VCC (RESET); 0.83 x VCC */
+//
+// OLED_WriteCmd(0x8D); /* ÉèÖóäµç±Ã£¨ºÍϸöÃüÁî½áºÏʹÓã© */
+// OLED_WriteCmd(0x14); /* 0x14 ʹÄܳäµç±Ã£¬ 0x10 ÊÇ¹Ø±Õ */
+// OLED_WriteCmd(0xAF); /* ´ò¿ªOLEDÃæ°å */
+
SPI_SEND(spi, SSD1306_DISPOFF); /* Display off 0xAE*/
SPI_SEND(spi, SSD1306_SETCOLL(0)); /* Set lower column address 0x00 */
SPI_SEND(spi, SSD1306_SETCOLH(0)); /* Set higher column address 0x10 */
SPI_SEND(spi, SSD1306_STARTLINE(0)); /* Set display start line 0x40*/
- SPI_SEND(spi, SSD1306_PAGEADDR(0)); /* Set page address [¿ÉºöÂÔ] */
+ /* SPI_SEND(spi, SSD1306_PAGEADDR(0));*//* Set page address (Can ignore)*/
SPI_SEND(spi, SSD1306_CONTRAST_MODE); /* Contrast control 0x81*/
SPI_SEND(spi ,SSD1306_CONTRAST(UG2864HSWEG01_CONTRAST)); /* Default contrast 0xCF */
SPI_SEND(spi, SSD1306_REMAPPLEFT); /* Set segment remap left 95 to 0 | 0xA1*/
- SPI_SEND(spi, SSD1306_EDISPOFF); /* Normal display :off 0xA4 [¶à³öµÄÒ»ÐÐ] */
+ /* SPI_SEND(spi, SSD1306_EDISPOFF); */ /* Normal display :off 0xA4 (Can ignore)*/
SPI_SEND(spi, SSD1306_NORMAL); /* Normal (un-reversed) display mode 0xA6 */
SPI_SEND(spi, SSD1306_MRATIO_MODE); /* Multiplex ratio 0xA8*/
SPI_SEND(spi, SSD1306_MRATIO(0x3f)); /* Duty = 1/64 */
- SPI_SEND(spi, SSD1306_SCANTOCOM0); /* Com scan direction: Scan from COM[n-1] to COM[0] [¿ÉºöÂÔ] */
+ /* SPI_SEND(spi, SSD1306_SCANTOCOM0);*/ /* Com scan direction: Scan from COM[n-1] to COM[0] (Can ignore)*/
SPI_SEND(spi, SSD1306_DISPOFFS_MODE); /* Set display offset 0xD3 */
SPI_SEND(spi, SSD1306_DISPOFFS(0));
SPI_SEND(spi, SSD1306_CLKDIV_SET); /* Set clock divider 0xD5*/
- SPI_SEND(spi, SSD1306_CLKDIV(8,0)); /* 0x80 ? ¼ì²é ĬÈÏ0,0*/
-
+ SPI_SEND(spi, SSD1306_CLKDIV(8,0)); /* 0x80*/
+
SPI_SEND(spi, SSD1306_CHRGPER_SET); /* ++Set pre-charge period 0xD9*/
- SPI_SEND(spi, SSD1306_CHRGPER(0x0f,1)); /* 0xf1 or 0x22£¨Ôöǿģʽ£¿£© */
-
+ SPI_SEND(spi, SSD1306_CHRGPER(0x0f,1)); /* 0xf1 or 0x22£¨Enhanced mode?£© */
+
SPI_SEND(spi, SSD1306_CMNPAD_CONFIG); /* Set common pads / set com pins hardware configuration 0xDA*/
- SPI_SEND(spi, SSD1306_CMNPAD(0x12)); /* 0x12 ? ¼ì²é ĬÈÏ 0x10 */
-
- SPI_SEND(spi, SSD1306_VCOM_SET); /* set vcomh 0xDB*/
+ SPI_SEND(spi, SSD1306_CMNPAD(0x12)); /* 0x12 */
+
+ SPI_SEND(spi, SSD1306_VCOM_SET); /* set vcomh 0xDB*/
SPI_SEND(spi, SSD1306_VCOM(0x40));
- SPI_SEND(spi, SSD1306_CHRPUMP_SET); /* ++Set Charge Pump enable/disable 0x8D Ôö¼ÓµÄ*/
- SPI_SEND(spi, SSD1306_CHRPUMP_ON); /* 0x14 */
+ SPI_SEND(spi, SSD1306_CHRPUMP_SET); /* ++Set Charge Pump enable/disable 0x8D ssd1306*/
+ SPI_SEND(spi, SSD1306_CHRPUMP_ON); /* 0x14 close 0x10 */
- //SPI_SEND(spi, SSD1306_DCDC_MODE); /* DC/DC control mode: on */
- //SPI_SEND(spi, SSD1306_DCDC_ON);
+ /*SPI_SEND(spi, SSD1306_DCDC_MODE); */ /* DC/DC control mode: on (SSD1306 Not supported) */
+ /*SPI_SEND(spi, SSD1306_DCDC_ON); */
SPI_SEND(spi, SSD1306_DISPON); /* display ON 0xAF */
From 41731a71efe2bca6fdc3490eff7af1e6fbcb6a3c Mon Sep 17 00:00:00 2001
From: patacongo
Date: Tue, 1 Jan 2013 16:33:47 +0000
Subject: [PATCH 023/118] All lm3s6965-ek configurations converted to use
kconfig-frontends
git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5470 42af7a65-404d-4744-a932-0658087f49c3
---
nuttx/ChangeLog | 2 +
nuttx/arch/arm/src/lm3s/Kconfig | 140 ++++
nuttx/configs/lm3s6965-ek/README.txt | 59 +-
nuttx/configs/lm3s6965-ek/nsh/appconfig | 58 --
nuttx/configs/lm3s6965-ek/nsh/defconfig | 892 ++++++++++++++-------
nuttx/configs/lm3s6965-ek/nx/appconfig | 39 -
nuttx/configs/lm3s6965-ek/nx/defconfig | 800 +++++++++++-------
nuttx/configs/lm3s6965-ek/ostest/appconfig | 39 -
nuttx/configs/lm3s6965-ek/ostest/defconfig | 765 +++++++++++-------
9 files changed, 1760 insertions(+), 1034 deletions(-)
delete mode 100644 nuttx/configs/lm3s6965-ek/nsh/appconfig
delete mode 100644 nuttx/configs/lm3s6965-ek/nx/appconfig
delete mode 100644 nuttx/configs/lm3s6965-ek/ostest/appconfig
diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog
index 9fd5619fdd..7f2bda4579 100644
--- a/nuttx/ChangeLog
+++ b/nuttx/ChangeLog
@@ -3849,4 +3849,6 @@
configuration.
* configs/stm32f4discovery/src and nuttx/drivers/lcd/ug-2864hsweg01.c:
Updates and correctinos for the UG-2864HSWEG01 from Darcy Gong.
+ * configs/lm326965-ek: All configurations converted to use the
+ kconfig-frontends configuration tool.
diff --git a/nuttx/arch/arm/src/lm3s/Kconfig b/nuttx/arch/arm/src/lm3s/Kconfig
index 469ff1fc91..aaf8342fa6 100644
--- a/nuttx/arch/arm/src/lm3s/Kconfig
+++ b/nuttx/arch/arm/src/lm3s/Kconfig
@@ -12,6 +12,7 @@ choice
config ARCH_CHIP_LM3S6918
bool "LM3S6918"
+ select LM3S_HAVE_SSI1
config ARCH_CHIP_LM3S9B96
bool "LM3S9B96"
@@ -27,33 +28,172 @@ config ARCH_CHIP_LM3S8962
endchoice
+config LM3S_HAVE_SSI1
+ bool
+
+config LM3S_REVA2
+ bool "Rev A2"
+ default n
+ ---help---
+ Some early silicon returned an increase LDO voltage or 2.75V to work
+ around a PLL bug
+
config LM3S_DFU
bool "DFU"
default y
+menu "Select LM3S Peripheral Support"
+
+config LM3S_UART0
+ bool "UART0"
+ select ARCH_HAVE_UART0
+ default n
+
+config LM3S_UART1
+ bool "UART1"
+ select ARCH_HAVE_UART1
+ default n
+
+config SSI0_DISABLE
+ bool "Disable SSI0"
+ default y
+
+config SSI1_DISABLE
+ bool "Disable SSI1"
+ default y
+
+config LM3S_UART2
+ bool "UART2"
+ select ARCH_HAVE_UART2
+ default n
+
+config LM3S_ETHERNET
+ bool "LM3S Ethernet"
+ default n
+ ---help---
+ This must be set (along with NET) to build the LM3S Ethernet driver.
+
+endmenu
+
+menu "Disable GPIO Interrupts"
+
config LM3S_DISABLE_GPIOA_IRQS
bool "Disable GPIOA IRQs"
+ default n
config LM3S_DISABLE_GPIOB_IRQS
bool "Disable GPIOB IRQs"
+ default n
config LM3S_DISABLE_GPIOC_IRQS
bool "Disable GPIOC IRQs"
+ default n
config LM3S_DISABLE_GPIOD_IRQS
bool "Disable GPIOD IRQs"
+ default n
config LM3S_DISABLE_GPIOE_IRQS
bool "Disable GPIOE IRQs"
+ default n
config LM3S_DISABLE_GPIOF_IRQS
bool "Disable GPIOF IRQs"
+ default n
config LM3S_DISABLE_GPIOG_IRQS
bool "Disable GPIOG IRQs"
+ default n
config LM3S_DISABLE_GPIOH_IRQS
bool "Disable GPIOH IRQs"
+ default n
config LM3S_DISABLE_GPIOJ_IRQS
bool "Disable GPIOJ IRQs"
+ default n
+
+endmenu
+
+if LM3S_ETHERNET
+menu "LM3S Ethernet Configuration"
+
+config LM3S_ETHLEDS
+ bool "Ethernet LEDs"
+ default n
+ ---help---
+ Enable to use Ethernet LEDs on the board.
+
+config LM3S_BOARDMAC
+ bool "Board MAC"
+ default n
+ ---help---
+ If the board-specific logic can provide a MAC address (via
+ lm3s_ethernetmac()), then this should be selected.
+
+config LM3S_ETHHDUPLEX
+ bool "Force Half Duplex"
+ default n
+ ---help---
+ Set to force half duplex operation
+
+config LM3S_ETHNOAUTOCRC
+ bool "Disable auto-CRC"
+ default n
+ ---help---
+ Set to suppress auto-CRC generation
+
+config LM3S_ETHNOPAD
+ bool "Disable Tx Padding"
+ default n
+ ---help---
+ Set to suppress Tx padding
+
+config LM3S_MULTICAST
+ bool "Enable Multicast"
+ default n
+ ---help---
+ Set to enable multicast frames
+
+config LM3S_PROMISCUOUS
+ bool "Enable Promiscuous Mode"
+ default n
+ ---help---
+ Set to enable promiscuous mode
+
+config LM3S_TIMESTAMP
+ bool "Enable Timestamping"
+ default n
+
+config LM3S_BADCRC
+ bool "Enable Bad CRC Rejection"
+ default n
+ ---help---
+ Set to enable bad CRC rejection.
+
+config M3S_DUMPPACKET
+ bool "Dump Packets"
+ default n
+ ---help---
+ Dump each packet received/sent to the console.
+
+endmenu
+endif
+
+if !SSI0_DISABLE || !SSI1_DISABLE
+menu "LM3S SSI Configuration"
+
+config SSI_POLLWAIT
+ bool "Poll Wait (No-Interrupt) Mode"
+ default y
+
+config SSI_TXLIMIT
+ int "Tx Limit"
+ default 4
+ ---help---
+ Default of 4 assumes half of the 8 entry FIFO
+
+endmenu
+endif
+
+
diff --git a/nuttx/configs/lm3s6965-ek/README.txt b/nuttx/configs/lm3s6965-ek/README.txt
index 1e3aed2d95..09a07ec685 100644
--- a/nuttx/configs/lm3s6965-ek/README.txt
+++ b/nuttx/configs/lm3s6965-ek/README.txt
@@ -478,21 +478,68 @@ Where is one of the following:
Configures the NuttShell (nsh) located at examples/nsh. The
Configuration enables both the serial and telnetd NSH interfaces.
- NOTE: As it is configured now, you MUST have a network connected.
- Otherwise, the NSH prompt will not come up because the Ethernet
- driver is waiting for the network to come up. That is probably
- a bug in the Ethernet driver behavior!
+ NOTES:
+ 1. This configuration uses the mconf-based configuration tool. To
+ change this configuration using that tool, you should:
- Network File System (NFS) support can be added by setting the
- following in your configuration file:
+ a. Build and install the mconf tool. See nuttx/README.txt and
+ misc/tools/
+
+ b. Execute 'make menuconfig' in nuttx/ in order to start the
+ reconfiguration process.
+
+ 2. Default platform/toolchain:
+
+ CONFIG_HOST_LINUX=y : Linux (Cygwin under Windows okay too).
+ CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT=y : Buildroot (arm-nuttx-elf-gcc)
+ CONFIG_RAW_BINARY=y : Output formats: ELF and raw binary
+
+ 3. As it is configured now, you MUST have a network connected.
+ Otherwise, the NSH prompt will not come up because the Ethernet
+ driver is waiting for the network to come up. That is probably
+ a bug in the Ethernet driver behavior!
+
+ 4. Network File System (NFS) support can be added by setting the
+ following in your configuration file:
CONFIG_NFS=y
+
nx:
And example using the NuttX graphics system (NX). This example
uses the P14201 OLED driver.
+ NOTES:
+ 1. This configuration uses the mconf-based configuration tool. To
+ change this configuration using that tool, you should:
+
+ a. Build and install the mconf tool. See nuttx/README.txt and
+ misc/tools/
+
+ b. Execute 'make menuconfig' in nuttx/ in order to start the
+ reconfiguration process.
+
+ 2. Default platform/toolchain:
+
+ CONFIG_HOST_LINUX=y : Linux (Cygwin under Windows okay too).
+ CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT=y : Buildroot (arm-nuttx-elf-gcc)
+ CONFIG_RAW_BINARY=y : Output formats: ELF and raw binary
+
ostest:
This configuration directory, performs a simple OS test using
examples/ostest.
+ NOTES:
+ 1. This configuration uses the mconf-based configuration tool. To
+ change this configuration using that tool, you should:
+ a. Build and install the mconf tool. See nuttx/README.txt and
+ misc/tools/
+
+ b. Execute 'make menuconfig' in nuttx/ in order to start the
+ reconfiguration process.
+
+ 2. Default platform/toolchain:
+
+ CONFIG_HOST_LINUX=y : Linux (Cygwin under Windows okay too).
+ CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT=y : Buildroot (arm-nuttx-elf-gcc)
+ CONFIG_RAW_BINARY=y : Output formats: ELF and raw binary
diff --git a/nuttx/configs/lm3s6965-ek/nsh/appconfig b/nuttx/configs/lm3s6965-ek/nsh/appconfig
deleted file mode 100644
index 6277056d00..0000000000
--- a/nuttx/configs/lm3s6965-ek/nsh/appconfig
+++ /dev/null
@@ -1,58 +0,0 @@
-############################################################################
-# configs/lm3s6965-ek/nsh/appconfig
-#
-# Copyright (C) 2011-2012 Gregory Nutt. All rights reserved.
-# Author: Gregory Nutt
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in
-# the documentation and/or other materials provided with the
-# distribution.
-# 3. Neither the name NuttX nor the names of its contributors may be
-# used to endorse or promote products derived from this software
-# without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-#
-############################################################################
-
-# Path to example in apps/examples containing the user_start entry point
-
-CONFIGURED_APPS += examples/nsh
-
-# NSH library
-
-CONFIGURED_APPS += system/readline
-CONFIGURED_APPS += nshlib
-
-# Networking support
-
-ifeq ($(CONFIG_NET),y)
-CONFIGURED_APPS += netutils/uiplib
-CONFIGURED_APPS += netutils/dhcpc
-CONFIGURED_APPS += netutils/resolv
-CONFIGURED_APPS += netutils/tftpc
-CONFIGURED_APPS += netutils/webclient
-ifeq ($(CONFIG_NSH_TELNET),y)
-CONFIGURED_APPS += netutils/telnetd
-endif
-endif
-
-
diff --git a/nuttx/configs/lm3s6965-ek/nsh/defconfig b/nuttx/configs/lm3s6965-ek/nsh/defconfig
index 7b75178eab..84651012d6 100755
--- a/nuttx/configs/lm3s6965-ek/nsh/defconfig
+++ b/nuttx/configs/lm3s6965-ek/nsh/defconfig
@@ -1,213 +1,231 @@
-############################################################################
-# configs/lm3s6965-ek/nsh/defconfig
#
-# Copyright (C) 2010 Gregory Nutt. All rights reserved.
-# Author: Gregory Nutt
+# Automatically generated file; DO NOT EDIT.
+# Nuttx/ Configuration
#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in
-# the documentation and/or other materials provided with the
-# distribution.
-# 3. Neither the name NuttX nor the names of its contributors may be
-# used to endorse or promote products derived from this software
-# without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-#
-############################################################################
-#
-# Architecture Selection
-#
-CONFIG_ARCH="arm"
-CONFIG_ARCH_ARM=y
-CONFIG_ARCH_CORTEXM3=y
-CONFIG_ARCH_CHIP="lm3s"
-CONFIG_ARCH_CHIP_LM3S=y
-CONFIG_ARCH_CHIP_LM3S6965=y
-CONFIG_ARCH_BOARD="lm3s6965-ek"
-CONFIG_ARCH_BOARD_LM3S6965EK=y
-CONFIG_BOARD_LOOPSPERMSEC=4531
-CONFIG_DRAM_SIZE=65536
-CONFIG_DRAM_START=0x20000000
-CONFIG_ARCH_IRQPRIO=y
-CONFIG_ARCH_INTERRUPTSTACK=0
-CONFIG_ARCH_STACKDUMP=y
-CONFIG_ARCH_LEDS=y
-CONFIG_ARCH_CALIBRATION=n
+CONFIG_NUTTX_NEWCONFIG=y
#
-# Identify toolchain and linker options
+# Build Setup
#
-CONFIG_LM3S_CODESOURCERYW=n
-CONFIG_LM3S_CODESOURCERYL=n
-CONFIG_LM3S_DEVKITARM=n
-CONFIG_LM3S_BUILDROOT=y
+# 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_LM3S=y
+# 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_SAM3U is not set
+# CONFIG_ARCH_CHIP_STM32 is not set
+# CONFIG_ARCH_CHIP_STR71X is not set
+CONFIG_ARCH_CORTEXM3=y
+CONFIG_ARCH_FAMILY="armv7-m"
+CONFIG_ARCH_CHIP="lm3s"
+CONFIG_ARCH_HAVE_MPU=y
+# CONFIG_ARMV7M_MPU is not set
+CONFIG_BOARD_LOOPSPERMSEC=4531
+# CONFIG_ARCH_CALIBRATION 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
+
+#
+# LM3S Configuration Options
+#
+# CONFIG_ARCH_CHIP_LM3S6918 is not set
+# CONFIG_ARCH_CHIP_LM3S9B96 is not set
+# CONFIG_ARCH_CHIP_LM3S6432 is not set
+CONFIG_ARCH_CHIP_LM3S6965=y
+# CONFIG_ARCH_CHIP_LM3S8962 is not set
+# CONFIG_LM3S_REVA2 is not set
CONFIG_LM3S_DFU=y
#
-# Disable support for interrupts on GPIOH and GPIOJ which do not
-# exist on the LM3S6B96. Additional interrupt support can be
-# disabled if desired to reduce memory footprint.
-CONFIG_LM3S_DISABLE_GPIOA_IRQS=n
-CONFIG_LM3S_DISABLE_GPIOB_IRQS=n
-CONFIG_LM3S_DISABLE_GPIOC_IRQS=n
-CONFIG_LM3S_DISABLE_GPIOD_IRQS=n
-CONFIG_LM3S_DISABLE_GPIOE_IRQS=n
-CONFIG_LM3S_DISABLE_GPIOF_IRQS=n
-CONFIG_LM3S_DISABLE_GPIOG_IRQS=n
+# Select LM3S Peripheral Support
+#
+CONFIG_LM3S_UART0=y
+# CONFIG_LM3S_UART1 is not set
+# CONFIG_SSI0_DISABLE is not set
+CONFIG_SSI1_DISABLE=y
+# CONFIG_LM3S_UART2 is not set
+CONFIG_LM3S_ETHERNET=y
+
+#
+# Disable GPIO Interrupts
+#
+# CONFIG_LM3S_DISABLE_GPIOA_IRQS is not set
+# CONFIG_LM3S_DISABLE_GPIOB_IRQS is not set
+# CONFIG_LM3S_DISABLE_GPIOC_IRQS is not set
+# CONFIG_LM3S_DISABLE_GPIOD_IRQS is not set
+# CONFIG_LM3S_DISABLE_GPIOE_IRQS is not set
+# CONFIG_LM3S_DISABLE_GPIOF_IRQS is not set
+# CONFIG_LM3S_DISABLE_GPIOG_IRQS is not set
CONFIG_LM3S_DISABLE_GPIOH_IRQS=y
CONFIG_LM3S_DISABLE_GPIOJ_IRQS=y
#
-# LM3S6965 specific serial device driver settings
+# LM3S Ethernet Configuration
#
-CONFIG_LM3S_UART0=y
-CONFIG_LM3S_UART1=n
-CONFIG_LM3S_UART2=n
-CONFIG_UART0_SERIAL_CONSOLE=y
-CONFIG_UART1_SERIAL_CONSOLE=n
-CONFIG_UART2_SERIAL_CONSOLE=n
-CONFIG_UART0_TXBUFSIZE=256
-CONFIG_UART1_TXBUFSIZE=256
-CONFIG_UART2_TXBUFSIZE=256
-CONFIG_UART0_RXBUFSIZE=256
-CONFIG_UART1_RXBUFSIZE=256
-CONFIG_UART2_RXBUFSIZE=256
-CONFIG_UART0_BAUD=115200
-CONFIG_UART1_BAUD=115200
-CONFIG_UART2_BAUD=115200
-CONFIG_UART0_BITS=8
-CONFIG_UART1_BITS=8
-CONFIG_UART2_BITS=8
-CONFIG_UART0_PARITY=0
-CONFIG_UART1_PARITY=0
-CONFIG_UART2_PARITY=0
-CONFIG_UART0_2STOP=0
-CONFIG_UART1_2STOP=0
-CONFIG_UART2_2STOP=0
+# CONFIG_LM3S_ETHLEDS is not set
+# CONFIG_LM3S_BOARDMAC is not set
+# CONFIG_LM3S_ETHHDUPLEX is not set
+# CONFIG_LM3S_ETHNOAUTOCRC is not set
+# CONFIG_LM3S_ETHNOPAD is not set
+# CONFIG_LM3S_MULTICAST is not set
+# CONFIG_LM3S_PROMISCUOUS is not set
+# CONFIG_LM3S_TIMESTAMP is not set
+# CONFIG_LM3S_BADCRC is not set
+# CONFIG_M3S_DUMPPACKET is not set
#
-# LM3S6965 specific SSI device driver settings
+# LM3S SSI Configuration
#
-CONFIG_SSI0_DISABLE=n
-CONFIG_SSI1_DISABLE=y
CONFIG_SSI_POLLWAIT=y
-#CONFIG_SSI_TXLIMIT=4
+CONFIG_SSI_TXLIMIT=4
+# CONFIG_NET_MULTICAST is not set
+# CONFIG_SDIO_DMA is not set
+# CONFIG_SDIO_WIDTH_D1_ONLY is not set
#
-# LM3S6965 specific serial device driver settings
+# Architecture Options
#
-CONFIG_LM3S_ETHERNET=y
-CONFIG_LM3S_ETHLEDS=n
-CONFIG_LM3S_BOARDMAC=n
-CONFIG_LM3S_ETHHDUPLEX=n
-CONFIG_LM3S_ETHNOAUTOCRC=n
-CONFIG_LM3S_ETHNOPAD=n
-CONFIG_LM3S_MULTICAST=n
-CONFIG_LM3S_PROMISCUOUS=n
-CONFIG_LM3S_BADCRC=n
-CONFIG_LM3S_DUMPPACKET=n
+# CONFIG_ARCH_NOINTC 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_STACKDUMP=y
+# CONFIG_ENDIAN_BIG is not set
#
-# General build options
+# Board Settings
#
-CONFIG_RRLOAD_BINARY=n
-CONFIG_INTELHEX_BINARY=n
-CONFIG_MOTOROLA_SREC=n
-CONFIG_RAW_BINARY=y
+CONFIG_DRAM_START=0x20000000
+CONFIG_DRAM_SIZE=65536
+CONFIG_ARCH_HAVE_INTERRUPTSTACK=y
+CONFIG_ARCH_INTERRUPTSTACK=0
#
-# General OS setup
+# Boot options
#
-CONFIG_USER_ENTRYPOINT="nsh_main"
-CONFIG_DEBUG=n
-CONFIG_DEBUG_VERBOSE=n
-CONFIG_DEBUG_SYMBOLS=n
-CONFIG_DEBUG_NET=n
-CONFIG_MM_REGIONS=1
-CONFIG_ARCH_LOWPUTC=y
+# CONFIG_BOOT_RUNFROMEXTSRAM is not set
+CONFIG_BOOT_RUNFROMFLASH=y
+# CONFIG_BOOT_RUNFROMISRAM is not set
+# CONFIG_BOOT_RUNFROMSDRAM is not set
+# CONFIG_BOOT_COPYTORAM is not set
+
+#
+# Board Selection
+#
+CONFIG_ARCH_BOARD_LM3S6965EK=y
+# CONFIG_ARCH_BOARD_CUSTOM is not set
+CONFIG_ARCH_BOARD="lm3s6965-ek"
+
+#
+# Common Board Options
+#
+CONFIG_ARCH_HAVE_LEDS=y
+CONFIG_ARCH_LEDS=y
+CONFIG_NSH_MMCSDMINOR=0
+CONFIG_NSH_MMCSDSLOTNO=0
+
+#
+# Board-Specific Options
+#
+
+#
+# RTOS Features
+#
+CONFIG_MSEC_PER_TICK=10
CONFIG_RR_INTERVAL=200
-CONFIG_SCHED_INSTRUMENTATION=n
+# CONFIG_SCHED_INSTRUMENTATION is not set
CONFIG_TASK_NAME_SIZE=0
+# CONFIG_JULIAN_TIME is not set
CONFIG_START_YEAR=2010
CONFIG_START_MONTH=5
CONFIG_START_DAY=8
-CONFIG_GREGORIAN_TIME=n
-CONFIG_JULIAN_TIME=n
CONFIG_DEV_CONSOLE=y
-CONFIG_DEV_LOWCONSOLE=n
-CONFIG_MUTEX_TYPES=n
-CONFIG_PRIORITY_INHERITANCE=n
-CONFIG_SEM_PREALLOCHOLDERS=0
-CONFIG_SEM_NNESTPRIO=0
-CONFIG_FDCLONE_DISABLE=n
-CONFIG_FDCLONE_STDIO=n
+# CONFIG_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_NXFLAT=n
-
-#
-# The following can be used to disable categories of
-# APIs supported by the OS. If the compiler supports
-# weak functions, then it should not be necessary to
-# disable functions unless you want to restrict usage
-# of those APIs.
-#
-# There are certain dependency relationships in these
-# features.
-#
-# o mq_notify logic depends on signals to awaken tasks
-# waiting for queues to become full or empty.
-# o pthread_condtimedwait() depends on signals to wake
-# up waiting tasks.
-#
-CONFIG_DISABLE_CLOCK=n
-CONFIG_DISABLE_POSIX_TIMERS=n
-CONFIG_DISABLE_PTHREAD=n
-CONFIG_DISABLE_SIGNALS=n
-CONFIG_DISABLE_MQUEUE=n
-CONFIG_DISABLE_MOUNTPOINT=n
-CONFIG_DISABLE_ENVIRON=n
+# CONFIG_SCHED_WORKQUEUE is not set
+# CONFIG_SCHED_WAITPID is not set
+# CONFIG_SCHED_ATEXIT is not set
+# CONFIG_SCHED_ONEXIT is not set
+CONFIG_USER_ENTRYPOINT="nsh_main"
+CONFIG_DISABLE_OS_API=y
+# CONFIG_DISABLE_CLOCK is not set
+# CONFIG_DISABLE_POSIX_TIMERS is not set
+# CONFIG_DISABLE_PTHREAD is not set
+# CONFIG_DISABLE_SIGNALS is not set
+# CONFIG_DISABLE_MQUEUE is not set
+# CONFIG_DISABLE_MOUNTPOINT is not set
+# CONFIG_DISABLE_ENVIRON is not set
CONFIG_DISABLE_POLL=y
-#
-# Misc libc settings
-#
-CONFIG_NOPRINTF_FIELDWIDTH=n
-
-#
-# Allow for architecture optimized implementations
-#
-# The architecture can provide optimized versions of the
-# following to improve system performance
-#
-CONFIG_ARCH_MEMCPY=n
-CONFIG_ARCH_MEMCMP=n
-CONFIG_ARCH_MEMMOVE=n
-CONFIG_ARCH_MEMSET=n
-CONFIG_ARCH_STRCMP=n
-CONFIG_ARCH_STRCPY=n
-CONFIG_ARCH_STRNCPY=n
-CONFIG_ARCH_STRLEN=n
-CONFIG_ARCH_STRNLEN=n
-CONFIG_ARCH_BZERO=n
-
#
# Sizes of configurable things (0 disables)
#
@@ -217,135 +235,421 @@ CONFIG_NPTHREAD_KEYS=4
CONFIG_NFILE_DESCRIPTORS=8
CONFIG_NFILE_STREAMS=8
CONFIG_NAME_MAX=32
-CONFIG_STDIO_BUFFER_SIZE=256
-CONFIG_NUNGET_CHARS=2
CONFIG_PREALLOC_MQ_MSGS=4
CONFIG_MQ_MAXMSGSIZE=32
CONFIG_MAX_WDOGPARMS=2
CONFIG_PREALLOC_WDOGS=4
CONFIG_PREALLOC_TIMERS=4
-#
-# Filesystem configuration
-#
-CONFIG_FS_FAT=y
-CONFIG_FS_ROMFS=n
-CONFIG_NFS=n
-
-#
-# Maintain legacy build behavior (revisit)
-#
-
-CONFIG_MMCSD=y
-CONFIG_MMCSD_SPI=y
-CONFIG_MMCSD_SDIO=y
-
-#
-# SPI-based MMC/SD driver
-#
-CONFIG_MMCSD_NSLOTS=1
-CONFIG_MMCSD_READONLY=n
-CONFIG_MMCSD_SPICLOCK=12500000
-
-#
-# TCP/IP and UDP support via uIP
-#
-CONFIG_NET=y
-CONFIG_NET_IPv6=n
-CONFIG_NSOCKET_DESCRIPTORS=8
-CONFIG_NET_SOCKOPTS=y
-CONFIG_NET_BUFSIZE=562
-CONFIG_NET_TCP=y
-CONFIG_NET_TCP_CONNS=8
-CONFIG_NET_NTCP_READAHEAD_BUFFERS=16
-CONFIG_NET_TCPBACKLOG=n
-CONFIG_NET_MAX_LISTENPORTS=8
-CONFIG_NET_UDP=y
-CONFIG_NET_UDP_CHECKSUMS=y
-#CONFIG_NET_UDP_CONNS=8
-CONFIG_NET_ICMP=y
-CONFIG_NET_ICMP_PING=y
-#CONFIG_NET_PINGADDRCONF=0
-CONFIG_NET_STATISTICS=y
-#CONFIG_NET_RECEIVE_WINDOW=
-#CONFIG_NET_ARPTAB_SIZE=8
-CONFIG_NET_BROADCAST=n
-
-#
-# UIP Network Utilities
-#
-CONFIG_NET_DHCP_LIGHT=n
-CONFIG_NET_RESOLV_ENTRIES=4
-
-#
-# Settings for examples/uip
-#
-CONFIG_EXAMPLES_UIP_IPADDR=0x0a000002
-CONFIG_EXAMPLES_UIP_DRIPADDR=0x0a000001
-CONFIG_EXAMPLES_UIP_NETMASK=0xffffff00
-CONFIG_EXAMPLES_UIP_DHCPC=n
-
-#
-# Settings for examples/nettest
-CONFIG_EXAMPLES_NETTEST_SERVER=n
-CONFIG_EXAMPLES_NETTEST_PERFORMANCE=n
-CONFIG_EXAMPLES_NETTEST_NOMAC=n
-CONFIG_EXAMPLES_NETTEST_IPADDR=0x0a000002
-CONFIG_EXAMPLES_NETTEST_DRIPADDR=0x0a000001
-CONFIG_EXAMPLES_NETTEST_NETMASK=0xffffff00
-CONFIG_EXAMPLES_NETTEST_CLIENTIP=0x0a000001
-
-#
-# Settings for examples/ostest
-#
-CONFIG_EXAMPLES_OSTEST_LOOPS=1
-CONFIG_EXAMPLES_OSTEST_STACKSIZE=2048
-CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=3
-
-#
-# Settings for apps/nshlib
-#
-CONFIG_NSH_FILEIOSIZE=512
-CONFIG_NSH_STRERROR=n
-CONFIG_NSH_LINELEN=64
-CONFIG_NSH_NESTDEPTH=3
-CONFIG_NSH_DISABLESCRIPT=n
-CONFIG_NSH_DISABLEBG=n
-CONFIG_NSH_ROMFSETC=n
-CONFIG_NSH_CONSOLE=y
-CONFIG_NSH_TELNET=y
-CONFIG_NSH_ARCHINIT=y
-CONFIG_NSH_IOBUFFER_SIZE=512
-CONFIG_NSH_DHCPC=n
-CONFIG_NSH_NOMAC=y
-CONFIG_NSH_IPADDR=0x0a000002
-CONFIG_NSH_DRIPADDR=0x0a000001
-CONFIG_NSH_NETMASK=0xffffff00
-CONFIG_NSH_ROMFSMOUNTPT="/etc"
-CONFIG_NSH_INITSCRIPT="init.d/rcS"
-CONFIG_NSH_ROMFSDEVNO=0
-CONFIG_NSH_ROMFSSECTSIZE=64
-CONFIG_NSH_FATDEVNO=1
-CONFIG_NSH_FATSECTSIZE=512
-CONFIG_NSH_FATNSECTORS=1024
-CONFIG_NSH_FATMOUNTPT="/tmp"
-
-#
-# Architecture-specific NSH options
-#
-CONFIG_NSH_MMCSDSPIPORTNO=0
-CONFIG_NSH_MMCSDSLOTNO=0
-CONFIG_NSH_MMCSDMINOR=0
-
#
# Stack and heap information
#
-CONFIG_BOOT_RUNFROMFLASH=n
-CONFIG_BOOT_COPYTORAM=n
-CONFIG_CUSTOM_STACK=n
CONFIG_IDLETHREAD_STACKSIZE=1024
CONFIG_USERMAIN_STACKSIZE=2048
CONFIG_PTHREAD_STACK_MIN=256
CONFIG_PTHREAD_STACK_DEFAULT=2048
-CONFIG_HEAP_BASE=
-CONFIG_HEAP_SIZE=
+
+#
+# Device Drivers
+#
+CONFIG_DEV_NULL=y
+# CONFIG_DEV_ZERO is not set
+# CONFIG_LOOP is not set
+# CONFIG_RAMDISK is not set
+# CONFIG_CAN is not set
+# CONFIG_PWM is not set
+# CONFIG_I2C is not set
+# CONFIG_SPI is not set
+# CONFIG_RTC is not set
+# CONFIG_WATCHDOG is not set
+# CONFIG_ANALOG is not set
+# CONFIG_BCH is not set
+# CONFIG_INPUT is not set
+# CONFIG_LCD is not set
+CONFIG_MMCSD=y
+CONFIG_MMCSD_NSLOTS=1
+# CONFIG_MMCSD_READONLY is not set
+# CONFIG_MMCSD_MULTIBLOCK_DISABLE is not set
+CONFIG_MMCSD_MMCSUPPORT=y
+CONFIG_MMCSD_HAVECARDDETECT=y
+CONFIG_MMCSD_SPI=y
+CONFIG_MMCSD_SPICLOCK=12500000
+CONFIG_MMCSD_SDIO=y
+# CONFIG_SDIO_MUXBUS is not set
+# CONFIG_MTD is not set
+# CONFIG_NETDEVICES is not set
+# CONFIG_NET_SLIP is not set
+# CONFIG_PIPES is not set
+# CONFIG_PM is not set
+# CONFIG_POWER is not set
+# CONFIG_SENSORS is not set
+# CONFIG_SERCOMM_CONSOLE is not set
+CONFIG_SERIAL=y
+# CONFIG_DEV_LOWCONSOLE is not set
+# CONFIG_16550_UART is not set
+CONFIG_ARCH_HAVE_UART0=y
+CONFIG_MCU_SERIAL=y
+CONFIG_STANDARD_SERIAL=y
+CONFIG_UART0_SERIAL_CONSOLE=y
+# CONFIG_NO_SERIAL_CONSOLE is not set
+
+#
+# UART0 Configuration
+#
+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_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=y
+# CONFIG_NET_NOINTS is not set
+# CONFIG_NET_MULTIBUFFER is not set
+# CONFIG_NET_IPv6 is not set
+CONFIG_NSOCKET_DESCRIPTORS=8
+CONFIG_NET_NACTIVESOCKETS=16
+CONFIG_NET_SOCKOPTS=y
+CONFIG_NET_BUFSIZE=562
+# CONFIG_NET_TCPURGDATA is not set
+CONFIG_NET_TCP=y
+CONFIG_NET_TCP_CONNS=8
+CONFIG_NET_MAX_LISTENPORTS=8
+CONFIG_NET_TCP_READAHEAD_BUFSIZE=562
+CONFIG_NET_NTCP_READAHEAD_BUFFERS=16
+CONFIG_NET_TCP_RECVDELAY=0
+# CONFIG_NET_TCPBACKLOG is not set
+CONFIG_NET_UDP=y
+CONFIG_NET_UDP_CHECKSUMS=y
+CONFIG_NET_UDP_CONNS=8
+# CONFIG_NET_BROADCAST is not set
+CONFIG_NET_ICMP=y
+CONFIG_NET_ICMP_PING=y
+# CONFIG_NET_PINGADDRCONF is not set
+# CONFIG_NET_IGMP is not set
+CONFIG_NET_STATISTICS=y
+CONFIG_NET_RECEIVE_WINDOW=562
+CONFIG_NET_ARPTAB_SIZE=16
+# CONFIG_NET_ARP_IPIN is not set
+
+#
+# File Systems
+#
+
+#
+# File system configuration
+#
+CONFIG_FS_FAT=y
+# CONFIG_FAT_LCNAMES is not set
+# CONFIG_FAT_LFN is not set
+# CONFIG_FS_FATTIME is not set
+# CONFIG_FAT_DMAMEMORY is not set
+# CONFIG_FS_RAMMAP is not set
+# CONFIG_NFS is not set
+# CONFIG_FS_NXFFS is not set
+# CONFIG_FS_ROMFS is not set
+
+#
+# System Logging
+#
+# CONFIG_SYSLOG is not set
+
+#
+# Graphics Support
+#
+# CONFIG_NX is not set
+
+#
+# Memory Management
+#
+# CONFIG_MM_SMALL is not set
+CONFIG_MM_REGIONS=1
+# CONFIG_GRAN is not set
+
+#
+# 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_PIC is not set
+# CONFIG_SYMTAB_ORDEREDBYNAME is not set
+
+#
+# Library Routines
+#
+
+#
+# Standard C Library Options
+#
+CONFIG_STDIO_BUFFER_SIZE=256
+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
+# CONFIG_EOL_IS_CR is not set
+# CONFIG_EOL_IS_LF is not set
+# CONFIG_EOL_IS_BOTH_CRLF is not set
+CONFIG_EOL_IS_EITHER_CRLF=y
+# CONFIG_LIBC_STRERROR is not set
+# CONFIG_LIBC_PERROR_STDOUT is not set
+CONFIG_ARCH_LOWPUTC=y
+CONFIG_LIB_SENDFILE_BUFSIZE=512
+# CONFIG_ARCH_ROMGETC is not set
+# CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set
+
+#
+# Non-standard Helper Functions
+#
+CONFIG_LIB_KBDCODEC=y
+
+#
+# Basic CXX Support
+#
+# CONFIG_C99_BOOL8 is not set
+# CONFIG_HAVE_CXX is not set
+
+#
+# Application Configuration
+#
+
+#
+# Built-In Applications
+#
+# CONFIG_BUILTIN is not set
+
+#
+# Examples
+#
+# CONFIG_EXAMPLES_BUTTONS is not set
+# CONFIG_EXAMPLES_CAN is not set
+# CONFIG_EXAMPLES_CDCACM is not set
+# CONFIG_EXAMPLES_COMPOSITE is not set
+# CONFIG_EXAMPLES_DHCPD is not set
+# CONFIG_EXAMPLES_ELF is not set
+# CONFIG_EXAMPLES_FTPC is not set
+# CONFIG_EXAMPLES_FTPD is not set
+# CONFIG_EXAMPLES_HELLO is not set
+# CONFIG_EXAMPLES_HELLOXX is not set
+# CONFIG_EXAMPLES_JSON is not set
+# CONFIG_EXAMPLES_HIDKBD is not set
+# CONFIG_EXAMPLES_KEYPADTEST is not set
+# CONFIG_EXAMPLES_IGMP is not set
+# CONFIG_EXAMPLES_LCDRW is not set
+# CONFIG_EXAMPLES_MM is not set
+# CONFIG_EXAMPLES_MOUNT is not set
+# CONFIG_EXAMPLES_MODBUS is not set
+# CONFIG_EXAMPLES_NETTEST is not set
+CONFIG_EXAMPLES_NSH=y
+# CONFIG_EXAMPLES_NULL is not set
+# CONFIG_EXAMPLES_NX is not set
+# CONFIG_EXAMPLES_NXCONSOLE is not set
+# CONFIG_EXAMPLES_NXFFS is not set
+# CONFIG_EXAMPLES_NXFLAT is not set
+# CONFIG_EXAMPLES_NXHELLO is not set
+# CONFIG_EXAMPLES_NXIMAGE is not set
+# CONFIG_EXAMPLES_NXLINES is not set
+# CONFIG_EXAMPLES_NXTEXT is not set
+# CONFIG_EXAMPLES_OSTEST is not set
+# CONFIG_EXAMPLES_PASHELLO is not set
+# CONFIG_EXAMPLES_PIPE is not set
+# CONFIG_EXAMPLES_POLL is not set
+# CONFIG_EXAMPLES_QENCODER is not set
+# CONFIG_EXAMPLES_RGMP is not set
+# CONFIG_EXAMPLES_ROMFS is not set
+# CONFIG_EXAMPLES_SENDMAIL is not set
+# CONFIG_EXAMPLES_SERLOOP is not set
+# CONFIG_EXAMPLES_TELNETD is not set
+# CONFIG_EXAMPLES_THTTPD is not set
+# CONFIG_EXAMPLES_TIFF is not set
+# CONFIG_EXAMPLES_TOUCHSCREEN is not set
+# CONFIG_EXAMPLES_UDP is not set
+# CONFIG_EXAMPLES_DISCOVER is not set
+# CONFIG_EXAMPLES_UIP is not set
+# CONFIG_EXAMPLES_USBSERIAL is not set
+# CONFIG_EXAMPLES_USBMSC is not set
+# CONFIG_EXAMPLES_USBTERM is not set
+# CONFIG_EXAMPLES_WATCHDOG is not set
+# CONFIG_EXAMPLES_WGET is not set
+
+#
+# Interpreters
+#
+
+#
+# Interpreters
+#
+# CONFIG_INTERPRETERS_FICL is not set
+# CONFIG_INTERPRETERS_PCODE is not set
+
+#
+# Network Utilities
+#
+
+#
+# Networking Utilities
+#
+# CONFIG_NETUTILS_CODECS is not set
+CONFIG_NETUTILS_DHCPC=y
+# 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=y
+CONFIG_NET_RESOLV_ENTRIES=4
+CONFIG_NET_RESOLV_MAXRESPONSE=96
+# CONFIG_NETUTILS_SMTP is not set
+CONFIG_NETUTILS_TELNETD=y
+CONFIG_NETUTILS_TFTPC=y
+# CONFIG_NETUTILS_THTTPD is not set
+CONFIG_NETUTILS_UIPLIB=y
+CONFIG_NETUTILS_WEBCLIENT=y
+CONFIG_NSH_WGET_USERAGENT="NuttX/6.xx.x (; http://www.nuttx.org/)"
+# CONFIG_NETUTILS_WEBSERVER is not set
+# CONFIG_NETUTILS_DISCOVER is not set
+# CONFIG_NETUTILS_XMLRPC is not set
+
+#
+# ModBus
+#
+
+#
+# FreeModbus
+#
+# CONFIG_MODBUS is not set
+
+#
+# NSH Library
+#
+CONFIG_NSH_LIBRARY=y
+
+#
+# Disable Individual commands
+#
+# CONFIG_NSH_DISABLE_CAT is not set
+# CONFIG_NSH_DISABLE_CD is not set
+# CONFIG_NSH_DISABLE_CP is not set
+# CONFIG_NSH_DISABLE_DD is not set
+# CONFIG_NSH_DISABLE_ECHO is not set
+# CONFIG_NSH_DISABLE_EXEC is not set
+# CONFIG_NSH_DISABLE_EXIT is not set
+# CONFIG_NSH_DISABLE_FREE is not set
+# CONFIG_NSH_DISABLE_GET is not set
+# CONFIG_NSH_DISABLE_HELP is not set
+# CONFIG_NSH_DISABLE_HEXDUMP is not set
+# CONFIG_NSH_DISABLE_IFCONFIG is not set
+# CONFIG_NSH_DISABLE_KILL is not set
+# CONFIG_NSH_DISABLE_LOSETUP is not set
+# CONFIG_NSH_DISABLE_LS is not set
+# CONFIG_NSH_DISABLE_MB is not set
+# CONFIG_NSH_DISABLE_MKDIR is not set
+# CONFIG_NSH_DISABLE_MKFATFS is not set
+# CONFIG_NSH_DISABLE_MKFIFO is not set
+# CONFIG_NSH_DISABLE_MKRD is not set
+# CONFIG_NSH_DISABLE_MH is not set
+# CONFIG_NSH_DISABLE_MOUNT is not set
+# CONFIG_NSH_DISABLE_MW is not set
+# CONFIG_NSH_DISABLE_NSFMOUNT is not set
+# CONFIG_NSH_DISABLE_PS is not set
+# CONFIG_NSH_DISABLE_PING is not set
+# CONFIG_NSH_DISABLE_PUT is not set
+# CONFIG_NSH_DISABLE_PWD is not set
+# CONFIG_NSH_DISABLE_RM is not set
+# CONFIG_NSH_DISABLE_RMDIR is not set
+# CONFIG_NSH_DISABLE_SET is not set
+# CONFIG_NSH_DISABLE_SH is not set
+# CONFIG_NSH_DISABLE_SLEEP is not set
+# CONFIG_NSH_DISABLE_TEST is not set
+# CONFIG_NSH_DISABLE_UMOUNT is not set
+# CONFIG_NSH_DISABLE_UNSET is not set
+# CONFIG_NSH_DISABLE_USLEEP is not set
+# CONFIG_NSH_DISABLE_WGET is not set
+# CONFIG_NSH_DISABLE_XD is not set
+CONFIG_NSH_CODECS_BUFSIZE=128
+CONFIG_NSH_FILEIOSIZE=512
+CONFIG_NSH_LINELEN=64
+CONFIG_NSH_NESTDEPTH=3
+# CONFIG_NSH_DISABLESCRIPT is not set
+# CONFIG_NSH_DISABLEBG is not set
+CONFIG_NSH_CONSOLE=y
+# CONFIG_NSH_CONDEV is not set
+CONFIG_NSH_ARCHINIT=y
+CONFIG_NSH_TELNET=y
+CONFIG_NSH_TELNETD_PORT=23
+CONFIG_NSH_TELNETD_DAEMONPRIO=100
+CONFIG_NSH_TELNETD_DAEMONSTACKSIZE=2048
+CONFIG_NSH_TELNETD_CLIENTPRIO=100
+CONFIG_NSH_TELNETD_CLIENTSTACKSIZE=2048
+CONFIG_NSH_IOBUFFER_SIZE=512
+# CONFIG_NSH_TELNET_LOGIN is not set
+CONFIG_NSH_IPADDR=0x0a000002
+CONFIG_NSH_DRIPADDR=0x0a000001
+CONFIG_NSH_NETMASK=0xffffff00
+CONFIG_NSH_NOMAC=y
+CONFIG_NSH_MAX_ROUNDTRIP=20
+
+#
+# NxWidgets/NxWM
+#
+
+#
+# System NSH Add-Ons
+#
+
+#
+# Custom Free Memory Command
+#
+# CONFIG_SYSTEM_FREE is not set
+
+#
+# I2C tool
+#
+
+#
+# FLASH Program Installation
+#
+# CONFIG_SYSTEM_INSTALL is not set
+
+#
+# readline()
+#
+CONFIG_SYSTEM_READLINE=y
+CONFIG_READLINE_ECHO=y
+
+#
+# Power Off
+#
+# CONFIG_SYSTEM_POWEROFF is not set
+
+#
+# RAMTRON
+#
+# CONFIG_SYSTEM_RAMTRON is not set
+
+#
+# SD Card
+#
+# CONFIG_SYSTEM_SDCARD is not set
+
+#
+# Sysinfo
+#
+# CONFIG_SYSTEM_SYSINFO is not set
diff --git a/nuttx/configs/lm3s6965-ek/nx/appconfig b/nuttx/configs/lm3s6965-ek/nx/appconfig
deleted file mode 100644
index 69f92ce3a5..0000000000
--- a/nuttx/configs/lm3s6965-ek/nx/appconfig
+++ /dev/null
@@ -1,39 +0,0 @@
-############################################################################
-# configs/lm3s6965-ek/nx/appconfig
-#
-# Copyright (C) 2011 Gregory Nutt. All rights reserved.
-# Author: Gregory Nutt
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in
-# the documentation and/or other materials provided with the
-# distribution.
-# 3. Neither the name NuttX nor the names of its contributors may be
-# used to endorse or promote products derived from this software
-# without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-#
-############################################################################
-
-# Path to example in apps/examples containing the user_start entry point
-
-CONFIGURED_APPS += examples/nx
-
diff --git a/nuttx/configs/lm3s6965-ek/nx/defconfig b/nuttx/configs/lm3s6965-ek/nx/defconfig
index bca864013d..5fb666e65b 100755
--- a/nuttx/configs/lm3s6965-ek/nx/defconfig
+++ b/nuttx/configs/lm3s6965-ek/nx/defconfig
@@ -1,219 +1,212 @@
-############################################################################
-# configs/lm3s6965-ek/nx/defconfig
#
-# Copyright (C) 2010 Gregory Nutt. All rights reserved.
-# Author: Gregory Nutt
+# Automatically generated file; DO NOT EDIT.
+# Nuttx/ Configuration
#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in
-# the documentation and/or other materials provided with the
-# distribution.
-# 3. Neither the name NuttX nor the names of its contributors may be
-# used to endorse or promote products derived from this software
-# without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-#
-############################################################################
-#
-# Architecture Selection
-#
-CONFIG_ARCH="arm"
-CONFIG_ARCH_ARM=y
-CONFIG_ARCH_CORTEXM3=y
-CONFIG_ARCH_CHIP="lm3s"
-CONFIG_ARCH_CHIP_LM3S=y
-CONFIG_ARCH_CHIP_LM3S6965=y
-CONFIG_ARCH_BOARD="lm3s6965-ek"
-CONFIG_ARCH_BOARD_LM3S6965EK=y
-CONFIG_BOARD_LOOPSPERMSEC=4531
-CONFIG_DRAM_SIZE=65536
-CONFIG_DRAM_START=0x20000000
-CONFIG_ARCH_IRQPRIO=y
-CONFIG_ARCH_INTERRUPTSTACK=0
-CONFIG_ARCH_STACKDUMP=y
-CONFIG_ARCH_LEDS=y
-CONFIG_ARCH_CALIBRATION=n
+CONFIG_NUTTX_NEWCONFIG=y
#
-# Identify toolchain and linker options
+# Build Setup
#
-CONFIG_LM3S_CODESOURCERYW=n
-CONFIG_LM3S_CODESOURCERYL=n
-CONFIG_LM3S_DEVKITARM=n
-CONFIG_LM3S_BUILDROOT=y
+# 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_LM3S=y
+# 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_SAM3U is not set
+# CONFIG_ARCH_CHIP_STM32 is not set
+# CONFIG_ARCH_CHIP_STR71X is not set
+CONFIG_ARCH_CORTEXM3=y
+CONFIG_ARCH_FAMILY="armv7-m"
+CONFIG_ARCH_CHIP="lm3s"
+CONFIG_ARCH_HAVE_MPU=y
+# CONFIG_ARMV7M_MPU is not set
+CONFIG_BOARD_LOOPSPERMSEC=4531
+# CONFIG_ARCH_CALIBRATION 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
+
+#
+# LM3S Configuration Options
+#
+# CONFIG_ARCH_CHIP_LM3S6918 is not set
+# CONFIG_ARCH_CHIP_LM3S9B96 is not set
+# CONFIG_ARCH_CHIP_LM3S6432 is not set
+CONFIG_ARCH_CHIP_LM3S6965=y
+# CONFIG_ARCH_CHIP_LM3S8962 is not set
+# CONFIG_LM3S_REVA2 is not set
CONFIG_LM3S_DFU=y
#
-# Disable support for interrupts on GPIOH and GPIOJ which do not
-# exist on the LM3S6B96. Additional interrupt support can be
-# disabled if desired to reduce memory footprint.
-CONFIG_LM3S_DISABLE_GPIOA_IRQS=n
-CONFIG_LM3S_DISABLE_GPIOB_IRQS=n
-CONFIG_LM3S_DISABLE_GPIOC_IRQS=n
-CONFIG_LM3S_DISABLE_GPIOD_IRQS=n
-CONFIG_LM3S_DISABLE_GPIOE_IRQS=n
-CONFIG_LM3S_DISABLE_GPIOF_IRQS=n
-CONFIG_LM3S_DISABLE_GPIOG_IRQS=n
+# Select LM3S Peripheral Support
+#
+CONFIG_LM3S_UART0=y
+# CONFIG_LM3S_UART1 is not set
+# CONFIG_SSI0_DISABLE is not set
+CONFIG_SSI1_DISABLE=y
+# CONFIG_LM3S_UART2 is not set
+# CONFIG_LM3S_ETHERNET is not set
+
+#
+# Disable GPIO Interrupts
+#
+# CONFIG_LM3S_DISABLE_GPIOA_IRQS is not set
+# CONFIG_LM3S_DISABLE_GPIOB_IRQS is not set
+# CONFIG_LM3S_DISABLE_GPIOC_IRQS is not set
+# CONFIG_LM3S_DISABLE_GPIOD_IRQS is not set
+# CONFIG_LM3S_DISABLE_GPIOE_IRQS is not set
+# CONFIG_LM3S_DISABLE_GPIOF_IRQS is not set
+# CONFIG_LM3S_DISABLE_GPIOG_IRQS is not set
CONFIG_LM3S_DISABLE_GPIOH_IRQS=y
CONFIG_LM3S_DISABLE_GPIOJ_IRQS=y
#
-# LM3S6965 specific serial device driver settings
+# LM3S SSI Configuration
#
-CONFIG_LM3S_UART0=y
-CONFIG_LM3S_UART1=n
-CONFIG_LM3S_UART2=n
-CONFIG_UART0_SERIAL_CONSOLE=y
-CONFIG_UART1_SERIAL_CONSOLE=n
-CONFIG_UART2_SERIAL_CONSOLE=n
-CONFIG_UART0_TXBUFSIZE=256
-CONFIG_UART1_TXBUFSIZE=256
-CONFIG_UART2_TXBUFSIZE=256
-CONFIG_UART0_RXBUFSIZE=256
-CONFIG_UART1_RXBUFSIZE=256
-CONFIG_UART2_RXBUFSIZE=256
-CONFIG_UART0_BAUD=115200
-CONFIG_UART1_BAUD=115200
-CONFIG_UART2_BAUD=115200
-CONFIG_UART0_BITS=8
-CONFIG_UART1_BITS=8
-CONFIG_UART2_BITS=8
-CONFIG_UART0_PARITY=0
-CONFIG_UART1_PARITY=0
-CONFIG_UART2_PARITY=0
-CONFIG_UART0_2STOP=0
-CONFIG_UART1_2STOP=0
-CONFIG_UART2_2STOP=0
-
-#
-# LM3S6965 specific SSI device driver settings
-#
-CONFIG_SSI0_DISABLE=n
-CONFIG_SSI1_DISABLE=y
CONFIG_SSI_POLLWAIT=y
-#CONFIG_SSI_TXLIMIT=4
+CONFIG_SSI_TXLIMIT=4
#
-# LM3S6965 specific serial device driver settings
+# Architecture Options
#
-CONFIG_LM3S_ETHERNET=n
-CONFIG_LM3S_ETHLEDS=n
-CONFIG_LM3S_BOARDMAC=y
-CONFIG_LM3S_ETHHDUPLEX=n
-CONFIG_LM3S_ETHNOAUTOCRC=n
-CONFIG_LM3S_ETHNOPAD=n
-CONFIG_LM3S_MULTICAST=n
-CONFIG_LM3S_PROMISCUOUS=n
-CONFIG_LM3S_BADCRC=n
-CONFIG_LM3S_DUMPPACKET=n
+# CONFIG_ARCH_NOINTC 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_STACKDUMP=y
+# CONFIG_ENDIAN_BIG is not set
#
-# General build options
+# Board Settings
#
-CONFIG_RRLOAD_BINARY=n
-CONFIG_INTELHEX_BINARY=n
-CONFIG_MOTOROLA_SREC=n
-CONFIG_RAW_BINARY=y
+CONFIG_DRAM_START=0x20000000
+CONFIG_DRAM_SIZE=65536
+CONFIG_ARCH_HAVE_INTERRUPTSTACK=y
+CONFIG_ARCH_INTERRUPTSTACK=0
#
-# General SPI interface configuration
+# Boot options
#
-CONFIG_SPI_CMDDATA=y
+# CONFIG_BOOT_RUNFROMEXTSRAM is not set
+CONFIG_BOOT_RUNFROMFLASH=y
+# CONFIG_BOOT_RUNFROMISRAM is not set
+# CONFIG_BOOT_RUNFROMSDRAM is not set
+# CONFIG_BOOT_COPYTORAM is not set
#
-# General OS setup
+# Board Selection
#
-CONFIG_USER_ENTRYPOINT="nx_main"
-CONFIG_DEBUG=n
-CONFIG_DEBUG_VERBOSE=n
-CONFIG_DEBUG_SYMBOLS=n
-CONFIG_DEBUG_GRAPHICS=n
-CONFIG_LCD_RITDEBUG=n
-CONFIG_MM_REGIONS=1
-CONFIG_ARCH_LOWPUTC=y
+CONFIG_ARCH_BOARD_LM3S6965EK=y
+# CONFIG_ARCH_BOARD_CUSTOM is not set
+CONFIG_ARCH_BOARD="lm3s6965-ek"
+
+#
+# Common Board Options
+#
+CONFIG_ARCH_HAVE_LEDS=y
+CONFIG_ARCH_LEDS=y
+
+#
+# Board-Specific Options
+#
+
+#
+# RTOS Features
+#
+CONFIG_MSEC_PER_TICK=10
CONFIG_RR_INTERVAL=200
-CONFIG_SCHED_INSTRUMENTATION=n
+# CONFIG_SCHED_INSTRUMENTATION is not set
CONFIG_TASK_NAME_SIZE=0
+# CONFIG_JULIAN_TIME is not set
CONFIG_START_YEAR=2010
CONFIG_START_MONTH=5
CONFIG_START_DAY=12
-CONFIG_GREGORIAN_TIME=n
-CONFIG_JULIAN_TIME=n
CONFIG_DEV_CONSOLE=y
-CONFIG_DEV_LOWCONSOLE=n
-CONFIG_MUTEX_TYPES=n
-CONFIG_PRIORITY_INHERITANCE=n
-CONFIG_SEM_PREALLOCHOLDERS=0
-CONFIG_SEM_NNESTPRIO=0
-CONFIG_FDCLONE_DISABLE=n
-CONFIG_FDCLONE_STDIO=n
+# CONFIG_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_NXFLAT=n
-
-#
-# The following can be used to disable categories of
-# APIs supported by the OS. If the compiler supports
-# weak functions, then it should not be necessary to
-# disable functions unless you want to restrict usage
-# of those APIs.
-#
-# There are certain dependency relationships in these
-# features.
-#
-# o mq_notify logic depends on signals to awaken tasks
-# waiting for queues to become full or empty.
-# o pthread_condtimedwait() depends on signals to wake
-# up waiting tasks.
-#
-CONFIG_DISABLE_CLOCK=n
+# CONFIG_SCHED_WORKQUEUE is not set
+# CONFIG_SCHED_WAITPID is not set
+# CONFIG_SCHED_ATEXIT is not set
+# CONFIG_SCHED_ONEXIT is not set
+CONFIG_USER_ENTRYPOINT="nx_main"
+CONFIG_DISABLE_OS_API=y
+# CONFIG_DISABLE_CLOCK is not set
CONFIG_DISABLE_POSIX_TIMERS=y
-CONFIG_DISABLE_PTHREAD=n
-CONFIG_DISABLE_SIGNALS=n
-CONFIG_DISABLE_MQUEUE=n
+# CONFIG_DISABLE_PTHREAD is not set
+# CONFIG_DISABLE_SIGNALS is not set
+# CONFIG_DISABLE_MQUEUE is not set
CONFIG_DISABLE_MOUNTPOINT=y
CONFIG_DISABLE_ENVIRON=y
CONFIG_DISABLE_POLL=y
-#
-# Misc libc settings
-#
-CONFIG_NOPRINTF_FIELDWIDTH=n
-
-#
-# Allow for architecture optimized implementations
-#
-# The architecture can provide optimized versions of the
-# following to improve system performance
-#
-CONFIG_ARCH_MEMCPY=n
-CONFIG_ARCH_MEMCMP=n
-CONFIG_ARCH_MEMMOVE=n
-CONFIG_ARCH_MEMSET=n
-CONFIG_ARCH_STRCMP=n
-CONFIG_ARCH_STRCPY=n
-CONFIG_ARCH_STRNCPY=n
-CONFIG_ARCH_STRLEN=n
-CONFIG_ARCH_STRNLEN=n
-CONFIG_ARCH_BZERO=n
-
#
# Sizes of configurable things (0 disables)
#
@@ -223,8 +216,6 @@ CONFIG_NPTHREAD_KEYS=4
CONFIG_NFILE_DESCRIPTORS=12
CONFIG_NFILE_STREAMS=12
CONFIG_NAME_MAX=32
-CONFIG_STDIO_BUFFER_SIZE=256
-CONFIG_NUNGET_CHARS=2
CONFIG_PREALLOC_MQ_MSGS=4
CONFIG_MQ_MAXMSGSIZE=32
CONFIG_MAX_WDOGPARMS=2
@@ -232,187 +223,382 @@ CONFIG_PREALLOC_WDOGS=4
CONFIG_PREALLOC_TIMERS=4
#
-# Framebuffer driver options
-CONFIG_FB_CMAP=n
-CONFIG_FB_HWCURSOR=n
-CONFIG_FB_HWCURSORIMAGE=n
-#CONFIG_FB_HWCURSORSIZE
-#CONFIG_FB_TRANSPARENCY
+# Stack and heap information
+#
+CONFIG_IDLETHREAD_STACKSIZE=1024
+CONFIG_USERMAIN_STACKSIZE=2048
+CONFIG_PTHREAD_STACK_MIN=256
+CONFIG_PTHREAD_STACK_DEFAULT=2048
#
-# Filesystem configuration
+# Device Drivers
#
-CONFIG_FS_FAT=n
-CONFIG_FS_ROMFS=n
+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=y
+# CONFIG_SPI_OWNBUS is not set
+CONFIG_SPI_EXCHANGE=y
+CONFIG_SPI_CMDDATA=y
+# CONFIG_RTC is not set
+# CONFIG_WATCHDOG is not set
+# CONFIG_ANALOG is not set
+# CONFIG_BCH is not set
+# CONFIG_INPUT is not set
+CONFIG_LCD=y
+# CONFIG_LCD_NOGETRUN is not set
+CONFIG_LCD_MAXCONTRAST=255
+CONFIG_LCD_MAXPOWER=1
+CONFIG_LCD_P14201=y
+CONFIG_P14201_NINTERFACES=1
+CONFIG_P14201_SPIMODE=2
+CONFIG_P14201_FREQUENCY=3500000
+CONFIG_P14201_FRAMEBUFFER=y
+# CONFIG_LCD_NOKIA6100 is not set
+# CONFIG_LCD_UG9664HSWAG01 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_RPORTRAIT is not set
+# CONFIG_LCD_RLANDSCAPE is not set
+# CONFIG_MMCSD is not set
+# CONFIG_MTD is not set
+# CONFIG_PIPES is not set
+# CONFIG_PM is not set
+# CONFIG_POWER is not set
+# CONFIG_SENSORS is not set
+# CONFIG_SERCOMM_CONSOLE is not set
+CONFIG_SERIAL=y
+# CONFIG_DEV_LOWCONSOLE is not set
+# CONFIG_16550_UART is not set
+CONFIG_ARCH_HAVE_UART0=y
+CONFIG_MCU_SERIAL=y
+CONFIG_STANDARD_SERIAL=y
+CONFIG_UART0_SERIAL_CONSOLE=y
+# CONFIG_NO_SERIAL_CONSOLE is not set
#
-# Maintain legacy build behavior (revisit)
+# UART0 Configuration
#
-
-CONFIG_MMCSD=y
-CONFIG_MMCSD_SPI=y
-CONFIG_MMCSD_SDIO=y
+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_USBDEV is not set
+# CONFIG_USBHOST is not set
+# CONFIG_WIRELESS is not set
#
-# SPI-based MMC/SD driver
+# System Logging Device Options
#
-CONFIG_MMCSD_NSLOTS=1
-CONFIG_MMCSD_READONLY=n
-CONFIG_MMCSD_SPICLOCK=12500000
#
-# TCP/IP and UDP support via uIP
+# System Logging
#
-CONFIG_NET=n
-CONFIG_NET_IPv6=n
-CONFIG_NSOCKET_DESCRIPTORS=0
-CONFIG_NET_SOCKOPTS=y
-CONFIG_NET_BUFSIZE=420
-CONFIG_NET_TCP=n
-CONFIG_NET_TCP_CONNS=40
-CONFIG_NET_MAX_LISTENPORTS=40
-CONFIG_NET_UDP=n
-CONFIG_NET_UDP_CHECKSUMS=y
-#CONFIG_NET_UDP_CONNS=10
-CONFIG_NET_ICMP=n
-CONFIG_NET_ICMP_PING=n
-#CONFIG_NET_PINGADDRCONF=0
-CONFIG_NET_STATISTICS=y
-#CONFIG_NET_RECEIVE_WINDOW=
-#CONFIG_NET_ARPTAB_SIZE=8
-CONFIG_NET_BROADCAST=n
+# CONFIG_RAMLOG is not set
#
-# UIP Network Utilities
+# Networking Support
#
-CONFIG_NET_DHCP_LIGHT=n
-CONFIG_NET_RESOLV_ENTRIES=4
+# CONFIG_NET is not set
#
-# Graphics related configuration settings
+# File Systems
+#
+
+#
+# File system configuration
+#
+# CONFIG_FS_RAMMAP is not set
+
+#
+# System Logging
+#
+# CONFIG_SYSLOG is not set
+
+#
+# Graphics Support
#
CONFIG_NX=y
-CONFIG_NX_MULTIUSER=n
+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=n
+# CONFIG_NX_DISABLE_4BPP is not set
CONFIG_NX_DISABLE_8BPP=y
CONFIG_NX_DISABLE_16BPP=y
CONFIG_NX_DISABLE_24BPP=y
CONFIG_NX_DISABLE_32BPP=y
CONFIG_NX_PACKEDMSFIRST=y
-CONFIG_NX_LCDDRIVER=y
-CONFIG_LCD_MAXPOWER=1
-CONFIG_LCD_MAXCONTRAST=255
+
+#
+# Input Devices
+#
CONFIG_NX_MOUSE=y
CONFIG_NX_KBD=y
-#CONFIG_NXTK_BORDERWIDTH=4
-CONFIG_NXTK_BORDERCOLOR1=8
-CONFIG_NXTK_BORDERCOLOR2=4
-CONFIG_NXTK_AUTORAISE=n
-CONFIG_NXFONT_SANS23X27=y
+
+#
+# Framed Window Borders
+#
+CONFIG_NXTK_BORDERWIDTH=4
+CONFIG_NXTK_BORDERCOLOR1=0x08
+CONFIG_NXTK_BORDERCOLOR2=0x04
+CONFIG_NXTK_BORDERCOLOR3=0
+# CONFIG_NXTK_AUTORAISE is not set
+
+#
+# Font Selections
+#
CONFIG_NXFONTS_CHARBITS=7
-CONFIG_NX_BLOCKING=y
-CONFIG_NX_MXSERVERMSGS=32
-CONFIG_NX_MXCLIENTMSGS=16
+# 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
#
-# RiT P14201 OLED Driver Configuration
+# NX Multi-user only options
#
-CONFIG_LCD_P14201=y
-CONFIG_P14201_SPIMODE=2
-CONFIG_P14201_FREQUENCY=3500000
-CONFIG_P14201_NINTERFACES=1
-CONFIG_P14201_FRAMEBUFFER=y
+# CONFIG_NX_MULTIUSER is not set
#
-# Settings for examples/uip
+# Memory Management
#
-CONFIG_EXAMPLES_UIP_IPADDR=0x0a000002
-CONFIG_EXAMPLES_UIP_DRIPADDR=0x0a000001
-CONFIG_EXAMPLES_UIP_NETMASK=0xffffff00
-CONFIG_EXAMPLES_UIP_DHCPC=n
+# CONFIG_MM_SMALL is not set
+CONFIG_MM_REGIONS=1
+# CONFIG_GRAN is not set
#
-# Settings for examples/nettest
-CONFIG_EXAMPLES_NETTEST_SERVER=n
-CONFIG_EXAMPLES_NETTEST_PERFORMANCE=n
-CONFIG_EXAMPLES_NETTEST_NOMAC=n
-CONFIG_EXAMPLES_NETTEST_IPADDR=0x0a000002
-CONFIG_EXAMPLES_NETTEST_DRIPADDR=0x0a000001
-CONFIG_EXAMPLES_NETTEST_NETMASK=0xffffff00
-CONFIG_EXAMPLES_NETTEST_CLIENTIP=0x0a000001
+# Binary Formats
+#
+# CONFIG_BINFMT_DISABLE is not set
+# CONFIG_NXFLAT is not set
+# CONFIG_ELF is not set
+# CONFIG_PIC is not set
+# CONFIG_SYMTAB_ORDEREDBYNAME is not set
#
-# Settings for examples/ostest
+# Library Routines
#
-CONFIG_EXAMPLES_OSTEST_LOOPS=1
-CONFIG_EXAMPLES_OSTEST_STACKSIZE=2048
-CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=3
#
-# Settings for apps/nshlib
+# Standard C Library Options
#
-CONFIG_NSH_FILEIOSIZE=512
-CONFIG_NSH_STRERROR=n
-CONFIG_NSH_LINELEN=64
-CONFIG_NSH_NESTDEPTH=3
-CONFIG_NSH_DISABLESCRIPT=n
-CONFIG_NSH_DISABLEBG=n
-CONFIG_NSH_ROMFSETC=n
-CONFIG_NSH_CONSOLE=y
-CONFIG_NSH_TELNET=n
-CONFIG_NSH_ARCHINIT=n
-CONFIG_NSH_IOBUFFER_SIZE=512
-CONFIG_NSH_DHCPC=n
-CONFIG_NSH_NOMAC=n
-CONFIG_NSH_IPADDR=0x0a000002
-CONFIG_NSH_DRIPADDR=0x0a000001
-CONFIG_NSH_NETMASK=0xffffff00
-CONFIG_NSH_ROMFSMOUNTPT="/etc"
-CONFIG_NSH_INITSCRIPT="init.d/rcS"
-CONFIG_NSH_ROMFSDEVNO=0
-CONFIG_NSH_ROMFSSECTSIZE=64
-CONFIG_NSH_FATDEVNO=1
-CONFIG_NSH_FATSECTSIZE=512
-CONFIG_NSH_FATNSECTORS=1024
-CONFIG_NSH_FATMOUNTPT="/tmp"
+CONFIG_STDIO_BUFFER_SIZE=256
+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_EOL_IS_CR is not set
+# CONFIG_EOL_IS_LF is not set
+# CONFIG_EOL_IS_BOTH_CRLF is not set
+CONFIG_EOL_IS_EITHER_CRLF=y
+# CONFIG_LIBC_STRERROR is not set
+# CONFIG_LIBC_PERROR_STDOUT is not set
+CONFIG_ARCH_LOWPUTC=y
+CONFIG_LIB_SENDFILE_BUFSIZE=512
+# CONFIG_ARCH_ROMGETC is not set
+# CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set
#
-# Architecture-specific NSH options
+# Non-standard Helper Functions
#
-CONFIG_NSH_MMCSDSPIPORTNO=0
-CONFIG_NSH_MMCSDSLOTNO=0
-CONFIG_NSH_MMCSDMINOR=0
+CONFIG_LIB_KBDCODEC=y
#
-# Settings for examples/nx
+# Basic CXX Support
#
+# CONFIG_C99_BOOL8 is not set
+# CONFIG_HAVE_CXX is not set
+
+#
+# Application Configuration
+#
+
+#
+# Built-In Applications
+#
+# CONFIG_BUILTIN is not set
+
+#
+# Examples
+#
+# CONFIG_EXAMPLES_BUTTONS is not set
+# CONFIG_EXAMPLES_CAN is not set
+# CONFIG_EXAMPLES_CDCACM is not set
+# CONFIG_EXAMPLES_COMPOSITE is not set
+# CONFIG_EXAMPLES_DHCPD is not set
+# CONFIG_EXAMPLES_ELF is not set
+# CONFIG_EXAMPLES_FTPC is not set
+# CONFIG_EXAMPLES_FTPD is not set
+# CONFIG_EXAMPLES_HELLO is not set
+# CONFIG_EXAMPLES_HELLOXX is not set
+# CONFIG_EXAMPLES_JSON is not set
+# CONFIG_EXAMPLES_HIDKBD is not set
+# CONFIG_EXAMPLES_KEYPADTEST is not set
+# CONFIG_EXAMPLES_IGMP is not set
+# CONFIG_EXAMPLES_LCDRW is not set
+# CONFIG_EXAMPLES_MM is not set
+# CONFIG_EXAMPLES_MOUNT is not set
+# CONFIG_EXAMPLES_MODBUS is not set
+# CONFIG_EXAMPLES_NETTEST is not set
+# CONFIG_EXAMPLES_NSH is not set
+# CONFIG_EXAMPLES_NULL is not set
+CONFIG_EXAMPLES_NX=y
CONFIG_EXAMPLES_NX_VPLANE=0
CONFIG_EXAMPLES_NX_DEVNO=0
-CONFIG_EXAMPLES_NX_BGCOLOR=2
-CONFIG_EXAMPLES_NX_COLOR1=10
-CONFIG_EXAMPLES_NX_COLOR2=12
-CONFIG_EXAMPLES_NX_TBCOLOR=8
-CONFIG_EXAMPLES_NX_FONTCOLOR=0
+# CONFIG_EXAMPLES_NX_DEFAULT_COLORS is not set
+CONFIG_EXAMPLES_NX_BGCOLOR=0x02
+CONFIG_EXAMPLES_NX_COLOR1=0x0a
+CONFIG_EXAMPLES_NX_COLOR2=0x0c
+CONFIG_EXAMPLES_NX_TBCOLOR=0x08
+CONFIG_EXAMPLES_NX_FONTCOLOR=0x00
+CONFIG_EXAMPLES_NX_DEFAULT_FONT=y
CONFIG_EXAMPLES_NX_BPP=4
-CONFIG_EXAMPLES_NX_RAWWINDOWS=n
-CONFIG_EXAMPLES_NX_STACKSIZE=2048
-CONFIG_EXAMPLES_NX_CLIENTPRIO=80
-CONFIG_EXAMPLES_NX_SERVERPRIO=120
-CONFIG_EXAMPLES_NX_NOTIFYSIGNO=4
+# CONFIG_EXAMPLES_NX_RAWWINDOWS is not set
CONFIG_EXAMPLES_NX_EXTERNINIT=y
+# CONFIG_EXAMPLES_NXCONSOLE is not set
+# CONFIG_EXAMPLES_NXFFS is not set
+# CONFIG_EXAMPLES_NXFLAT is not set
+# CONFIG_EXAMPLES_NXHELLO is not set
+# CONFIG_EXAMPLES_NXIMAGE is not set
+# CONFIG_EXAMPLES_NXLINES is not set
+# CONFIG_EXAMPLES_NXTEXT is not set
+# CONFIG_EXAMPLES_OSTEST is not set
+# CONFIG_EXAMPLES_PASHELLO is not set
+# CONFIG_EXAMPLES_PIPE is not set
+# CONFIG_EXAMPLES_POLL is not set
+# CONFIG_EXAMPLES_QENCODER is not set
+# CONFIG_EXAMPLES_RGMP is not set
+# CONFIG_EXAMPLES_ROMFS is not set
+# CONFIG_EXAMPLES_SENDMAIL is not set
+# CONFIG_EXAMPLES_SERLOOP is not set
+# CONFIG_EXAMPLES_TELNETD is not set
+# CONFIG_EXAMPLES_THTTPD is not set
+# CONFIG_EXAMPLES_TIFF is not set
+# CONFIG_EXAMPLES_TOUCHSCREEN is not set
+# CONFIG_EXAMPLES_UDP is not set
+# CONFIG_EXAMPLES_UIP is not set
+# CONFIG_EXAMPLES_USBSERIAL is not set
+# CONFIG_EXAMPLES_USBMSC is not set
+# CONFIG_EXAMPLES_USBTERM is not set
+# CONFIG_EXAMPLES_WATCHDOG is not set
#
-# Stack and heap information
+# Interpreters
#
-CONFIG_BOOT_RUNFROMFLASH=n
-CONFIG_BOOT_COPYTORAM=n
-CONFIG_CUSTOM_STACK=n
-CONFIG_IDLETHREAD_STACKSIZE=1024
-CONFIG_USERMAIN_STACKSIZE=2048
-CONFIG_PTHREAD_STACK_MIN=256
-CONFIG_PTHREAD_STACK_DEFAULT=2048
-CONFIG_HEAP_BASE=
-CONFIG_HEAP_SIZE=
+
+#
+# Interpreters
+#
+# CONFIG_INTERPRETERS_FICL is not set
+# CONFIG_INTERPRETERS_PCODE is not set
+
+#
+# Network Utilities
+#
+
+#
+# Networking Utilities
+#
+# CONFIG_NETUTILS_CODECS is not set
+# CONFIG_NETUTILS_DHCPC is not set
+# CONFIG_NETUTILS_DHCPD is not set
+# CONFIG_NETUTILS_FTPC is not set
+# CONFIG_NETUTILS_FTPD is not set
+# CONFIG_NETUTILS_JSON is not set
+# CONFIG_NETUTILS_RESOLV is not set
+# CONFIG_NETUTILS_SMTP is not set
+# CONFIG_NETUTILS_TELNETD is not set
+# CONFIG_NETUTILS_TFTPC is not set
+# CONFIG_NETUTILS_THTTPD is not set
+# CONFIG_NETUTILS_UIPLIB is not set
+# CONFIG_NETUTILS_WEBCLIENT is not set
+
+#
+# ModBus
+#
+
+#
+# FreeModbus
+#
+# CONFIG_MODBUS is not set
+
+#
+# NSH Library
+#
+# CONFIG_NSH_LIBRARY is not set
+
+#
+# NxWidgets/NxWM
+#
+
+#
+# System NSH Add-Ons
+#
+
+#
+# Custom Free Memory Command
+#
+# CONFIG_SYSTEM_FREE is not set
+
+#
+# I2C tool
+#
+
+#
+# FLASH Program Installation
+#
+# CONFIG_SYSTEM_INSTALL is not set
+
+#
+# readline()
+#
+# CONFIG_SYSTEM_READLINE is not set
+
+#
+# Power Off
+#
+# CONFIG_SYSTEM_POWEROFF is not set
+
+#
+# RAMTRON
+#
+# CONFIG_SYSTEM_RAMTRON is not set
+
+#
+# SD Card
+#
+# CONFIG_SYSTEM_SDCARD is not set
+
+#
+# Sysinfo
+#
+# CONFIG_SYSTEM_SYSINFO is not set
diff --git a/nuttx/configs/lm3s6965-ek/ostest/appconfig b/nuttx/configs/lm3s6965-ek/ostest/appconfig
deleted file mode 100644
index dabf1f2b44..0000000000
--- a/nuttx/configs/lm3s6965-ek/ostest/appconfig
+++ /dev/null
@@ -1,39 +0,0 @@
-############################################################################
-# configs/lm3s6965-ek/ostest/appconfig
-#
-# Copyright (C) 2011 Gregory Nutt. All rights reserved.
-# Author: Gregory Nutt
-#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in
-# the documentation and/or other materials provided with the
-# distribution.
-# 3. Neither the name NuttX nor the names of its contributors may be
-# used to endorse or promote products derived from this software
-# without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-#
-############################################################################
-
-# Path to example in apps/examples containing the user_start entry point
-
-CONFIGURED_APPS += examples/ostest
-
diff --git a/nuttx/configs/lm3s6965-ek/ostest/defconfig b/nuttx/configs/lm3s6965-ek/ostest/defconfig
index fcee444333..d1168ad45a 100755
--- a/nuttx/configs/lm3s6965-ek/ostest/defconfig
+++ b/nuttx/configs/lm3s6965-ek/ostest/defconfig
@@ -1,212 +1,214 @@
-############################################################################
-# configs/lm3s6965-ek/ostest/defconfig
#
-# Copyright (C) 2010 Gregory Nutt. All rights reserved.
-# Author: Gregory Nutt
+# Automatically generated file; DO NOT EDIT.
+# Nuttx/ Configuration
#
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions
-# are met:
-#
-# 1. Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# 2. Redistributions in binary form must reproduce the above copyright
-# notice, this list of conditions and the following disclaimer in
-# the documentation and/or other materials provided with the
-# distribution.
-# 3. Neither the name NuttX nor the names of its contributors may be
-# used to endorse or promote products derived from this software
-# without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
-# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
-# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
-# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
-# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
-# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
-# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-# POSSIBILITY OF SUCH DAMAGE.
-#
-############################################################################
-#
-# Architecture Selection
-#
-CONFIG_ARCH="arm"
-CONFIG_ARCH_ARM=y
-CONFIG_ARCH_CORTEXM3=y
-CONFIG_ARCH_CHIP="lm3s"
-CONFIG_ARCH_CHIP_LM3S=y
-CONFIG_ARCH_CHIP_LM3S6965=y
-CONFIG_ARCH_BOARD="lm3s6965-ek"
-CONFIG_ARCH_BOARD_LM3S6965EK=y
-CONFIG_BOARD_LOOPSPERMSEC=4531
-CONFIG_DRAM_SIZE=65536
-CONFIG_DRAM_START=0x20000000
-CONFIG_ARCH_IRQPRIO=y
-CONFIG_ARCH_INTERRUPTSTACK=0
-CONFIG_ARCH_STACKDUMP=y
-CONFIG_ARCH_LEDS=y
-CONFIG_ARCH_CALIBRATION=n
+CONFIG_NUTTX_NEWCONFIG=y
#
-# Identify toolchain and linker options
+# Build Setup
#
-CONFIG_LM3S_CODESOURCERYW=n
-CONFIG_LM3S_CODESOURCERYL=n
-CONFIG_LM3S_DEVKITARM=n
-CONFIG_LM3S_BUILDROOT=y
+# 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_LM3S=y
+# 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_SAM3U is not set
+# CONFIG_ARCH_CHIP_STM32 is not set
+# CONFIG_ARCH_CHIP_STR71X is not set
+CONFIG_ARCH_CORTEXM3=y
+CONFIG_ARCH_FAMILY="armv7-m"
+CONFIG_ARCH_CHIP="lm3s"
+CONFIG_ARCH_HAVE_MPU=y
+# CONFIG_ARMV7M_MPU is not set
+CONFIG_BOARD_LOOPSPERMSEC=4531
+# CONFIG_ARCH_CALIBRATION 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
+
+#
+# LM3S Configuration Options
+#
+# CONFIG_ARCH_CHIP_LM3S6918 is not set
+# CONFIG_ARCH_CHIP_LM3S9B96 is not set
+# CONFIG_ARCH_CHIP_LM3S6432 is not set
+CONFIG_ARCH_CHIP_LM3S6965=y
+# CONFIG_ARCH_CHIP_LM3S8962 is not set
+# CONFIG_LM3S_REVA2 is not set
CONFIG_LM3S_DFU=y
#
-# Disable support for interrupts on GPIOH and GPIOJ which do not
-# exist on the LM3S6B96. Additional interrupt support can be
-# disabled if desired to reduce memory footprint.
-CONFIG_LM3S_DISABLE_GPIOA_IRQS=n
-CONFIG_LM3S_DISABLE_GPIOB_IRQS=n
-CONFIG_LM3S_DISABLE_GPIOC_IRQS=n
-CONFIG_LM3S_DISABLE_GPIOD_IRQS=n
-CONFIG_LM3S_DISABLE_GPIOE_IRQS=n
-CONFIG_LM3S_DISABLE_GPIOF_IRQS=n
-CONFIG_LM3S_DISABLE_GPIOG_IRQS=n
+# Select LM3S Peripheral Support
+#
+CONFIG_LM3S_UART0=y
+# CONFIG_LM3S_UART1 is not set
+# CONFIG_SSI0_DISABLE is not set
+CONFIG_SSI1_DISABLE=y
+# CONFIG_LM3S_UART2 is not set
+# CONFIG_LM3S_ETHERNET is not set
+
+#
+# Disable GPIO Interrupts
+#
+# CONFIG_LM3S_DISABLE_GPIOA_IRQS is not set
+# CONFIG_LM3S_DISABLE_GPIOB_IRQS is not set
+# CONFIG_LM3S_DISABLE_GPIOC_IRQS is not set
+# CONFIG_LM3S_DISABLE_GPIOD_IRQS is not set
+# CONFIG_LM3S_DISABLE_GPIOE_IRQS is not set
+# CONFIG_LM3S_DISABLE_GPIOF_IRQS is not set
+# CONFIG_LM3S_DISABLE_GPIOG_IRQS is not set
CONFIG_LM3S_DISABLE_GPIOH_IRQS=y
CONFIG_LM3S_DISABLE_GPIOJ_IRQS=y
#
-# LM3S6965 specific serial device driver settings
+# LM3S SSI Configuration
#
-CONFIG_LM3S_UART0=y
-CONFIG_LM3S_UART1=n
-CONFIG_LM3S_UART2=n
-CONFIG_UART0_SERIAL_CONSOLE=y
-CONFIG_UART1_SERIAL_CONSOLE=n
-CONFIG_UART2_SERIAL_CONSOLE=n
-CONFIG_UART0_TXBUFSIZE=256
-CONFIG_UART1_TXBUFSIZE=256
-CONFIG_UART2_TXBUFSIZE=256
-CONFIG_UART0_RXBUFSIZE=256
-CONFIG_UART1_RXBUFSIZE=256
-CONFIG_UART2_RXBUFSIZE=256
-CONFIG_UART0_BAUD=115200
-CONFIG_UART1_BAUD=115200
-CONFIG_UART2_BAUD=115200
-CONFIG_UART0_BITS=8
-CONFIG_UART1_BITS=8
-CONFIG_UART2_BITS=8
-CONFIG_UART0_PARITY=0
-CONFIG_UART1_PARITY=0
-CONFIG_UART2_PARITY=0
-CONFIG_UART0_2STOP=0
-CONFIG_UART1_2STOP=0
-CONFIG_UART2_2STOP=0
-
-#
-# LM3S6965 specific SSI device driver settings
-#
-CONFIG_SSI0_DISABLE=n
-CONFIG_SSI1_DISABLE=y
CONFIG_SSI_POLLWAIT=y
-#CONFIG_SSI_TXLIMIT=4
+CONFIG_SSI_TXLIMIT=4
+# CONFIG_SDIO_DMA is not set
+# CONFIG_SDIO_WIDTH_D1_ONLY is not set
#
-# LM3S6965 specific serial device driver settings
+# Architecture Options
#
-CONFIG_LM3S_ETHERNET=n
-CONFIG_LM3S_ETHLEDS=n
-CONFIG_LM3S_BOARDMAC=y
-CONFIG_LM3S_ETHHDUPLEX=n
-CONFIG_LM3S_ETHNOAUTOCRC=n
-CONFIG_LM3S_ETHNOPAD=n
-CONFIG_LM3S_MULTICAST=n
-CONFIG_LM3S_PROMISCUOUS=n
-CONFIG_LM3S_BADCRC=n
-CONFIG_LM3S_DUMPPACKET=n
+# CONFIG_ARCH_NOINTC 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_STACKDUMP=y
+# CONFIG_ENDIAN_BIG is not set
#
-# General build options
+# Board Settings
#
-CONFIG_RRLOAD_BINARY=n
-CONFIG_INTELHEX_BINARY=n
-CONFIG_MOTOROLA_SREC=n
-CONFIG_RAW_BINARY=y
+CONFIG_DRAM_START=0x20000000
+CONFIG_DRAM_SIZE=65536
+CONFIG_ARCH_HAVE_INTERRUPTSTACK=y
+CONFIG_ARCH_INTERRUPTSTACK=0
#
-# General OS setup
+# Boot options
#
-CONFIG_USER_ENTRYPOINT="ostest_main"
-CONFIG_DEBUG=n
-CONFIG_DEBUG_VERBOSE=n
-CONFIG_DEBUG_SYMBOLS=n
-CONFIG_MM_REGIONS=1
-CONFIG_ARCH_LOWPUTC=y
+# CONFIG_BOOT_RUNFROMEXTSRAM is not set
+CONFIG_BOOT_RUNFROMFLASH=y
+# CONFIG_BOOT_RUNFROMISRAM is not set
+# CONFIG_BOOT_RUNFROMSDRAM is not set
+# CONFIG_BOOT_COPYTORAM is not set
+
+#
+# Board Selection
+#
+CONFIG_ARCH_BOARD_LM3S6965EK=y
+# CONFIG_ARCH_BOARD_CUSTOM is not set
+CONFIG_ARCH_BOARD="lm3s6965-ek"
+
+#
+# Common Board Options
+#
+CONFIG_ARCH_HAVE_LEDS=y
+CONFIG_ARCH_LEDS=y
+
+#
+# Board-Specific Options
+#
+
+#
+# RTOS Features
+#
+CONFIG_MSEC_PER_TICK=10
CONFIG_RR_INTERVAL=200
-CONFIG_SCHED_INSTRUMENTATION=n
+# CONFIG_SCHED_INSTRUMENTATION is not set
CONFIG_TASK_NAME_SIZE=0
+# CONFIG_JULIAN_TIME is not set
CONFIG_START_YEAR=2010
CONFIG_START_MONTH=5
CONFIG_START_DAY=6
-CONFIG_GREGORIAN_TIME=n
-CONFIG_JULIAN_TIME=n
CONFIG_DEV_CONSOLE=y
-CONFIG_DEV_LOWCONSOLE=y
-CONFIG_MUTEX_TYPES=n
-CONFIG_PRIORITY_INHERITANCE=n
-CONFIG_SEM_PREALLOCHOLDERS=0
-CONFIG_SEM_NNESTPRIO=0
-CONFIG_FDCLONE_DISABLE=n
-CONFIG_FDCLONE_STDIO=n
+# CONFIG_MUTEX_TYPES is not set
+# CONFIG_PRIORITY_INHERITANCE is not set
+# CONFIG_FDCLONE_DISABLE is not set
+# CONFIG_FDCLONE_STDIO is not set
CONFIG_SDCLONE_DISABLE=y
-CONFIG_NXFLAT=n
-
-#
-# The following can be used to disable categories of
-# APIs supported by the OS. If the compiler supports
-# weak functions, then it should not be necessary to
-# disable functions unless you want to restrict usage
-# of those APIs.
-#
-# There are certain dependency relationships in these
-# features.
-#
-# o mq_notify logic depends on signals to awaken tasks
-# waiting for queues to become full or empty.
-# o pthread_condtimedwait() depends on signals to wake
-# up waiting tasks.
-#
-CONFIG_DISABLE_CLOCK=n
-CONFIG_DISABLE_POSIX_TIMERS=n
-CONFIG_DISABLE_PTHREAD=n
-CONFIG_DISABLE_SIGNALS=n
-CONFIG_DISABLE_MQUEUE=n
+# CONFIG_SCHED_WORKQUEUE is not set
+# CONFIG_SCHED_WAITPID is not set
+# CONFIG_SCHED_ATEXIT is not set
+# CONFIG_SCHED_ONEXIT is not set
+CONFIG_USER_ENTRYPOINT="ostest_main"
+CONFIG_DISABLE_OS_API=y
+# CONFIG_DISABLE_CLOCK is not set
+# CONFIG_DISABLE_POSIX_TIMERS is not set
+# CONFIG_DISABLE_PTHREAD is not set
+# CONFIG_DISABLE_SIGNALS is not set
+# CONFIG_DISABLE_MQUEUE is not set
CONFIG_DISABLE_MOUNTPOINT=y
CONFIG_DISABLE_ENVIRON=y
CONFIG_DISABLE_POLL=y
-#
-# Misc libc settings
-#
-CONFIG_NOPRINTF_FIELDWIDTH=n
-
-#
-# Allow for architecture optimized implementations
-#
-# The architecture can provide optimized versions of the
-# following to improve system performance
-#
-CONFIG_ARCH_MEMCPY=n
-CONFIG_ARCH_MEMCMP=n
-CONFIG_ARCH_MEMMOVE=n
-CONFIG_ARCH_MEMSET=n
-CONFIG_ARCH_STRCMP=n
-CONFIG_ARCH_STRCPY=n
-CONFIG_ARCH_STRNCPY=n
-CONFIG_ARCH_STRLEN=n
-CONFIG_ARCH_STRNLEN=n
-CONFIG_ARCH_BZERO=n
-
#
# Sizes of configurable things (0 disables)
#
@@ -216,132 +218,313 @@ CONFIG_NPTHREAD_KEYS=4
CONFIG_NFILE_DESCRIPTORS=8
CONFIG_NFILE_STREAMS=8
CONFIG_NAME_MAX=32
-CONFIG_STDIO_BUFFER_SIZE=256
-CONFIG_NUNGET_CHARS=2
CONFIG_PREALLOC_MQ_MSGS=4
CONFIG_MQ_MAXMSGSIZE=32
CONFIG_MAX_WDOGPARMS=2
CONFIG_PREALLOC_WDOGS=4
CONFIG_PREALLOC_TIMERS=4
-#
-# Filesystem configuration
-#
-CONFIG_FS_FAT=n
-CONFIG_FS_ROMFS=n
-
-#
-# Maintain legacy build behavior (revisit)
-#
-
-CONFIG_MMCSD=y
-CONFIG_MMCSD_SPI=y
-CONFIG_MMCSD_SDIO=y
-
-#
-# SPI-based MMC/SD driver
-#
-CONFIG_MMCSD_NSLOTS=1
-CONFIG_MMCSD_READONLY=n
-CONFIG_MMCSD_SPICLOCK=12500000
-
-#
-# TCP/IP and UDP support via uIP
-#
-CONFIG_NET=n
-CONFIG_NET_IPv6=n
-CONFIG_NSOCKET_DESCRIPTORS=0
-CONFIG_NET_SOCKOPTS=y
-CONFIG_NET_BUFSIZE=420
-CONFIG_NET_TCP=n
-CONFIG_NET_TCP_CONNS=40
-CONFIG_NET_MAX_LISTENPORTS=40
-CONFIG_NET_UDP=n
-CONFIG_NET_UDP_CHECKSUMS=y
-#CONFIG_NET_UDP_CONNS=10
-CONFIG_NET_ICMP=n
-CONFIG_NET_ICMP_PING=n
-#CONFIG_NET_PINGADDRCONF=0
-CONFIG_NET_STATISTICS=y
-#CONFIG_NET_RECEIVE_WINDOW=
-#CONFIG_NET_ARPTAB_SIZE=8
-CONFIG_NET_BROADCAST=n
-
-#
-# UIP Network Utilities
-#
-CONFIG_NET_DHCP_LIGHT=n
-CONFIG_NET_RESOLV_ENTRIES=4
-
-#
-# Settings for examples/uip
-#
-CONFIG_EXAMPLES_UIP_IPADDR=0x0a000002
-CONFIG_EXAMPLES_UIP_DRIPADDR=0x0a000001
-CONFIG_EXAMPLES_UIP_NETMASK=0xffffff00
-CONFIG_EXAMPLES_UIP_DHCPC=n
-
-#
-# Settings for examples/nettest
-CONFIG_EXAMPLES_NETTEST_SERVER=n
-CONFIG_EXAMPLES_NETTEST_PERFORMANCE=n
-CONFIG_EXAMPLES_NETTEST_NOMAC=n
-CONFIG_EXAMPLES_NETTEST_IPADDR=0x0a000002
-CONFIG_EXAMPLES_NETTEST_DRIPADDR=0x0a000001
-CONFIG_EXAMPLES_NETTEST_NETMASK=0xffffff00
-CONFIG_EXAMPLES_NETTEST_CLIENTIP=0x0a000001
-
-#
-# Settings for examples/ostest
-#
-CONFIG_EXAMPLES_OSTEST_LOOPS=1
-CONFIG_EXAMPLES_OSTEST_STACKSIZE=2048
-CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=3
-
-#
-# Settings for apps/nshlib
-#
-CONFIG_NSH_FILEIOSIZE=512
-CONFIG_NSH_STRERROR=n
-CONFIG_NSH_LINELEN=64
-CONFIG_NSH_NESTDEPTH=3
-CONFIG_NSH_DISABLESCRIPT=n
-CONFIG_NSH_DISABLEBG=n
-CONFIG_NSH_ROMFSETC=n
-CONFIG_NSH_CONSOLE=y
-CONFIG_NSH_TELNET=n
-CONFIG_NSH_ARCHINIT=n
-CONFIG_NSH_IOBUFFER_SIZE=512
-CONFIG_NSH_DHCPC=n
-CONFIG_NSH_NOMAC=n
-CONFIG_NSH_IPADDR=0x0a000002
-CONFIG_NSH_DRIPADDR=0x0a000001
-CONFIG_NSH_NETMASK=0xffffff00
-CONFIG_NSH_ROMFSMOUNTPT="/etc"
-CONFIG_NSH_INITSCRIPT="init.d/rcS"
-CONFIG_NSH_ROMFSDEVNO=0
-CONFIG_NSH_ROMFSSECTSIZE=64
-CONFIG_NSH_FATDEVNO=1
-CONFIG_NSH_FATSECTSIZE=512
-CONFIG_NSH_FATNSECTORS=1024
-CONFIG_NSH_FATMOUNTPT="/tmp"
-
-#
-# Architecture-specific NSH options
-#
-CONFIG_NSH_MMCSDSPIPORTNO=0
-CONFIG_NSH_MMCSDSLOTNO=0
-CONFIG_NSH_MMCSDMINOR=0
-
#
# Stack and heap information
#
-CONFIG_BOOT_RUNFROMFLASH=n
-CONFIG_BOOT_COPYTORAM=n
-CONFIG_CUSTOM_STACK=n
CONFIG_IDLETHREAD_STACKSIZE=1024
CONFIG_USERMAIN_STACKSIZE=2048
CONFIG_PTHREAD_STACK_MIN=256
CONFIG_PTHREAD_STACK_DEFAULT=2048
-CONFIG_HEAP_BASE=
-CONFIG_HEAP_SIZE=
+
+#
+# Device Drivers
+#
+CONFIG_DEV_NULL=y
+# CONFIG_DEV_ZERO is not set
+# CONFIG_LOOP is not set
+# CONFIG_RAMDISK is not set
+# CONFIG_CAN is not set
+# CONFIG_PWM is not set
+# CONFIG_I2C is not set
+# CONFIG_SPI is not set
+# CONFIG_RTC is not set
+# CONFIG_WATCHDOG is not set
+# CONFIG_ANALOG is not set
+# CONFIG_BCH is not set
+# CONFIG_INPUT is not set
+# CONFIG_LCD is not set
+CONFIG_MMCSD=y
+CONFIG_MMCSD_NSLOTS=1
+# CONFIG_MMCSD_READONLY is not set
+# CONFIG_MMCSD_MULTIBLOCK_DISABLE is not set
+CONFIG_MMCSD_MMCSUPPORT=y
+CONFIG_MMCSD_HAVECARDDETECT=y
+CONFIG_MMCSD_SPI=y
+CONFIG_MMCSD_SPICLOCK=12500000
+CONFIG_MMCSD_SDIO=y
+# CONFIG_SDIO_MUXBUS is not set
+# CONFIG_MTD is not set
+# CONFIG_PIPES is not set
+# CONFIG_PM is not set
+# CONFIG_POWER is not set
+# CONFIG_SENSORS is not set
+# CONFIG_SERCOMM_CONSOLE is not set
+CONFIG_SERIAL=y
+CONFIG_DEV_LOWCONSOLE=y
+# CONFIG_16550_UART is not set
+CONFIG_ARCH_HAVE_UART0=y
+CONFIG_MCU_SERIAL=y
+CONFIG_UART0_SERIAL_CONSOLE=y
+# CONFIG_NO_SERIAL_CONSOLE is not set
+
+#
+# UART0 Configuration
+#
+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_USBDEV is not set
+# CONFIG_USBHOST is not set
+# CONFIG_WIRELESS is not set
+
+#
+# System Logging Device Options
+#
+
+#
+# System Logging
+#
+# CONFIG_RAMLOG is not set
+
+#
+# Networking Support
+#
+# CONFIG_NET is not set
+
+#
+# File Systems
+#
+
+#
+# File system configuration
+#
+# CONFIG_FS_RAMMAP is not set
+
+#
+# System Logging
+#
+# CONFIG_SYSLOG is not set
+
+#
+# Graphics Support
+#
+# CONFIG_NX is not set
+
+#
+# Memory Management
+#
+# CONFIG_MM_SMALL is not set
+CONFIG_MM_REGIONS=1
+# CONFIG_GRAN is not set
+
+#
+# Binary Formats
+#
+# CONFIG_BINFMT_DISABLE is not set
+# CONFIG_NXFLAT is not set
+# CONFIG_ELF is not set
+# CONFIG_PIC is not set
+# CONFIG_SYMTAB_ORDEREDBYNAME is not set
+
+#
+# Library Routines
+#
+
+#
+# Standard C Library Options
+#
+CONFIG_STDIO_BUFFER_SIZE=256
+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_EOL_IS_CR is not set
+# CONFIG_EOL_IS_LF is not set
+# CONFIG_EOL_IS_BOTH_CRLF is not set
+CONFIG_EOL_IS_EITHER_CRLF=y
+# CONFIG_LIBC_STRERROR is not set
+# CONFIG_LIBC_PERROR_STDOUT is not set
+CONFIG_ARCH_LOWPUTC=y
+CONFIG_LIB_SENDFILE_BUFSIZE=512
+# CONFIG_ARCH_ROMGETC is not set
+# CONFIG_ARCH_OPTIMIZED_FUNCTIONS is not set
+
+#
+# Non-standard Helper Functions
+#
+CONFIG_LIB_KBDCODEC=y
+
+#
+# Basic CXX Support
+#
+# CONFIG_C99_BOOL8 is not set
+# CONFIG_HAVE_CXX is not set
+
+#
+# Application Configuration
+#
+
+#
+# Built-In Applications
+#
+# CONFIG_BUILTIN is not set
+
+#
+# Examples
+#
+# CONFIG_EXAMPLES_BUTTONS is not set
+# CONFIG_EXAMPLES_CAN is not set
+# CONFIG_EXAMPLES_CDCACM is not set
+# CONFIG_EXAMPLES_COMPOSITE is not set
+# CONFIG_EXAMPLES_DHCPD is not set
+# CONFIG_EXAMPLES_ELF is not set
+# CONFIG_EXAMPLES_FTPC is not set
+# CONFIG_EXAMPLES_FTPD is not set
+# CONFIG_EXAMPLES_HELLO is not set
+# CONFIG_EXAMPLES_HELLOXX is not set
+# CONFIG_EXAMPLES_JSON is not set
+# CONFIG_EXAMPLES_HIDKBD is not set
+# CONFIG_EXAMPLES_KEYPADTEST is not set
+# CONFIG_EXAMPLES_IGMP is not set
+# CONFIG_EXAMPLES_LCDRW is not set
+# CONFIG_EXAMPLES_MM is not set
+# CONFIG_EXAMPLES_MOUNT is not set
+# CONFIG_EXAMPLES_MODBUS is not set
+# CONFIG_EXAMPLES_NETTEST is not set
+# CONFIG_EXAMPLES_NSH is not set
+# CONFIG_EXAMPLES_NULL is not set
+# CONFIG_EXAMPLES_NX is not set
+# CONFIG_EXAMPLES_NXCONSOLE is not set
+# CONFIG_EXAMPLES_NXFFS is not set
+# CONFIG_EXAMPLES_NXFLAT is not set
+# CONFIG_EXAMPLES_NXHELLO is not set
+# CONFIG_EXAMPLES_NXIMAGE is not set
+# CONFIG_EXAMPLES_NXLINES is not set
+# CONFIG_EXAMPLES_NXTEXT is not set
+CONFIG_EXAMPLES_OSTEST=y
+# CONFIG_EXAMPLES_OSTEST_BUILTIN is not set
+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_QENCODER is not set
+# CONFIG_EXAMPLES_RGMP is not set
+# CONFIG_EXAMPLES_ROMFS is not set
+# CONFIG_EXAMPLES_SENDMAIL is not set
+# CONFIG_EXAMPLES_SERLOOP is not set
+# CONFIG_EXAMPLES_TELNETD is not set
+# CONFIG_EXAMPLES_THTTPD is not set
+# CONFIG_EXAMPLES_TIFF is not set
+# CONFIG_EXAMPLES_TOUCHSCREEN is not set
+# CONFIG_EXAMPLES_UDP is not set
+# CONFIG_EXAMPLES_UIP is not set
+# CONFIG_EXAMPLES_USBSERIAL is not set
+# CONFIG_EXAMPLES_USBMSC is not set
+# CONFIG_EXAMPLES_USBTERM is not set
+# CONFIG_EXAMPLES_WATCHDOG is not set
+
+#
+# Interpreters
+#
+
+#
+# Interpreters
+#
+# CONFIG_INTERPRETERS_FICL is not set
+# CONFIG_INTERPRETERS_PCODE is not set
+
+#
+# Network Utilities
+#
+
+#
+# Networking Utilities
+#
+# CONFIG_NETUTILS_CODECS is not set
+# CONFIG_NETUTILS_DHCPC is not set
+# CONFIG_NETUTILS_DHCPD is not set
+# CONFIG_NETUTILS_FTPC is not set
+# CONFIG_NETUTILS_FTPD is not set
+# CONFIG_NETUTILS_JSON is not set
+# CONFIG_NETUTILS_RESOLV is not set
+# CONFIG_NETUTILS_SMTP is not set
+# CONFIG_NETUTILS_TELNETD is not set
+# CONFIG_NETUTILS_TFTPC is not set
+# CONFIG_NETUTILS_THTTPD is not set
+# CONFIG_NETUTILS_UIPLIB is not set
+# CONFIG_NETUTILS_WEBCLIENT is not set
+
+#
+# ModBus
+#
+
+#
+# FreeModbus
+#
+# CONFIG_MODBUS is not set
+
+#
+# NSH Library
+#
+# CONFIG_NSH_LIBRARY is not set
+
+#
+# NxWidgets/NxWM
+#
+
+#
+# System NSH Add-Ons
+#
+
+#
+# Custom Free Memory Command
+#
+# CONFIG_SYSTEM_FREE is not set
+
+#
+# I2C tool
+#
+
+#
+# FLASH Program Installation
+#
+# CONFIG_SYSTEM_INSTALL is not set
+
+#
+# readline()
+#
+# CONFIG_SYSTEM_READLINE is not set
+
+#
+# Power Off
+#
+# CONFIG_SYSTEM_POWEROFF is not set
+
+#
+# RAMTRON
+#
+# CONFIG_SYSTEM_RAMTRON is not set
+
+#
+# SD Card
+#
+# CONFIG_SYSTEM_SDCARD is not set
+
+#
+# Sysinfo
+#
+# CONFIG_SYSTEM_SYSINFO is not set
From 5d6b2017a05d31b6e7bdeab8defa3717fc72be3a Mon Sep 17 00:00:00 2001
From: patacongo
Date: Tue, 1 Jan 2013 16:34:12 +0000
Subject: [PATCH 024/118] All lm3s6965-ek configurations converted to use
kconfig-frontends
git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5471 42af7a65-404d-4744-a932-0658087f49c3
---
apps/examples/nx/Kconfig | 128 +++++++++++++++++++++++++++++++++++++++
1 file changed, 128 insertions(+)
diff --git a/apps/examples/nx/Kconfig b/apps/examples/nx/Kconfig
index 2081b12dc3..f636daf84f 100644
--- a/apps/examples/nx/Kconfig
+++ b/apps/examples/nx/Kconfig
@@ -10,4 +10,132 @@ config EXAMPLES_NX
Enable the NX graphics example
if EXAMPLES_NX
+
+config EXAMPLES_NX_BUILTIN
+ bool "NSH Built-IN"
+ depends on NSH_BUILTIN_APPS
+ ---help---
+ Build the NX example as a "built-in" that can be executed from the
+ NSH command line
+
+config EXAMPLES_NX_VPLANE
+ int "Video Plane"
+ default 0
+ ---help---
+ The plane to select from the framebuffer driver for use in the test.
+ Default: 0
+
+config EXAMPLES_NX_DEVNO
+ int "Video Device Number"
+ default 0
+ ---help---
+ The LCD device to select from the LCD driver for use in the test:
+ Default: 0
+
+config EXAMPLES_NX_DEFAULT_COLORS
+ bool "Use Default Colors"
+ default y
+
+if !EXAMPLES_NX_DEFAULT_COLORS
+
+config EXAMPLES_NX_BGCOLOR
+ hex "Background Color"
+ ---help---
+ The color of the background. Default depends on config EXAMPLES_NX_BPP.
+
+config EXAMPLES_NX_COLOR1
+ hex "Color of Window 1"
+ ---help---
+ The color of window 1. Default depends on config EXAMPLES_NX_BPP.
+
+config EXAMPLES_NX_COLOR2
+ hex "Color of Window 2"
+ ---help---
+ The color of window 2. Default depends on config EXAMPLES_NX_BPP.
+
+config EXAMPLES_NX_TBCOLOR
+ hex "Toolbar Color"
+ ---help---
+ The color of the toolbar. Default depends on config EXAMPLES_NX_BPP.
+
+config EXAMPLES_NX_FONTCOLOR
+ hex "Font Color"
+ ---help---
+ The color of the fonts. Default depends on config EXAMPLES_NX_BPP.
+
+endif
+
+config EXAMPLES_NX_DEFAULT_FONT
+ bool "Use Default Font"
+ default y
+
+config EXAMPLES_NX_FONTID
+ bool "Font ID"
+ depends on !EXAMPLES_NX_DEFAULT_FONT
+ ---help---
+ Selects the font (see font ID numbers in include/nuttx/nx/nxfonts.h)
+
+config EXAMPLES_NX_BPP
+ int "Bits-Per-Pixel"
+ default 32
+ ---help---
+ Pixels per pixel to use. Valid options include 2, 4, 8, 16, 24,
+ and 32. Default is 32.
+
+config EXAMPLES_NX_RAWWINDOWS
+ bool "Use Raw Windows"
+ default n
+ ---help---
+ Use raw windows; Default is to use pretty, framed NXTK windows with
+ toolbars.
+
+config EXAMPLES_NX_EXTERNINIT
+ bool "External Device Initialization"
+ default n
+ ---help---
+ The driver for the graphics device on this platform requires some
+ unusual initialization. This is the for, for example, SPI LCD/OLED
+ devices. If this configuration is selected, then the platform code
+ must provide an LCD initialization function with a prototype like:
+
+ #ifdef CONFIG_NX_LCDDRIVER
+ FAR struct lcd_dev_s *up_nxdrvinit(unsigned int devno);
+ #else
+ FAR struct fb_vtable_s *up_nxdrvinit(unsigned int devno);
+ #endif
+
+if NX_MULTIUSER
+comment "Multi-User Configuration Options"
+
+config EXAMPLES_NX_STACKSIZE
+ int "NX Server Stack Size"
+ default 2048
+ ---help---
+ The stacksize to use when creating the NX server. Default 2048
+
+config EXAMPLES_NX_CLIENTPRIO
+ int "Client Priority"
+ default 100
+ ---help---
+ The client priority. Default: 100
+
+config EXAMPLES_NX_SERVERPRIO
+ int "Server Priority"
+ default 120
+ ---help---
+ The server priority. Default: 120
+
+config EXAMPLES_NX_LISTENERPRIO
+ int "Listener Priority"
+ default 80
+ ---help---
+ The priority of the event listener thread. Default 80.
+
+config EXAMPLES_NX_NOTIFYSIGNO
+ int "Notify Signal Number"
+ default 4
+ ---help---
+ The signal number to use with nx_eventnotify(). Default: 4
+
+endif
endif
From d0d3328d9cec65a161330c29aa318d1a3ded63e3 Mon Sep 17 00:00:00 2001
From: patacongo
Date: Wed, 2 Jan 2013 14:02:07 +0000
Subject: [PATCH 025/118] Misc fixes for LM3S kconfig-frontends build
git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5472 42af7a65-404d-4744-a932-0658087f49c3
---
misc/buildroot/configs/cortexm3-defconfig-4.3.3 | 7 +++++++
nuttx/ChangeLog | 5 ++++-
nuttx/arch/arm/src/arm/Kconfig | 7 +++++++
nuttx/arch/arm/src/arm/Toolchain.defs | 5 +++++
nuttx/arch/arm/src/armv7-m/Kconfig | 8 ++++++++
nuttx/arch/arm/src/armv7-m/Toolchain.defs | 11 ++++++-----
nuttx/configs/Kconfig | 2 +-
nuttx/configs/lm3s6965-ek/nsh/defconfig | 7 ++++++-
nuttx/configs/lm3s6965-ek/nx/defconfig | 1 +
nuttx/configs/lm3s6965-ek/ostest/defconfig | 1 +
nuttx/drivers/Kconfig | 3 ++-
nuttx/drivers/mmcsd/Kconfig | 3 ++-
12 files changed, 50 insertions(+), 10 deletions(-)
diff --git a/misc/buildroot/configs/cortexm3-defconfig-4.3.3 b/misc/buildroot/configs/cortexm3-defconfig-4.3.3
index 664000a168..a3371531be 100644
--- a/misc/buildroot/configs/cortexm3-defconfig-4.3.3
+++ b/misc/buildroot/configs/cortexm3-defconfig-4.3.3
@@ -14,6 +14,7 @@ BR2_arm=y
# BR2_m68k is not set
# BR2_m68hc11 is not set
# BR2_m68hc12 is not set
+# BR2_m9s12x is not set
# BR2_mips is not set
# BR2_mipsel is not set
# BR2_nios2 is not set
@@ -71,8 +72,11 @@ BR2_GNU_TARGET_SUFFIX="nuttx-elf"
# Binutils Options
#
# BR2_BINUTILS_VERSION_2_17 is not set
+# BR2_BINUTILS_VERSION_2_18 is not set
# BR2_BINUTILS_VERSION_2_19 is not set
BR2_BINUTILS_VERSION_2_19_1=y
+# BR2_BINUTILS_VERSION_2_21_1 is not set
+# BR2_BINUTILS_VERSION_2_22 is not set
BR2_BINUTILS_VERSION="2.19.1"
BR2_EXTRA_BINUTILS_CONFIG_OPTIONS=""
@@ -80,9 +84,12 @@ BR2_EXTRA_BINUTILS_CONFIG_OPTIONS=""
# GCC Options
#
BR2_PACKAGE_GCC=y
+# BR2_GCC_VERSION_3_3_6 is not set
# BR2_GCC_VERSION_3_4_6 is not set
# BR2_GCC_VERSION_4_2_4 is not set
BR2_GCC_VERSION_4_3_3=y
+# BR2_GCC_VERSION_4_5_2 is not set
+# BR2_GCC_VERSION_4_6_3 is not set
BR2_GCC_SUPPORTS_SYSROOT=y
BR2_GCC_VERSION="4.3.3"
# BR2_GCC_USE_SJLJ_EXCEPTIONS is not set
diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog
index 7f2bda4579..ee43a897e5 100644
--- a/nuttx/ChangeLog
+++ b/nuttx/ChangeLog
@@ -3851,4 +3851,7 @@
Updates and correctinos for the UG-2864HSWEG01 from Darcy Gong.
* configs/lm326965-ek: All configurations converted to use the
kconfig-frontends configuration tool.
-
+ * configs/Kconfig: NSH_MMCSDSPIPORTNO should depend on MMCSD_SPI,
+ not just SPI (from Jose Pablo Carballo).
+ * arch/arm/src/arm/Kconfig and armv7m/Kconfig: Add an option for
+ buildroot toolchains: They may be EABI or OABI.
diff --git a/nuttx/arch/arm/src/arm/Kconfig b/nuttx/arch/arm/src/arm/Kconfig
index 0d08d89a8e..665fab5758 100644
--- a/nuttx/arch/arm/src/arm/Kconfig
+++ b/nuttx/arch/arm/src/arm/Kconfig
@@ -33,3 +33,10 @@ config ARM_TOOLCHAIN_GNU_EABI
configured for arm-none-eabi.
endchoice
+
+config ARM_OABI_TOOLCHAIN
+ bool "OABI (vs EABI)"
+ default y
+ depends on ARM_TOOLCHAIN_BUILDROOT
+ ---help---
+ Most of the older buildroot toolchains are OABI and are named arm-nuttx-elf- vs. arm-nuttx-eabi-
diff --git a/nuttx/arch/arm/src/arm/Toolchain.defs b/nuttx/arch/arm/src/arm/Toolchain.defs
index defe30b51b..ea11c4dc90 100644
--- a/nuttx/arch/arm/src/arm/Toolchain.defs
+++ b/nuttx/arch/arm/src/arm/Toolchain.defs
@@ -102,8 +102,13 @@ endif
# NuttX buildroot under Linux or Cygwin
ifeq ($(CONFIG_ARM_TOOLCHAIN),BUILDROOT)
+ifeq ($(CONFIG_ARMV_OABI_TOOLCHAIN),y)
CROSSDEV = arm-nuttx-elf-
ARCROSSDEV = arm-nuttx-elf-
+else
+ CROSSDEV = arm-nuttx-eabi-
+ ARCROSSDEV = arm-nuttx-eabi-
+endif
MAXOPTIMIZATION = -Os
endif
diff --git a/nuttx/arch/arm/src/armv7-m/Kconfig b/nuttx/arch/arm/src/armv7-m/Kconfig
index dc5aa39153..a154a4c5c4 100644
--- a/nuttx/arch/arm/src/armv7-m/Kconfig
+++ b/nuttx/arch/arm/src/armv7-m/Kconfig
@@ -49,3 +49,11 @@ config ARMV7M_TOOLCHAIN_RAISONANCE
depends on HOST_WINDOWS
endchoice
+
+config ARMV7M_OABI_TOOLCHAIN
+ bool "OABI (vs EABI)"
+ default y
+ depends on ARMV7M_TOOLCHAIN_BUILDROOT
+ ---help---
+ Most of the older buildroot toolchains are OABI and are named arm-nuttx-elf- vs. arm-nuttx-eabi-
+
diff --git a/nuttx/arch/arm/src/armv7-m/Toolchain.defs b/nuttx/arch/arm/src/armv7-m/Toolchain.defs
index e214ce8bd0..d7f2ed77f1 100644
--- a/nuttx/arch/arm/src/armv7-m/Toolchain.defs
+++ b/nuttx/arch/arm/src/armv7-m/Toolchain.defs
@@ -160,14 +160,15 @@ endif
# NuttX buildroot under Linux or Cygwin
ifeq ($(CONFIG_ARMV7M_TOOLCHAIN),BUILDROOT)
- # OABI
- # CROSSDEV = arm-nuttx-elf-
- # ARCROSSDEV = arm-nuttx-elf-
- # ARCHCPUFLAGS = -mtune=cortex-m3 -march=armv7-m -mfloat-abi=soft
- # EABI
+ifeq ($(CONFIG_ARMV7M_OABI_TOOLCHAIN),y)
+ CROSSDEV = arm-nuttx-elf-
+ ARCROSSDEV = arm-nuttx-elf-
+ ARCHCPUFLAGS = -mtune=cortex-m3 -march=armv7-m -mfloat-abi=soft
+else
CROSSDEV = arm-nuttx-eabi-
ARCROSSDEV = arm-nuttx-eabi-
ARCHCPUFLAGS = -mcpu=cortex-m3 -mthumb -mfloat-abi=soft
+endif
MAXOPTIMIZATION = -Os
endif
diff --git a/nuttx/configs/Kconfig b/nuttx/configs/Kconfig
index cda5aa7bcd..d851eeccb1 100644
--- a/nuttx/configs/Kconfig
+++ b/nuttx/configs/Kconfig
@@ -761,7 +761,7 @@ config NSH_MMCSDSLOTNO
config NSH_MMCSDSPIPORTNO
int "MMC/SD SPI device number"
default 0
- depends on NSH_LIBRARY && MMCSD && SPI
+ depends on NSH_LIBRARY && MMCSD && MMCSD_SPI
---help---
If board-specif NSH start-up logic will mount an SPI-based MMC/SD volume, then this setting may be needed to tell the board logic which SPI bus to use. Default: 0 (meaning is board-specific).
diff --git a/nuttx/configs/lm3s6965-ek/nsh/defconfig b/nuttx/configs/lm3s6965-ek/nsh/defconfig
index 84651012d6..1213797a77 100755
--- a/nuttx/configs/lm3s6965-ek/nsh/defconfig
+++ b/nuttx/configs/lm3s6965-ek/nsh/defconfig
@@ -89,6 +89,7 @@ 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
#
# LM3S Configuration Options
@@ -189,6 +190,7 @@ CONFIG_ARCH_HAVE_LEDS=y
CONFIG_ARCH_LEDS=y
CONFIG_NSH_MMCSDMINOR=0
CONFIG_NSH_MMCSDSLOTNO=0
+CONFIG_NSH_MMCSDSPIPORTNO=0
#
# Board-Specific Options
@@ -259,7 +261,10 @@ CONFIG_DEV_NULL=y
# CONFIG_CAN is not set
# CONFIG_PWM is not set
# CONFIG_I2C is not set
-# CONFIG_SPI is not set
+CONFIG_SPI=y
+# CONFIG_SPI_OWNBUS is not set
+CONFIG_SPI_EXCHANGE=y
+# CONFIG_SPI_CMDDATA is not set
# CONFIG_RTC is not set
# CONFIG_WATCHDOG is not set
# CONFIG_ANALOG is not set
diff --git a/nuttx/configs/lm3s6965-ek/nx/defconfig b/nuttx/configs/lm3s6965-ek/nx/defconfig
index 5fb666e65b..7fca4d7357 100755
--- a/nuttx/configs/lm3s6965-ek/nx/defconfig
+++ b/nuttx/configs/lm3s6965-ek/nx/defconfig
@@ -89,6 +89,7 @@ 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
#
# LM3S Configuration Options
diff --git a/nuttx/configs/lm3s6965-ek/ostest/defconfig b/nuttx/configs/lm3s6965-ek/ostest/defconfig
index d1168ad45a..abfdcc251f 100755
--- a/nuttx/configs/lm3s6965-ek/ostest/defconfig
+++ b/nuttx/configs/lm3s6965-ek/ostest/defconfig
@@ -89,6 +89,7 @@ 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
#
# LM3S Configuration Options
diff --git a/nuttx/drivers/Kconfig b/nuttx/drivers/Kconfig
index 8302d21b71..3ced01b587 100644
--- a/nuttx/drivers/Kconfig
+++ b/nuttx/drivers/Kconfig
@@ -140,7 +140,8 @@ menuconfig SPI
bool "SPI Driver Support"
default n
---help---
- This selection enables building of the "upper-half" SPI driver.
+ This selection enables selection of common SPI options. This option
+ should be enabled by all platforms that support SPI interfaces.
See include/nuttx/spi.h for further SPI driver information.
if SPI
diff --git a/nuttx/drivers/mmcsd/Kconfig b/nuttx/drivers/mmcsd/Kconfig
index f3a64be6ce..5cdc23bcf8 100644
--- a/nuttx/drivers/mmcsd/Kconfig
+++ b/nuttx/drivers/mmcsd/Kconfig
@@ -39,8 +39,9 @@ config MMCSD_HAVECARDDETECT
100% accurate
config MMCSD_SPI
- bool "MMC/SD spi transfer support"
+ bool "MMC/SD SPI transfer support"
default y
+ depends on SPI
config MMCSD_SPICLOCK
int "MMC/SD maximum SPI clock"
From 8d75785fad6f77f796655167bb9087266df2a117 Mon Sep 17 00:00:00 2001
From: patacongo
Date: Thu, 3 Jan 2013 13:39:16 +0000
Subject: [PATCH 026/118] STM32 FLASH changes from Freddie Chopin
git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5473 42af7a65-404d-4744-a932-0658087f49c3
---
nuttx/ChangeLog | 3 +
nuttx/README.txt | 110 +++++++++++++++++++++++++
nuttx/arch/arm/src/stm32/stm32_flash.c | 37 +++++----
nuttx/include/nuttx/progmem.h | 4 +-
4 files changed, 138 insertions(+), 16 deletions(-)
diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog
index ee43a897e5..0c7a4dcbf5 100644
--- a/nuttx/ChangeLog
+++ b/nuttx/ChangeLog
@@ -3855,3 +3855,6 @@
not just SPI (from Jose Pablo Carballo).
* arch/arm/src/arm/Kconfig and armv7m/Kconfig: Add an option for
buildroot toolchains: They may be EABI or OABI.
+ * include/nuttx/progmem and arch/arm/src/stm32/stm32_flash.c:
+ Fix a counting bug plus change interface to use either relative
+ or absolut FLASH addressing (from Freddie Chopin).
diff --git a/nuttx/README.txt b/nuttx/README.txt
index dc3c9fb673..c00f086a11 100644
--- a/nuttx/README.txt
+++ b/nuttx/README.txt
@@ -10,6 +10,8 @@ README
o Configuring NuttX
- Instantiating "Canned" Configurations
- NuttX Configuration Tool
+ - Incompatibilities with Older Configurations
+ - Converting Older Configurations to use the Configuration Tool
- NuttX Configuration Tool under DOS
o Toolchains
- Cross-Development Toolchains
@@ -292,6 +294,114 @@ NuttX Configuration Tool
install 'mconf', make certain that your PATH variable includes
a path to that installation directory.
+ The basic configuration order is "bottom-up":
+
+ - Select the build environment,
+ - Select the processor,
+ - Select the board,
+ - Select the supported peripherals
+ - Configure the device drivers,
+ - Configure the application options on top of this.
+
+ This is pretty straight forward for creating new configurations
+ but may be less intuitive for modifying existing configurations.
+
+Incompatibilities with Older Configurations
+-------------------------------------------
+
+ ***** WARNING *****
+
+ The old legacy, manual configurations and the new kconfig-frontends
+ configurations are not 100% compatible. Old legacy configurations
+ can *not* be used with the kconfig-frontends tool: If you run
+ 'make menuconfig' with a legacy configuration the resulting
+ configuration will probably not be functional.
+
+ Q: How can I tell if a configuration is a new kconfig-frontends
+ configuration or an older, manual configuration?
+
+ A: a) New kcondfig-frontends configurations will have this setting
+ within the defconfig/.config file":
+
+ CONFIG_NUTTX_NEWCONFIG=y
+
+ b) Only old, manual configurations will have an appconfig file
+
+Converting Older Configurations to use the Configuration Tool
+-------------------------------------------------------------
+
+ Q: How can I convert a older, manual configuration into a new,
+ kconfig-frontends toolchain.
+
+ A: 1) Look at the appconfig file: Each application path there
+ will now have to have an enabling setting. For example,
+ if the old appconfig file had:
+
+ CONFIGURED_APPS = examples/ostest
+
+ Then the new configuration will need:
+
+ CONFIG_EXAMPLES_OSTEST=y
+
+ The appconfig file can then be deleted because it will not
+ be needed after the conversion.
+
+ 2) Build the cmpconfig utility at tools:
+
+ cd tools
+ make -f Makefile.host cmpconfig
+
+ 3) Perform these steps repeatedly until you are convinced that
+ the configurations are the same:
+
+ a) Repeat the following until you have account for all of the differences:
+
+ cp configs///defconfig .config
+ make menuconfig (Just exit and save the new .config file)
+ tools/cmpconfig configs///defconfig .config | grep file1
+
+ The final grep will show settings in the old defconfig file that
+ do not appear in the new .config file (or have a different value
+ in the new .config file). In the new configuration, you will
+ probably have to enable certain groups of features. Such
+ hierarachical enabling options were not part of the older
+ configuration.
+
+ b) Then make sure these all make sense:
+
+ tools/cmpconfig configs///defconfig .config | grep file2
+
+ The final grep will show settings in the new .config file that
+ do not appear in the older defconfig file (or have a different value
+ in the new .config file). Here you should see only the new
+ hierarachical enabling options (such as CONFIG_SPI or CONFIG_MMCSD)
+ plus some other internal configuration settings (like CONFIG_ARCH_HAVE_UART0).
+ You will have to convince yourself that these new settings all make sense.
+
+ 4) Finally, update the configuration:
+
+ cp .config configs///defconfig
+ rm configs///appconfig
+
+ NOTE: You should comment out the line containing the CONFIG_APPS_DIR
+ in the new defconfig file. Why? Because the application directory
+ may reside at a different location when the configuration is installed
+ at some later time.
+
+ # CONFIG_APPS_DIR="../apps"
+
+ 5) The updated configuration can then be instantiated in the normal
+ fashion:
+
+ cd tools
+ ./configure.sh /
+
+ NOTE: If CONFIG_APPS_DIR is not defined in the defconfig file,
+ the configure.sh script will find and add the new, correct path to
+ the application directory (CONFIG_APPS_DIR) when it copies the
+ defconfig file to the .config file. This is the setting that was
+ commented out in step 4.
+
NuttX Configuration Tool under DOS
----------------------------------
diff --git a/nuttx/arch/arm/src/stm32/stm32_flash.c b/nuttx/arch/arm/src/stm32/stm32_flash.c
index 83fcc6172e..20b0cfe103 100644
--- a/nuttx/arch/arm/src/stm32/stm32_flash.c
+++ b/nuttx/arch/arm/src/stm32/stm32_flash.c
@@ -35,7 +35,7 @@
/* Provides standard flash access functions, to be used by the flash mtd driver.
* The interface is defined in the include/nuttx/progmem.h
- *
+ *
* Requirements during write/erase operations on FLASH:
* - HSI must be ON.
* - Low Power Modes are not permitted during write/erase
@@ -80,7 +80,7 @@ void stm32_flash_unlock(void)
if (getreg32(STM32_FLASH_CR) & FLASH_CR_LOCK)
{
/* Unlock sequence */
-
+
putreg32(FLASH_KEY1, STM32_FLASH_KEYR);
putreg32(FLASH_KEY2, STM32_FLASH_KEYR);
}
@@ -112,6 +112,11 @@ uint16_t up_progmem_pagesize(uint16_t page)
int up_progmem_getpage(uint32_t addr)
{
+ if (addr >= STM32_FLASH_BASE)
+ {
+ addr -= STM32_FLASH_BASE;
+ }
+
if (addr >= STM32_FLASH_SIZE)
{
return -EFAULT;
@@ -131,14 +136,14 @@ int up_progmem_erasepage(uint16_t page)
}
/* Get flash ready and begin erasing single page */
-
+
if (!(getreg32(STM32_RCC_CR) & RCC_CR_HSION))
{
return -EPERM;
}
-
+
stm32_flash_unlock();
-
+
modifyreg32(STM32_FLASH_CR, 0, FLASH_CR_PER);
putreg32(page * STM32_FLASH_PAGESIZE, STM32_FLASH_AR);
modifyreg32(STM32_FLASH_CR, 0, FLASH_CR_STRT);
@@ -146,10 +151,10 @@ int up_progmem_erasepage(uint16_t page)
while(getreg32(STM32_FLASH_SR) & FLASH_SR_BSY) up_waste();
modifyreg32(STM32_FLASH_CR, FLASH_CR_PER, 0);
-
+
/* Verify */
-
- for (addr = page * STM32_FLASH_PAGESIZE + STM32_FLASH_BASE, count = STM32_FLASH_PAGESIZE;
+
+ for (addr = page * STM32_FLASH_PAGESIZE + STM32_FLASH_BASE, count = STM32_FLASH_PAGESIZE;
count; count-=4, addr += 4)
{
if (getreg32(addr) != 0xffffffff)
@@ -173,8 +178,8 @@ int up_progmem_ispageerased(uint16_t page)
}
/* Verify */
-
- for (addr = page * STM32_FLASH_PAGESIZE + STM32_FLASH_BASE, count = STM32_FLASH_PAGESIZE;
+
+ for (addr = page * STM32_FLASH_PAGESIZE + STM32_FLASH_BASE, count = STM32_FLASH_PAGESIZE;
count; count--, addr++)
{
if (getreg8(addr) != 0xff)
@@ -200,6 +205,11 @@ int up_progmem_write(uint32_t addr, const void *buf, size_t count)
/* Check for valid address range */
+ if (addr >= STM32_FLASH_BASE)
+ {
+ addr -= STM32_FLASH_BASE;
+ }
+
if ((addr+count) >= STM32_FLASH_SIZE)
{
return -EFAULT;
@@ -213,10 +223,10 @@ int up_progmem_write(uint32_t addr, const void *buf, size_t count)
}
stm32_flash_unlock();
-
+
modifyreg32(STM32_FLASH_CR, 0, FLASH_CR_PG);
-
- for (addr += STM32_FLASH_BASE; count; count--, hword++, addr+=2)
+
+ for (addr += STM32_FLASH_BASE; count; count-=2, hword++, addr+=2)
{
/* Write half-word and wait to complete */
@@ -237,7 +247,6 @@ int up_progmem_write(uint32_t addr, const void *buf, size_t count)
modifyreg32(STM32_FLASH_CR, FLASH_CR_PG, 0);
return -EIO;
}
-
}
modifyreg32(STM32_FLASH_CR, FLASH_CR_PG, 0);
diff --git a/nuttx/include/nuttx/progmem.h b/nuttx/include/nuttx/progmem.h
index ac5a659407..2da59eab1c 100644
--- a/nuttx/include/nuttx/progmem.h
+++ b/nuttx/include/nuttx/progmem.h
@@ -99,7 +99,7 @@ uint16_t up_progmem_pagesize(uint16_t page);
* Address to page conversion
*
* Input Parameters:
- * addr - Address without flash offet (aligned to page0)
+ * addr - Address with of without flash offset (absolute or aligned to page0)
*
* Returned Value:
* Page or negative value on error. The following errors are reported
@@ -165,7 +165,7 @@ int up_progmem_ispageerased(uint16_t page);
* the address be aligned inside the page boundaries.
*
* Input Parameters:
- * addr - Address without flash offet (aligned to page0)
+ * addr - Address with or without flash offset (absolute or aligned to page0)
* buf - Pointer to buffer
* count - Number of bytes to write *
*
From 60bd93728b779608fb0733822b7de55308ab738b Mon Sep 17 00:00:00 2001
From: patacongo
Date: Thu, 3 Jan 2013 15:45:57 +0000
Subject: [PATCH 027/118] Fix bad conditional in nuttx/libc/misc/Make.defs
git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5474 42af7a65-404d-4744-a932-0658087f49c3
---
nuttx/ChangeLog | 2 ++
nuttx/libc/misc/Make.defs | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog
index 0c7a4dcbf5..bc698f6ad4 100644
--- a/nuttx/ChangeLog
+++ b/nuttx/ChangeLog
@@ -3858,3 +3858,5 @@
* include/nuttx/progmem and arch/arm/src/stm32/stm32_flash.c:
Fix a counting bug plus change interface to use either relative
or absolut FLASH addressing (from Freddie Chopin).
+ * libc/misc/Make.defs: Fix error in conditional for KBD CODEC.
+
diff --git a/nuttx/libc/misc/Make.defs b/nuttx/libc/misc/Make.defs
index ad0313346b..0d3c87d9d9 100644
--- a/nuttx/libc/misc/Make.defs
+++ b/nuttx/libc/misc/Make.defs
@@ -65,7 +65,7 @@ CSRCS += lib_dbg.c lib_dumpbuffer.c
# Keyboard driver encoder/decoder
-ifneq ($(CONFIG_LIB_KBDCODEC),0)
+ifeq ($(CONFIG_LIB_KBDCODEC),y)
CSRCS += lib_kbdencode.c lib_kbddecode.c
endif
From 19752b4453e78c844b9ca348992100b594c3eaa1 Mon Sep 17 00:00:00 2001
From: patacongo
Date: Thu, 3 Jan 2013 16:18:44 +0000
Subject: [PATCH 028/118] The default should be CONFIG_LIB_KBDCODEC=n
git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5475 42af7a65-404d-4744-a932-0658087f49c3
---
nuttx/ChangeLog | 2 ++
nuttx/configs/lm3s6965-ek/nsh/defconfig | 2 +-
nuttx/configs/lm3s6965-ek/nx/defconfig | 2 +-
nuttx/configs/lm3s6965-ek/ostest/defconfig | 2 +-
nuttx/configs/mcu123-lpc214x/nsh/defconfig | 2 +-
nuttx/configs/sim/nxlines/defconfig | 2 +-
nuttx/configs/zp214xpa/nsh/defconfig | 2 +-
nuttx/configs/zp214xpa/nxlines/defconfig | 2 +-
nuttx/libc/Kconfig | 2 +-
9 files changed, 10 insertions(+), 8 deletions(-)
diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog
index bc698f6ad4..2762faf665 100644
--- a/nuttx/ChangeLog
+++ b/nuttx/ChangeLog
@@ -3859,4 +3859,6 @@
Fix a counting bug plus change interface to use either relative
or absolut FLASH addressing (from Freddie Chopin).
* libc/misc/Make.defs: Fix error in conditional for KBD CODEC.
+ * libc/Kconfig and configs/*/defconfig (several): The default
+ setting should be CONFIG_LIB_KBDCODEC=n
diff --git a/nuttx/configs/lm3s6965-ek/nsh/defconfig b/nuttx/configs/lm3s6965-ek/nsh/defconfig
index 1213797a77..64f4397cb5 100755
--- a/nuttx/configs/lm3s6965-ek/nsh/defconfig
+++ b/nuttx/configs/lm3s6965-ek/nsh/defconfig
@@ -424,7 +424,7 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512
#
# Non-standard Helper Functions
#
-CONFIG_LIB_KBDCODEC=y
+# CONFIG_LIB_KBDCODEC is not set
#
# Basic CXX Support
diff --git a/nuttx/configs/lm3s6965-ek/nx/defconfig b/nuttx/configs/lm3s6965-ek/nx/defconfig
index 7fca4d7357..be75c28755 100755
--- a/nuttx/configs/lm3s6965-ek/nx/defconfig
+++ b/nuttx/configs/lm3s6965-ek/nx/defconfig
@@ -431,7 +431,7 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512
#
# Non-standard Helper Functions
#
-CONFIG_LIB_KBDCODEC=y
+# CONFIG_LIB_KBDCODEC is not set
#
# Basic CXX Support
diff --git a/nuttx/configs/lm3s6965-ek/ostest/defconfig b/nuttx/configs/lm3s6965-ek/ostest/defconfig
index abfdcc251f..83e89a6ae7 100755
--- a/nuttx/configs/lm3s6965-ek/ostest/defconfig
+++ b/nuttx/configs/lm3s6965-ek/ostest/defconfig
@@ -363,7 +363,7 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512
#
# Non-standard Helper Functions
#
-CONFIG_LIB_KBDCODEC=y
+# CONFIG_LIB_KBDCODEC is not set
#
# Basic CXX Support
diff --git a/nuttx/configs/mcu123-lpc214x/nsh/defconfig b/nuttx/configs/mcu123-lpc214x/nsh/defconfig
index 6ae163386a..e065ef3fb2 100644
--- a/nuttx/configs/mcu123-lpc214x/nsh/defconfig
+++ b/nuttx/configs/mcu123-lpc214x/nsh/defconfig
@@ -381,7 +381,7 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512
#
# Non-standard Helper Functions
#
-CONFIG_LIB_KBDCODEC=y
+# CONFIG_LIB_KBDCODEC is not set
#
# Basic CXX Support
diff --git a/nuttx/configs/sim/nxlines/defconfig b/nuttx/configs/sim/nxlines/defconfig
index c023af6743..c798b175fd 100644
--- a/nuttx/configs/sim/nxlines/defconfig
+++ b/nuttx/configs/sim/nxlines/defconfig
@@ -347,7 +347,7 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512
#
# Non-standard Helper Functions
#
-CONFIG_LIB_KBDCODEC=y
+# CONFIG_LIB_KBDCODEC is not set
#
# Basic CXX Support
diff --git a/nuttx/configs/zp214xpa/nsh/defconfig b/nuttx/configs/zp214xpa/nsh/defconfig
index 7c7d9d06cf..7f8ddc19b9 100644
--- a/nuttx/configs/zp214xpa/nsh/defconfig
+++ b/nuttx/configs/zp214xpa/nsh/defconfig
@@ -358,7 +358,7 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512
#
# Non-standard Helper Functions
#
-CONFIG_LIB_KBDCODEC=y
+# CONFIG_LIB_KBDCODEC is not set
#
# Basic CXX Support
diff --git a/nuttx/configs/zp214xpa/nxlines/defconfig b/nuttx/configs/zp214xpa/nxlines/defconfig
index 03a6bf72cd..209b4a5e4f 100644
--- a/nuttx/configs/zp214xpa/nxlines/defconfig
+++ b/nuttx/configs/zp214xpa/nxlines/defconfig
@@ -433,7 +433,7 @@ CONFIG_LIB_SENDFILE_BUFSIZE=512
#
# Non-standard Helper Functions
#
-CONFIG_LIB_KBDCODEC=y
+# CONFIG_LIB_KBDCODEC is not set
#
# Basic CXX Support
diff --git a/nuttx/libc/Kconfig b/nuttx/libc/Kconfig
index a5ff7fd438..0ae56ac57e 100644
--- a/nuttx/libc/Kconfig
+++ b/nuttx/libc/Kconfig
@@ -280,7 +280,7 @@ comment "Non-standard Helper Functions"
config LIB_KBDCODEC
bool "Keyboard CODEC"
- default y
+ default n
---help---
In NuttX, a keyboard/keypad driver is simply a character driver that
may have an (optional) encoding/decoding layer on the data returned
From c504d9e32ec45736356b68afd878705a46d8791e Mon Sep 17 00:00:00 2001
From: patacongo
Date: Fri, 4 Jan 2013 16:00:38 +0000
Subject: [PATCH 029/118] Renaming some files in tools/
git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5476 42af7a65-404d-4744-a932-0658087f49c3
---
nuttx/README.txt | 9 +-
nuttx/TODO | 84 ++++++----
nuttx/tools/Makefile.host | 22 ++-
nuttx/tools/README.txt | 4 +-
nuttx/tools/cfgdefine.c | 322 ++++++++++++++++++++++++++++++++++++++
nuttx/tools/cfgdefine.h | 64 ++++++++
nuttx/tools/mkconfig.c | 4 +-
nuttx/tools/mkversion.c | 4 +-
8 files changed, 469 insertions(+), 44 deletions(-)
create mode 100644 nuttx/tools/cfgdefine.c
create mode 100644 nuttx/tools/cfgdefine.h
diff --git a/nuttx/README.txt b/nuttx/README.txt
index c00f086a11..bfd057351a 100644
--- a/nuttx/README.txt
+++ b/nuttx/README.txt
@@ -41,6 +41,10 @@ Installing Cygwin
tiny setup.exe program and it does the real, internet installation
for you.
+ NOTE: NuttX can also be installed and built on a native Windows
+ system, but with some loss of tool functionality (see the
+ discussion "Native Windows Build" below).
+
Some Cygwin installation tips:
1. Install at C:\cygwin
@@ -61,8 +65,9 @@ Installing Cygwin
After installing Cygwin, you will get lots of links for installed
tools and shells. I use the RXVT native shell. It is fast and reliable
and does not require you to run the Cygwin X server (which is neither
- fast nor reliable). The rest of these instructions assume that you
- are at a bash command line prompt in either Linux or in Cygwin shell.
+ fast nor reliable). Unless otherwise noted, the rest of these
+ instructions assume that you are at a bash command line prompt in
+ either Linux or in Cygwin shell.
Download and Unpack
-------------------
diff --git a/nuttx/TODO b/nuttx/TODO
index 6162431dc9..d37231e1d5 100644
--- a/nuttx/TODO
+++ b/nuttx/TODO
@@ -6,8 +6,7 @@ standards, things that could be improved, and ideas for enhancements.
nuttx/
- (6) Task/Scheduler (sched/)
- (1) On-demand paging (sched/)
+ (10) Task/Scheduler (sched/)
(1) Memory Managment (mm/)
(2) Signals (sched/, arch/)
(2) pthreads (sched/)
@@ -56,14 +55,9 @@ o Task/Scheduler (sched/)
Title: CHILD PTHREAD TERMINATION
Description: When a tasks exits, shouldn't all of its child pthreads also be
terminated?
- Status: Open
+ Status: Closed. No, this behavior will not be implemented.
Priority: Medium, required for good emulation of process/pthread model.
- Title: MMAN.H
- Description: Implement sys/mman.h and functions
- Status: Open
- Priority: Low
-
Title: WAIT.H
Description: Implement sys/wait.h and functions. Consider implementing wait,
waitpid, waitid. At present, a parent has no information about
@@ -72,14 +66,16 @@ o Task/Scheduler (sched/)
Update: A simple but usable version of waitpid() has been included.
This version is not compliant with all specifications and can be
enabled with CONFIG_SCHED_WAITPID.
- Status: Open
+ Status: Open, however no further work is planned.
Priority: Low
Title: MISSING ERRNO SETTINGS
Description: Several APIs do not set errno. Need to review all APIs.
Update: These are being fixed as they are encountered. There is
no accounting of how many interfaces have this problem.
- Status: Open
+ Status: Open? There has been an effort over the past few years to assure
+ that all errno settings are in place. What is the current state?
+ Unknown.
Priority: Medium, required for standard compliance (but makes the
code bigger)
@@ -107,18 +103,29 @@ o Task/Scheduler (sched/)
3) sched_process_timeslice(). Then there is round-robin time-slicing.
- Status: Open
+ The primary advantage of a tickless OS is that is would allow for
+ reduce power consumptions. That is because timer interrupts will
+ usually awaken CPUs from reduced power consumption states.
+ Status: Open. There will probably be no tickless OS implementation unless
+ someone gets motivated and drives the change.
Priority: Low
Title: posix_spawn()
Description: This would be a good interface to add to NuttX. It is really
just a re-packaging of the existing, non-standard NuttX exec()
function.
- Status: Open
+ Status: Open. There are no plans to implement this capabilitiey now.
Priority: Medium low.
-o On-demand paging (sched/)
- ^^^^^^^^^^^^^^^^^^^^^^^^^
+ Title: pause() NON-COMPLIANCE
+ Description: In the POSIX description of this function is the pause() function
+ will suspend the calling thread until delivery of a signal whose
+ action is either to execute a signal-catching function or to
+ terminate the process. The current implementation only waits for
+ any non-blocked signal to be received. It should only wake up if
+ the signal is delivered to a handler.
+ Status: Open.
+ Priority: Medium Low.
Title: ON-DEMAND PAGE INCOMPLETE
Description: On-demand paging has recently been incorporated into the RTOS.
@@ -130,19 +137,16 @@ o On-demand paging (sched/)
configs/ea3131/pgnsh and locked directories). There are
some limitations of this testing so I still cannot say that
the feature is fully functional.
- Status: Open
+ Status: Open. This has been put on the shelf for some time.
Priority: Medium-Low
-o Other core OS logic
- ^^^^^^^^^^^^^^^^^^^
-
Title: GET_ENVIRON_PTR()
Description: get_environ_ptr() (sched/sched_getenvironptr.c) is not implemented.
The representation of the the environment strings selected for
NutX is not compatible with the operation. Some significant
re-design would be required to implement this funcion and that
effort is thought to be not worth the result.
- Status: Open
+ Status: Open. No change is planned.
Priority: Low -- There is no plan to implement this.
Title: TIMER_GETOVERRUN()
@@ -150,6 +154,23 @@ o Other core OS logic
Status: Open
Priority: Low -- There is no plan to implement this.
+ Title: USER-SPACE WORK QUEUES
+ Description: There has been some use of work queues that has crept into some
+ user code. I am thinking of NxWidgets::CNxTimer. That timer
+ logic was originally implemented (correctly) using POSIX timers,
+ but was re-implemented using timed work.
+
+ The issue is that NxWidgets::CNxTimer is a user-space application
+ but the work queues are an OS internal feature. This will be a
+ problem for KERNEL builds. Hooks and definitions have been added
+ in include/nuttx/wqueue.h to support a user-space work queue, but
+ the corresponding logic has not been implemented.
+
+ The work queue logic will need to be moved from sched/ to libc/wqueue/
+ Status: Open. No work will probably be done until a functional KERNEL build
+ that includes NxWisges::CNxTimer is needed.
+ Priority: Medium Low for now
+
o Memory Managment (mm/)
^^^^^^^^^^^^^^^^^^^^^^
@@ -212,7 +233,7 @@ o Memory Managment (mm/)
be required to keep this memory on the correct list (or on
no list at all).
- Status: Open
+ Status: Open. No changes are planned.
Priority: Medium/Low, a good feature to prevent memory leaks but would
have negative impact on memory usage and code size.
@@ -222,7 +243,7 @@ o Signals (sched/, arch/)
Title: STANDARD SIGNALS
Description: 'Standard' signals and signal actions are not supported.
(e.g., SIGINT, SIGCHLD, SIGSEGV, etc).
- Status: Open
+ Status: Open. No changes are planned.
Priority: Low, required by standards but not so critical for an
embedded system.
@@ -240,11 +261,11 @@ o pthreads (sched/)
Title: CANCELLATION POINTS
Description: pthread_cancel(): Should implement cancellation points and
pthread_testcancel()
- Status: Open
+ Status: Open. No changes are planned.
Priority: Low, probably not that useful
Title: PTHREAD_PRIO_PROTECT
- Description: Extended pthread_mutexattr_setprotocol() suport PTHREAD_PRIO_PROTECT:
+ Description: Extended pthread_mutexattr_setprotocol() suport PTHREAD_PRIO_PROTECT:
"When a thread owns one or more mutexes initialized with the
PTHREAD_PRIO_PROTECT protocol, it shall execute at the higher of its
priority or the highest of the priority ceilings of all the mutexes
@@ -260,7 +281,7 @@ o pthreads (sched/)
PTHREAD_PRIO_PROTECT protocol attributes, it shall not be subject to
being moved to the tail of the scheduling queue at its priority in the
event that its original priority is changed."
- Status: Open
+ Status: Open. No changes planned.
Priority: Low -- about zero, probably not that useful. Priority inheritance is
already supported and is a much better solution. And it turns out
that priority protection is just about as complex as priority inheritance.
@@ -442,21 +463,25 @@ o Network (net/, drivers/net)
Title: SOCK_RAW/SOCK_PACKET
Description: Should implement SOCK_RAW, SOCK_PACKET
- Status: Open
+ Status: Open. No changes are planned.
Priority: Low
Tile: MULTIPLE NETWORK INTERFACE SUPPORT
Description: uIP polling issues / Multiple network interface support:
+
(1) Current logic will not support multiple ethernet drivers.
Each driver should poll on TCP connections connect on the
network supported by the driver; UDP polling should respond
with TX data only if the UDP packet is intended for the
the network supported by the driver.
+
(2) If there were multiple drivers, polling would occur at
double the rate. Fix by using bound IP address in TCP
connection (lipaddr) and verifying that it is in the subnet
served by the driver.
- Status: Open
+
+ Status: Open. Nothing will probably be done until I have a platform
+ with two network interfaces that I need to support.
Priority: Medium, The feature is not important, but it is important
for NuttX to resolve the architectural issues.
@@ -464,7 +489,7 @@ o Network (net/, drivers/net)
Description: sendto() and multiple network interface support:
When polled, would have to assure that the destination IP
is on the subnet served by the polling driver.
- Status: Open
+ Status: Open. This is really part of the above issue.
Priority: Medium, The feature is not important, but it is important
for NuttX to resolve the architectural issues.
@@ -472,7 +497,8 @@ o Network (net/, drivers/net)
Description: IPv6 support is incomplete. Adam Dunkels has recently announced
IPv6 support for uIP (currently only as part of Contiki). Those
changes need to be ported to NuttX.
- Status: Open
+ Status: Open. No work will probably be done until there is a specific
+ requirement for IPv6.
Priority: Medium
Title: LISTENING FOR UDP BROADCASTS
@@ -488,7 +514,7 @@ o Network (net/, drivers/net)
driver should be throttled. Perhaps the driver should disable
RX interrupts when throttled and re-anable on each poll time.
recvfrom would, of course, have to un-throttle.
- Status: Open
+ Status: Open. This is just a thought experiment. No changes are planned.
Priority: Medium
Title: STANDARDIZE ETHERNET DRIVER STATISTICS
diff --git a/nuttx/tools/Makefile.host b/nuttx/tools/Makefile.host
index 4a46901e6a..663ff29c73 100644
--- a/nuttx/tools/Makefile.host
+++ b/nuttx/tools/Makefile.host
@@ -45,13 +45,12 @@ ifneq ($(CONFIG_WINDOWS_NATIVE),y)
endif
all: b16$(HOSTEXEEXT) bdf-converter$(HOSTEXEEXT) cmpconfig$(HOSTEXEEXT) \
- mkconfig$(HOSTEXEEXT) mkdeps$(HOSTEXEEXT) mksymtab$(HOSTEXEEXT) \
+ configure$(HOSTEXEEXT) mkconfig$(HOSTEXEEXT) mkdeps$(HOSTEXEEXT) mksymtab$(HOSTEXEEXT) \
mksyscall$(HOSTEXEEXT) mkversion$(HOSTEXEEXT)
default: mkconfig$(HOSTEXEEXT) mksyscall$(HOSTEXEEXT) mkdeps$(HOSTEXEEXT)
ifdef HOSTEXEEXT
-.PHONY: b16 bdf-converter cmpconfig clean mkconfig mkdeps mksymtab \
- mksyscall mkversion
+.PHONY: b16 bdf-converter cmpconfig clean configure mkconfig mkdeps mksymtab mksyscall mkversion
else
.PHONY: clean
endif
@@ -70,10 +69,19 @@ ifdef HOSTEXEEXT
b16: b16$(HOSTEXEEXT)
endif
+# configure - Instantiate a canned NuttX configuration
+
+configure$(HOSTEXEEXT): configure.c cfgparser.c
+ $(Q) $(HOSTCC) $(HOSTCFLAGS) -o configure$(HOSTEXEEXT) configure.c cfgparser.c
+
+ifdef HOSTEXEEXT
+configure: configure$(HOSTEXEEXT)
+endif
+
# mkconfig - Convert a .config file into a C config.h file
-mkconfig$(HOSTEXEEXT): mkconfig.c cfgparser.c
- $(Q) $(HOSTCC) $(HOSTCFLAGS) -o mkconfig$(HOSTEXEEXT) mkconfig.c cfgparser.c
+mkconfig$(HOSTEXEEXT): mkconfig.c cfgdefine.c
+ $(Q) $(HOSTCC) $(HOSTCFLAGS) -o mkconfig$(HOSTEXEEXT) mkconfig.c cfgdefine.c
ifdef HOSTEXEEXT
mkconfig: mkconfig$(HOSTEXEEXT)
@@ -90,8 +98,8 @@ endif
# mkversion - Convert a .version file into a C version.h file
-mkversion$(HOSTEXEEXT): mkconfig.c cfgparser.c
- $(Q) $(HOSTCC) $(HOSTCFLAGS) -o mkversion$(HOSTEXEEXT) mkversion.c cfgparser.c
+mkversion$(HOSTEXEEXT): mkconfig.c cfgdefine.c
+ $(Q) $(HOSTCC) $(HOSTCFLAGS) -o mkversion$(HOSTEXEEXT) mkversion.c cfgdefine.c
ifdef HOSTEXEEXT
mkversion: mkversion$(HOSTEXEEXT)
diff --git a/nuttx/tools/README.txt b/nuttx/tools/README.txt
index fc03322127..f9e2d1099c 100644
--- a/nuttx/tools/README.txt
+++ b/nuttx/tools/README.txt
@@ -38,7 +38,7 @@ discover.py
Example script for discovering devices in the local network.
It is the counter part to apps/netutils/discover
-mkconfig.c, cfgparser.c, and cfgparser.h
+mkconfig.c, cfgdefine.c, and cfgdefine.h
----------------------------------------
These are Cs file that are used to build mkconfig program. The mkconfig
@@ -79,7 +79,7 @@ mkfsdata.pl
NOTE: This perl script comes from uIP and was (probably) written
by Adam Dunkels. uIP has a license that is compatible with NuttX.
-mkversion.c, cfgparser.c, and cfgparser.h
+mkversion.c, cfgdefine.c, and cfgdefine.h
-----------------------------------------
This is C file that is used to build mkversion program. The mkversion
diff --git a/nuttx/tools/cfgdefine.c b/nuttx/tools/cfgdefine.c
new file mode 100644
index 0000000000..00dd11c20b
--- /dev/null
+++ b/nuttx/tools/cfgdefine.c
@@ -0,0 +1,322 @@
+/****************************************************************************
+ * tools/cfgdefine.c
+ *
+ * Copyright (C) 2007-2012 Gregory Nutt. All rights reserved.
+ * Author: Gregory Nutt
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ * 3. Neither the name NuttX nor the names of its contributors may be
+ * used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ ****************************************************************************/
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include
+#include
+#include "cfgdefine.h"
+
+/****************************************************************************
+ * Definitions
+ ****************************************************************************/
+
+/****************************************************************************
+ * Public Data
+ ****************************************************************************/
+
+char line[LINESIZE+1];
+
+/****************************************************************************
+ * Private Data
+ ****************************************************************************/
+
+/* These are configuration variable name that are quoted by configuration tool
+ * but which must be unquoted when used in C code.
+ */
+
+static const char *dequote_list[] =
+{
+ /* NuttX */
+
+ "CONFIG_USER_ENTRYPOINT", /* Name of entry point function */
+
+ /* NxWidgets/NxWM */
+
+ "CONFIG_NXWM_BACKGROUND_IMAGE", /* Name of bitmap image class */
+ "CONFIG_NXWM_STARTWINDOW_ICON", /* Name of bitmap image class */
+ "CONFIG_NXWM_NXCONSOLE_ICON", /* Name of bitmap image class */
+ "CONFIG_NXWM_CALIBRATION_ICON", /* Name of bitmap image class */
+ "CONFIG_NXWM_HEXCALCULATOR_ICON", /* Name of bitmap image class */
+
+ NULL /* Marks the end of the list */
+};
+
+ /****************************************************************************
+ * Private Functions
+ ****************************************************************************/
+
+ /* Skip over any spaces */
+
+static char *skip_space(char *ptr)
+{
+ while (*ptr && isspace((int)*ptr)) ptr++;
+ return ptr;
+}
+
+/* Find the end of a variable string */
+
+static char *find_name_end(char *ptr)
+{
+ while (*ptr && (isalnum((int)*ptr) || *ptr == '_')) ptr++;
+ return ptr;
+}
+
+/* Find the end of a value string */
+
+static char *find_value_end(char *ptr)
+{
+ while (*ptr && !isspace((int)*ptr))
+ {
+ if (*ptr == '"')
+ {
+ do ptr++; while (*ptr && *ptr != '"');
+ if (*ptr) ptr++;
+ }
+ else
+ {
+ do ptr++; while (*ptr && !isspace((int)*ptr) && *ptr != '"');
+ }
+ }
+ return ptr;
+}
+
+/* Read the next line from the configuration file */
+
+static char *read_line(FILE *stream)
+{
+ char *ptr;
+
+ for (;;)
+ {
+ line[LINESIZE] = '\0';
+ if (!fgets(line, LINESIZE, stream))
+ {
+ return NULL;
+ }
+ else
+ {
+ ptr = skip_space(line);
+ if (*ptr && *ptr != '#' && *ptr != '\n')
+ {
+ return ptr;
+ }
+ }
+ }
+}
+
+/* Parse the line from the configuration file into a variable name
+ * string and a value string.
+ */
+
+static void parse_line(char *ptr, char **varname, char **varval)
+{
+ /* Skip over any leading spaces */
+
+ ptr = skip_space(ptr);
+
+ /* The first no-space is the beginning of the variable name */
+
+ *varname = skip_space(ptr);
+ *varval = NULL;
+
+ /* Parse to the end of the variable name */
+
+ ptr = find_name_end(ptr);
+
+ /* An equal sign is expected next, perhaps after some white space */
+
+ if (*ptr && *ptr != '=')
+ {
+ /* Some else follows the variable name. Terminate the variable
+ * name and skip over any spaces.
+ */
+
+ *ptr = '\0';
+ ptr = skip_space(ptr + 1);
+ }
+
+ /* Verify that the equal sign is present */
+
+ if (*ptr == '=')
+ {
+ /* Make sure that the variable name is terminated (this was already
+ * done if the name was followed by white space.
+ */
+
+ *ptr = '\0';
+
+ /* The variable value should follow =, perhaps separated by some
+ * white space.
+ */
+
+ ptr = skip_space(ptr + 1);
+ if (*ptr)
+ {
+ /* Yes.. a variable follows. Save the pointer to the start
+ * of the variable string.
+ */
+
+ *varval = ptr;
+
+ /* Find the end of the variable string and make sure that it
+ * is terminated.
+ */
+
+ ptr = find_value_end(ptr);
+ *ptr = '\0';
+ }
+ }
+}
+
+static char *dequote_value(const char *varname, char *varval)
+{
+ const char **dqnam;
+ char *dqval = varval;
+ int len;
+
+ if (dqval)
+ {
+ /* Check if the variable name is in the list of strings to be dequoated */
+
+ for (dqnam = dequote_list; *dqnam; dqnam++)
+ {
+ if (strcmp(*dqnam, varname) == 0)
+ {
+ break;
+ }
+ }
+
+ /* Did we find the variable name in the list of configuration variables
+ * to be dequoated?
+ */
+
+ if (*dqnam)
+ {
+ /* Yes... Check if there is a traiing quote */
+
+ len = strlen(dqval);
+ if (dqval[len-1] == '"')
+ {
+ /* Yes... replace it with a terminator */
+
+ dqval[len-1] = '\0';
+ len--;
+ }
+
+ /* Is there a leading quote? */
+
+ if (dqval[0] == '"')
+ {
+ /* Yes.. skip over the leading quote */
+
+ dqval++;
+ len--;
+ }
+
+ /* Handle the case where nothing is left after dequoting */
+
+ if (len <= 0)
+ {
+ dqval = NULL;
+ }
+ }
+ }
+
+ return dqval;
+}
+
+/****************************************************************************
+ * Public Functions
+ ****************************************************************************/
+
+void generate_definitions(FILE *stream)
+{
+ char *varname;
+ char *varval;
+ char *ptr;
+
+ /* Loop until the entire file has been parsed. */
+
+ do
+ {
+ /* Read the next line from the file */
+
+ ptr = read_line(stream);
+ if (ptr)
+ {
+ /* Parse the line into a variable and a value field */
+
+ parse_line(ptr, &varname, &varval);
+
+ /* Was a variable name found? */
+
+ if (varname)
+ {
+ /* Yes.. dequote the value if necessary */
+
+ varval = dequote_value(varname, varval);
+
+ /* If no value was provided or if the special value 'n' was provided,
+ * then undefine the configuration variable.
+ */
+
+ if (!varval || strcmp(varval, "n") == 0)
+ {
+ printf("#undef %s\n", varname);
+ }
+
+ /* Simply define the configuration variable if it has the special
+ * value "y"
+ */
+
+ else if (strcmp(varval, "y") == 0)
+ {
+ printf("#define %s 1\n", varname);
+ }
+
+ /* Otherwise, use the value as provided */
+
+ else
+ {
+ printf("#define %s %s\n", varname, varval);
+ }
+ }
+ }
+ }
+ while (ptr);
+}
diff --git a/nuttx/tools/cfgdefine.h b/nuttx/tools/cfgdefine.h
new file mode 100644
index 0000000000..04817b719c
--- /dev/null
+++ b/nuttx/tools/cfgdefine.h
@@ -0,0 +1,64 @@
+/****************************************************************************
+ * tools/cfgdefine.h
+ *
+ * Copyright (C) 2007-2011 Gregory Nutt. All rights reserved.
+ * Author: Gregory Nutt
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ * 3. Neither the name NuttX nor the names of its contributors may be
+ * used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+ * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ *
+ ****************************************************************************/
+
+#ifndef __TOOLS_CFGDEFINE_H
+#define __TOOLS_CFGDEFINE_H
+
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
+#include
+#include
+
+/****************************************************************************
+ * Definitions
+ ****************************************************************************/
+
+#define LINESIZE ( PATH_MAX > 256 ? PATH_MAX : 256 )
+
+/****************************************************************************
+ * Public Data
+ ****************************************************************************/
+
+extern char line[LINESIZE+1];
+
+/****************************************************************************
+ * Public Functions
+ ****************************************************************************/
+
+extern void generate_definitions(FILE *stream);
+
+#endif /* __TOOLS_CFGDEFINE_H */
diff --git a/nuttx/tools/mkconfig.c b/nuttx/tools/mkconfig.c
index 3e55f50974..f4a1168c57 100644
--- a/nuttx/tools/mkconfig.c
+++ b/nuttx/tools/mkconfig.c
@@ -41,7 +41,7 @@
#include
#include
-#include "cfgparser.h"
+#include "cfgdefine.h"
/****************************************************************************
* Pre-processor Definitions
@@ -99,7 +99,7 @@ int main(int argc, char **argv, char **envp)
printf("#ifndef __INCLUDE_NUTTX_CONFIG_H\n");
printf("#define __INCLUDE_NUTTX_CONFIG_H\n\n");
printf("/* Architecture-specific options *************************/\n\n");
- parse_file(stream);
+ generate_definitions(stream);
printf("\n/* Sanity Checks *****************************************/\n\n");
printf("/* If this is an NXFLAT, external build, then make sure that\n");
printf(" * NXFLAT support is enabled in the base code.\n");
diff --git a/nuttx/tools/mkversion.c b/nuttx/tools/mkversion.c
index 32068df38b..c6b00c5e50 100644
--- a/nuttx/tools/mkversion.c
+++ b/nuttx/tools/mkversion.c
@@ -41,7 +41,7 @@
#include
#include
-#include "cfgparser.h"
+#include "cfgdefine.h"
/****************************************************************************
* Definitions
@@ -98,7 +98,7 @@ int main(int argc, char **argv, char **envp)
printf("/* version.h -- Autogenerated! Do not edit. */\n\n");
printf("#ifndef __INCLUDE_NUTTX_VERSION_H\n");
printf("#define __INCLUDE_NUTTX_VERSION_H\n\n");
- parse_file(stream);
+ generate_definitions(stream);
printf("\n#define CONFIG_VERSION ((CONFIG_VERSION_MAJOR << 8) | (CONFIG_VERSION_MINOR))\n\n");
printf("#endif /* __INCLUDE_NUTTX_VERSION_H */\n");
fclose(stream);
From b66a46decca8ba8bc3570ca5d91d908f2e339c0d Mon Sep 17 00:00:00 2001
From: patacongo
Date: Fri, 4 Jan 2013 16:50:15 +0000
Subject: [PATCH 030/118] Working on configure.c
git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5477 42af7a65-404d-4744-a932-0658087f49c3
---
nuttx/tools/Makefile.host | 4 +-
nuttx/tools/cfgdefine.c | 2 +-
nuttx/tools/cfgdefine.h | 2 +-
nuttx/tools/cfgparser.c | 165 ++++++++++++++++----------------------
nuttx/tools/cfgparser.h | 15 +++-
nuttx/tools/cmpconfig.c | 154 +----------------------------------
6 files changed, 91 insertions(+), 251 deletions(-)
diff --git a/nuttx/tools/Makefile.host b/nuttx/tools/Makefile.host
index 663ff29c73..73352aae3a 100644
--- a/nuttx/tools/Makefile.host
+++ b/nuttx/tools/Makefile.host
@@ -89,8 +89,8 @@ endif
# cmpconfig - Compare the contents of two configuration files
-cmpconfig$(HOSTEXEEXT): cmpconfig.c
- $(Q) $(HOSTCC) $(HOSTCFLAGS) -o cmpconfig$(HOSTEXEEXT) cmpconfig.c
+cmpconfig$(HOSTEXEEXT): cmpconfig.c cfgparser.c
+ $(Q) $(HOSTCC) $(HOSTCFLAGS) -o cmpconfig$(HOSTEXEEXT) cmpconfig.c cfgparser.c
ifdef HOSTEXEEXT
cmpconfig: cmpconfig$(HOSTEXEEXT)
diff --git a/nuttx/tools/cfgdefine.c b/nuttx/tools/cfgdefine.c
index 00dd11c20b..ee1dd40038 100644
--- a/nuttx/tools/cfgdefine.c
+++ b/nuttx/tools/cfgdefine.c
@@ -76,7 +76,7 @@ static const char *dequote_list[] =
NULL /* Marks the end of the list */
};
- /****************************************************************************
+/****************************************************************************
* Private Functions
****************************************************************************/
diff --git a/nuttx/tools/cfgdefine.h b/nuttx/tools/cfgdefine.h
index 04817b719c..f76ba73fb9 100644
--- a/nuttx/tools/cfgdefine.h
+++ b/nuttx/tools/cfgdefine.h
@@ -59,6 +59,6 @@ extern char line[LINESIZE+1];
* Public Functions
****************************************************************************/
-extern void generate_definitions(FILE *stream);
+void generate_definitions(FILE *stream);
#endif /* __TOOLS_CFGDEFINE_H */
diff --git a/nuttx/tools/cfgparser.c b/nuttx/tools/cfgparser.c
index 1a35f78579..cb4ab4c52f 100644
--- a/nuttx/tools/cfgparser.c
+++ b/nuttx/tools/cfgparser.c
@@ -38,7 +38,9 @@
****************************************************************************/
#include
+#include
#include
+
#include "cfgparser.h"
/****************************************************************************
@@ -55,28 +57,7 @@ char line[LINESIZE+1];
* Private Data
****************************************************************************/
-/* These are configuration variable name that are quoted by configuration tool
- * but which must be unquoted when used in C code.
- */
-
-static const char *dequote_list[] =
-{
- /* NuttX */
-
- "CONFIG_USER_ENTRYPOINT", /* Name of entry point function */
-
- /* NxWidgets/NxWM */
-
- "CONFIG_NXWM_BACKGROUND_IMAGE", /* Name of bitmap image class */
- "CONFIG_NXWM_STARTWINDOW_ICON", /* Name of bitmap image class */
- "CONFIG_NXWM_NXCONSOLE_ICON", /* Name of bitmap image class */
- "CONFIG_NXWM_CALIBRATION_ICON", /* Name of bitmap image class */
- "CONFIG_NXWM_HEXCALCULATOR_ICON", /* Name of bitmap image class */
-
- NULL /* Marks the end of the list */
-};
-
- /****************************************************************************
+/****************************************************************************
* Private Functions
****************************************************************************/
@@ -203,69 +184,15 @@ static void parse_line(char *ptr, char **varname, char **varval)
}
}
-static char *dequote_value(const char *varname, char *varval)
-{
- const char **dqnam;
- char *dqval = varval;
- int len;
-
- if (dqval)
- {
- /* Check if the variable name is in the list of strings to be dequoated */
-
- for (dqnam = dequote_list; *dqnam; dqnam++)
- {
- if (strcmp(*dqnam, varname) == 0)
- {
- break;
- }
- }
-
- /* Did we find the variable name in the list of configuration variables
- * to be dequoated?
- */
-
- if (*dqnam)
- {
- /* Yes... Check if there is a traiing quote */
-
- len = strlen(dqval);
- if (dqval[len-1] == '"')
- {
- /* Yes... replace it with a terminator */
-
- dqval[len-1] = '\0';
- len--;
- }
-
- /* Is there a leading quote? */
-
- if (dqval[0] == '"')
- {
- /* Yes.. skip over the leading quote */
-
- dqval++;
- len--;
- }
-
- /* Handle the case where nothing is left after dequoting */
-
- if (len <= 0)
- {
- dqval = NULL;
- }
- }
- }
-
- return dqval;
-}
-
/****************************************************************************
* Public Functions
****************************************************************************/
-void parse_file(FILE *stream)
+void parse_file(FILE *stream, struct variable_s **list)
{
+ struct variable_s *curr;
+ struct variable_s *prev;
+ struct variable_s *next;
char *varname;
char *varval;
char *ptr;
@@ -283,40 +210,90 @@ void parse_file(FILE *stream)
parse_line(ptr, &varname, &varval);
- /* Was a variable name found? */
+ /* If the variable has not value (or the special value 'n'), then
+ * ignore it.
+ */
+
+ if (!varval || strcmp(varval, "n") == 0)
+ {
+ continue;
+ }
+
+ /* Make sure that a variable name was found. */
if (varname)
{
- /* Yes.. dequote the value if necessary */
+ int varlen = strlen(varname) + 1;
+ int vallen = 0;
- varval = dequote_value(varname, varval);
-
- /* If no value was provided or if the special value 'n' was provided,
- * then undefine the configuration variable.
+ /* Get the size of the value, including the NUL terminating
+ * character.
*/
- if (!varval || strcmp(varval, "n") == 0)
+ if (varval)
{
- printf("#undef %s\n", varname);
+ vallen = strlen(varval) + 1;
}
- /* Simply define the configuration variable if it has the special
- * value "y"
+ /* Allocate memory to hold the struct variable_s with the
+ * variable name and the value.
*/
- else if (strcmp(varval, "y") == 0)
+ curr = (struct variable_s *)malloc(sizeof(struct variable_s) + varlen + vallen - 1);
+ if (curr)
{
- printf("#define %s 1\n", varname);
+ /* Add the variable to the list */
+
+ curr->var = &curr->storage[0];
+ strcpy(curr->var, varname);
+
+ curr->val = NULL;
+ if (varval)
+ {
+ curr->val = &curr->storage[varlen];
+ strcpy(curr->val, varval);
+ }
}
- /* Otherwise, use the value as provided */
+ prev = 0;
+ next = *list;
+ while (next && strcmp(next->var, curr->var) <= 0)
+ {
+ prev = next;
+ next = next->flink;
+ }
+ if (prev)
+ {
+ prev->flink = curr;
+ }
else
{
- printf("#define %s %s\n", varname, varval);
+ *list = curr;
}
+
+ curr->flink = next;
}
}
}
while (ptr);
}
+
+struct variable_s *find_variable(const char *varname, struct variable_s *list)
+{
+ char *varval1;
+ char *varval2;
+
+ while (list)
+ {
+ if (strcmp(varname, list->var) == 0)
+ {
+ return list;
+ }
+
+ list = list->flink;
+ }
+
+ return NULL;
+}
+
diff --git a/nuttx/tools/cfgparser.h b/nuttx/tools/cfgparser.h
index b1c4bae762..b1f421a68e 100644
--- a/nuttx/tools/cfgparser.h
+++ b/nuttx/tools/cfgparser.h
@@ -49,6 +49,18 @@
#define LINESIZE ( PATH_MAX > 256 ? PATH_MAX : 256 )
+/****************************************************************************
+ * Public Types
+ ****************************************************************************/
+
+struct variable_s
+{
+ struct variable_s *flink;
+ char *var;
+ char *val;
+ char storage[1];
+};
+
/****************************************************************************
* Public Data
****************************************************************************/
@@ -59,6 +71,7 @@ extern char line[LINESIZE+1];
* Public Functions
****************************************************************************/
-extern void parse_file(FILE *stream);
+void parse_file(FILE *stream, struct variable_s **list);
+struct variable_s *find_variable(const char *varname, struct variable_s *list);
#endif /* __TOOLS_CFGPARSER_H */
diff --git a/nuttx/tools/cmpconfig.c b/nuttx/tools/cmpconfig.c
index 2958acdc78..08b7dab3f0 100644
--- a/nuttx/tools/cmpconfig.c
+++ b/nuttx/tools/cmpconfig.c
@@ -43,6 +43,8 @@
#include
#include
+#include "cfgparser.h"
+
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
@@ -51,14 +53,6 @@
* Private Types
****************************************************************************/
-struct variable_s
-{
- struct variable_s *flink;
- char *var;
- char *val;
- char storage[1];
-};
-
/****************************************************************************
* Private Functions
****************************************************************************/
@@ -69,150 +63,6 @@ static void show_usage(const char *progname)
exit(EXIT_FAILURE);
}
-static char *skip_space(char *ptr)
-{
- while (*ptr && isspace((int)*ptr)) ptr++;
- return ptr;
-}
-
-static char *read_line(FILE *stream, char *line, int len)
-{
- char *ptr;
-
- for (;;)
- {
- line[len-1] = '\0';
- if (!fgets(line, len, stream))
- {
- return NULL;
- }
- else
- {
- ptr = skip_space(line);
- if (*ptr && *ptr != '#' && *ptr != '\n')
- {
- return ptr;
- }
- }
- }
-}
-
-static char *find_name_end(char *ptr)
-{
- while (*ptr && (isalnum((int)*ptr) || *ptr == '_')) ptr++;
- return ptr;
-}
-
-static char *find_value_end(char *ptr)
-{
- while (*ptr && !isspace((int)*ptr))
- {
- if (*ptr == '"')
- {
- do ptr++; while (*ptr && *ptr != '"');
- if (*ptr) ptr++;
- }
- else
- {
- do ptr++; while (*ptr && !isspace((int)*ptr) && *ptr != '"');
- }
- }
- return ptr;
-}
-
-static void parse_line(char *ptr, char **varname, char **varval)
-{
- *varname = ptr;
- *varval = NULL;
-
- ptr = find_name_end(ptr);
- if (*ptr && *ptr != '=')
- {
- *ptr = '\0';
- ptr = skip_space(ptr + 1);
- }
-
- if (*ptr == '=')
- {
- *ptr = '\0';
- ptr = skip_space(ptr + 1);
- if (*ptr)
- {
- *varval = ptr;
- ptr = find_value_end(ptr);
- *ptr = '\0';
- }
- }
-}
-
-static void parse_file(FILE *stream, struct variable_s **list)
-{
- char line[10242];
- struct variable_s *curr;
- struct variable_s *prev;
- struct variable_s *next;
- char *varname;
- char *varval;
- char *ptr;
-
- do
- {
- ptr = read_line(stream, line, 1024);
- if (ptr)
- {
- parse_line(ptr, &varname, &varval);
- if (!varval || strcmp(varval, "n") == 0)
- {
- continue;
- }
-
- if (varname)
- {
- int varlen = strlen(varname) + 1;
- int vallen = 0;
-
- if (varval)
- {
- vallen = strlen(varval) + 1;
- }
-
- curr = (struct variable_s *)malloc(sizeof(struct variable_s) + varlen + vallen - 1);
- if (curr)
- {
- curr->var = &curr->storage[0];
- strcpy(curr->var, varname);
-
- curr->val = NULL;
- if (varval)
- {
- curr->val = &curr->storage[varlen];
- strcpy(curr->val, varval);
- }
- }
-
- prev = 0;
- next = *list;
- while (next && strcmp(next->var, curr->var) <= 0)
- {
- prev = next;
- next = next->flink;
- }
-
- if (prev)
- {
- prev->flink = curr;
- }
- else
- {
- *list = curr;
- }
- curr->flink = next;
- }
- }
- }
- while (ptr);
-}
-
static void compare_variables(struct variable_s *list1, struct variable_s *list2)
{
char *varval1;
From 5c572a3cb50e6e52a641ee652d9e151b4c70661c Mon Sep 17 00:00:00 2001
From: patacongo | |