ARC: west runner: mdb: fix unexpected empty argument pass to MDB
Currently, in case of multi-core target or in case jtag adapter auto-selectio, we pass unexpected empty argument (empty quotes `''`) to MDB binary due to argument generation error. Fix that. Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
This commit is contained in:
parent
5329319d7a
commit
963c7a2d40
|
@ -41,7 +41,8 @@ def mdb_do_run(mdb_runner, command):
|
|||
# hardware target
|
||||
else:
|
||||
if mdb_runner.jtag == 'digilent':
|
||||
mdb_target = ['-digilent', mdb_runner.dig_device]
|
||||
mdb_target = ['-digilent']
|
||||
if mdb_runner.dig_device: mdb_target += [mdb_runner.dig_device]
|
||||
else:
|
||||
# \todo: add support of other debuggers
|
||||
mdb_target = ['']
|
||||
|
@ -63,14 +64,11 @@ def mdb_do_run(mdb_runner, command):
|
|||
elif 1 < mdb_runner.cores <= 4:
|
||||
mdb_multifiles = '-multifiles='
|
||||
for i in range(mdb_runner.cores):
|
||||
# note that: mdb requires -pset starting from 1, not 0 !!!
|
||||
mdb_sub_cmd = ([commander] +
|
||||
['-pset={}'.format(i + 1),
|
||||
'-psetname=core{}'.format(i),
|
||||
# -prop=download=2 is used for SMP application debug, only the 1st
|
||||
# core will download the shared image.
|
||||
('-prop=download=2' if i > 0 else '')] +
|
||||
mdb_basic_options + mdb_target + [mdb_runner.elf_name])
|
||||
mdb_sub_cmd = [commander] + ['-pset={}'.format(i + 1), '-psetname=core{}'.format(i)]
|
||||
# -prop=download=2 is used for SMP application debug, only the 1st core
|
||||
# will download the shared image.
|
||||
if i > 0: mdb_sub_cmd += ['-prop=download=2']
|
||||
mdb_sub_cmd += mdb_basic_options + mdb_target + [mdb_runner.elf_name]
|
||||
mdb_runner.check_call(mdb_sub_cmd, cwd=mdb_runner.build_dir)
|
||||
mdb_multifiles += ('core{}'.format(mdb_runner.cores-1-i) if i == 0 else ',core{}'.format(mdb_runner.cores-1-i))
|
||||
|
||||
|
|
|
@ -39,7 +39,7 @@ TEST_NSIM_DEBUG_CASES = [
|
|||
}]
|
||||
|
||||
TEST_NSIM_MULTICORE_CASES = [['--cores=2', '--nsim_args=' + TEST_NSIM_ARGS]]
|
||||
TEST_NSIM_CORE1 = [TEST_DRIVER_CMD, '-pset=1', '-psetname=core0', '',
|
||||
TEST_NSIM_CORE1 = [TEST_DRIVER_CMD, '-pset=1', '-psetname=core0',
|
||||
'-nooptions', '-nogoifmain', '-toggle=include_local_symbols=1',
|
||||
'-nsim', TEST_BOARD_NSIM_ARGS, RC_KERNEL_ELF]
|
||||
TEST_NSIM_CORE2 = [TEST_DRIVER_CMD, '-pset=2', '-psetname=core1',
|
||||
|
@ -55,7 +55,7 @@ TEST_HW_FLASH_CASES = [
|
|||
'i': ['--jtag=digilent', '--cores=1'],
|
||||
'o': [TEST_DRIVER_CMD, '-nooptions', '-nogoifmain',
|
||||
'-toggle=include_local_symbols=1',
|
||||
'-digilent', '',
|
||||
'-digilent',
|
||||
'-run', '-cmd=-nowaitq run', '-cmd=quit', '-cl', RC_KERNEL_ELF]
|
||||
}, {
|
||||
'i': ['--jtag=digilent', '--cores=1', '--dig-device=test'],
|
||||
|
@ -66,8 +66,7 @@ TEST_HW_FLASH_CASES = [
|
|||
}, {
|
||||
'i': ['--jtag=test_debug', '--cores=1'],
|
||||
'o': [TEST_DRIVER_CMD, '-nooptions', '-nogoifmain',
|
||||
'-toggle=include_local_symbols=1',
|
||||
'',
|
||||
'-toggle=include_local_symbols=1', '',
|
||||
'-run', '-cmd=-nowaitq run', '-cmd=quit', '-cl', RC_KERNEL_ELF]
|
||||
}]
|
||||
|
||||
|
@ -76,7 +75,7 @@ TEST_HW_DEBUG_CASES = [
|
|||
'i': ['--jtag=digilent', '--cores=1'],
|
||||
'o': [TEST_DRIVER_CMD, '-nooptions', '-nogoifmain',
|
||||
'-toggle=include_local_symbols=1',
|
||||
'-digilent', '',
|
||||
'-digilent',
|
||||
'-OKN', RC_KERNEL_ELF]
|
||||
}, {
|
||||
'i': ['--jtag=digilent', '--cores=1', '--dig-device=test'],
|
||||
|
@ -87,19 +86,18 @@ TEST_HW_DEBUG_CASES = [
|
|||
}, {
|
||||
'i': ['--jtag=test_debug', '--cores=1'],
|
||||
'o': [TEST_DRIVER_CMD, '-nooptions', '-nogoifmain',
|
||||
'-toggle=include_local_symbols=1',
|
||||
'',
|
||||
'-toggle=include_local_symbols=1', '',
|
||||
'-OKN', RC_KERNEL_ELF]
|
||||
}]
|
||||
|
||||
TEST_HW_MULTICORE_CASES = [['--jtag=digilent', '--cores=2']]
|
||||
TEST_HW_CORE1 = [TEST_DRIVER_CMD, '-pset=1', '-psetname=core0', '',
|
||||
TEST_HW_CORE1 = [TEST_DRIVER_CMD, '-pset=1', '-psetname=core0',
|
||||
'-nooptions', '-nogoifmain', '-toggle=include_local_symbols=1',
|
||||
'-digilent', '', RC_KERNEL_ELF]
|
||||
'-digilent', RC_KERNEL_ELF]
|
||||
TEST_HW_CORE2 = [TEST_DRIVER_CMD, '-pset=2', '-psetname=core1',
|
||||
'-prop=download=2', '-nooptions', '-nogoifmain',
|
||||
'-toggle=include_local_symbols=1',
|
||||
'-digilent', '', RC_KERNEL_ELF]
|
||||
'-digilent', RC_KERNEL_ELF]
|
||||
TEST_HW_CORES_LAUNCH = [TEST_DRIVER_CMD, '-multifiles=core1,core0', '-run',
|
||||
'-cmd=-nowaitq run', '-cmd=quit', '-cl']
|
||||
|
||||
|
|
Loading…
Reference in a new issue