Merge branch 'bugfix/idfpy_before_flash_option_v4.0' into 'release/v4.0'
idf.py: Add --before flag to esptool.py call (v4.0) See merge request espressif/esp-idf!6625
This commit is contained in:
commit
668c0dfb9b
1 changed files with 14 additions and 20 deletions
22
tools/idf.py
22
tools/idf.py
|
@ -334,6 +334,7 @@ def _get_esptool_args(args):
|
|||
flasher_args = json.load(f)
|
||||
|
||||
extra_esptool_args = flasher_args["extra_esptool_args"]
|
||||
result += ["--before", extra_esptool_args["before"]]
|
||||
result += ["--after", extra_esptool_args["after"]]
|
||||
return result
|
||||
|
||||
|
@ -783,26 +784,19 @@ def init_cli():
|
|||
for o, f in flash_items:
|
||||
cmd += o + " " + flasher_path(f) + " "
|
||||
|
||||
print(
|
||||
"%s -p %s -b %s --after %s write_flash %s"
|
||||
% (
|
||||
_safe_relpath(
|
||||
"%s/components/esptool_py/esptool/esptool.py"
|
||||
% os.environ["IDF_PATH"]
|
||||
),
|
||||
print("%s %s -p %s -b %s --before %s --after %s write_flash %s" % (
|
||||
PYTHON,
|
||||
_safe_relpath("%s/components/esptool_py/esptool/esptool.py" % os.environ["IDF_PATH"]),
|
||||
args.port or "(PORT)",
|
||||
args.baud,
|
||||
flasher_args["extra_esptool_args"]["before"],
|
||||
flasher_args["extra_esptool_args"]["after"],
|
||||
cmd.strip(),
|
||||
)
|
||||
)
|
||||
print(
|
||||
"or run 'idf.py -p %s %s'"
|
||||
% (
|
||||
))
|
||||
print("or run 'idf.py -p %s %s'" % (
|
||||
args.port or "(PORT)",
|
||||
key + "-flash" if key != "project" else "flash",
|
||||
)
|
||||
)
|
||||
))
|
||||
|
||||
if "all" in actions or "build" in actions:
|
||||
print_flashing_message("Project", "project")
|
||||
|
|
Loading…
Reference in a new issue