Skip to content

Commit 572bd48

Browse files
committed
Merge branch 'release/v0.7.4'
2 parents 2649ba8 + 485f8b7 commit 572bd48

File tree

2 files changed

+26
-1
lines changed

2 files changed

+26
-1
lines changed

builder/frameworks/espidf.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,12 @@
2020
https://github.com/espressif/esp-idf
2121
"""
2222

23+
from glob import glob
2324
from os import listdir, walk
2425
from os.path import basename, isdir, isfile, join
2526

27+
from shutil import copy
28+
import sys
2629
from SCons.Script import DefaultEnvironment
2730

2831

@@ -267,6 +270,28 @@ def build_espidf_bootloader():
267270
]
268271
)
269272

273+
274+
#
275+
# Handle missing sdkconfig.h
276+
#
277+
278+
if not isfile(join(env.subst("$PROJECTSRC_DIR"), "sdkconfig.h")):
279+
search_path = join(
280+
env.subst("$PIOHOME_DIR"), "platforms",
281+
env.subst("$PIOPLATFORM"), "examples", "*", "src", "sdkconfig.h"
282+
)
283+
284+
files = glob(search_path)
285+
if not files:
286+
sys.stderr.write(
287+
"Error: \"sdkconfig.h\" file is required for esp-idf framework!\n")
288+
env.Exit(1)
289+
290+
print("Warning! Cannot find \"sdk_config.h\" file. "
291+
"Default \"sdk_config.h\" will be added to your project!")
292+
copy(files[0], join(env.subst("$PROJECTSRC_DIR"), "sdkconfig.h"))
293+
294+
270295
#
271296
# Generate partition table
272297
#

platform.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"type": "git",
1313
"url": "https://github.com/platformio/platform-espressif32.git"
1414
},
15-
"version": "0.7.3",
15+
"version": "0.7.4",
1616
"packageRepositories": [
1717
"https://dl.bintray.com/platformio/dl-packages/manifest.json",
1818
"https://sourceforge.net/projects/platformio-storage/files/packages/manifest.json/download",

0 commit comments

Comments
 (0)