mirror of
https://github.com/espressif/esp-idf
synced 2025-03-09 09:09:10 -04:00
feat(idf_py): Allow tracing interactions during flashing with --trace
This commit is contained in:
parent
13d4235d73
commit
4a04a9e95c
@ -44,7 +44,8 @@ else()
|
||||
endif()
|
||||
|
||||
# SERIAL_TOOL_ARGS is defined during the first cmake run
|
||||
# SERIAL_TOOL_EXTRA_ARGS is used for additional arguments from the command line during run-time
|
||||
# EXTRA_ARGS and EXTRA_PRE_CMD_ARGS are used for additional arguments from the command line during run-time
|
||||
list(APPEND serial_tool_cmd $ENV{SERIAL_TOOL_EXTRA_PRE_CMD_ARGS})
|
||||
list(APPEND serial_tool_cmd ${SERIAL_TOOL_ARGS})
|
||||
list(APPEND serial_tool_cmd $ENV{SERIAL_TOOL_EXTRA_ARGS})
|
||||
|
||||
|
@ -213,6 +213,7 @@ def action_extensions(base_actions: Dict, project_path: str) -> Dict:
|
||||
args: PropertyDict,
|
||||
force: bool,
|
||||
extra_args: str,
|
||||
trace: bool,
|
||||
) -> None:
|
||||
"""
|
||||
Run esptool to flash the entire project, from an argfile generated by the build system
|
||||
@ -224,15 +225,22 @@ def action_extensions(base_actions: Dict, project_path: str) -> Dict:
|
||||
return
|
||||
|
||||
args.port = args.port or get_default_serial_port()
|
||||
extra = list()
|
||||
|
||||
extra_pre = list()
|
||||
if trace:
|
||||
extra_pre.append('--trace')
|
||||
|
||||
extra_post = list()
|
||||
if force:
|
||||
extra.append('--force')
|
||||
extra_post.append('--force')
|
||||
if extra_args:
|
||||
extra += shlex.split(extra_args)
|
||||
extra_post += shlex.split(extra_args)
|
||||
|
||||
env = {
|
||||
'ESPBAUD': str(args.baud),
|
||||
'ESPPORT': args.port,
|
||||
'SERIAL_TOOL_EXTRA_ARGS': ';'.join(extra),
|
||||
'SERIAL_TOOL_EXTRA_PRE_CMD_ARGS': ';'.join(extra_pre),
|
||||
'SERIAL_TOOL_EXTRA_ARGS': ';'.join(extra_post),
|
||||
}
|
||||
run_target(action, args, env, force_progression=True)
|
||||
|
||||
@ -527,6 +535,11 @@ def action_extensions(base_actions: Dict, project_path: str) -> Dict:
|
||||
|
||||
BAUD_AND_PORT = [BAUD_RATE, PORT]
|
||||
flash_options = BAUD_AND_PORT + [
|
||||
{
|
||||
'names': ['--trace'],
|
||||
'is_flag': True,
|
||||
'help': 'Enable trace-level output of flasher tool interactions. Useful when submitting bug reports.',
|
||||
},
|
||||
{
|
||||
'names': ['--force'],
|
||||
'is_flag': True,
|
||||
|
Loading…
x
Reference in New Issue
Block a user