cl-utils: Display targets found.
+ other small changes in DEBUG output.
This commit is contained in:
parent
65cb886bb6
commit
a7efe7cc14
|
@ -232,7 +232,7 @@ stlink Stlink;
|
|||
static void exit_function(void)
|
||||
{
|
||||
libusb_exit(NULL);
|
||||
DEBUG("\nCleanup\n");
|
||||
DEBUG("Cleanup\n");
|
||||
}
|
||||
|
||||
/* SIGTERM handler. */
|
||||
|
|
|
@ -228,6 +228,14 @@ void cl_init(BMP_CL_OPTIONS_t *opt, int argc, char **argv)
|
|||
}
|
||||
}
|
||||
|
||||
static void display_target(int i, target *t, void *context)
|
||||
{
|
||||
(void)context;
|
||||
DEBUG("*** %2d %c %s %s\n", i, target_attached(t)?'*':' ',
|
||||
target_driver_name(t),
|
||||
(target_core_name(t)) ? target_core_name(t): "");
|
||||
}
|
||||
|
||||
int cl_execute(BMP_CL_OPTIONS_t *opt)
|
||||
{
|
||||
int res = -1;
|
||||
|
@ -253,6 +261,8 @@ int cl_execute(BMP_CL_OPTIONS_t *opt)
|
|||
if (!num_targets) {
|
||||
DEBUG("No target found\n");
|
||||
return res;
|
||||
} else {
|
||||
target_foreach(display_target, NULL);
|
||||
}
|
||||
if (opt->opt_mode == BMP_MODE_TEST)
|
||||
return 0;
|
||||
|
|
|
@ -235,7 +235,6 @@ void adiv5_dp_unref(ADIv5_DP_t *dp)
|
|||
void adiv5_ap_unref(ADIv5_AP_t *ap)
|
||||
{
|
||||
if (--(ap->refcnt) == 0) {
|
||||
DEBUG("Unref AP\n");
|
||||
adiv5_dp_unref(ap->dp);
|
||||
free(ap);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue