mirror of https://github.com/arendst/Tasmota.git
Merge pull request #16193 from Jason2866/pio_flash
Allow overriding reset operation via project file
This commit is contained in:
commit
6e39fee5d5
|
@ -171,6 +171,8 @@ def esp32_create_combined_bin(source, target, env):
|
||||||
if(fs_offset != -1):
|
if(fs_offset != -1):
|
||||||
fs_bin = join(env.subst("$BUILD_DIR"),"littlefs.bin")
|
fs_bin = join(env.subst("$BUILD_DIR"),"littlefs.bin")
|
||||||
if exists(fs_bin):
|
if exists(fs_bin):
|
||||||
|
before_reset = env.BoardConfig().get("upload.before_reset", "default_reset")
|
||||||
|
after_reset = env.BoardConfig().get("upload.after_reset", "hard_reset")
|
||||||
print(f" - {hex(fs_offset)}| {fs_bin}")
|
print(f" - {hex(fs_offset)}| {fs_bin}")
|
||||||
cmd += [hex(fs_offset), fs_bin]
|
cmd += [hex(fs_offset), fs_bin]
|
||||||
env.Replace(
|
env.Replace(
|
||||||
|
@ -178,8 +180,8 @@ def esp32_create_combined_bin(source, target, env):
|
||||||
"--chip", chip,
|
"--chip", chip,
|
||||||
"--port", '"$UPLOAD_PORT"',
|
"--port", '"$UPLOAD_PORT"',
|
||||||
"--baud", "$UPLOAD_SPEED",
|
"--baud", "$UPLOAD_SPEED",
|
||||||
"--before", "default_reset",
|
"--before", before_reset,
|
||||||
"--after", "hard_reset",
|
"--after", after_reset,
|
||||||
"write_flash", "-z",
|
"write_flash", "-z",
|
||||||
"--flash_mode", "${__get_board_flash_mode(__env__)}",
|
"--flash_mode", "${__get_board_flash_mode(__env__)}",
|
||||||
"--flash_freq", "${__get_board_f_flash(__env__)}",
|
"--flash_freq", "${__get_board_f_flash(__env__)}",
|
||||||
|
|
Loading…
Reference in New Issue