Skip to content

Commit 6379928

Browse files
committed
Updated sdkconfig files should trigger CMake to regenerate project
Resolve platformio#588
1 parent b331f75 commit 6379928

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

builder/frameworks/espidf.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ def is_cmake_reconfigure_required(cmake_api_reply_dir):
109109
os.path.join(PROJECT_SRC_DIR, "CMakeLists.txt"),
110110
]
111111
cmake_preconf_dir = os.path.join(BUILD_DIR, "config")
112+
deafult_sdk_config = os.path.join(PROJECT_DIR, "sdkconfig.defaults")
112113

113114
for d in (cmake_api_reply_dir, cmake_preconf_dir):
114115
if not os.path.isdir(d) or not os.listdir(d):
@@ -117,10 +118,14 @@ def is_cmake_reconfigure_required(cmake_api_reply_dir):
117118
return True
118119
if not os.path.isfile(os.path.join(BUILD_DIR, "build.ninja")):
119120
return True
120-
if os.path.isfile(SDKCONFIG_PATH) and os.path.getmtime(
121+
if not os.path.isfile(SDKCONFIG_PATH) or os.path.getmtime(
121122
SDKCONFIG_PATH
122123
) > os.path.getmtime(cmake_cache_file):
123124
return True
125+
if os.path.isfile(deafult_sdk_config) and os.path.getmtime(
126+
deafult_sdk_config
127+
) > os.path.getmtime(cmake_cache_file):
128+
return True
124129
if any(
125130
os.path.getmtime(f) > os.path.getmtime(cmake_cache_file)
126131
for f in cmake_txt_files + [cmake_preconf_dir, FRAMEWORK_DIR]

0 commit comments

Comments
 (0)