|
|
@@ -30,6 +30,8 @@ import time
|
|
|
|
|
|
from pygdbmi.gdbcontroller import GdbController, DEFAULT_GDB_TIMEOUT_SEC
|
|
|
|
|
|
+_gdb_timeout_sec = DEFAULT_GDB_TIMEOUT_SEC
|
|
|
+
|
|
|
IDF_PATH = os.getenv('IDF_PATH')
|
|
|
if not IDF_PATH:
|
|
|
sys.stderr.write("IDF_PATH is not found! Set proper IDF_PATH in environment.\n")
|
|
|
@@ -1234,7 +1236,7 @@ def gdbmi_run_cmd_get_responses(p, cmd, resp_message, resp_type, multiple=True,
|
|
|
# type: (GdbController, str, typing.Optional[str], str, bool, typing.Optional[str], typing.Optional[str]) -> list
|
|
|
|
|
|
p.write(cmd, read_response=False)
|
|
|
- t_end = time.time() + DEFAULT_GDB_TIMEOUT_SEC
|
|
|
+ t_end = time.time() + _gdb_timeout_sec
|
|
|
filtered_response_list = []
|
|
|
all_responses = []
|
|
|
while time.time() < t_end:
|
|
|
@@ -1494,6 +1496,12 @@ def main():
|
|
|
type=int,
|
|
|
default=os.environ.get('ESPTOOL_BAUD', esptool.ESPLoader.ESP_ROM_BAUD))
|
|
|
|
|
|
+ parser.add_argument(
|
|
|
+ '--gdb-timeout-sec',
|
|
|
+ help='Overwrite the default internal delay for gdb responses',
|
|
|
+ type=int,
|
|
|
+ default=DEFAULT_GDB_TIMEOUT_SEC)
|
|
|
+
|
|
|
subparsers = parser.add_subparsers(
|
|
|
dest='operation',
|
|
|
help='Run coredumper {command} -h for additional help')
|
|
|
@@ -1537,6 +1545,9 @@ def main():
|
|
|
|
|
|
args = parser.parse_args()
|
|
|
|
|
|
+ global _gdb_timeout_sec
|
|
|
+ _gdb_timeout_sec = args.gdb_timeout_sec
|
|
|
+
|
|
|
log_level = logging.CRITICAL
|
|
|
if args.debug == 0:
|
|
|
log_level = logging.CRITICAL
|