Skip to content

Commit 540f614

Browse files
mikeysklarclaude
andcommitted
espressif: update_sdkconfig.py follows the loader default
The loader is now on by default in mpconfigport.mk, so a board file no longer names CIRCUITPY_LOAD_NATIVE. Default it to on here too and let a board's "= 0" turn it off, so the native sdkconfig defaults stay out of the board sdkconfig files. CIRCUITPY_ENABLE_MPY_NATIVE = 1 still counts on its own. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 56a8dac commit 540f614

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

‎ports/espressif/tools/update_sdkconfig.py‎

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,8 @@ def update(debug, board, update_all): # noqa: C901 too complex
164164
psram_size = "0"
165165
uf2_bootloader = None
166166
ble_enabled = None
167-
native_enabled = False
167+
load_native = True # Matches the mpconfigport.mk default.
168+
mpy_native = False
168169
for line in board_make.read_text().split("\n"):
169170
if "=" not in line or line.startswith("#"):
170171
continue
@@ -193,8 +194,10 @@ def update(debug, board, update_all): # noqa: C901 too complex
193194
uf2_bootloader = not (value == "0")
194195
elif key == "CIRCUITPY_BLEIO_NATIVE":
195196
ble_enabled = not (value == "0")
196-
elif key in ("CIRCUITPY_LOAD_NATIVE", "CIRCUITPY_ENABLE_MPY_NATIVE"):
197-
native_enabled = native_enabled or value == "1"
197+
elif key == "CIRCUITPY_LOAD_NATIVE":
198+
load_native = not (value == "0")
199+
elif key == "CIRCUITPY_ENABLE_MPY_NATIVE":
200+
mpy_native = value == "1"
198201

199202
os.environ["IDF_TARGET"] = target
200203
os.environ["COMPONENT_KCONFIGS_PROJBUILD_SOURCE_FILE"] = (
@@ -242,7 +245,7 @@ def update(debug, board, update_all): # noqa: C901 too complex
242245
if ble_enabled:
243246
ble_config = pathlib.Path("esp-idf-config/sdkconfig-ble.defaults")
244247
sdkconfigs.append(ble_config)
245-
if native_enabled:
248+
if load_native or mpy_native:
246249
native_config = pathlib.Path("esp-idf-config/sdkconfig-native.defaults")
247250
sdkconfigs.append(native_config)
248251
board_config = pathlib.Path(f"boards/{board}/sdkconfig")

0 commit comments

Comments
 (0)