mirror of
https://github.com/esphome/esphome.git
synced 2024-11-21 22:48:10 +01:00
[rp2040] Always use maxgerhardt platform fork (#7514)
This commit is contained in:
parent
050e2547ea
commit
748bc85bfe
4 changed files with 14 additions and 21 deletions
|
@ -71,6 +71,14 @@ def _format_framework_arduino_version(ver: cv.Version) -> str:
|
||||||
# return f"~1.{ver.major}{ver.minor:02d}{ver.patch:02d}.0"
|
# return f"~1.{ver.major}{ver.minor:02d}{ver.patch:02d}.0"
|
||||||
|
|
||||||
|
|
||||||
|
def _parse_platform_version(value):
|
||||||
|
value = cv.string(value)
|
||||||
|
if value.startswith("http"):
|
||||||
|
return value
|
||||||
|
|
||||||
|
return f"https://github.com/maxgerhardt/platform-raspberrypi.git#{value}"
|
||||||
|
|
||||||
|
|
||||||
# NOTE: Keep this in mind when updating the recommended version:
|
# NOTE: Keep this in mind when updating the recommended version:
|
||||||
# * The new version needs to be thoroughly validated before changing the
|
# * The new version needs to be thoroughly validated before changing the
|
||||||
# recommended version as otherwise a bunch of devices could be bricked
|
# recommended version as otherwise a bunch of devices could be bricked
|
||||||
|
@ -82,10 +90,9 @@ def _format_framework_arduino_version(ver: cv.Version) -> str:
|
||||||
# - https://api.registry.platformio.org/v3/packages/earlephilhower/tool/framework-arduinopico
|
# - https://api.registry.platformio.org/v3/packages/earlephilhower/tool/framework-arduinopico
|
||||||
RECOMMENDED_ARDUINO_FRAMEWORK_VERSION = cv.Version(3, 9, 4)
|
RECOMMENDED_ARDUINO_FRAMEWORK_VERSION = cv.Version(3, 9, 4)
|
||||||
|
|
||||||
# The platformio/raspberrypi version to use for arduino frameworks
|
# The raspberrypi platform version to use for arduino frameworks
|
||||||
# - https://github.com/platformio/platform-raspberrypi/releases
|
# - https://github.com/maxgerhardt/platform-raspberrypi/tags
|
||||||
# - https://api.registry.platformio.org/v3/packages/platformio/platform/raspberrypi
|
RECOMMENDED_ARDUINO_PLATFORM_VERSION = "v1.2.0-gcc12"
|
||||||
ARDUINO_PLATFORM_VERSION = cv.Version(1, 13, 0)
|
|
||||||
|
|
||||||
|
|
||||||
def _arduino_check_versions(value):
|
def _arduino_check_versions(value):
|
||||||
|
@ -111,7 +118,8 @@ def _arduino_check_versions(value):
|
||||||
value[CONF_SOURCE] = source or _format_framework_arduino_version(version)
|
value[CONF_SOURCE] = source or _format_framework_arduino_version(version)
|
||||||
|
|
||||||
value[CONF_PLATFORM_VERSION] = value.get(
|
value[CONF_PLATFORM_VERSION] = value.get(
|
||||||
CONF_PLATFORM_VERSION, _parse_platform_version(str(ARDUINO_PLATFORM_VERSION))
|
CONF_PLATFORM_VERSION,
|
||||||
|
_parse_platform_version(RECOMMENDED_ARDUINO_PLATFORM_VERSION),
|
||||||
)
|
)
|
||||||
|
|
||||||
if version != RECOMMENDED_ARDUINO_FRAMEWORK_VERSION:
|
if version != RECOMMENDED_ARDUINO_FRAMEWORK_VERSION:
|
||||||
|
@ -122,15 +130,6 @@ def _arduino_check_versions(value):
|
||||||
return value
|
return value
|
||||||
|
|
||||||
|
|
||||||
def _parse_platform_version(value):
|
|
||||||
try:
|
|
||||||
# if platform version is a valid version constraint, prefix the default package
|
|
||||||
cv.platformio_version_constraint(value)
|
|
||||||
return f"platformio/raspberrypi@{value}"
|
|
||||||
except cv.Invalid:
|
|
||||||
return value
|
|
||||||
|
|
||||||
|
|
||||||
ARDUINO_FRAMEWORK_SCHEMA = cv.All(
|
ARDUINO_FRAMEWORK_SCHEMA = cv.All(
|
||||||
cv.Schema(
|
cv.Schema(
|
||||||
{
|
{
|
||||||
|
|
|
@ -90,9 +90,6 @@ esp32:
|
||||||
RP2040_CONFIG = """
|
RP2040_CONFIG = """
|
||||||
rp2040:
|
rp2040:
|
||||||
board: {board}
|
board: {board}
|
||||||
framework:
|
|
||||||
# Required until https://github.com/platformio/platform-raspberrypi/pull/36 is merged
|
|
||||||
platform_version: https://github.com/maxgerhardt/platform-raspberrypi.git#5e87ae34ca025274df25b3303e9e9cb6c120123c
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
BK72XX_CONFIG = """
|
BK72XX_CONFIG = """
|
||||||
|
|
|
@ -165,7 +165,7 @@ platform_packages =
|
||||||
extends = common:arduino
|
extends = common:arduino
|
||||||
board_build.filesystem_size = 0.5m
|
board_build.filesystem_size = 0.5m
|
||||||
|
|
||||||
platform = https://github.com/maxgerhardt/platform-raspberrypi.git#5e87ae34ca025274df25b3303e9e9cb6c120123c
|
platform = https://github.com/maxgerhardt/platform-raspberrypi.git#v1.2.0-gcc12
|
||||||
platform_packages =
|
platform_packages =
|
||||||
; earlephilhower/framework-arduinopico@~1.20602.0 ; Cannot use the platformio package until old releases stop getting deleted
|
; earlephilhower/framework-arduinopico@~1.20602.0 ; Cannot use the platformio package until old releases stop getting deleted
|
||||||
earlephilhower/framework-arduinopico@https://github.com/earlephilhower/arduino-pico/releases/download/3.9.4/rp2040-3.9.4.zip
|
earlephilhower/framework-arduinopico@https://github.com/earlephilhower/arduino-pico/releases/download/3.9.4/rp2040-3.9.4.zip
|
||||||
|
|
|
@ -4,9 +4,6 @@ esphome:
|
||||||
|
|
||||||
rp2040:
|
rp2040:
|
||||||
board: rpipicow
|
board: rpipicow
|
||||||
framework:
|
|
||||||
# Waiting for https://github.com/platformio/platform-raspberrypi/pull/36
|
|
||||||
platform_version: https://github.com/maxgerhardt/platform-raspberrypi.git#5e87ae34ca025274df25b3303e9e9cb6c120123c
|
|
||||||
|
|
||||||
logger:
|
logger:
|
||||||
level: VERY_VERBOSE
|
level: VERY_VERBOSE
|
||||||
|
|
Loading…
Reference in a new issue