kconfig: fix IDF_ENV_FPGA not found
This commit is contained in:
parent
d1bf7a8743
commit
c963440a97
2 changed files with 15 additions and 1 deletions
|
@ -259,6 +259,8 @@ function(__kconfig_generate_config sdkconfig sdkconfig_defaults)
|
||||||
set(TERM_CHECK_CMD ${python} ${idf_path}/tools/check_term.py)
|
set(TERM_CHECK_CMD ${python} ${idf_path}/tools/check_term.py)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
idf_build_get_property(idf_env_fpga __IDF_ENV_FPGA)
|
||||||
|
|
||||||
# Generate the menuconfig target
|
# Generate the menuconfig target
|
||||||
add_custom_target(menuconfig
|
add_custom_target(menuconfig
|
||||||
${menuconfig_depends}
|
${menuconfig_depends}
|
||||||
|
@ -266,6 +268,7 @@ function(__kconfig_generate_config sdkconfig sdkconfig_defaults)
|
||||||
COMMAND ${prepare_kconfig_files_command}
|
COMMAND ${prepare_kconfig_files_command}
|
||||||
COMMAND ${confgen_basecommand}
|
COMMAND ${confgen_basecommand}
|
||||||
--env "IDF_TARGET=${idf_target}"
|
--env "IDF_TARGET=${idf_target}"
|
||||||
|
--env "IDF_ENV_FPGA=${idf_env_fpga}"
|
||||||
--dont-write-deprecated
|
--dont-write-deprecated
|
||||||
--output config ${sdkconfig}
|
--output config ${sdkconfig}
|
||||||
COMMAND ${TERM_CHECK_CMD}
|
COMMAND ${TERM_CHECK_CMD}
|
||||||
|
@ -275,13 +278,17 @@ function(__kconfig_generate_config sdkconfig sdkconfig_defaults)
|
||||||
"IDF_CMAKE=y"
|
"IDF_CMAKE=y"
|
||||||
"KCONFIG_CONFIG=${sdkconfig}"
|
"KCONFIG_CONFIG=${sdkconfig}"
|
||||||
"IDF_TARGET=${idf_target}"
|
"IDF_TARGET=${idf_target}"
|
||||||
|
"IDF_ENV_FPGA=${idf_env_fpga}"
|
||||||
${MENUCONFIG_CMD} ${root_kconfig}
|
${MENUCONFIG_CMD} ${root_kconfig}
|
||||||
# VERBATIM cannot be used here because it cannot handle ${mconf}="winpty mconf-idf" and the escaping must be
|
# VERBATIM cannot be used here because it cannot handle ${mconf}="winpty mconf-idf" and the escaping must be
|
||||||
# done manually
|
# done manually
|
||||||
USES_TERMINAL
|
USES_TERMINAL
|
||||||
# additional run of confgen esures that the deprecated options will be inserted into sdkconfig (for backward
|
# additional run of confgen esures that the deprecated options will be inserted into sdkconfig (for backward
|
||||||
# compatibility)
|
# compatibility)
|
||||||
COMMAND ${confgen_basecommand} --env "IDF_TARGET=${idf_target}" --output config ${sdkconfig}
|
COMMAND ${confgen_basecommand}
|
||||||
|
--env "IDF_TARGET=${idf_target}"
|
||||||
|
--env "IDF_ENV_FPGA=${idf_env_fpga}"
|
||||||
|
--output config ${sdkconfig}
|
||||||
)
|
)
|
||||||
|
|
||||||
# Custom target to run confserver.py from the build tool
|
# Custom target to run confserver.py from the build tool
|
||||||
|
|
|
@ -27,6 +27,13 @@ macro(__target_init)
|
||||||
|
|
||||||
# Finally, set IDF_TARGET in cache
|
# Finally, set IDF_TARGET in cache
|
||||||
set(IDF_TARGET ${env_idf_target} CACHE STRING "IDF Build Target")
|
set(IDF_TARGET ${env_idf_target} CACHE STRING "IDF Build Target")
|
||||||
|
|
||||||
|
# Check if IDF_ENV_FPGA environment is set
|
||||||
|
set(env_idf_env_fpga $ENV{IDF_ENV_FPGA})
|
||||||
|
if(${env_idf_env_fpga})
|
||||||
|
idf_build_set_property(__IDF_ENV_FPGA "y")
|
||||||
|
message(STATUS "IDF_ENV_FPGA is set, building for FPGA environment")
|
||||||
|
endif()
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
#
|
#
|
||||||
|
|
Loading…
Reference in a new issue