From cd061345570758dcad580dada716f123393d8788 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sun, 16 Sep 2018 09:25:32 -0600 Subject: [PATCH] graphics/NxWidgets: Fix some issues foundin build testing. --- graphics/NxWidgets/UnitTests/CButton/Makefile | 4 +- .../NxWidgets/UnitTests/CButtonArray/Makefile | 4 +- .../NxWidgets/UnitTests/CCheckBox/Makefile | 4 +- .../NxWidgets/UnitTests/CGlyphButton/Makefile | 4 +- .../UnitTests/CGlyphSliderHorizontal/Makefile | 4 +- graphics/NxWidgets/UnitTests/CImage/Makefile | 4 +- graphics/NxWidgets/UnitTests/CKeypad/Makefile | 4 +- graphics/NxWidgets/UnitTests/CLabel/Makefile | 4 +- .../NxWidgets/UnitTests/CLatchButton/Makefile | 4 +- .../UnitTests/CLatchButtonArray/Makefile | 4 +- .../NxWidgets/UnitTests/CListBox/Makefile | 4 +- .../NxWidgets/UnitTests/CProgressBar/Makefile | 4 +- .../NxWidgets/UnitTests/CRadioButton/Makefile | 4 +- .../UnitTests/CScrollbarHorizontal/Makefile | 4 +- .../UnitTests/CScrollbarVertical/Makefile | 4 +- .../UnitTests/CSliderHorizonal/Makefile | 4 +- .../UnitTests/CSliderVertical/Makefile | 4 +- .../NxWidgets/UnitTests/CTextBox/Makefile | 4 +- graphics/NxWidgets/UnitTests/README.txt | 198 +----------------- graphics/NxWidgets/UnitTests/nxwm/Makefile | 11 +- graphics/NxWidgets/libnxwidgets/.gitignore | 6 + graphics/NxWidgets/libnxwidgets/Makefile | 2 +- graphics/NxWidgets/nxwm/.gitignore | 8 +- graphics/NxWidgets/nxwm/Makefile | 2 +- 24 files changed, 62 insertions(+), 237 deletions(-) create mode 100644 graphics/NxWidgets/libnxwidgets/.gitignore diff --git a/graphics/NxWidgets/UnitTests/CButton/Makefile b/graphics/NxWidgets/UnitTests/CButton/Makefile index 4bbd5ebb5..7aa3b9fc6 100644 --- a/graphics/NxWidgets/UnitTests/CButton/Makefile +++ b/graphics/NxWidgets/UnitTests/CButton/Makefile @@ -35,8 +35,8 @@ -include $(TOPDIR)/Make.defs -NXWIDGETS_DIR="$(APPDIR)$(DELIM)graphics$(DELIM)NxWidgets$(DELIM)libnxwidgets" -NXWIDGETS_INC="$(NXWIDGETS_DIR)$(DELIM)include" +NXWIDGETS_DIR = "$(APPDIR)$(DELIM)graphics$(DELIM)NxWidgets$(DELIM)libnxwidgets" +NXWIDGETS_INC = "$(NXWIDGETS_DIR)$(DELIM)include" ifeq ($(WINTOOL),y) CFLAGS += ${shell $(INCDIR) -w "$(CC)" "$(NXWIDGETS_INC)"} diff --git a/graphics/NxWidgets/UnitTests/CButtonArray/Makefile b/graphics/NxWidgets/UnitTests/CButtonArray/Makefile index 4f4e67c18..fb5810204 100644 --- a/graphics/NxWidgets/UnitTests/CButtonArray/Makefile +++ b/graphics/NxWidgets/UnitTests/CButtonArray/Makefile @@ -35,8 +35,8 @@ -include $(TOPDIR)/Make.defs -NXWIDGETS_DIR="$(APPDIR)$(DELIM)graphics$(DELIM)NxWidgets$(DELIM)libnxwidgets" -NXWIDGETS_INC="$(NXWIDGETS_DIR)$(DELIM)include" +NXWIDGETS_DIR = "$(APPDIR)$(DELIM)graphics$(DELIM)NxWidgets$(DELIM)libnxwidgets" +NXWIDGETS_INC = "$(NXWIDGETS_DIR)$(DELIM)include" ifeq ($(WINTOOL),y) CFLAGS += ${shell $(INCDIR) -w "$(CC)" "$(NXWIDGETS_INC)"} diff --git a/graphics/NxWidgets/UnitTests/CCheckBox/Makefile b/graphics/NxWidgets/UnitTests/CCheckBox/Makefile index 804a2745e..4ba4b5525 100644 --- a/graphics/NxWidgets/UnitTests/CCheckBox/Makefile +++ b/graphics/NxWidgets/UnitTests/CCheckBox/Makefile @@ -35,8 +35,8 @@ -include $(TOPDIR)/Make.defs -NXWIDGETS_DIR="$(APPDIR)$(DELIM)graphics$(DELIM)NxWidgets$(DELIM)libnxwidgets" -NXWIDGETS_INC="$(NXWIDGETS_DIR)$(DELIM)include" +NXWIDGETS_DIR = "$(APPDIR)$(DELIM)graphics$(DELIM)NxWidgets$(DELIM)libnxwidgets" +NXWIDGETS_INC = "$(NXWIDGETS_DIR)$(DELIM)include" ifeq ($(WINTOOL),y) CFLAGS += ${shell $(INCDIR) -w "$(CC)" "$(NXWIDGETS_INC)"} diff --git a/graphics/NxWidgets/UnitTests/CGlyphButton/Makefile b/graphics/NxWidgets/UnitTests/CGlyphButton/Makefile index 957b6c571..0021304dc 100644 --- a/graphics/NxWidgets/UnitTests/CGlyphButton/Makefile +++ b/graphics/NxWidgets/UnitTests/CGlyphButton/Makefile @@ -35,8 +35,8 @@ -include $(TOPDIR)/Make.defs -NXWIDGETS_DIR="$(APPDIR)$(DELIM)graphics$(DELIM)NxWidgets$(DELIM)libnxwidgets" -NXWIDGETS_INC="$(NXWIDGETS_DIR)$(DELIM)include" +NXWIDGETS_DIR = "$(APPDIR)$(DELIM)graphics$(DELIM)NxWidgets$(DELIM)libnxwidgets" +NXWIDGETS_INC = "$(NXWIDGETS_DIR)$(DELIM)include" ifeq ($(WINTOOL),y) CFLAGS += ${shell $(INCDIR) -w "$(CC)" "$(NXWIDGETS_INC)"} diff --git a/graphics/NxWidgets/UnitTests/CGlyphSliderHorizontal/Makefile b/graphics/NxWidgets/UnitTests/CGlyphSliderHorizontal/Makefile index 83a60c13b..e4e7a0df6 100644 --- a/graphics/NxWidgets/UnitTests/CGlyphSliderHorizontal/Makefile +++ b/graphics/NxWidgets/UnitTests/CGlyphSliderHorizontal/Makefile @@ -35,8 +35,8 @@ -include $(TOPDIR)/Make.defs -NXWIDGETS_DIR="$(APPDIR)$(DELIM)graphics$(DELIM)NxWidgets$(DELIM)libnxwidgets" -NXWIDGETS_INC="$(NXWIDGETS_DIR)$(DELIM)include" +NXWIDGETS_DIR = "$(APPDIR)$(DELIM)graphics$(DELIM)NxWidgets$(DELIM)libnxwidgets" +NXWIDGETS_INC = "$(NXWIDGETS_DIR)$(DELIM)include" ifeq ($(WINTOOL),y) CFLAGS += ${shell $(INCDIR) -w "$(CC)" "$(NXWIDGETS_INC)"} diff --git a/graphics/NxWidgets/UnitTests/CImage/Makefile b/graphics/NxWidgets/UnitTests/CImage/Makefile index 443a2c21e..c30b6eae6 100644 --- a/graphics/NxWidgets/UnitTests/CImage/Makefile +++ b/graphics/NxWidgets/UnitTests/CImage/Makefile @@ -35,8 +35,8 @@ -include $(TOPDIR)/Make.defs -NXWIDGETS_DIR="$(APPDIR)$(DELIM)graphics$(DELIM)NxWidgets$(DELIM)libnxwidgets" -NXWIDGETS_INC="$(NXWIDGETS_DIR)$(DELIM)include" +NXWIDGETS_DIR = "$(APPDIR)$(DELIM)graphics$(DELIM)NxWidgets$(DELIM)libnxwidgets" +NXWIDGETS_INC = "$(NXWIDGETS_DIR)$(DELIM)include" ifeq ($(WINTOOL),y) CFLAGS += ${shell $(INCDIR) -w "$(CC)" "$(NXWIDGETS_INC)"} diff --git a/graphics/NxWidgets/UnitTests/CKeypad/Makefile b/graphics/NxWidgets/UnitTests/CKeypad/Makefile index 3407206ce..52b0bc9f0 100644 --- a/graphics/NxWidgets/UnitTests/CKeypad/Makefile +++ b/graphics/NxWidgets/UnitTests/CKeypad/Makefile @@ -35,8 +35,8 @@ -include $(TOPDIR)/Make.defs -NXWIDGETS_DIR="$(APPDIR)$(DELIM)graphics$(DELIM)NxWidgets$(DELIM)libnxwidgets" -NXWIDGETS_INC="$(NXWIDGETS_DIR)$(DELIM)include" +NXWIDGETS_DIR = "$(APPDIR)$(DELIM)graphics$(DELIM)NxWidgets$(DELIM)libnxwidgets" +NXWIDGETS_INC = "$(NXWIDGETS_DIR)$(DELIM)include" ifeq ($(WINTOOL),y) CFLAGS += ${shell $(INCDIR) -w "$(CC)" "$(NXWIDGETS_INC)"} diff --git a/graphics/NxWidgets/UnitTests/CLabel/Makefile b/graphics/NxWidgets/UnitTests/CLabel/Makefile index be66c9606..0a0cf1029 100644 --- a/graphics/NxWidgets/UnitTests/CLabel/Makefile +++ b/graphics/NxWidgets/UnitTests/CLabel/Makefile @@ -35,8 +35,8 @@ -include $(TOPDIR)/Make.defs -NXWIDGETS_DIR="$(APPDIR)$(DELIM)graphics$(DELIM)NxWidgets$(DELIM)libnxwidgets" -NXWIDGETS_INC="$(NXWIDGETS_DIR)$(DELIM)include" +NXWIDGETS_DIR = "$(APPDIR)$(DELIM)graphics$(DELIM)NxWidgets$(DELIM)libnxwidgets" +NXWIDGETS_INC = "$(NXWIDGETS_DIR)$(DELIM)include" ifeq ($(WINTOOL),y) CFLAGS += ${shell $(INCDIR) -w "$(CC)" "$(NXWIDGETS_INC)"} diff --git a/graphics/NxWidgets/UnitTests/CLatchButton/Makefile b/graphics/NxWidgets/UnitTests/CLatchButton/Makefile index 348ed929c..04e52760a 100644 --- a/graphics/NxWidgets/UnitTests/CLatchButton/Makefile +++ b/graphics/NxWidgets/UnitTests/CLatchButton/Makefile @@ -35,8 +35,8 @@ -include $(TOPDIR)/Make.defs -NXWIDGETS_DIR="$(APPDIR)$(DELIM)graphics$(DELIM)NxWidgets$(DELIM)libnxwidgets" -NXWIDGETS_INC="$(NXWIDGETS_DIR)$(DELIM)include" +NXWIDGETS_DIR = "$(APPDIR)$(DELIM)graphics$(DELIM)NxWidgets$(DELIM)libnxwidgets" +NXWIDGETS_INC = "$(NXWIDGETS_DIR)$(DELIM)include" ifeq ($(WINTOOL),y) CFLAGS += ${shell $(INCDIR) -w "$(CC)" "$(NXWIDGETS_INC)"} diff --git a/graphics/NxWidgets/UnitTests/CLatchButtonArray/Makefile b/graphics/NxWidgets/UnitTests/CLatchButtonArray/Makefile index f1deb6adf..d7d66b920 100644 --- a/graphics/NxWidgets/UnitTests/CLatchButtonArray/Makefile +++ b/graphics/NxWidgets/UnitTests/CLatchButtonArray/Makefile @@ -35,8 +35,8 @@ -include $(TOPDIR)/Make.defs -NXWIDGETS_DIR="$(APPDIR)$(DELIM)graphics$(DELIM)NxWidgets$(DELIM)libnxwidgets" -NXWIDGETS_INC="$(NXWIDGETS_DIR)$(DELIM)include" +NXWIDGETS_DIR = "$(APPDIR)$(DELIM)graphics$(DELIM)NxWidgets$(DELIM)libnxwidgets" +NXWIDGETS_INC = "$(NXWIDGETS_DIR)$(DELIM)include" ifeq ($(WINTOOL),y) CFLAGS += ${shell $(INCDIR) -w "$(CC)" "$(NXWIDGETS_INC)"} diff --git a/graphics/NxWidgets/UnitTests/CListBox/Makefile b/graphics/NxWidgets/UnitTests/CListBox/Makefile index 4b60f6a9a..5cc135a43 100644 --- a/graphics/NxWidgets/UnitTests/CListBox/Makefile +++ b/graphics/NxWidgets/UnitTests/CListBox/Makefile @@ -35,8 +35,8 @@ -include $(TOPDIR)/Make.defs -NXWIDGETS_DIR="$(APPDIR)$(DELIM)graphics$(DELIM)NxWidgets$(DELIM)libnxwidgets" -NXWIDGETS_INC="$(NXWIDGETS_DIR)$(DELIM)include" +NXWIDGETS_DIR = "$(APPDIR)$(DELIM)graphics$(DELIM)NxWidgets$(DELIM)libnxwidgets" +NXWIDGETS_INC = "$(NXWIDGETS_DIR)$(DELIM)include" ifeq ($(WINTOOL),y) CFLAGS += ${shell $(INCDIR) -w "$(CC)" "$(NXWIDGETS_INC)"} diff --git a/graphics/NxWidgets/UnitTests/CProgressBar/Makefile b/graphics/NxWidgets/UnitTests/CProgressBar/Makefile index b71076339..7963fcf36 100644 --- a/graphics/NxWidgets/UnitTests/CProgressBar/Makefile +++ b/graphics/NxWidgets/UnitTests/CProgressBar/Makefile @@ -35,8 +35,8 @@ -include $(TOPDIR)/Make.defs -NXWIDGETS_DIR="$(APPDIR)$(DELIM)graphics$(DELIM)NxWidgets$(DELIM)libnxwidgets" -NXWIDGETS_INC="$(NXWIDGETS_DIR)$(DELIM)include" +NXWIDGETS_DIR = "$(APPDIR)$(DELIM)graphics$(DELIM)NxWidgets$(DELIM)libnxwidgets" +NXWIDGETS_INC = "$(NXWIDGETS_DIR)$(DELIM)include" ifeq ($(WINTOOL),y) CFLAGS += ${shell $(INCDIR) -w "$(CC)" "$(NXWIDGETS_INC)"} diff --git a/graphics/NxWidgets/UnitTests/CRadioButton/Makefile b/graphics/NxWidgets/UnitTests/CRadioButton/Makefile index 77c4abf2e..799c42470 100644 --- a/graphics/NxWidgets/UnitTests/CRadioButton/Makefile +++ b/graphics/NxWidgets/UnitTests/CRadioButton/Makefile @@ -35,8 +35,8 @@ -include $(TOPDIR)/Make.defs -NXWIDGETS_DIR="$(APPDIR)$(DELIM)graphics$(DELIM)NxWidgets$(DELIM)libnxwidgets" -NXWIDGETS_INC="$(NXWIDGETS_DIR)$(DELIM)include" +NXWIDGETS_DIR = "$(APPDIR)$(DELIM)graphics$(DELIM)NxWidgets$(DELIM)libnxwidgets" +NXWIDGETS_INC = "$(NXWIDGETS_DIR)$(DELIM)include" ifeq ($(WINTOOL),y) CFLAGS += ${shell $(INCDIR) -w "$(CC)" "$(NXWIDGETS_INC)"} diff --git a/graphics/NxWidgets/UnitTests/CScrollbarHorizontal/Makefile b/graphics/NxWidgets/UnitTests/CScrollbarHorizontal/Makefile index 45e170d56..3c982d6e0 100644 --- a/graphics/NxWidgets/UnitTests/CScrollbarHorizontal/Makefile +++ b/graphics/NxWidgets/UnitTests/CScrollbarHorizontal/Makefile @@ -35,8 +35,8 @@ -include $(TOPDIR)/Make.defs -NXWIDGETS_DIR="$(APPDIR)$(DELIM)graphics$(DELIM)NxWidgets$(DELIM)libnxwidgets" -NXWIDGETS_INC="$(NXWIDGETS_DIR)$(DELIM)include" +NXWIDGETS_DIR = "$(APPDIR)$(DELIM)graphics$(DELIM)NxWidgets$(DELIM)libnxwidgets" +NXWIDGETS_INC = "$(NXWIDGETS_DIR)$(DELIM)include" ifeq ($(WINTOOL),y) CFLAGS += ${shell $(INCDIR) -w "$(CC)" "$(NXWIDGETS_INC)"} diff --git a/graphics/NxWidgets/UnitTests/CScrollbarVertical/Makefile b/graphics/NxWidgets/UnitTests/CScrollbarVertical/Makefile index 3966eb1a8..797e7b416 100644 --- a/graphics/NxWidgets/UnitTests/CScrollbarVertical/Makefile +++ b/graphics/NxWidgets/UnitTests/CScrollbarVertical/Makefile @@ -35,8 +35,8 @@ -include $(TOPDIR)/Make.defs -NXWIDGETS_DIR="$(APPDIR)$(DELIM)graphics$(DELIM)NxWidgets$(DELIM)libnxwidgets" -NXWIDGETS_INC="$(NXWIDGETS_DIR)$(DELIM)include" +NXWIDGETS_DIR = "$(APPDIR)$(DELIM)graphics$(DELIM)NxWidgets$(DELIM)libnxwidgets" +NXWIDGETS_INC = "$(NXWIDGETS_DIR)$(DELIM)include" ifeq ($(WINTOOL),y) CFLAGS += ${shell $(INCDIR) -w "$(CC)" "$(NXWIDGETS_INC)"} diff --git a/graphics/NxWidgets/UnitTests/CSliderHorizonal/Makefile b/graphics/NxWidgets/UnitTests/CSliderHorizonal/Makefile index a15c3e4a9..0e2a99526 100644 --- a/graphics/NxWidgets/UnitTests/CSliderHorizonal/Makefile +++ b/graphics/NxWidgets/UnitTests/CSliderHorizonal/Makefile @@ -35,8 +35,8 @@ -include $(TOPDIR)/Make.defs -NXWIDGETS_DIR="$(APPDIR)$(DELIM)graphics$(DELIM)NxWidgets$(DELIM)libnxwidgets" -NXWIDGETS_INC="$(NXWIDGETS_DIR)$(DELIM)include" +NXWIDGETS_DIR = "$(APPDIR)$(DELIM)graphics$(DELIM)NxWidgets$(DELIM)libnxwidgets" +NXWIDGETS_INC = "$(NXWIDGETS_DIR)$(DELIM)include" ifeq ($(WINTOOL),y) CFLAGS += ${shell $(INCDIR) -w "$(CC)" "$(NXWIDGETS_INC)"} diff --git a/graphics/NxWidgets/UnitTests/CSliderVertical/Makefile b/graphics/NxWidgets/UnitTests/CSliderVertical/Makefile index 0e217abe1..41d29ae1f 100644 --- a/graphics/NxWidgets/UnitTests/CSliderVertical/Makefile +++ b/graphics/NxWidgets/UnitTests/CSliderVertical/Makefile @@ -35,8 +35,8 @@ -include $(TOPDIR)/Make.defs -NXWIDGETS_DIR="$(APPDIR)$(DELIM)graphics$(DELIM)NxWidgets$(DELIM)libnxwidgets" -NXWIDGETS_INC="$(NXWIDGETS_DIR)$(DELIM)include" +NXWIDGETS_DIR = "$(APPDIR)$(DELIM)graphics$(DELIM)NxWidgets$(DELIM)libnxwidgets" +NXWIDGETS_INC = "$(NXWIDGETS_DIR)$(DELIM)include" ifeq ($(WINTOOL),y) CFLAGS += ${shell $(INCDIR) -w "$(CC)" "$(NXWIDGETS_INC)"} diff --git a/graphics/NxWidgets/UnitTests/CTextBox/Makefile b/graphics/NxWidgets/UnitTests/CTextBox/Makefile index 7fed7ab4a..09fda632a 100644 --- a/graphics/NxWidgets/UnitTests/CTextBox/Makefile +++ b/graphics/NxWidgets/UnitTests/CTextBox/Makefile @@ -35,8 +35,8 @@ -include $(TOPDIR)/Make.defs -NXWIDGETS_DIR="$(APPDIR)$(DELIM)graphics$(DELIM)NxWidgets$(DELIM)libnxwidgets" -NXWIDGETS_INC="$(NXWIDGETS_DIR)$(DELIM)include" +NXWIDGETS_DIR = "$(APPDIR)$(DELIM)graphics$(DELIM)NxWidgets$(DELIM)libnxwidgets" +NXWIDGETS_INC = "$(NXWIDGETS_DIR)$(DELIM)include" ifeq ($(WINTOOL),y) CFLAGS += ${shell $(INCDIR) -w "$(CC)" "$(NXWIDGETS_INC)"} diff --git a/graphics/NxWidgets/UnitTests/README.txt b/graphics/NxWidgets/UnitTests/README.txt index c9051486c..d0bda82fd 100644 --- a/graphics/NxWidgets/UnitTests/README.txt +++ b/graphics/NxWidgets/UnitTests/README.txt @@ -6,7 +6,7 @@ NXWidgets.: Contents ======== - o Installing and Building the Unit Tests + o Building the Unit Tests 1. Setup NuttX a) Configure NuttX b) Enable C++ Support @@ -18,9 +18,7 @@ Contents o Work-Arounds 1. Build Issues 2. Stack Size Issues with the X11 Simulation - o Theory of Operation o Unit Test Directories - o Example Installing and Building the Unit Tests ====================================== @@ -130,62 +128,14 @@ Installing and Building the Unit Tests CONFIG_EXAMPLES_TOUSCHCREEN=y ## REMOVE (provided "tc_main") - The following step will then install the new, correct directory containing - the user_start function for the selected unit test. If you see that NSH - is configured: - - CONFIG_EXAMPLES_NSH=y ## DO NOT REMOVE - - Then go back and re-read e) above. - - sim/nsh2 and stm3210e-eval/nsh2 are both NSH configurations. You do not need - to change anything further in the .config file for any NSH configuration. - -2. Configure/Install the Selected Unit Test - - Then reconfigure that to use the Unit Test of your choice: - - cd /tools - ./install.sh - - Where: - - is the full, absolute path to the NuttX apps/ directory - is the name of a sub-directory in the UnitTests directory - -3. Instantiate the Configuration - - Before we can make the NXWidgets Library, we have to instantiate the NuttX - configuration with the installed unit test: - - cd - . ./setenv.sh - make context - - This will create auto-generated files and will setup symbolic links needed - in order to build the NXWidgets Library. - -4. Adjust the Stack Size +2. Adjust the Stack Size If using an simulation configuration (like sim/nsh2) and your unit test uses X11 as its display device, then you would have to increase the size of unit test stack as described below under "Stack Size Issues with the X11 Simulation." -5. Build the NXWidgets Library - - cd /libnxwidgets - make TOPDIR= - -6. Build the NxWM library. - - The NxWM library (libnxwm.a) is required only for the NxWM unit test at - apps/graphics/NxWidgets/UnitTests/nxwm. For other unit tests, skip to step 7. - - cd /nxwm - make TOPDIR= - -7. Build NuttX including the unit test and the NXWidgets library +3. Build NuttX including the unit test and the NXWidgets library cd . ./setenv.sh @@ -236,21 +186,6 @@ Build Issues 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 -Theory Of Operation -=================== - -The NuttX application Makefile at apps/Makefile has some special hooks for -building "external" applications. In particular, it will automatically -build in the contents any directory call "external/" that may appear in the -apps/ directory. There is no external/ directory in the repository. Rather, -this directory may be provided by the user (possibly as a symbolic link) to -add libraries and applications to the standard build from the repository. - -The script at tools/install.sh, then, just does a lot of careful validation and -sanity checking. Then it installs the UnitTest test sub-directory in the apps/ -directory by creating a symbolic link in the apps/ directory call "external". -That symbolic link will refer to the selected UnitTest sub-directory. - UnitTests ========= @@ -310,130 +245,3 @@ nxwm Exercises the NxWM window manager. Use the special configurations nuttx/configs/sim/nxwm or nuttx/configs/stm3240g-eval/nxwm. -Example -======= - -1. Configure sim/nsh2 - Where: nuttx and nuttx/tools directory - - $ cd tools/ - $ ./configure.sh sim/nsh2 - $ cd - - -2. Edit the NuttX .config file to enable C++ support - - Do nothing... sim/nsh2 already has C++ support enabled. - - Since this is an NSH configuration, the entry point does not need to be - changed. - -3. Install the CButton C++ application (for example) - Where: /tool - - $ ./install.sh ~/projects/nuttx/nuttx/trunk/apps/ CButton - /home/patacongo/projects/nuttx/nuttx/trunk/apps//external already exists... - Removing the old symbolic link. - Creating symbolic link - - To /home/patacongo/projects/nuttx/nuttx/trunk/NxWidgets/UnitTests/CButton - - At /home/patacongo/projects/nuttx/nuttx/trunk/apps//external - -4. Instantiate the Configuration - Where: nuttx directory - - $ cd /home/patacongo/projects/nuttx/nuttx/trunk/nuttx - $ . ./setenv.sh - $ make context - - This will create auto-generated files and will setup symbolic links needed - in order to build the NXWidgets Library. - -6. Adjust the Stack Size - - If using an simulation configuration (like sim/nsh2) and your unit test - uses X11 as its display device, then you would have to increase the size - of unit test stack as described above under "Stack Size Issues." - -7. Build the NXWdigets Library - Where /libnxwidgets - - $ cd /home/patacongo/projects/nuttx/nuttx/trunk/NxWidgets/libnxwidgets - $ make TOPDIR=/home/patacongo/projects/nuttx/nuttx/trunk/nuttx - -8. Build NuttX - Where: nuttx directory - - $ cd /home/patacongo/projects/nuttx/nuttx/trunk/nuttx - $ make - ... - -8. Run the "bringup" task: - - a. Start NuttX - Where: nuttx directory - - ./nuttx - - NuttShell (NSH) NuttX-6.9 - nsh> - - b. Execute NuttX - Where: NSH command prompt - - NOTE that when you run NSH as a simulation, the commands are echoed - twice -- once by Linux/Cygwin and once by NuttX: - - nsh> help - help - ... - Builtin Apps: - nx - nxhello - tc - bringup - nsh> bringup - bringup - bringup [2:128] - - c. Then do a kludgy thing - Where: NSH command prompt - - The I/O with the Linux/Cygwin simulation is blocking. So while NSH is - waiting for input nothing can run (see configs/sim/README.txt for more info). - One way to make NSH stop asking for input is to sleep. - - nsh> sleep 10 - sleep 10 - - NOTE 1: This is not a problem if CONFIG_SCHED_WAITPID is defined in the - configuration file. If CONFIG_SCHED_WAITPID is defined, NSH will wait - for the unit test to complete and it will not be necessary to sleep. - - NOTE 2: CONFIG_SCHED_WAITPID is defined in the sim/nsh2 configuration - so you can probably ignore this kludgy thing. - - d. The Unit Test runs - - As soon as NSH sleeps, the unit test will run: - - bringup_main: Saying hello from the dynamically constructed instance - CHelloWorld::HelloWorld: Hello, World!! - bringup_main: Saying hello from the instance constructed on the stack - CHelloWorld::HelloWorld: Hello, World!! - bringup_main: Saying hello from the statically constructed instance - CHelloWorld::HelloWorld: Hello, World!! - -8. Debugging - Where: nuttx directory - - In the simulation (only) you can use GDB or, better, the graphic - front-end DDD to debug the code. Most embedded targets do not - have good debugging capabilities. - - In order to debug, you have to have build with CONFIG_DEBUG_SYMBOLS=y. - This setting is preselected in the sim/nsh2 configuration so that - you don't have to do anything. - - Then under Linux or in a Cygwin X11 window, you can start the graphic - debugger like: - - ddd nuttx & diff --git a/graphics/NxWidgets/UnitTests/nxwm/Makefile b/graphics/NxWidgets/UnitTests/nxwm/Makefile index e1e51f180..500222378 100644 --- a/graphics/NxWidgets/UnitTests/nxwm/Makefile +++ b/graphics/NxWidgets/UnitTests/nxwm/Makefile @@ -35,15 +35,22 @@ -include $(TOPDIR)/Make.defs -NXWIDGETS_DIR="$(APPDIR)$(DELIM)graphics$(DELIM)NxWidgets$(DELIM)libnxwidgets" -NXWIDGETS_INC="$(NXWIDGETS_DIR)$(DELIM)include" +NXWIDGETS_DIR = "$(APPDIR)$(DELIM)graphics$(DELIM)NxWidgets$(DELIM)libnxwidgets" +NXWIDGETS_INC = "$(NXWIDGETS_DIR)$(DELIM)include" + +NXWM_DIR = "$(APPDIR)$(DELIM)graphics$(DELIM)NxWidgets$(DELIM)nxwm" +NXWM_INC = "$(NXWM_DIR)$(DELIM)include" ifeq ($(WINTOOL),y) CFLAGS += ${shell $(INCDIR) -w "$(CC)" "$(NXWIDGETS_INC)"} + CFLAGS += ${shell $(INCDIR) -w "$(CC)" "$(NXWM_INC)"} CXXFLAGS += ${shell $(INCDIR) -w "$(CXX)" "$(NXWIDGETS_INC)"} + CXXFLAGS += ${shell $(INCDIR) -w "$(CXX)" "$(NXWM_INC)"} else CFLAGS += ${shell $(INCDIR) "$(CC)" "$(NXWIDGETS_INC)"} + CFLAGS += ${shell $(INCDIR) "$(CC)" "$(NXWM_INC)"} CXXFLAGS += ${shell $(INCDIR) "$(CXX)" "$(NXWIDGETS_INC)"} + CXXFLAGS += ${shell $(INCDIR) "$(CXX)" "$(NXWM_INC)"} endif # NxWM unit test diff --git a/graphics/NxWidgets/libnxwidgets/.gitignore b/graphics/NxWidgets/libnxwidgets/.gitignore new file mode 100644 index 000000000..f21c854d1 --- /dev/null +++ b/graphics/NxWidgets/libnxwidgets/.gitignore @@ -0,0 +1,6 @@ +/.built +/.depend +/Make.dep +/*.src +/*.obj +/*.lst diff --git a/graphics/NxWidgets/libnxwidgets/Makefile b/graphics/NxWidgets/libnxwidgets/Makefile index a71d18344..2b05e0f1b 100644 --- a/graphics/NxWidgets/libnxwidgets/Makefile +++ b/graphics/NxWidgets/libnxwidgets/Makefile @@ -78,7 +78,7 @@ CXXSRCS += glyph_checkboxoff.cxx glyph_screendepthdown.cxx CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(NXWIDGETDIR)$(DELIM)include} CXXFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(NXWIDGETDIR)$(DELIM)include} -VPATH = $(NXWIDGETDIR)$(DELIM)src +VPATH = src include $(APPDIR)/Application.mk diff --git a/graphics/NxWidgets/nxwm/.gitignore b/graphics/NxWidgets/nxwm/.gitignore index 72d6fc847..f21c854d1 100644 --- a/graphics/NxWidgets/nxwm/.gitignore +++ b/graphics/NxWidgets/nxwm/.gitignore @@ -1,2 +1,6 @@ -/nxwm-export.zip - +/.built +/.depend +/Make.dep +/*.src +/*.obj +/*.lst diff --git a/graphics/NxWidgets/nxwm/Makefile b/graphics/NxWidgets/nxwm/Makefile index 105910f47..3a49e8bc9 100644 --- a/graphics/NxWidgets/nxwm/Makefile +++ b/graphics/NxWidgets/nxwm/Makefile @@ -92,6 +92,6 @@ CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(NXWIDGETDIR)$(DELIM)include CXXFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(NXWMDIR)$(DELIM)include} CXXFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(NXWIDGETDIR)$(DELIM)include} -VPATH = $(NXWIDGETDIR)$(DELIM)src +VPATH = src include $(APPDIR)/Application.mk