Allowed CONFIG_USE_LIBSG=0 to suppress STLink/V1 compilation
[fw/stlink] / flash / main.c
index a443f95f6bb58b59460e3231a5a650d637763d6c..e474174377b1ac154d17cfaf96e46823f087e551 100644 (file)
@@ -86,9 +86,14 @@ 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 */
   {