Skip to content

Commit ae52b69

Browse files
committed
Fix copying examples config files in pico_project.py
Fixes #198
1 parent 3cd8e89 commit ae52b69

File tree

2 files changed

+3
-17
lines changed

2 files changed

+3
-17
lines changed

.vscodeignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ node_modules/**
2828
# make sure scripts and data are always included
2929
!scripts/blink.pio
3030
!scripts/lwipopts.h
31+
!scripts/mbedtls_config.h
32+
!scripts/btstack_config.h
3133
!scripts/pico_configs.tsv
3234
!scripts/pico_project.py
3335
!scripts/pico-vscode.cmake

scripts/pico_project.py

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1441,23 +1441,7 @@ def DoEverything(params):
14411441

14421442
# Add examples common files if we are using examples
14431443
if params["wantExample"]:
1444-
if os.path.exists(projectPath / "lwipopts.h"):
1445-
with open(projectPath / "lwipopts.h", "r") as f:
1446-
if "lwipopts_examples_common.h" in f.read():
1447-
# Write lwipopts for examples
1448-
shutil.copy(
1449-
sourcefolder + "/" + "lwipopts.h",
1450-
projectPath / "lwipopts_examples_common.h",
1451-
)
1452-
1453-
if os.path.exists(projectPath / "mbedtls_config.h"):
1454-
with open(projectPath / "mbedtls_config.h", "r") as f:
1455-
if "mbedtls_config_examples_common.h" in f.read():
1456-
# Write mbedtls_config for examples
1457-
shutil.copy(
1458-
sourcefolder + "/" + "mbedtls_config.h",
1459-
projectPath / "mbedtls_config_examples_common.h",
1460-
)
1444+
copyExampleConfigs(projectPath)
14611445

14621446
# Create a build folder, and run our cmake project build from it
14631447
if not os.path.exists("build"):

0 commit comments

Comments
 (0)