mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-31 19:24:33 +02:00
Merge branch 'bugfix/ci_openocd_ignore_error' into 'master'
CI: ignore a non-fatal error in the loadable ELF file example See merge request espressif/esp-idf!6810
This commit is contained in:
@@ -34,14 +34,25 @@ class CustomProcess(object):
|
|||||||
|
|
||||||
class OCDProcess(CustomProcess):
|
class OCDProcess(CustomProcess):
|
||||||
def __init__(self, proj_path):
|
def __init__(self, proj_path):
|
||||||
cmd = 'openocd -f interface/ftdi/esp32_devkitj_v1.cfg -f board/esp-wroom-32.cfg'
|
cmd = 'openocd -f board/esp32-wrover-kit-3.3v.cfg'
|
||||||
log_file = os.path.join(proj_path, 'openocd.log')
|
log_file = os.path.join(proj_path, 'openocd.log')
|
||||||
super(OCDProcess, self).__init__(cmd, log_file)
|
super(OCDProcess, self).__init__(cmd, log_file)
|
||||||
i = self.p.expect_exact(['Info : Listening on port 3333 for gdb connections', 'Error:'])
|
patterns = ['Info : Listening on port 3333 for gdb connections',
|
||||||
if i == 0:
|
'Error: type \'esp32\' is missing virt2phys']
|
||||||
Utility.console_log('openocd is listening for gdb connections')
|
|
||||||
else:
|
try:
|
||||||
raise RuntimeError('openocd initialization has failed')
|
while True:
|
||||||
|
i = self.p.expect_exact(patterns, timeout=30)
|
||||||
|
# TIMEOUT or EOF exceptions will be thrown upon other errors
|
||||||
|
if i == 0:
|
||||||
|
Utility.console_log('openocd is listening for gdb connections')
|
||||||
|
break # success
|
||||||
|
elif i == 1:
|
||||||
|
Utility.console_log('Ignoring error: "{}"'.format(patterns[i]))
|
||||||
|
# this error message is ignored because it is not a fatal error
|
||||||
|
except Exception:
|
||||||
|
Utility.console_log('openocd initialization has failed', 'R')
|
||||||
|
raise
|
||||||
|
|
||||||
def close(self):
|
def close(self):
|
||||||
try:
|
try:
|
||||||
|
Reference in New Issue
Block a user