Merge branch 'esp8266-native-ninja-emission' into esp8266-arduino-toolchain

This commit is contained in:
J. Nick Koston
2026-08-22 13:16:00 -05:00
3 changed files with 9 additions and 4 deletions
+2 -1
View File
@@ -992,7 +992,8 @@ class EsphomeCore:
@property
def using_native_toolchain(self):
"""Whether the selected toolchain builds natively, without reading
``platformio.ini`` (see ``NATIVE_TOOLCHAINS`` in ``esphome.const``)."""
``platformio.ini`` (see ``NATIVE_TOOLCHAINS`` in ``esphome.const``;
keep its membership in sync with ``write_cpp_file``'s dispatch)."""
return self.toolchain in NATIVE_TOOLCHAINS
@property
+4 -2
View File
@@ -596,9 +596,11 @@ async def _add_platformio_options(pio_options: dict[str, str | list[str]]) -> No
# discovered dependencies
cg.add_platformio_option(key, vals)
elif key in NATIVE_ARDUINO_PIO_OPTIONS and CORE.using_toolchain_arduino:
# The esp8266 native generator reads these; other native
# The esp8266 native generator reads these as scalars; the
# schema also permits the list form, where the last value
# wins like a later platformio.ini line. Other native
# toolchains have no equivalent and fall through to the warning.
cg.add_platformio_option(key, val)
cg.add_platformio_option(key, vals[-1])
elif key != "upload_speed":
# upload_speed needs no handling: it is read from the raw
# config at upload time (upload_using_esptool)
+3 -1
View File
@@ -1408,7 +1408,9 @@ async def test_add_platformio_options_native_arduino(
await config._add_platformio_options(
{
"board_build.f_cpu": "160000000L",
"board_build.ldscript": "eagle.flash.4m2m.ld",
# The schema also permits the list form; the last value wins
# and reaches the generator as a scalar
"board_build.ldscript": ["eagle.flash.2m.ld", "eagle.flash.4m2m.ld"],
"board_build.filesystem": "littlefs",
"upload_speed": "115200",
}