tools/configure.sh: Another fix for the script. The last change only worked for Windows Cygwin; for Linux, it needed to remove some additional things from the defconfig file.

This commit is contained in:
Gregory Nutt 2017-10-01 14:24:57 -06:00
parent e505df2eb5
commit 9eca03b9be
5 changed files with 44 additions and 52 deletions

View File

@ -12,7 +12,7 @@ Contents
o Configuring NuttX
o Reconfiguring NuttX
o Reconfiguring for Linux, OSX, or Cygwin
o Reconfiguring for Windows Native, Cygwin, or OSX
o SDCC
o Building the SDCC toolchain
@ -36,10 +36,10 @@ Configuring NuttX
"Reconfiguring" section below for information about changing this
configuration.
2. The default setup for this configuration uses a windows native build.
See the section entitled "Reconfiguring for Linux, OSX, or Cygwin"
which will give you the steps you would need to do to convert this
configuration to build in other, Unix-like environments.
2. The default setup for this configuration builds under Linux.
See the section entitled "Reconfiguring for Windows Native, Cygwin,
or OSX" which will give you the steps you would need to do to convert
this configuration to build in other environments.
3. This configuration was last verified sucessfully prior to the
the configure to Kconfig/mconf tool using SDCC 2.6.0 built to run
@ -66,9 +66,9 @@ Configuring NuttX
configuration.
2. The default setup for this configuration uses a windows native build.
See the section entitled "Reconfiguring for Linux, OSX, or Cygwin"
which will give you the steps you would need to do to convert this
configuration to build in other, Unix-like environments.
See the section entitled "Reconfiguring for Windows Native, Cygwin,
or OSX" which will give you the steps you would need to do to convert
this configuration to build in other environments.
3. This configuration was last verified sucessfully prior to the
the configure to Kconfig/mconf tool using SDCC 2.6.0 built to run
@ -97,9 +97,9 @@ Configuring NuttX
configuration.
2. The default setup for this configuration uses a windows native build.
See the section entitled "Reconfiguring for Linux, OSX, or Cygwin"
which will give you the steps you would need to do to convert this
configuration to build in other, Unix-like environments.
See the section entitled "Reconfiguring for Windows Native, Cygwin,
or OSX" which will give you the steps you would need to do to convert
this configuration to build in other environments.
3. This configuration was last verified sucessfully prior to the
the configure to Kconfig/mconf tool using SDCC 2.6.0 built to run
@ -117,26 +117,25 @@ tool. To change this configuration using that tool, you should:
b. Execute 'make menuconfig' in nuttx/ in order to start the reconfiguration
process.
Reconfiguring for Linux, OSX, or Cygwin
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Reconfiguring for Windows Native, Cygwin, or OSX
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
All of the z80 configurations in this this directory are set up to build in a
Windows CMD.exe shell. This configuration requires the MinGW host compiler
and severl GNUWin32 tools (see discussion in the top-level NuttX/README.txt
file).
All of the z80 configurations in this this directory are set up to build
under Linux. That configuration can be converted to run natively in a
Windows CMD.exe shell. That configuration requires the MinGW host compiler
and several GNUWin32 tools (see discussion in the top-level NuttX/README.txt
file) and the following changes to the configuation file:
These configurations can be converted to run under Linux (or Cygwin or OSX),
by modifying the configuration file as follows:
-CONFIG_HOST_LINUX=y
+CONFIG_HOST_WINDOWS=y
+CONFIG_WINDOWS_NATIVE=y
-CONFIG_HOST_WINDOWS=y
-CONFIG_WINDOWS_NATIVE=y
+CONFIG_HOST_LINUX=y
-CONFIG_Z80_TOOLCHAIN_SDCCL=y
+CONFIG_Z80_TOOLCHAIN_SDCCW=y
-CONFIG_Z80_TOOLCHAIN_SDCCW=y
+CONFIG_Z80_TOOLCHAIN_SDCCL=y
You may need to first manually change the CONFIG_APPS_DIR="..\apps" definition
in the .config file because the backslash may upset some Unix-based tools.
You may need to first manually change the CONFIG_APPS_DIR="../apps"
definition in the .config file because the forward slash may upset some
Windows-based tools.
This configuration will require a recent version of SDCC (ca. 3.2.1) for Linux
or custom built for Cygwin (see below).

View File

