mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-02 12:14:32 +02:00
examples: Fixes 'apptrace_to_host' to work with updated OpenOCD tracing command
This commit is contained in:
@@ -16,7 +16,6 @@ def test_examples_app_trace_to_host(env, extra_data):
|
|||||||
dut.start_app()
|
dut.start_app()
|
||||||
dut.expect_all('example: Enabling ADC1 on channel 6 / GPIO34.',
|
dut.expect_all('example: Enabling ADC1 on channel 6 / GPIO34.',
|
||||||
'example: Enabling CW generator on DAC channel 1',
|
'example: Enabling CW generator on DAC channel 1',
|
||||||
'example: Custom divider of RTC 8 MHz clock has been set.',
|
|
||||||
'example: Sampling ADC and sending data to the host...',
|
'example: Sampling ADC and sending data to the host...',
|
||||||
re.compile(r'example: Collected \d+ samples in 20 ms.'),
|
re.compile(r'example: Collected \d+ samples in 20 ms.'),
|
||||||
'example: Sampling ADC and sending data to the UART...',
|
'example: Sampling ADC and sending data to the UART...',
|
||||||
@@ -24,10 +23,8 @@ def test_examples_app_trace_to_host(env, extra_data):
|
|||||||
re.compile(r'example: Collected \d+ samples in 20 ms.'),
|
re.compile(r'example: Collected \d+ samples in 20 ms.'),
|
||||||
timeout=20)
|
timeout=20)
|
||||||
|
|
||||||
response = ocd.cmd_exec('esp apptrace start file://adc.log 0 9000 5 0 0')
|
ocd.apptrace_start("file://adc.log 0 9000 5 0 0")
|
||||||
with open(os.path.join(proj_path, 'telnet.log'), 'w') as f:
|
ocd.apptrace_wait_stop(tmo=30)
|
||||||
f.write(response)
|
|
||||||
assert('Data: blocks incomplete 0, lost bytes: 0' in response)
|
|
||||||
|
|
||||||
with ttfw_idf.CustomProcess(' '.join([os.path.join(idf_path, 'tools/esp_app_trace/logtrace_proc.py'),
|
with ttfw_idf.CustomProcess(' '.join([os.path.join(idf_path, 'tools/esp_app_trace/logtrace_proc.py'),
|
||||||
'adc.log',
|
'adc.log',
|
||||||
|
@@ -82,6 +82,15 @@ class OCDBackend(object):
|
|||||||
def cmd_exec(self, cmd):
|
def cmd_exec(self, cmd):
|
||||||
return self.oocd.cmd_exec(cmd)
|
return self.oocd.cmd_exec(cmd)
|
||||||
|
|
||||||
|
def apptrace_start(self, trace_args):
|
||||||
|
self.oocd.apptrace_start(trace_args)
|
||||||
|
|
||||||
|
def apptrace_stop(self):
|
||||||
|
self.oocd.apptrace_stop()
|
||||||
|
|
||||||
|
def apptrace_wait_stop(self, tmo=10):
|
||||||
|
self.oocd.apptrace_wait_stop(tmo=tmo)
|
||||||
|
|
||||||
|
|
||||||
class GDBBackend(object):
|
class GDBBackend(object):
|
||||||
def __init__(self, logfile_path, elffile_path, target, gdbinit_path=None, working_dir=None):
|
def __init__(self, logfile_path, elffile_path, target, gdbinit_path=None, working_dir=None):
|
||||||
|
Reference in New Issue
Block a user