cmake: Hide serial port settings in menuconfig when using cmake

This commit is contained in:
Angus Gratton
2018-05-07 10:01:16 +08:00
committed by Angus Gratton
parent 829e6c44f1
commit 2f4079ebb2
4 changed files with 11 additions and 1 deletions

View File

@@ -4,6 +4,9 @@
# #
mainmenu "Espressif IoT Development Framework Configuration" mainmenu "Espressif IoT Development Framework Configuration"
config IDF_CMAKE
bool
option env="IDF_CMAKE"
menu "SDK tool configuration" menu "SDK tool configuration"
config TOOLPREFIX config TOOLPREFIX

View File

@@ -2,6 +2,7 @@ menu "Serial flasher config"
config ESPTOOLPY_PORT config ESPTOOLPY_PORT
string "Default serial port" string "Default serial port"
depends on !IDF_CMAKE
default "/dev/ttyUSB0" default "/dev/ttyUSB0"
help help
The serial port that's connected to the ESP chip. This can be overridden by setting the ESPPORT The serial port that's connected to the ESP chip. This can be overridden by setting the ESPPORT
@@ -11,6 +12,7 @@ config ESPTOOLPY_PORT
choice ESPTOOLPY_BAUD choice ESPTOOLPY_BAUD
prompt "Default baud rate" prompt "Default baud rate"
depends on !IDF_CMAKE
default ESPTOOLPY_BAUD_115200B default ESPTOOLPY_BAUD_115200B
help help
Default baud rate to use while communicating with the ESP chip. Can be overridden by Default baud rate to use while communicating with the ESP chip. Can be overridden by
@@ -36,6 +38,7 @@ config ESPTOOLPY_BAUD_OTHER_VAL
config ESPTOOLPY_BAUD config ESPTOOLPY_BAUD
int int
depends on !IDF_CMAKE
default 115200 if ESPTOOLPY_BAUD_115200B default 115200 if ESPTOOLPY_BAUD_115200B
default 230400 if ESPTOOLPY_BAUD_230400B default 230400 if ESPTOOLPY_BAUD_230400B
default 921600 if ESPTOOLPY_BAUD_921600B default 921600 if ESPTOOLPY_BAUD_921600B
@@ -44,6 +47,7 @@ config ESPTOOLPY_BAUD
config ESPTOOLPY_COMPRESSED config ESPTOOLPY_COMPRESSED
bool "Use compressed upload" bool "Use compressed upload"
depends on !IDF_CMAKE
default "y" default "y"
help help
The flasher tool can send data compressed using zlib, letting the ROM on the ESP chip The flasher tool can send data compressed using zlib, letting the ROM on the ESP chip

View File

@@ -43,6 +43,7 @@ define RunConf
cd $(BUILD_DIR_BASE); KCONFIG_AUTOHEADER=$(abspath $(BUILD_DIR_BASE)/include/sdkconfig.h) \ cd $(BUILD_DIR_BASE); KCONFIG_AUTOHEADER=$(abspath $(BUILD_DIR_BASE)/include/sdkconfig.h) \
COMPONENT_KCONFIGS="$(COMPONENT_KCONFIGS)" KCONFIG_CONFIG=$(SDKCONFIG) \ COMPONENT_KCONFIGS="$(COMPONENT_KCONFIGS)" KCONFIG_CONFIG=$(SDKCONFIG) \
COMPONENT_KCONFIGS_PROJBUILD="$(COMPONENT_KCONFIGS_PROJBUILD)" \ COMPONENT_KCONFIGS_PROJBUILD="$(COMPONENT_KCONFIGS_PROJBUILD)" \
IDF_CMAKE=n \
$(KCONFIG_TOOL_DIR)/$1 $(IDF_PATH)/Kconfig $(KCONFIG_TOOL_DIR)/$1 $(IDF_PATH)/Kconfig
endef endef

View File

@@ -83,7 +83,8 @@ function(kconfig_process_config)
${defaults_arg} ${defaults_arg}
--create-config-if-missing --create-config-if-missing
--env "COMPONENT_KCONFIGS=${kconfigs}" --env "COMPONENT_KCONFIGS=${kconfigs}"
--env "COMPONENT_KCONFIGS_PROJBUILD=${kconfigs_projbuild}") --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 tool, either prebuilt or via mconf target above)
add_custom_target(menuconfig add_custom_target(menuconfig
@@ -93,6 +94,7 @@ function(kconfig_process_config)
COMMAND ${CMAKE_COMMAND} -E env COMMAND ${CMAKE_COMMAND} -E env
"COMPONENT_KCONFIGS=${kconfigs}" "COMPONENT_KCONFIGS=${kconfigs}"
"COMPONENT_KCONFIGS_PROJBUILD=${kconfigs_projbuild}" "COMPONENT_KCONFIGS_PROJBUILD=${kconfigs_projbuild}"
"IDF_CMAKE=y"
"KCONFIG_CONFIG=${SDKCONFIG}" "KCONFIG_CONFIG=${SDKCONFIG}"
${MCONF} ${ROOT_KCONFIG} ${MCONF} ${ROOT_KCONFIG}
VERBATIM VERBATIM