cl-utils: Care for -j (JTAG) argument in test mode.
This commit is contained in:
parent
1a1cabc90b
commit
45fb12f9b6
@ -224,16 +224,8 @@ int cl_execute(BMP_CL_OPTIONS_t *opt)
|
|||||||
{
|
{
|
||||||
int res = -1;
|
int res = -1;
|
||||||
int num_targets;
|
int num_targets;
|
||||||
if (opt->opt_mode == BMP_MODE_TEST) {
|
if (opt->opt_mode == BMP_MODE_TEST)
|
||||||
printf("Running in Test Mode\n");
|
printf("Running in Test Mode\n");
|
||||||
num_targets = adiv5_swdp_scan();
|
|
||||||
if (num_targets == 0)
|
|
||||||
num_targets = jtag_scan(NULL);
|
|
||||||
if (num_targets)
|
|
||||||
return 0;
|
|
||||||
else
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
if (opt->opt_usejtag) {
|
if (opt->opt_usejtag) {
|
||||||
num_targets = jtag_scan(NULL);
|
num_targets = jtag_scan(NULL);
|
||||||
} else {
|
} else {
|
||||||
@ -243,6 +235,8 @@ int cl_execute(BMP_CL_OPTIONS_t *opt)
|
|||||||
DEBUG("No target found\n");
|
DEBUG("No target found\n");
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
if (opt->opt_mode == BMP_MODE_TEST)
|
||||||
|
return 0;
|
||||||
if (opt->opt_target_dev > num_targets) {
|
if (opt->opt_target_dev > num_targets) {
|
||||||
DEBUG("Given target nummer %d not available\n", opt->opt_target_dev);
|
DEBUG("Given target nummer %d not available\n", opt->opt_target_dev);
|
||||||
return res;
|
return res;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user