Optimize factory firmware generation

to use all settings from boards.json manifest.
Set boot flash modes correctly for all flash modes
This commit is contained in:
Jason2866 2022-07-13 14:33:13 +02:00 committed by GitHub
parent 9f9155da9b
commit 861518679a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -132,8 +132,14 @@ def esp32_create_combined_bin(source, target, env):
else: else:
esp32_fetch_safeboot_bin(tasmota_platform) esp32_fetch_safeboot_bin(tasmota_platform)
flash_size = env.BoardConfig().get("upload.flash_size", "4MB") flash_size = env.BoardConfig().get("upload.flash_size", "4MB")
flash_freq = "keep" flash_freq = env.BoardConfig().get("build.f_flash", "40000000L")
flash_freq = str(flash_freq).replace("L", "")
flash_freq = str(int(int(flash_freq) / 1000000)) + "m"
flash_mode = env.BoardConfig().get("build.flash_mode", "dout") flash_mode = env.BoardConfig().get("build.flash_mode", "dout")
if flash_mode == "qio":
flash_mode = "dio"
elif flash_mode == "qout":
flash_mode = "dout"
cmd = [ cmd = [
"--chip", "--chip",
chip, chip,