You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ag...@apache.org on 2020/01/16 17:22:45 UTC

[incubator-nuttx] branch pr116 updated: tools/configure.bat: Update configure.bat so that it works like configure.sh and integrates properly with configure.c. Also update the README.txt file with a few native build clarifications.

This is an automated email from the ASF dual-hosted git repository.

aguettouche pushed a commit to branch pr116
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git


The following commit(s) were added to refs/heads/pr116 by this push:
     new b3fd644  tools/configure.bat: Update configure.bat so that it works like configure.sh and integrates properly with configure.c. Also update the README.txt file with a few native build clarifications.
b3fd644 is described below

commit b3fd644f1bef831df2c04d18219a9251dc3b6dc5
Author: patacongo <sp...@yahoo.com>
AuthorDate: Thu Jan 16 11:22:36 2020 -0600

    tools/configure.bat: Update configure.bat so that it works like configure.sh and integrates properly with configure.c. Also update the README.txt file with a few native build clarifications.
---
 README.txt          | 20 +++++++++++++++++---
 tools/configure.bat | 20 +++++++++++++++++---
 2 files changed, 34 insertions(+), 6 deletions(-)

diff --git a/README.txt b/README.txt
index 1c375d8..627df0a 100644
--- a/README.txt
+++ b/README.txt
@@ -795,9 +795,10 @@ NuttX Configuration Tool
   An automated tool has been incorporated to support re-configuration
   of NuttX.  This tool is based on the kconfig-frontends application available
   at https://bitbucket.org/nuttx/tools/src/master/kconfig-frontends/.  (This
-  is a snapshot of http://ymorin.is-a-geek.org/projects/kconfig-frontends.)
-  This application provides a tool called 'kconfig-mconf' that is used by the
-  NuttX top-level Makefile. The following make target is provided:
+  is a snapshot of the old http://ymorin.is-a-geek.org/projects/kconfig-frontends
+  which is no longer available.)  This application provides a tool called
+  'kconfig-mconf' that is used by the NuttX top-level Makefile. The following
+  make target is provided:
 
     make menuconfig
 
@@ -1466,10 +1467,19 @@ Native Windows Build
   instead if you know what you are doing and want a faster download (No, I
   can't tell you which packages you should or should not download).
 
+  NOTE:  It should be possible to use Cygwin or MSYS2 in place of the GNUWin32
+  tools.  There are, however, complexities in doing that because those tools
+  depend on the shell environment and use DLLs that are not found (at least
+  not without the correct setup).
+
   Host Compiler:  I use the MingGW GCC compiler which can be downloaded from
   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.
 
+  Kconfig-frontends:  See the section entitled "NuttX Configuration Tool
+  under DOS" for information about installing the kconfig-frontend tools to
+  run natively under Windows.
+
   This capability should still be considered a work in progress because:
 
     (1) It has not been verified on all targets and tools, and
@@ -1542,6 +1552,10 @@ Installing GNUWin32
   need to perform a manual installation of the individual ZIP files that you
   will find in the <this directory>/GetGNUWin32/packages directory.
 
+  9. Make sure that you add the GNUWin32 tools to your path variable:
+
+    set PATH=C:\gnuwin32\bin;%PATH%
+
 CYGWIN BUILD PROBLEMS
 ^^^^^^^^^^^^^^^^^^^^^
 
diff --git a/tools/configure.bat b/tools/configure.bat
index 64f0fc1..7a2115c 100755
--- a/tools/configure.bat
+++ b/tools/configure.bat
@@ -33,6 +33,18 @@ rem ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 rem POSSIBILITY OF SUCH DAMAGE.
 rem
 
+if exist tools goto :GoToolDir
+if exist ..\tools goto :SetToolDir
+
+echo Cannot find tools\ directory
+goto End
+
+:GoToolDir
+cd tools
+
+:SetTooldir
+set tooldir=%CD%
+
 rem Parse command line arguments
 
 set debug=
@@ -86,6 +98,7 @@ if exist configure.exe goto :HaveConfigureExe
 
 set cc=mingw32-gcc.exe
 set cflags=-Wall -Wstrict-prototypes -Wshadow -g -pipe -I. -DCONFIG_WINDOWS_NATIVE=y
+echo %cc% %cflags% -o configure.exe configure.c cfgparser.c
 %cc% %cflags% -o configure.exe configure.c cfgparser.c
 if errorlevel 1 (
   echo ERROR: %cc% failed
@@ -94,15 +107,16 @@ if errorlevel 1 (
 )
 
 :HaveConfigureExe
-configure.exe %debug% %fmt% %hostopt% %appdir% %config%
+cd ..
+tools\configure.exe %debug% %fmt% %hostopt% %appdir% %config%
 if errorlevel 1 echo configure.exe failed
 goto End
 
 :NoConfig
-echo Missing ^<board-name^>\configs\^<config-name^> argument
+echo Missing ^<board-name^>:^<config-name^> argument
 
 :ShowUsage
-echo USAGE: %0 [-d] [-b|f] [-a ^<app-dir^>] ^<board-name^>\configs\^<config-name^>
+echo USAGE: %0 [-d] [-b|f] [-a ^<app-dir^>] ^<board-name^>:^<config-name^>
 echo        %0 [-h]
 echo\nWhere:
 echo  -d: