mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-25 19:56:30 +00:00
commit
72e9fbe7c2
@ -45,11 +45,18 @@ def esp32_build_filesystem(fs_size):
|
|||||||
os.makedirs(filesystem_dir)
|
os.makedirs(filesystem_dir)
|
||||||
print("Creating filesystem with content:")
|
print("Creating filesystem with content:")
|
||||||
for file in files:
|
for file in files:
|
||||||
|
if "no_files" in file:
|
||||||
|
continue
|
||||||
shutil.copy(file, filesystem_dir)
|
shutil.copy(file, filesystem_dir)
|
||||||
|
if not os.listdir(filesystem_dir):
|
||||||
|
print("No files added -> will NOT create littlefs.bin and NOT overwrite fs partition!")
|
||||||
|
return False
|
||||||
env.Replace( MKSPIFFSTOOL=platform.get_package_dir("tool-mklittlefs") + '/mklittlefs' )
|
env.Replace( MKSPIFFSTOOL=platform.get_package_dir("tool-mklittlefs") + '/mklittlefs' )
|
||||||
tool = env.subst(env["MKSPIFFSTOOL"])
|
tool = env.subst(env["MKSPIFFSTOOL"])
|
||||||
cmd = (tool,"-c",filesystem_dir,"-s",fs_size,join(env.subst("$BUILD_DIR"),"littlefs.bin"))
|
cmd = (tool,"-c",filesystem_dir,"-s",fs_size,join(env.subst("$BUILD_DIR"),"littlefs.bin"))
|
||||||
returncode = subprocess.call(cmd, shell=False)
|
returncode = subprocess.call(cmd, shell=False)
|
||||||
|
# print(retrncode)
|
||||||
|
return True
|
||||||
|
|
||||||
def esp32_fetch_safeboot_bin(chip):
|
def esp32_fetch_safeboot_bin(chip):
|
||||||
safeboot_fw_url = "https://github.com/arendst/Tasmota-firmware/raw/main/firmware/tasmota32/tasmota" + ("32solo1" if "solo1" in env.subst("$BUILD_DIR") else chip[3:]) + "-safeboot.bin"
|
safeboot_fw_url = "https://github.com/arendst/Tasmota-firmware/raw/main/firmware/tasmota32/tasmota" + ("32solo1" if "solo1" in env.subst("$BUILD_DIR") else chip[3:]) + "-safeboot.bin"
|
||||||
@ -74,9 +81,9 @@ def esp32_create_combined_bin(source, target, env):
|
|||||||
|
|
||||||
# The offset from begin of the file where the app0 partition starts
|
# The offset from begin of the file where the app0 partition starts
|
||||||
# This is defined in the partition .csv file
|
# This is defined in the partition .csv file
|
||||||
factory_offset = -1 # error code value
|
# factory_offset = -1 # error code value - currently unused
|
||||||
app_offset = 0x10000 # default value for "old" scheme
|
app_offset = 0x10000 # default value for "old" scheme
|
||||||
fs_offset = -1 # error code value
|
fs_offset = -1 # error code value
|
||||||
with open(env.BoardConfig().get("build.partitions")) as csv_file:
|
with open(env.BoardConfig().get("build.partitions")) as csv_file:
|
||||||
print("Read partitions from ",env.BoardConfig().get("build.partitions"))
|
print("Read partitions from ",env.BoardConfig().get("build.partitions"))
|
||||||
csv_reader = csv.reader(csv_file, delimiter=',')
|
csv_reader = csv.reader(csv_file, delimiter=',')
|
||||||
@ -92,9 +99,9 @@ def esp32_create_combined_bin(source, target, env):
|
|||||||
app_offset = int(row[3],base=16)
|
app_offset = int(row[3],base=16)
|
||||||
# elif(row[0] == 'factory'):
|
# elif(row[0] == 'factory'):
|
||||||
# factory_offset = int(row[3],base=16)
|
# factory_offset = int(row[3],base=16)
|
||||||
elif(row[0] == 'spiffs'):
|
elif(row[0] == 'spiffs'):
|
||||||
fs_offset = int(row[3],base=16)
|
if esp32_build_filesystem(row[4]):
|
||||||
esp32_build_filesystem(row[4])
|
fs_offset = int(row[3],base=16)
|
||||||
|
|
||||||
|
|
||||||
new_file_name = env.subst("$BUILD_DIR/${PROGNAME}.factory.bin")
|
new_file_name = env.subst("$BUILD_DIR/${PROGNAME}.factory.bin")
|
||||||
|
@ -12,6 +12,14 @@ build_flags = ${env:tasmota32_base.build_flags}
|
|||||||
-D USE_WIFI_RANGE_EXTENDER
|
-D USE_WIFI_RANGE_EXTENDER
|
||||||
-D USE_WIFI_RANGE_EXTENDER_NAPT
|
-D USE_WIFI_RANGE_EXTENDER_NAPT
|
||||||
|
|
||||||
|
[env:tasmota32s3]
|
||||||
|
extends = env:tasmota32_base
|
||||||
|
board = esp32s3
|
||||||
|
build_flags = ${env:tasmota32_base.build_flags} -D FIRMWARE_TASMOTA32
|
||||||
|
; example for custom file upload in Tasmota Filesystem
|
||||||
|
; custom_files_upload = ${env:tasmota32_base.custom_files_upload}
|
||||||
|
; tasmota/berry/modules/Partition_wizard.tapp
|
||||||
|
|
||||||
; *** Debug version used for PlatformIO Home Project Inspection
|
; *** Debug version used for PlatformIO Home Project Inspection
|
||||||
[env:tasmota-debug]
|
[env:tasmota-debug]
|
||||||
build_type = debug
|
build_type = debug
|
||||||
|
@ -34,6 +34,11 @@ lib_ignore =
|
|||||||
BluetoothSerial
|
BluetoothSerial
|
||||||
; Disable next if you want to use ArduinoOTA in Tasmota32 (default disabled)
|
; Disable next if you want to use ArduinoOTA in Tasmota32 (default disabled)
|
||||||
ArduinoOTA
|
ArduinoOTA
|
||||||
|
; Add files to Filesystem for all env (global). Remove no files entry and add add a line with the file to include
|
||||||
|
; Example for adding the Partition Manager
|
||||||
|
; custom_files_upload =
|
||||||
|
; tasmota/berry/modules/Partition_Manager.tapp
|
||||||
|
custom_files_upload = no_files
|
||||||
|
|
||||||
[env:tasmota32]
|
[env:tasmota32]
|
||||||
extends = env:tasmota32_base
|
extends = env:tasmota32_base
|
||||||
|
Loading…
x
Reference in New Issue
Block a user