Skip to content

Commit

Permalink
📌 Ask for PlatformIO 6.1.1 or newer (MarlinFirmware#24435)
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead authored Jul 12, 2022
1 parent ec2864b commit 068624a
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 18 deletions.
9 changes: 7 additions & 2 deletions buildroot/share/PlatformIO/scripts/pioutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,10 @@

# Make sure 'vscode init' is not the current command
def is_pio_build():
from SCons.Script import COMMAND_LINE_TARGETS
return "idedata" not in COMMAND_LINE_TARGETS and "_idedata" not in COMMAND_LINE_TARGETS
from SCons.Script import DefaultEnvironment
env = DefaultEnvironment()
return not env.IsIntegrationDump()

def get_pio_version():
from platformio import util
return util.pioversion_to_intstr()
5 changes: 5 additions & 0 deletions buildroot/share/PlatformIO/scripts/preflight-checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ def sanity_check_target():
if 'PIOENV' not in env:
raise SystemExit("Error: PIOENV is not defined. This script is intended to be used with PlatformIO")

# Require PlatformIO 6.1.1 or later
vers = pioutil.get_pio_version()
if vers < [6, 1, 1]:
raise SystemExit("Error: Marlin requires PlatformIO >= 6.1.1. Use 'pio upgrade' to get a newer version.")

if 'MARLIN_FEATURES' not in env:
raise SystemExit("Error: this script should be used after common Marlin scripts")

Expand Down
13 changes: 7 additions & 6 deletions ini/esp32.ini
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ build_src_filter = ${common.default_src_filter} +<src/HAL/ESP32>
lib_ignore = NativeEthernet
upload_speed = 500000
monitor_speed = 250000
monitor_filters = colorize, time, send_on_enter, log2file, esp32_exception_decoder
#upload_port = marlinesp.local
#board_build.flash_mode = qio

Expand All @@ -28,13 +29,13 @@ extends = env:esp32
board_build.partitions = default_16MB.csv

[env:PANDA]
extends = env:esp32
build_flags = ${env:esp32.build_flags} -DUSE_ESP32_EXIO -DUSE_ESP32_TASK_WDT
lib_deps = ${common.lib_deps}
SoftwareSerialEsp32
extends = env:esp32
build_flags = ${env:esp32.build_flags} -DUSE_ESP32_EXIO -DUSE_ESP32_TASK_WDT
lib_deps = ${common.lib_deps}
SoftwareSerialEsp32
board_build.partitions = Marlin/src/HAL/ESP32/esp32.csv
upload_speed = 115200
monitor_speed = 115200
upload_speed = 115200
monitor_speed = 115200

[env:mks_tinybee]
extends = env:esp32
Expand Down
13 changes: 3 additions & 10 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -267,17 +267,10 @@ framework = arduino
extra_scripts = ${common.extra_scripts}
build_flags = ${common.build_flags}
lib_deps = ${common.lib_deps}
platform_packages = platformio/tool-dfuutil@^1.11.0
monitor_speed = 250000
monitor_flags =
--quiet
--echo
--eol
LF
--filter
colorize
--filter
time
monitor_eol = LF
monitor_echo = yes
monitor_filters = colorize, time, send_on_enter, log2file

#
# Just print the dependency tree
Expand Down

0 comments on commit 068624a

Please sign in to comment.