@ -13,7 +13,6 @@ CONFIG_DISABLE_PTHREAD=y
CONFIG_EXAMPLES_OSTEST_NBARRIER_THREADS=4
CONFIG_EXAMPLES_OSTEST_STACKSIZE=1024
CONFIG_EXAMPLES_OSTEST=y
CONFIG_HOST_WINDOWS=y
CONFIG_MAX_TASKS=8
CONFIG_MAX_WDOGPARMS=2
CONFIG_NFILE_DESCRIPTORS=0
@ -37,4 +36,3 @@ CONFIG_UART_TXBUFSIZE=64
CONFIG_USER_ENTRYPOINT="ostest_main"
CONFIG_USERMAIN_STACKSIZE=1024
CONFIG_WDOG_INTRESERVE=0
CONFIG_WINDOWS_NATIVE=y

View File

@ -282,7 +282,7 @@
/* SDCC-specific definitions ************************************************/
#elif defined(__SDCC__) || defined(SDCC)
#elif defined(SDCC) || defined(__SDCC)
/* No I-space access qualifiers */

View File

@ -64,11 +64,11 @@
/* NULL is usually defined in stddef.h (which includes this file) */
#ifndef NULL
/* SDCC is sensitive to NULL pointer type conversions, and C++ defines
* NULL as zero
*/
/* SDCC is sensitive to NULL pointer type conversions, and C++ defines
* NULL as zero
*/
# if defined(SDCC) || defined(__cplusplus)
# if defined(SDCC) || defined(__SDCC) || defined(__cplusplus)
# define NULL (0)
# else
# define NULL ((void*)0)

View File

@ -266,45 +266,40 @@ if [ "X${defappdir}" = "Xy" ]; then
fi
if [ ! -z "$host" ]; then
sed -i -e "/CONFIG_HOST_LINUX/d" ${dest_config}
sed -i -e "/CONFIG_HOST_WINDOWS/d" ${dest_config}
sed -i -e "/CONFIG_HOST_OSX/d" ${dest_config}
sed -i -e "/CONFIG_HOST_OTHER/d" ${dest_config}
sed -i -e "/CONFIG_WINDOWS_NATIVE/d" ${dest_config}
sed -i -e "/CONFIG_WINDOWS_CYGWIN/d" ${dest_config}
sed -i -e "/CONFIG_WINDOWS_MSYS/d" ${dest_config}
sed -i -e "/CONFIG_WINDOWS_UBUNTU/d" ${dest_config}
sed -i -e "/CONFIG_WINDOWS_OTHER/d" ${dest_config}
sed -i -e "/CONFIG_SIM_X8664_MICROSOFT/d" ${dest_config}
sed -i -e "/CONFIG_SIM_X8664_SYSTEMV/d" ${dest_config}
sed -i -e "/CONFIG_SIM_M32/d" ${dest_config}
if [ "$host" == "linux" ]; then
echo " Select CONFIG_HOST_LINUX=y"
sed -i -e "/CONFIG_HOST_WINDOWS/d" ${dest_config}
sed -i -e "/CONFIG_SIM_X8664_MICROSOFT/d" ${dest_config}
sed -i -e "/CONFIG_SIM_M32/d" ${dest_config}
echo "CONFIG_HOST_LINUX=y" >> "${dest_config}"
echo "CONFIG_SIM_X8664_SYSTEMV=y" >> "${dest_config}"
else
else
echo " Select CONFIG_HOST_WINDOWS=y"
sed -i -e "/CONFIG_HOST_LINUX/d" ${dest_config}
sed -i -e "/CONFIG_WINDOWS_MSYS/d" ${dest_config}
sed -i -e "/CONFIG_WINDOWS_OTHER/d" ${dest_config}
sed -i -e "/CONFIG_SIM_X8664_SYSTEMV/d" ${dest_config}
echo "CONFIG_HOST_WINDOWS=y" >> "${dest_config}"
echo "CONFIG_SIM_X8664_MICROSOFT=y" >> "${dest_config}"
if [ "X$wenv" == "Xcygwin" ]; then
echo " Select CONFIG_WINDOWS_CYGWIN=y"
sed -i -e "/CONFIG_WINDOWS_UBUNTU/d" ${dest_config}
sed -i -e "/CONFIG_WINDOWS_NATIVE/d" ${dest_config}
echo "CONFIG_WINDOWS_CYGWIN=y" >> "${dest_config}"
else
sed -i -e "/CONFIG_WINDOWS_CYGWIN/d" ${dest_config}
if [ "X$wenv" == "Xubuntu" ]; then
echo " Select CONFIG_WINDOWS_UBUNTU=y"
sed -i -e "/CONFIG_WINDOWS_UBUNTU/d" ${dest_config}
echo "CONFIG_WINDOWS_UBUNTU=y" >> "${dest_config}"
else
echo " Select CONFIG_WINDOWS_NATIVE=y"
sed -i -e "/CONFIG_WINDOWS_NATIVE/d" ${dest_config}
echo "CONFIG_WINDOWS_NATIVE=y" >> "${dest_config}"
fi
fi