Add initial support for remote wifi
This commit is contained in:
@@ -145,6 +145,7 @@ esphome/components/esp32_ble_client/* @jesserockz
|
||||
esphome/components/esp32_ble_server/* @Rapsssito @clydebarrow @jesserockz
|
||||
esphome/components/esp32_camera_web_server/* @ayufan
|
||||
esphome/components/esp32_can/* @Sympatron
|
||||
esphome/components/esp32_hosted/* @swoboda1337
|
||||
esphome/components/esp32_improv/* @jesserockz
|
||||
esphome/components/esp32_rmt/* @jesserockz
|
||||
esphome/components/esp32_rmt_led_strip/* @jesserockz
|
||||
|
||||
39
esphome/components/esp32_hosted/__init__.py
Executable file
39
esphome/components/esp32_hosted/__init__.py
Executable file
@@ -0,0 +1,39 @@
|
||||
import os
|
||||
|
||||
from esphome.components import esp32
|
||||
import esphome.config_validation as cv
|
||||
from esphome.const import CONF_VARIANT, KEY_CORE, KEY_FRAMEWORK_VERSION
|
||||
from esphome.core import CORE
|
||||
|
||||
CODEOWNERS = ["@swoboda1337"]
|
||||
|
||||
CONFIG_SCHEMA = cv.All(
|
||||
cv.Schema(
|
||||
{
|
||||
cv.Optional(CONF_VARIANT): cv.one_of(*esp32.VARIANTS, upper=True),
|
||||
}
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
async def to_code(config):
|
||||
framework_ver: cv.Version = CORE.data[KEY_CORE][KEY_FRAMEWORK_VERSION]
|
||||
|
||||
os.environ["ESP_IDF_VERSION"] = f"{framework_ver.major}.{framework_ver.minor}"
|
||||
|
||||
esp32.add_idf_sdkconfig_option(
|
||||
f"CONFIG_SLAVE_IDF_TARGET_{config[CONF_VARIANT]}", # NOLINT
|
||||
True,
|
||||
)
|
||||
|
||||
esp32.add_idf_component(
|
||||
name="esp_wifi_remote",
|
||||
repo="https://github.com/espressif/esp-wifi-remote.git",
|
||||
path="components/esp_wifi_remote",
|
||||
)
|
||||
|
||||
esp32.add_extra_script(
|
||||
"post",
|
||||
"esp32_hosted.py",
|
||||
os.path.join(os.path.dirname(__file__), "esp32_hosted.py.script"),
|
||||
)
|
||||
12
esphome/components/esp32_hosted/esp32_hosted.py.script
Executable file
12
esphome/components/esp32_hosted/esp32_hosted.py.script
Executable file
@@ -0,0 +1,12 @@
|
||||
# pylint: disable=E0602
|
||||
Import("env") # noqa
|
||||
|
||||
# Workaround whole archive issue
|
||||
if "__LIB_DEPS" in env and "libespressif__esp_hosted.a" in env["__LIB_DEPS"]:
|
||||
env.Append(
|
||||
LINKFLAGS=[
|
||||
"-Wl,--whole-archive",
|
||||
env["BUILD_DIR"] + "/esp-idf/espressif__esp_hosted/libespressif__esp_hosted.a",
|
||||
"-Wl,--no-whole-archive",
|
||||
]
|
||||
)
|
||||
Reference in New Issue
Block a user