X-Git-Url: https://git.gag.com/?a=blobdiff_plain;ds=sidebyside;f=flash%2Fmain.c;h=46a8ce1711e295651cf2c16e1bfae3c08bc6dd09;hb=6b26cc09ad26d9e4436b0112d84962f253e23e98;hp=a443f95f6bb58b59460e3231a5a650d637763d6c;hpb=9eaafd0519ad2958a3c9a29fb903da4b90cf987f;p=fw%2Fstlink diff --git a/flash/main.c b/flash/main.c index a443f95..46a8ce1 100644 --- a/flash/main.c +++ b/flash/main.c @@ -86,13 +86,18 @@ int main(int ac, char** av) if (o.devname != NULL) /* stlinkv1 */ { +#if CONFIG_USE_LIBSG static const int scsi_verbose = 2; sl = stlink_quirk_open(o.devname, scsi_verbose); if (sl == NULL) goto on_error; +#else + printf("not compiled for use with STLink/V1"); + goto on_error; +#endif } else /* stlinkv2 */ { - sl = stlink_open_usb(10); + sl = stlink_open_usb(1); if (sl == NULL) goto on_error; }