mirror of https://github.com/arendst/Tasmota.git
pio script to set env `PARTITIONS_TABLE_CSV` (#18065)
This commit is contained in:
parent
39fd0cb0c4
commit
cadab815ef
|
@ -0,0 +1,22 @@
|
|||
#
|
||||
# The scipt sets the missing "PARTITIONS_TABLE_CSV" when using the command `pio run -t nobuild`
|
||||
# Adopted from https://github.com/platformio/platform-espressif32/issues/861#issuecomment-1241871437
|
||||
# Possible now to upload the firmware or the filesystem with (when builded already!):
|
||||
#
|
||||
# `pio run -t nobuild -t upload` and `pio run -t nobuild -t uploadfs`
|
||||
#
|
||||
|
||||
Import("env")
|
||||
|
||||
import os
|
||||
from SCons.Script import COMMAND_LINE_TARGETS
|
||||
|
||||
board_config = env.BoardConfig()
|
||||
|
||||
if "nobuild" in COMMAND_LINE_TARGETS:
|
||||
env.Replace(
|
||||
PARTITIONS_TABLE_CSV=os.path.join(
|
||||
board_config.get("build.partitions"),
|
||||
)
|
||||
)
|
||||
# print("Set PARTITIONS_TABLE_CSV to: ", os.path.join(board_config.get("build.partitions")))
|
|
@ -0,0 +1,28 @@
|
|||
#
|
||||
# The scipt sets the missing "LDSCRIPT_PATH" when using the command `pio run -t nobuild`
|
||||
# Adopted from https://github.com/platformio/platform-espressif32/issues/861#issuecomment-1241871437
|
||||
# Possible now to upload the firmware or the filesystem with (when builded already!):
|
||||
#
|
||||
# `pio run -t nobuild -t upload` and `pio run -t nobuild -t uploadfs`
|
||||
#
|
||||
|
||||
Import("env")
|
||||
|
||||
import os
|
||||
from SCons.Script import COMMAND_LINE_TARGETS
|
||||
|
||||
board_config = env.BoardConfig()
|
||||
framework_dir = env.PioPlatform().get_package_dir("framework-arduinoespressif8266")
|
||||
assert os.path.isdir(framework_dir)
|
||||
|
||||
if "nobuild" in COMMAND_LINE_TARGETS:
|
||||
env.Replace(
|
||||
LDSCRIPT_PATH=os.path.join(
|
||||
framework_dir,
|
||||
"tools",
|
||||
"sdk",
|
||||
"ld",
|
||||
board_config.get("build.arduino.ldscript"),
|
||||
)
|
||||
)
|
||||
# print("Set LDSCRIPT_PATH to: ", os.path.join(framework_dir,"tools","sdk","ld",board_config.get("build.arduino.ldscript")))
|
|
@ -65,11 +65,11 @@ lib_extra_dirs =
|
|||
|
||||
[scripts_defaults]
|
||||
extra_scripts = pre:pio-tools/pre_source_dir.py
|
||||
pio-tools/strip-floats.py
|
||||
pio-tools/name-firmware.py
|
||||
pio-tools/gzip-firmware.py
|
||||
pio-tools/override_copy.py
|
||||
pio-tools/download_fs.py
|
||||
pre:pio-tools/strip-floats.py
|
||||
post:pio-tools/name-firmware.py
|
||||
post:pio-tools/gzip-firmware.py
|
||||
post:pio-tools/override_copy.py
|
||||
post:pio-tools/download_fs.py
|
||||
|
||||
[esp_defaults]
|
||||
extra_scripts = ${scripts_defaults.extra_scripts}
|
||||
|
@ -92,6 +92,8 @@ build_flags = -DCORE_DEBUG_LEVEL=0
|
|||
; *********************************************************************
|
||||
|
||||
[esp82xx_defaults]
|
||||
extra_scripts = ${esp_defaults.extra_scripts}
|
||||
pre:pio-tools/set_partition_table_esp8266.py
|
||||
build_flags = ${esp_defaults.build_flags}
|
||||
-DNDEBUG
|
||||
-DFP_IN_IROM
|
||||
|
|
|
@ -37,7 +37,8 @@ build_flags = ${esp_defaults.build_flags}
|
|||
-Wl,--wrap=_Z11analogWritehi ; `analogWrite(unsigned char, int)` use the Tasmota version of analogWrite for deeper integration and phase control
|
||||
-Wl,--wrap=ledcReadFreq ; `uint32_t ledcReadFreq(uint8_t chan)`
|
||||
extra_scripts = pre:pio-tools/add_c_flags.py
|
||||
pio-tools/gen-berry-structures.py
|
||||
pre:pio-tools/gen-berry-structures.py
|
||||
pre:pio-tools/set_partition_table_esp32.py
|
||||
post:pio-tools/post_esp32.py
|
||||
${esp_defaults.extra_scripts}
|
||||
|
||||
|
|
|
@ -29,6 +29,8 @@ lib_ignore =
|
|||
Hash
|
||||
; Disable next if you want to use ArduinoOTA in Tasmota (default disabled)
|
||||
ArduinoOTA
|
||||
; Add files to Filesystem for all env (global). Remove no files entry and add add a line with the file to include
|
||||
custom_files_upload = no_files
|
||||
|
||||
|
||||
[env:tasmota]
|
||||
|
|
Loading…
Reference in New Issue