mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04: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:
commit
680415b9ce
@ -34,14 +34,25 @@ class CustomProcess(object):
|
||||
|
||||
class OCDProcess(CustomProcess):
|
||||
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')
|
||||
super(OCDProcess, self).__init__(cmd, log_file)
|
||||
i = self.p.expect_exact(['Info : Listening on port 3333 for gdb connections', 'Error:'])
|
||||
if i == 0:
|
||||
Utility.console_log('openocd is listening for gdb connections')
|
||||
else:
|
||||
raise RuntimeError('openocd initialization has failed')
|
||||
patterns = ['Info : Listening on port 3333 for gdb connections',
|
||||
'Error: type \'esp32\' is missing virt2phys']
|
||||
|
||||
try:
|
||||
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):
|
||||
try:
|
||||
|
Loading…
Reference in New Issue
Block a user