diff --git a/docs/en/get-started/windows-setup-scratch.rst b/docs/en/get-started/windows-setup-scratch.rst index 908897613..f7ee77081 100644 --- a/docs/en/get-started/windows-setup-scratch.rst +++ b/docs/en/get-started/windows-setup-scratch.rst @@ -45,10 +45,10 @@ Once Python is installed, open a Windows Command Prompt from the Start menu and pip install pyserial -MConf -^^^^^ +MConf for IDF +^^^^^^^^^^^^^ -Download the ESP-IDF customized version of the configuration tool mconf from the `mconf releases page `_. +Download the configuration tool mconf-idf from the `kconfig-frontends releases page `_. This is the ``mconf`` configuration tool with some minor customizations for ESP-IDF. This tool will also need to be unzipped to a directory which is then `added to your Path `_. diff --git a/docs/en/get-started/windows-setup.rst b/docs/en/get-started/windows-setup.rst index c9e1b7011..9b12e9d90 100644 --- a/docs/en/get-started/windows-setup.rst +++ b/docs/en/get-started/windows-setup.rst @@ -23,9 +23,9 @@ ESP-IDF Tools Installer The easiest way to install ESP-IDF's prerequisites is to download the ESP-IDF Tools installer from this URL: -https://dl.espressif.com/dl/esp-idf-tools-setup-1.0.exe +https://dl.espressif.com/dl/esp-idf-tools-setup-1.1.exe -The installer will automatically install the ESP32 Xtensa gcc toolchain, Ninja_ build tool, and a customized configuration tool called mconf. The installer can also download and run installers for CMake_ and Python_ 2.7 if these are not already installed on the computer. +The installer will automatically install the ESP32 Xtensa gcc toolchain, Ninja_ build tool, and a configuration tool called mconf-idf_. The installer can also download and run installers for CMake_ and Python_ 2.7 if these are not already installed on the computer. By default, the installer updates the Windows ``Path`` environment variable so all of these tools can be run from anywhere. If you disable this option, you will need to configure the environment where you are using ESP-IDF (terminal or chosen IDE) with the correct paths. @@ -68,5 +68,5 @@ For advanced users who want to customize the install process: .. _ninja: https://ninja-build.org/ .. _Python: https://www.python.org/downloads/windows/ .. _Git for Windows: https://gitforwindows.org/ -.. _mconf: https://github.com/espressif/kconfig-frontends/releases/ +.. _mconf-idf: https://github.com/espressif/kconfig-frontends/releases/ .. _Github Desktop: https://desktop.github.com/ diff --git a/make/project_config.mk b/make/project_config.mk index 613b203f7..50cf139e6 100644 --- a/make/project_config.mk +++ b/make/project_config.mk @@ -15,11 +15,11 @@ SDKCONFIG ?= $(PROJECT_PATH)/sdkconfig # overrides (usually used for esp-idf examples) SDKCONFIG_DEFAULTS ?= $(PROJECT_PATH)/sdkconfig.defaults -# Workaround to run make parallel (-j). mconf and conf cannot be made simultaneously -$(KCONFIG_TOOL_DIR)/mconf: $(KCONFIG_TOOL_DIR)/conf +# Workaround to run make parallel (-j). mconf-idf and conf-idf cannot be made simultaneously +$(KCONFIG_TOOL_DIR)/mconf-idf: $(KCONFIG_TOOL_DIR)/conf-idf # reset MAKEFLAGS as the menuconfig makefile uses implicit compile rules -$(KCONFIG_TOOL_DIR)/mconf $(KCONFIG_TOOL_DIR)/conf: $(wildcard $(KCONFIG_TOOL_DIR)/*.c) +$(KCONFIG_TOOL_DIR)/mconf-idf $(KCONFIG_TOOL_DIR)/conf-idf: $(wildcard $(KCONFIG_TOOL_DIR)/*.c) MAKEFLAGS="" CC=$(HOSTCC) LD=$(HOSTLD) \ $(MAKE) -C $(KCONFIG_TOOL_DIR) @@ -36,7 +36,7 @@ $(SDKCONFIG): defconfig endif endif -# macro for the commands to run kconfig tools conf or mconf. +# macro for the commands to run kconfig tools conf-idf or mconf-idf. # $1 is the name (& args) of the conf tool to run define RunConf mkdir -p $(BUILD_DIR_BASE)/include/config @@ -59,7 +59,7 @@ ifndef MAKE_RESTARTS # depend on any prerequisite that may cause a make restart as part of # the prerequisite's own recipe. -menuconfig: $(KCONFIG_TOOL_DIR)/mconf +menuconfig: $(KCONFIG_TOOL_DIR)/mconf-idf $(summary) MENUCONFIG ifdef BATCH_BUILD @echo "Can't run interactive configuration inside non-interactive build process." @@ -68,25 +68,25 @@ ifdef BATCH_BUILD @echo "See esp-idf documentation for more details." @exit 1 else - $(call RunConf,mconf) + $(call RunConf,mconf-idf) endif # defconfig creates a default config, based on SDKCONFIG_DEFAULTS if present -defconfig: $(KCONFIG_TOOL_DIR)/conf +defconfig: $(KCONFIG_TOOL_DIR)/conf-idf $(summary) DEFCONFIG ifneq ("$(wildcard $(SDKCONFIG_DEFAULTS))","") cat $(SDKCONFIG_DEFAULTS) >> $(SDKCONFIG) # append defaults to sdkconfig, will override existing values endif - $(call RunConf,conf --olddefconfig) + $(call RunConf,conf-idf --olddefconfig) # if neither defconfig or menuconfig are requested, use the GENCONFIG rule to # ensure generated config files are up to date -$(SDKCONFIG_MAKEFILE) $(BUILD_DIR_BASE)/include/sdkconfig.h: $(KCONFIG_TOOL_DIR)/conf $(SDKCONFIG) $(COMPONENT_KCONFIGS) $(COMPONENT_KCONFIGS_PROJBUILD) | $(call prereq_if_explicit,defconfig) $(call prereq_if_explicit,menuconfig) +$(SDKCONFIG_MAKEFILE) $(BUILD_DIR_BASE)/include/sdkconfig.h: $(KCONFIG_TOOL_DIR)/conf-idf $(SDKCONFIG) $(COMPONENT_KCONFIGS) $(COMPONENT_KCONFIGS_PROJBUILD) | $(call prereq_if_explicit,defconfig) $(call prereq_if_explicit,menuconfig) $(summary) GENCONFIG ifdef BATCH_BUILD # can't prompt for new config values like on terminal - $(call RunConf,conf --olddefconfig) + $(call RunConf,conf-idf --olddefconfig) endif - $(call RunConf,conf --silentoldconfig) + $(call RunConf,conf-idf --silentoldconfig) touch $(SDKCONFIG_MAKEFILE) $(BUILD_DIR_BASE)/include/sdkconfig.h # ensure newer than sdkconfig else # "$(MAKE_RESTARTS)" != "" diff --git a/tools/cmake/kconfig.cmake b/tools/cmake/kconfig.cmake index 7d1f51304..478b73e34 100644 --- a/tools/cmake/kconfig.cmake +++ b/tools/cmake/kconfig.cmake @@ -16,16 +16,26 @@ macro(kconfig_set_variables) endmacro() if(CMAKE_HOST_WIN32) - # Prefer a prebuilt mconf on Windows + # Prefer a prebuilt mconf-idf on Windows find_program(WINPTY winpty) - find_program(MCONF mconf) + find_program(MCONF mconf-idf) + + # Fall back to the old binary which was called 'mconf' not 'mconf-idf' + if(NOT MCONF) + find_program(MCONF mconf) + if(MCONF) + message(WARNING "Falling back to mconf binary '${MCONF}' not mconf-idf. " + "This is probably because an old version of IDF mconf is installed and this is fine. " + "However if there are config problems please check the Getting Started guide for your platform.") + endif() + endif() if(NOT MCONF) find_program(NATIVE_GCC gcc) if(NOT NATIVE_GCC) message(FATAL_ERROR - "Windows requires a prebuilt ESP-IDF-specific mconf for your platform " - "on the PATH, or an MSYS2 version of gcc on the PATH to build mconf. " + "Windows requires a prebuilt mconf-idf for your platform " + "on the PATH, or an MSYS2 version of gcc on the PATH to build mconf-idf. " "Consult the setup docs for ESP-IDF on Windows.") endif() elseif(WINPTY) @@ -36,26 +46,26 @@ endif() if(NOT MCONF) # Use the existing Makefile to build mconf (out of tree) when needed # - set(MCONF kconfig_bin/mconf) + set(MCONF kconfig_bin/mconf-idf) - Externalproject_Add(mconf + externalproject_add(mconf-idf SOURCE_DIR ${IDF_PATH}/tools/kconfig CONFIGURE_COMMAND "" BINARY_DIR "kconfig_bin" - BUILD_COMMAND make -f ${IDF_PATH}/tools/kconfig/Makefile mconf + BUILD_COMMAND make -f ${IDF_PATH}/tools/kconfig/Makefile mconf-idf BUILD_BYPRODUCTS ${MCONF} INSTALL_COMMAND "" EXCLUDE_FROM_ALL 1 ) file(GLOB mconf_srcfiles ${IDF_PATH}/tools/kconfig/*.c) - ExternalProject_Add_StepDependencies(mconf build + externalproject_add_stepdependencies(mconf-idf build ${mconf_srcfiles} ${IDF_PATH}/tools/kconfig/Makefile ${CMAKE_CURRENT_LIST_FILE}) unset(mconf_srcfiles) - set(menuconfig_depends DEPENDS mconf) + set(menuconfig_depends DEPENDS mconf-idf) endif() @@ -99,7 +109,7 @@ function(kconfig_process_config) --env "COMPONENT_KCONFIGS_PROJBUILD=${kconfigs_projbuild}" --env "IDF_CMAKE=y") - # Generate the menuconfig target (uses C-based mconf tool, either prebuilt or via mconf target above) + # Generate the menuconfig target (uses C-based mconf-idf tool, either prebuilt or via mconf-idf target above) add_custom_target(menuconfig ${menuconfig_depends} # create any missing config file, with defaults if necessary diff --git a/tools/kconfig/.gitignore b/tools/kconfig/.gitignore index 1950c8cb1..641b9e576 100644 --- a/tools/kconfig/.gitignore +++ b/tools/kconfig/.gitignore @@ -16,7 +16,9 @@ gconf.glade.h # configuration programs # conf +conf-idf mconf +mconf-idf nconf qconf gconf diff --git a/tools/kconfig/Makefile b/tools/kconfig/Makefile index c8a56abdd..c8f8ba014 100644 --- a/tools/kconfig/Makefile +++ b/tools/kconfig/Makefile @@ -43,7 +43,7 @@ endif endif # MING32 endif # MSYSTEM -default: mconf conf +default: mconf-idf conf-idf xconfig: qconf $< $(silent) $(Kconfig) @@ -51,41 +51,41 @@ xconfig: qconf gconfig: gconf $< $(silent) $(Kconfig) -menuconfig: mconf +menuconfig: mconf-idf $< $(silent) $(Kconfig) -config: conf +config: conf-idf $< $(silent) --oldaskconfig $(Kconfig) nconfig: nconf $< $(silent) $(Kconfig) -silentoldconfig: conf +silentoldconfig: conf-idf mkdir -p include/config include/generated $< $(silent) --$@ $(Kconfig) -localyesconfig localmodconfig: streamline_config.pl conf +localyesconfig localmodconfig: streamline_config.pl conf-idf mkdir -p include/config include/generated perl $< --$@ . $(Kconfig) > .tmp.config if [ -f .config ]; then \ cmp -s .tmp.config .config || \ (mv -f .config .config.old.1; \ mv -f .tmp.config .config; \ - conf $(silent) --silentoldconfig $(Kconfig); \ + conf-idf $(silent) --silentoldconfig $(Kconfig); \ mv -f .config.old.1 .config.old) \ else \ mv -f .tmp.config .config; \ - conf $(silent) --silentoldconfig $(Kconfig); \ + conf-idf $(silent) --silentoldconfig $(Kconfig); \ fi rm -f .tmp.config -# These targets map 1:1 to the commandline options of 'conf' +# These targets map 1:1 to the commandline options of 'conf-idf' simple-targets := oldconfig allnoconfig allyesconfig allmodconfig \ alldefconfig randconfig listnewconfig olddefconfig PHONY += $(simple-targets) -$(simple-targets): conf +$(simple-targets): conf-idf $< $(silent) --$@ $(Kconfig) PHONY += oldnoconfig savedefconfig defconfig @@ -95,10 +95,10 @@ PHONY += oldnoconfig savedefconfig defconfig # counter-intuitive name. oldnoconfig: olddefconfig -savedefconfig: conf +savedefconfig: conf-idf $< $(silent) --$@=defconfig $(Kconfig) -defconfig: conf +defconfig: conf-idf ifeq ($(KBUILD_DEFCONFIG),) $< $(silent) --defconfig $(Kconfig) else @@ -111,12 +111,12 @@ else endif endif -%_defconfig: conf +%_defconfig: conf-idf $< $(silent) --defconfig=arch/$(SRCARCH)/configs/$@ $(Kconfig) configfiles=$(wildcard $(srctree)/kernel/configs/$@ $(srctree)/arch/$(SRCARCH)/configs/$@) -%.config: conf +%.config: conf-idf $(if $(call configfiles),, $(error No configuration exists for this target on this architecture)) $(CONFIG_SHELL) $(srctree)/scripts/kconfig/merge_config.sh -m .config $(configfiles) +yes "" | $(MAKE) -f $(srctree)/Makefile oldconfig @@ -178,10 +178,10 @@ lxdialog/%.o: $(SRCDIR)/lxdialog/%.c # =========================================================================== # Shared Makefile for the various kconfig executables: -# conf: Used for defconfig, oldconfig and related targets +# conf-idf: Used for defconfig, oldconfig and related targets # nconf: Used for the nconfig target. # Utilizes ncurses -# mconf: Used for the menuconfig target +# mconf-idf: Used for the menuconfig target # Utilizes the lxdialog package # qconf: Used for the xconfig target # Based on Qt which needs to be installed to compile it @@ -200,14 +200,15 @@ qconf-cxxobjs := qconf.o qconf-objs := zconf.tab.o gconf-objs := gconf.o zconf.tab.o -hostprogs-y := conf nconf mconf kxgettext qconf gconf +hostprogs-y := conf-idf nconf mconf-idf kxgettext qconf gconf all-objs := $(conf-objs) $(mconf-objs) $(lxdialog) all-deps := $(all-objs:.o=.d) clean-files := qconf.moc .tmp_qtcheck .tmp_gtkcheck clean-files += zconf.tab.c zconf.lex.c zconf.hash.c gconf.glade.h -clean-files += $(all-objs) $(all-deps) conf mconf +clean-files += $(all-objs) $(all-deps) conf-idf mconf-idf conf mconf +# (note: cleans both mconf & conf (old names) and conf-idf & mconf-idf (new names)) # Check that we have the required ncurses stuff installed for lxdialog (menuconfig) PHONY += dochecklxdialog @@ -324,10 +325,10 @@ gconf.glade.h: gconf.glade gconf.glade -mconf: lxdialog $(mconf-objs) +mconf-idf: lxdialog $(mconf-objs) $(CC) -o $@ $(mconf-objs) $(LOADLIBES_mconf) -conf: $(conf-objs) +conf-idf: $(conf-objs) $(CC) -o $@ $(conf-objs) $(LOADLIBES_conf) zconf.tab.c: zconf.lex.c diff --git a/tools/windows/tool_setup/build_installer.sh b/tools/windows/tool_setup/build_installer.sh index 8733629b6..8dc21f1de 100755 --- a/tools/windows/tool_setup/build_installer.sh +++ b/tools/windows/tool_setup/build_installer.sh @@ -13,14 +13,14 @@ set -e cd `dirname $0` pushd dl wget --continue "https://dl.espressif.com/dl/xtensa-esp32-elf-win32-1.22.0-80-g6c4433a-5.2.0.zip" -wget --continue "https://github.com/espressif/kconfig-frontends/releases/download/v4.6.0.0-idf-20180319/mconf-v4.6.0.0-idf-20180319-win32.zip" +wget --continue "https://github.com/espressif/kconfig-frontends/releases/download/v4.6.0.0-idf-20180525/mconf-v4.6.0.0-idf-20180525-win32.zip" wget --continue "https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-win.zip" popd rm -rf input/* pushd input unzip ../dl/xtensa-esp32-elf-win32-1.22.0-80-g6c4433a-5.2.0.zip -unzip ../dl/mconf-v4.6.0.0-idf-20180319-win32.zip +unzip ../dl/mconf-v4.6.0.0-idf-20180525-win32.zip unzip ../dl/ninja-win.zip popd diff --git a/tools/windows/tool_setup/idf_tool_setup.iss b/tools/windows/tool_setup/idf_tool_setup.iss index 8c888e8f0..551c5abcb 100644 --- a/tools/windows/tool_setup/idf_tool_setup.iss +++ b/tools/windows/tool_setup/idf_tool_setup.iss @@ -2,8 +2,8 @@ [Setup] AppName=ESP-IDF Tools -AppVersion=1.0 -OutputBaseFilename=esp-idf-tools-setup-1.0 +AppVersion=1.1 +OutputBaseFilename=esp-idf-tools-setup-1.1 DefaultDirName={pf}\Espressif\ESP-IDF Tools DefaultGroupName=ESP-IDF Tools @@ -22,7 +22,7 @@ Name: "custom"; Description: "Custom installation"; Flags: iscustom [Components] Name: toolchain; Description: ESP32 Xtensa GCC Cross-Toolchain; Types: full custom; -Name: mconf; Description: ESP-IDF console menuconfig tool; Types: full custom; +Name: mconf_idf; Description: ESP-IDF console menuconfig tool; Types: full custom; Name: ninja; Description: Install Ninja build v1.8.2; Types: full custom [Tasks] @@ -42,7 +42,7 @@ Name: python64; Description: Download and Run Python 2.7.14 Installer and instal [Files] Components: toolchain; Source: "input\xtensa-esp32-elf\*"; DestDir: "{app}\toolchain\"; Flags: recursesubdirs; -Components: mconf; Source: "input\mconf-v4.6.0.0-idf-20180319-win32\*"; DestDir: "{app}\mconf\"; +Components: mconf_idf; Source: "input\mconf-v4.6.0.0-idf-20180525-win32\*"; DestDir: "{app}\mconf-idf\"; Components: ninja; Source: "input\ninja.exe"; DestDir: "{app}"; [Run] @@ -61,13 +61,13 @@ Root: HKCU; Subkey: "Environment"; \ ValueType: expandsz; ValueName: "Path"; ValueData: "{app};{olddata}"; Check: not IsInPath('{app}'); \ Components: ninja; Tasks: addpath\user -; mconf path +; mconf-idf path Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; \ - ValueType: expandsz; ValueName: "Path"; ValueData: "{app}\mconf;{olddata}"; Check: not IsInPath('{app}\mconf'); \ - Components: mconf; Tasks: addpath\allusers + ValueType: expandsz; ValueName: "Path"; ValueData: "{app}\mconf-idf;{olddata}"; Check: not IsInPath('{app}\mconf-idf'); \ + Components: mconf_idf; Tasks: addpath\allusers Root: HKCU; Subkey: "Environment"; \ - ValueType: expandsz; ValueName: "Path"; ValueData: "{app}\mconf;{olddata}"; Check: not IsInPath('{app}\mconf'); \ - Components: mconf; Tasks: addpath\user + ValueType: expandsz; ValueName: "Path"; ValueData: "{app}\mconf-idf;{olddata}"; Check: not IsInPath('{app}\mconf-idf'); \ + Components: mconf_idf; Tasks: addpath\user ; toolchain path Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; \