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"
config IDF_CMAKE
bool
option env="IDF_CMAKE"
menu "SDK tool configuration"
config TOOLPREFIX

View file

@ -2,6 +2,7 @@ menu "Serial flasher config"
config ESPTOOLPY_PORT
string "Default serial port"
depends on !IDF_CMAKE
default "/dev/ttyUSB0"
help
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
prompt "Default baud rate"
depends on !IDF_CMAKE
default ESPTOOLPY_BAUD_115200B
help
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
int
depends on !IDF_CMAKE
default 115200 if ESPTOOLPY_BAUD_115200B
default 230400 if ESPTOOLPY_BAUD_230400B
default 921600 if ESPTOOLPY_BAUD_921600B
@ -44,6 +47,7 @@ config ESPTOOLPY_BAUD
config ESPTOOLPY_COMPRESSED
bool "Use compressed upload"
depends on !IDF_CMAKE
default "y"
help
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) \
COMPONENT_KCONFIGS="$(COMPONENT_KCONFIGS)" KCONFIG_CONFIG=$(SDKCONFIG) \
COMPONENT_KCONFIGS_PROJBUILD="$(COMPONENT_KCONFIGS_PROJBUILD)" \
IDF_CMAKE=n \
$(KCONFIG_TOOL_DIR)/$1 $(IDF_PATH)/Kconfig
endef

View file

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