diff --git a/Kconfig b/Kconfig index bf1f1c7b4b3..4ea2ee47aff 100644 --- a/Kconfig +++ b/Kconfig @@ -60,7 +60,13 @@ config WINDOWS_CYGWIN bool "Cygwin" ---help--- Build natively in a Cygwin environment with POSIX style paths (like - /cygdrive/c/cgywin/home) + /cygdrive/c/Program Files) + +config WINDOWS_UBUNTU + bool "Ubuntu under Windows10" + ---help--- + Build natively in an Unbuntu shell under Windoes 10 environment with + POSIX style paths (like /mnt/c/Program Files) config WINDOWS_MSYS bool "MSYS" diff --git a/README.txt b/README.txt index 201bc35ed0a..24838ee4bdd 100644 --- a/README.txt +++ b/README.txt @@ -67,7 +67,7 @@ ENVIRONMENTS using MSYS. People report to me that they have used MSYS successfully. I suppose that the advantages of the MSYS environemnt is that it is closer to a native Windows environment and uses only a - minimal of add-on POSIX-ish tools. + minimal of add-on POSIX-land tools. - NuttX can also be installed and built on a native Windows system, but with some potential tool-related issues (see the discussion "Native @@ -178,10 +178,7 @@ Ubuntu Bash under Windows 10 the same directory would appear at "/cygdrive/c/Program Files". With these differences (perhaps a few other Windows quirks) the Ubuntu - install works just like Ubuntu running natively on your PC. Currently - there is no host configuration for Bash running under Windows 10 but - setting the host to either Linux or Cygwin in your configuratino file - should work fine. + install works just like Ubuntu running natively on your PC. Accessing Ubuntu Files From Windows ----------------------------------- @@ -224,9 +221,9 @@ Ubuntu Bash under Windows 10 ------------------------------ If you want to integrate with Windows native tools, then you will need deal with the same kind of craziness as with integrating Cygwin with - native toolchains. If you set the host PC to Cygwin in this case, then - the NuttX build system should deal with that craziness for you. See the - section "Cygwin Build Problems" below. + native toolchains. But when you select a Windows native toolchain, the + NuttX build system should deal with most that craziness for you. But not + all, see the section "Cygwin Build Problems" below. INSTALLATION ^^^^^^^^^^^^ diff --git a/arch/arm/src/arm/Toolchain.defs b/arch/arm/src/arm/Toolchain.defs index d713e92e5da..199e118936f 100644 --- a/arch/arm/src/arm/Toolchain.defs +++ b/arch/arm/src/arm/Toolchain.defs @@ -1,7 +1,7 @@ ############################################################################ # arch/arm/src/armv/Toolchain.defs # -# Copyright (C) 2012-2014 Gregory Nutt. All rights reserved. +# Copyright (C) 2012-2014, 2017 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -129,6 +129,8 @@ ifeq ($(CONFIG_ARM_TOOLCHAIN),CODESOURCERYW) MAXOPTIMIZATION ?= -O2 ifeq ($(CONFIG_WINDOWS_CYGWIN),y) WINTOOL = y + else ifeq ($(CONFIG_WINDOWS_UBUNTU),y) + WINTOOL = y endif endif @@ -139,6 +141,8 @@ ifeq ($(CONFIG_ARM_TOOLCHAIN),DEVKITARM) ARCROSSDEV ?= arm-eabi- ifeq ($(CONFIG_WINDOWS_CYGWIN),y) WINTOOL = y + else ifeq ($(CONFIG_WINDOWS_UBUNTU),y) + WINTOOL = y endif endif @@ -158,5 +162,7 @@ ifeq ($(CONFIG_ARM_TOOLCHAIN),GNU_EABIW) MAXOPTIMIZATION ?= -Os ifeq ($(CONFIG_WINDOWS_CYGWIN),y) WINTOOL = y + else ifeq ($(CONFIG_WINDOWS_UBUNTU),y) + WINTOOL = y endif endif diff --git a/arch/arm/src/armv6-m/Toolchain.defs b/arch/arm/src/armv6-m/Toolchain.defs index dfe5b9c9fdb..b3b1d3d7c0c 100644 --- a/arch/arm/src/armv6-m/Toolchain.defs +++ b/arch/arm/src/armv6-m/Toolchain.defs @@ -1,7 +1,7 @@ ############################################################################ # arch/arm/src/armv6-m/Toolchain.defs # -# Copyright (C) 2013 Gregory Nutt. All rights reserved. +# Copyright (C) 2013, 2017 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -107,6 +107,8 @@ ifeq ($(CONFIG_ARMV6M_TOOLCHAIN),ATOLLIC) ARCROSSDEV ?= arm-atollic-eabi- ifeq ($(CONFIG_WINDOWS_CYGWIN),y) WINTOOL = y + else ifeq ($(CONFIG_WINDOWS_UBUNTU),y) + WINTOOL = y endif ARCHCPUFLAGS = -mcpu=cortex-m0 -mthumb -mfloat-abi=soft endif @@ -134,6 +136,8 @@ ifeq ($(CONFIG_ARMV6M_TOOLCHAIN),CODEREDW) ARCROSSDEV ?= arm-none-eabi- ifeq ($(CONFIG_WINDOWS_CYGWIN),y) WINTOOL = y + else ifeq ($(CONFIG_WINDOWS_UBUNTU),y) + WINTOOL = y endif ARCHCPUFLAGS = -mcpu=cortex-m0 -mthumb -mfloat-abi=soft endif @@ -153,6 +157,8 @@ ifeq ($(CONFIG_ARMV6M_TOOLCHAIN),CODESOURCERYW) ARCROSSDEV ?= arm-none-eabi- ifeq ($(CONFIG_WINDOWS_CYGWIN),y) WINTOOL = y + else ifeq ($(CONFIG_WINDOWS_UBUNTU),y) + WINTOOL = y endif ARCHCPUFLAGS = -mcpu=cortex-m0 -mthumb -mfloat-abi=soft endif @@ -164,6 +170,8 @@ ifeq ($(CONFIG_ARMV6M_TOOLCHAIN),DEVKITARM) ARCROSSDEV ?= arm-eabi- ifeq ($(CONFIG_WINDOWS_CYGWIN),y) WINTOOL = y + else ifeq ($(CONFIG_WINDOWS_UBUNTU),y) + WINTOOL = y endif ARCHCPUFLAGS = -mcpu=cortex-m0 -mthumb -mfloat-abi=soft endif @@ -181,6 +189,8 @@ ifeq ($(CONFIG_ARMV6M_TOOLCHAIN),GNU_EABIW) ARCROSSDEV ?= arm-none-eabi- ifeq ($(CONFIG_WINDOWS_CYGWIN),y) WINTOOL = y + else ifeq ($(CONFIG_WINDOWS_UBUNTU),y) + WINTOOL = y endif ARCHCPUFLAGS = -mcpu=cortex-m0 -mthumb -mfloat-abi=soft endif diff --git a/arch/arm/src/armv7-a/Toolchain.defs b/arch/arm/src/armv7-a/Toolchain.defs index 8ee6efdf2ad..329abba970f 100644 --- a/arch/arm/src/armv7-a/Toolchain.defs +++ b/arch/arm/src/armv7-a/Toolchain.defs @@ -1,7 +1,7 @@ ############################################################################ # arch/arm/src/armv7-a/Toolchain.defs # -# Copyright (C) 2013 Gregory Nutt. All rights reserved. +# Copyright (C) 2013, 2017 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -129,6 +129,8 @@ ifeq ($(CONFIG_ARMV7A_TOOLCHAIN),CODESOURCERYW) MAXOPTIMIZATION ?= -O2 ifeq ($(CONFIG_WINDOWS_CYGWIN),y) WINTOOL = y + else ifeq ($(CONFIG_WINDOWS_UBUNTU),y) + WINTOOL = y endif endif @@ -139,6 +141,8 @@ ifeq ($(CONFIG_ARMV7A_TOOLCHAIN),DEVKITARM) ARCROSSDEV ?= $(TARGET_ARCH)-eabi- ifeq ($(CONFIG_WINDOWS_CYGWIN),y) WINTOOL = y + else ifeq ($(CONFIG_WINDOWS_UBUNTU),y) + WINTOOL = y endif endif @@ -158,5 +162,7 @@ ifeq ($(CONFIG_ARMV7A_TOOLCHAIN),GNU_EABIW) MAXOPTIMIZATION ?= -Os ifeq ($(CONFIG_WINDOWS_CYGWIN),y) WINTOOL = y + else ifeq ($(CONFIG_WINDOWS_UBUNTU),y) + WINTOOL = y endif endif diff --git a/arch/arm/src/armv7-m/Toolchain.defs b/arch/arm/src/armv7-m/Toolchain.defs index 8cfcaa3e1d4..262f79c4de3 100644 --- a/arch/arm/src/armv7-m/Toolchain.defs +++ b/arch/arm/src/armv7-m/Toolchain.defs @@ -1,7 +1,7 @@ ############################################################################ # arch/arm/src/armv7-m/Toolchain.defs # -# Copyright (C) 2012-2013, 2015-2016 Gregory Nutt. All rights reserved. +# Copyright (C) 2012-2013, 2015-2017 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -167,6 +167,8 @@ ifeq ($(CONFIG_ARMV7M_TOOLCHAIN),ATOLLIC) ARCHCPUFLAGS = $(TOOLCHAIN_MCPU) -mthumb $(TOOLCHAIN_MFLOAT) ifeq ($(CONFIG_WINDOWS_CYGWIN),y) WINTOOL = y + else ifeq ($(CONFIG_WINDOWS_UBUNTU),y) + WINTOOL = y endif endif @@ -203,6 +205,8 @@ ifeq ($(CONFIG_ARMV7M_TOOLCHAIN),CODEREDW) ARCHCPUFLAGS = $(TOOLCHAIN_MCPU) -mthumb $(TOOLCHAIN_MFLOAT) ifeq ($(CONFIG_WINDOWS_CYGWIN),y) WINTOOL = y + else ifeq ($(CONFIG_WINDOWS_UBUNTU),y) + WINTOOL = y endif endif @@ -224,6 +228,8 @@ ifeq ($(CONFIG_ARMV7M_TOOLCHAIN),CODESOURCERYW) ARCHCPUFLAGS = $(TOOLCHAIN_MCPU) -mthumb $(TOOLCHAIN_MFLOAT) ifeq ($(CONFIG_WINDOWS_CYGWIN),y) WINTOOL = y + else ifeq ($(CONFIG_WINDOWS_UBUNTU),y) + WINTOOL = y endif endif @@ -234,6 +240,8 @@ ifeq ($(CONFIG_ARMV7M_TOOLCHAIN),DEVKITARM) ARCROSSDEV ?= arm-none-eabi- ifeq ($(CONFIG_WINDOWS_CYGWIN),y) WINTOOL = y + else ifeq ($(CONFIG_WINDOWS_UBUNTU),y) + WINTOOL = y endif ARCHCPUFLAGS = $(TOOLCHAIN_MCPU) -mthumb $(TOOLCHAIN_MFLOAT) endif @@ -256,6 +264,8 @@ ifeq ($(CONFIG_ARMV7M_TOOLCHAIN),GNU_EABIW) ARCHCPUFLAGS = $(TOOLCHAIN_MCPU) -mthumb $(TOOLCHAIN_MFLOAT) ifeq ($(CONFIG_WINDOWS_CYGWIN),y) WINTOOL = y + else ifeq ($(CONFIG_WINDOWS_UBUNTU),y) + WINTOOL = y endif endif @@ -266,6 +276,8 @@ ifeq ($(CONFIG_ARMV7M_TOOLCHAIN),RAISONANCE) ARCROSSDEV ?= arm-none-eabi- ifeq ($(CONFIG_WINDOWS_CYGWIN),y) WINTOOL = y + else ifeq ($(CONFIG_WINDOWS_UBUNTU),y) + WINTOOL = y endif ARCHCPUFLAGS = $(TOOLCHAIN_MCPU) -mthumb $(TOOLCHAIN_MFLOAT) endif diff --git a/arch/arm/src/armv7-r/Toolchain.defs b/arch/arm/src/armv7-r/Toolchain.defs index f1eb9db8170..09aab784409 100644 --- a/arch/arm/src/armv7-r/Toolchain.defs +++ b/arch/arm/src/armv7-r/Toolchain.defs @@ -1,7 +1,7 @@ ############################################################################ # arch/arm/src/armv7-r/Toolchain.defs # -# Copyright (C) 2015 Gregory Nutt. All rights reserved. +# Copyright (C) 2015, 2017 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -129,6 +129,8 @@ ifeq ($(CONFIG_ARMV7R_TOOLCHAIN),CODESOURCERYW) MAXOPTIMIZATION ?= -O2 ifeq ($(CONFIG_WINDOWS_CYGWIN),y) WINTOOL = y + else ifeq ($(CONFIG_WINDOWS_UBUNTU),y) + WINTOOL = y endif endif @@ -139,6 +141,8 @@ ifeq ($(CONFIG_ARMV7R_TOOLCHAIN),DEVKITARM) ARCROSSDEV ?= $(TARGET_ARCH)-eabi- ifeq ($(CONFIG_WINDOWS_CYGWIN),y) WINTOOL = y + else ifeq ($(CONFIG_WINDOWS_UBUNTU),y) + WINTOOL = y endif endif @@ -158,5 +162,7 @@ ifeq ($(CONFIG_ARMV7R_TOOLCHAIN),GNU_EABIW) MAXOPTIMIZATION ?= -Os ifeq ($(CONFIG_WINDOWS_CYGWIN),y) WINTOOL = y + else ifeq ($(CONFIG_WINDOWS_UBUNTU),y) + WINTOOL = y endif endif diff --git a/arch/avr/src/avr/Toolchain.defs b/arch/avr/src/avr/Toolchain.defs index 7503086fb07..eea11e441af 100644 --- a/arch/avr/src/avr/Toolchain.defs +++ b/arch/avr/src/avr/Toolchain.defs @@ -1,7 +1,7 @@ ############################################################################ # arch/avr/src/avr/Toolchain.defs # -# Copyright (C) 2012-2013 Gregory Nutt. All rights reserved. +# Copyright (C) 2012-2013, 2017 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -134,6 +134,8 @@ ifeq ($(_WINAVR),1) CROSSDEV ?= avr- ifeq ($(CONFIG_WINDOWS_CYGWIN),y) WINTOOL = y + else ifeq ($(CONFIG_WINDOWS_UBUNTU),y) + WINTOOL = y endif MAXOPTIMIZATION ?= -O2 LDFLAGS += -nostartfiles -nodefaultlibs diff --git a/arch/avr/src/avr32/Toolchain.defs b/arch/avr/src/avr32/Toolchain.defs index b0a40e34b30..68f9c7045b0 100644 --- a/arch/avr/src/avr32/Toolchain.defs +++ b/arch/avr/src/avr32/Toolchain.defs @@ -1,7 +1,7 @@ ############################################################################ # arch/avr/src/avr32/Toolchain.defs # -# Copyright (C) 2012 Gregory Nutt. All rights reserved. +# Copyright (C) 2012, 2017 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -62,6 +62,8 @@ endif ifeq ($(CONFIG_AVR32_TOOLCHAIN),AVRTOOLSW) ifeq ($(CONFIG_WINDOWS_CYGWIN),y) WINTOOL = y + else ifeq ($(CONFIG_WINDOWS_UBUNTU),y) + WINTOOL = y endif else # AVR Tools or avr32-toolchain from https://github.com/jsnyder/avr32-toolchain diff --git a/arch/mips/src/mips32/Toolchain.defs b/arch/mips/src/mips32/Toolchain.defs index cee45311d8e..3e2947a7e1a 100644 --- a/arch/mips/src/mips32/Toolchain.defs +++ b/arch/mips/src/mips32/Toolchain.defs @@ -1,7 +1,7 @@ ############################################################################ # arch/mips/src/mips32/Toolchain.defs # -# Copyright (C) 2012-2013, 2015 Gregory Nutt. All rights reserved. +# Copyright (C) 2012-2013, 2015, 2017 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -178,6 +178,8 @@ ifeq ($(CONFIG_MIPS32_TOOLCHAIN),MICROCHIPW_XC32) CROSSDEV ?= xc32- ifeq ($(CONFIG_WINDOWS_CYGWIN),y) WINTOOL = y + else ifeq ($(CONFIG_WINDOWS_UBUNTU),y) + WINTOOL = y endif ifeq ($(CONFIG_MIPS32_TOOLCHAIN_MICROCHIP_XC32_LICENSED),y) MAXOPTIMIZATION ?= -O2 @@ -193,6 +195,8 @@ ifeq ($(CONFIG_MIPS32_TOOLCHAIN),MICROCHIPW) CROSSDEV ?= pic32- ifeq ($(CONFIG_WINDOWS_CYGWIN),y) WINTOOL = y + else ifeq ($(CONFIG_WINDOWS_UBUNTU),y) + WINTOOL = y endif MAXOPTIMIZATION ?= -O2 ARCHCPUFLAGS = -mprocessor=$(MIPS_MPROCESSOR) $(MIPS_MICROMIPS) -mno-float -mlong32 -membedded-data @@ -219,6 +223,8 @@ ifeq ($(CONFIG_MIPS32_TOOLCHAIN),MICROCHIPW_LITE) # CROSSDEV ?= xc32- ifeq ($(CONFIG_WINDOWS_CYGWIN),y) WINTOOL = y + else ifeq ($(CONFIG_WINDOWS_UBUNTU),y) + WINTOOL = y endif # MAXOPTIMIZATION ?= -O2 ARCHCPUFLAGS = -mprocessor=$(MIPS_MPROCESSOR) $(MIPS_MICROMIPS) -mno-float -mlong32 -membedded-data @@ -245,6 +251,8 @@ ifeq ($(CONFIG_MIPS32_TOOLCHAIN),PINGUINOW) CROSSDEV ?= p32- ifeq ($(CONFIG_WINDOWS_CYGWIN),y) WINTOOL = y + else ifeq ($(CONFIG_WINDOWS_UBUNTU),y) + WINTOOL = y endif MAXOPTIMIZATION ?= -O2 ARCHCPUFLAGS = -mlong32 -membedded-data -msoft-float -march=$(MIPS_MARCH) $(MIPS_MICROMIPS) -EL diff --git a/arch/misoc/src/lm32/Toolchain.defs b/arch/misoc/src/lm32/Toolchain.defs index f59fa1ab45e..f7c7c1adf9e 100644 --- a/arch/misoc/src/lm32/Toolchain.defs +++ b/arch/misoc/src/lm32/Toolchain.defs @@ -1,7 +1,7 @@ ############################################################################ # arch/misco/src/lm32/Toolchain.defs # -# Copyright (C) 2016 Gregory Nutt. All rights reserved. +# Copyright (C) 2016-2017 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -100,5 +100,7 @@ ifeq ($(CONFIG_LM32_TOOLCHAIN),GNUW) MAXOPTIMIZATION ?= -Os ifeq ($(CONFIG_WINDOWS_CYGWIN),y) WINTOOL = y + else ifeq ($(CONFIG_WINDOWS_UBUNTU),y) + WINTOOL = y endif endif diff --git a/arch/sim/Kconfig b/arch/sim/Kconfig index 975d0449a5b..5168c7796eb 100644 --- a/arch/sim/Kconfig +++ b/arch/sim/Kconfig @@ -37,7 +37,7 @@ config SIM_CYGWIN_DECORATED default n depends on WINDOWS_CYGWIN ---help--- - Older versions of Cygwin toolsdecorated C symbol names by adding an + Older versions of Cygwin tools decorated C symbol names by adding an underscore to the beginning of the symbol name. Newer versions of Cygwin do not seem to do this. diff --git a/arch/z80/src/ez80/Toolchain.defs b/arch/z80/src/ez80/Toolchain.defs index bc68e4782dd..257a37d995c 100644 --- a/arch/z80/src/ez80/Toolchain.defs +++ b/arch/z80/src/ez80/Toolchain.defs @@ -1,7 +1,7 @@ ############################################################################ # arch/z80/src/ez80/Toolchain.defs # -# Copyright (C) 2012, 2016 Gregory Nutt. All rights reserved. +# Copyright (C) 2012, 2016-2017 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -44,4 +44,6 @@ CONFIG_EZ80_TOOLCHAIN ?= ZDSII ifeq ($(CONFIG_WINDOWS_CYGWIN),y) WINTOOL = y +else ifeq ($(CONFIG_WINDOWS_UBUNTU),y) + WINTOOL = y endif diff --git a/arch/z80/src/z180/Toolchain.defs b/arch/z80/src/z180/Toolchain.defs index cf97558ffca..ed57fff794f 100644 --- a/arch/z80/src/z180/Toolchain.defs +++ b/arch/z80/src/z180/Toolchain.defs @@ -1,7 +1,7 @@ ############################################################################ # arch/z80/src/z180/Toolchain.defs # -# Copyright (C) 2012 Gregory Nutt. All rights reserved. +# Copyright (C) 2012, 2017 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -69,6 +69,8 @@ endif ifeq ($(CONFIG_AVR_TOOLCHAIN),SDCCWIN32) ifeq ($(CONFIG_WINDOWS_CYGWIN),y) WINTOOL = y + else ifeq ($(CONFIG_WINDOWS_UBUNTU),y) + WINTOOL = y endif endif diff --git a/arch/z80/src/z8/Toolchain.defs b/arch/z80/src/z8/Toolchain.defs index 9aaf1b89ced..e1f5cb64207 100644 --- a/arch/z80/src/z8/Toolchain.defs +++ b/arch/z80/src/z8/Toolchain.defs @@ -1,7 +1,7 @@ ############################################################################ # arch/z80/src/z8/Toolchain.defs # -# Copyright (C) 2012 Gregory Nutt. All rights reserved. +# Copyright (C) 2012, 2017 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -44,4 +44,6 @@ CONFIG_Z8_TOOLCHAIN ?= ZDSII ifeq ($(CONFIG_WINDOWS_CYGWIN),y) WINTOOL = y +else ifeq ($(CONFIG_WINDOWS_UBUNTU),y) + WINTOOL = y endif diff --git a/arch/z80/src/z80/Toolchain.defs b/arch/z80/src/z80/Toolchain.defs index 90fc9944ad2..9c0776247a0 100644 --- a/arch/z80/src/z80/Toolchain.defs +++ b/arch/z80/src/z80/Toolchain.defs @@ -1,7 +1,7 @@ ############################################################################ # arch/z80/src/z80/Toolchain.defs # -# Copyright (C) 2012 Gregory Nutt. All rights reserved. +# Copyright (C) 2012, 2017 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -69,6 +69,8 @@ endif ifeq ($(CONFIG_AVR_TOOLCHAIN),SDCCWIN32) ifeq ($(CONFIG_WINDOWS_CYGWIN),y) WINTOOL = y + else ifeq ($(CONFIG_WINDOWS_UBUNTU),y) + WINTOOL = y endif endif diff --git a/tools/sethost.sh b/tools/sethost.sh index 085361f5b68..ba7848e0427 100755 --- a/tools/sethost.sh +++ b/tools/sethost.sh @@ -1,7 +1,7 @@ #!/bin/bash # tools/sethost.sh # -# Copyright (C) 2016 Gregory Nutt. All rights reserved. +# Copyright (C) 2016-2017 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -42,13 +42,14 @@ unset configfile function showusage { echo "" - echo "USAGE: $progname [-w|l] [-c|n] [-32|64] []" + echo "USAGE: $progname [-w|l] [-c|u|n] [-32|64] []" echo " $progname -h" echo "" echo "Where:" echo " -w|l selects Windows (w) or Linux (l). Default: Linux" - echo " -c|n selects Windows native (n) or Cygwin (c). Default Cygwin" - echo " -32|64 selects 32- or 64-bit host (Only for Cygwin). Default 64" + echo " -c|u|n selects Windows environment option: Cygwin (c), Ubuntu under" + echo " Windows 10 (u), or Windows native (n). Default Cygwin" + echo " -32|64 selects 32- or 64-bit host. Default 64" echo " -h will show this help test and terminate" echo " selects configuration file. Default: .config" exit 1 @@ -67,6 +68,9 @@ while [ ! -z "$1" ]; do -c ) wenv=cygwin ;; + -u ) + wenv=ubuntu + ;; -n ) wenv=native ;; @@ -170,6 +174,7 @@ if [ "X$host" == "Xlinux" ]; then kconfig-tweak --file $nuttx/.config --disable CONFIG_WINDOWS_NATIVE kconfig-tweak --file $nuttx/.config --disable CONFIG_WINDOWS_CYGWIN + kconfig-tweak --file $nuttx/.config --disable CONFIG_WINDOWS_UBUNTU kconfig-tweak --file $nuttx/.config --disable CONFIG_WINDOWS_MSYS kconfig-tweak --file $nuttx/.config --disable CONFIG_WINDOWS_OTHER @@ -184,11 +189,19 @@ else if [ "X$wenv" == "Xcygwin" ]; then echo " Select CONFIG_WINDOWS_CYGWIN=y" kconfig-tweak --file $nuttx/.config --enable CONFIG_WINDOWS_CYGWIN + kconfig-tweak --file $nuttx/.config --disable CONFIG_WINDOWS_UBUNTU kconfig-tweak --file $nuttx/.config --disable CONFIG_WINDOWS_NATIVE else - echo " Select CONFIG_WINDOWS_NATIVE=y" - kconfig-tweak --file $nuttx/.config --enable CONFIG_WINDOWS_NATIVE kconfig-tweak --file $nuttx/.config --disable CONFIG_WINDOWS_CYGWIN + if [ "X$wenv" == "Xubuntu" ]; then + echo " Select CONFIG_WINDOWS_UBUNTU=y" + kconfig-tweak --file $nuttx/.config --enable CONFIG_WINDOWS_UBUNTU + kconfig-tweak --file $nuttx/.config --disable CONFIG_WINDOWS_NATIVE + else + echo " Select CONFIG_WINDOWS_NATIVE=y" + kconfig-tweak --file $nuttx/.config --disable CONFIG_WINDOWS_UBUNTU + kconfig-tweak --file $nuttx/.config --enable CONFIG_WINDOWS_NATIVE + fi fi kconfig-tweak --file $nuttx/.config --disable CONFIG_WINDOWS_MSYS diff --git a/tools/testbuild.sh b/tools/testbuild.sh index 775dcab3fb9..75e0e3b57c0 100755 --- a/tools/testbuild.sh +++ b/tools/testbuild.sh @@ -1,7 +1,7 @@ #!/bin/bash # testbuild.sh # -# Copyright (C) 2016 Gregory Nutt. All rights reserved. +# Copyright (C) 2016-2017 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -47,12 +47,13 @@ unset testfile function showusage { echo "" - echo "USAGE: $progname [-w|l] [-c|n] [-s] [-a ] [-n ] " + echo "USAGE: $progname [-w|l] [-c|u|n] [-s] [-a ] [-n ] " echo " $progname -h" echo "" echo "Where:" echo " -w|l selects Windows (w) or Linux (l). Default: Linux" - echo " -c|n selects Windows native (n) or Cygwin (c). Default Cygwin" + echo " -c|u|n selects Windows environment option: Cygwin (c), Ubuntu under" + echo " Windows 10 (u), or Windows native (n). Default Cygwin" echo " -s Use C++ unsigned long size_t in new operator. Default unsigned int" echo " -a provides the relative path to the apps/ directory. Default ../apps" echo " -n provides the relative path to the NxWidgets/ directory. Default ../NxWidgets" @@ -78,6 +79,9 @@ while [ ! -z "$1" ]; do -c ) wenv=cygwin ;; + -u ) + wenv=ubuntu + ;; -n ) wenv=native ;; @@ -165,11 +169,19 @@ function configure { if [ "X$wenv" == "Xcygwin" ]; then echo " Select CONFIG_WINDOWS_CYGWIN=y" kconfig-tweak --file $nuttx/.config --enable CONFIG_WINDOWS_CYGWIN + kconfig-tweak --file $nuttx/.config --disable CONFIG_WINDOWS_UBUNTU kconfig-tweak --file $nuttx/.config --disable CONFIG_WINDOWS_NATIVE else - echo " Select CONFIG_WINDOWS_NATIVE=y" - kconfig-tweak --file $nuttx/.config --enable CONFIG_WINDOWS_NATIVE kconfig-tweak --file $nuttx/.config --disable CONFIG_WINDOWS_CYGWIN + if [ "X$wenv" == "Xubuntu" ]; then + echo " Select CONFIG_WINDOWS_UBUNTU=y" + kconfig-tweak --file $nuttx/.config --enable CONFIG_WINDOWS_UBUNTU + kconfig-tweak --file $nuttx/.config --disable CONFIG_WINDOWS_NATIVE + else + echo " Select CONFIG_WINDOWS_NATIVE=y" + kconfig-tweak --file $nuttx/.config --disable CONFIG_WINDOWS_UBUNTU + kconfig-tweak --file $nuttx/.config --enable CONFIG_WINDOWS_NATIVE + fi fi kconfig-tweak --file $nuttx/.config --disable CONFIG_WINDOWS_MSYS