USBBlaster-1.0.0 not working for MKR Vidor 4000

I am using Arduino vidor 4000, and trying to upload USB blaster code But it shows following error message

Arduino: 1.8.16 (Windows Store 1.8.51.0) (Windows 10), Board: "Arduino MKR Vidor 4000"

In file included from C:\Users\rf\Documents\Arduino\libraries\USBBlaster\src/Blaster.h:1:0,

             from C:\Users\rf\Documents\Arduino\libraries\USBBlaster\examples\USB_Blaster\USB_Blaster.ino:1:

C:\Users\rf\Documents\Arduino\libraries\USBBlaster\src/USBConfig.h:51:10: fatal error: USB/PluggableUSB.h: No such file or directory

#include "USB/PluggableUSB.h"

      ^~~~~~~~~~~~~~~~~~~~

compilation terminated.

exit status 1

Error compiling for board Arduino MKR Vidor 4000.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

Hi @ferdaus89. There was a significant restructuring of the "Arduino SAMD (32-bits ARM Cortex-M0+) Boards" platform at its 1.8.10 release caused by the switch to using the ArduinoCore-API code (AKA "Project Chainsaw")

This broke compatibility with the "USBBlaster" library. A similar thing happened with the MIDIUSB library:

and you can make the same simple fix:

  1. Open this file in a text editor:
    C:\Users\rf\Documents\Arduino\libraries\USBBlaster\src/USBConfig.h
    
  2. Change line 51 from this:
    #include "USB/PluggableUSB.h"
    
    to this:
    #include "api/PluggableUSB.h"
    
  3. Save the file.

i just changed , but it shows new error .............

Arduino: 1.8.16 (Windows Store 1.8.51.0) (Windows 10), Board: "Arduino MKR Vidor 4000"

In file included from C:\Users\rf\Documents\ArduinoData\packages\arduino\tools\CMSIS-Atmel\1.2.0/CMSIS/Device/ATMEL/samd21/include/samd21.h:69:0,

             from C:\Users\rf\Documents\ArduinoData\packages\arduino\tools\CMSIS-Atmel\1.2.0/CMSIS/Device/ATMEL/samd.h:105,

             from C:\Users\rf\Documents\ArduinoData\packages\arduino\hardware\samd\1.8.10\cores\arduino/Arduino.h:34,

             from sketch\USB_Blaster.ino.cpp:1:

C:\Users\rf\Documents\ArduinoData\packages\arduino\tools\CMSIS-Atmel\1.2.0/CMSIS/Device/ATMEL/samd21/include/samd21g18a.h:226:0: warning: "LITTLE_ENDIAN" redefined

#define LITTLE_ENDIAN 1

In file included from c:\users\rf\documents\arduinodata\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4\arm-none-eabi\include\sys\types.h:67:0,

             from c:\users\rf\documents\arduinodata\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4\arm-none-eabi\include\stdio.h:61,

             from C:\Users\rf\Documents\ArduinoData\packages\arduino\hardware\samd\1.8.10\cores\arduino/api/Print.h:22,

             from C:\Users\rf\Documents\ArduinoData\packages\arduino\hardware\samd\1.8.10\cores\arduino/api/ArduinoAPI.h:31,

             from C:\Users\rf\Documents\ArduinoData\packages\arduino\hardware\samd\1.8.10\cores\arduino/Arduino.h:23,

             from sketch\USB_Blaster.ino.cpp:1:

c:\users\rf\documents\arduinodata\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4\arm-none-eabi\include\machine\endian.h:17:0: note: this is the location of the previous definition

#define LITTLE_ENDIAN _LITTLE_ENDIAN

Library USBBlaster has been declared precompiled:

Using precompiled library in C:\Users\rf\Documents\Arduino\libraries\USBBlaster\src\cortex-m0plus

In file included from C:\Users\rf\Documents\ArduinoData\packages\arduino\tools\CMSIS-Atmel\1.2.0/CMSIS/Device/ATMEL/samd21/include/samd21.h:69:0,

             from C:\Users\rf\Documents\ArduinoData\packages\arduino\tools\CMSIS-Atmel\1.2.0/CMSIS/Device/ATMEL/samd.h:105,

             from C:\Users\rf\Documents\ArduinoData\packages\arduino\hardware\samd\1.8.10\cores\arduino/Arduino.h:34,

             from C:\Users\rf\Documents\ArduinoData\packages\arduino\hardware\samd\1.8.10\cores\arduino\USB\samd21_host.c:24:

C:\Users\rf\Documents\ArduinoData\packages\arduino\tools\CMSIS-Atmel\1.2.0/CMSIS/Device/ATMEL/samd21/include/samd21g18a.h:226:0: warning: "LITTLE_ENDIAN" redefined

#define LITTLE_ENDIAN 1

In file included from c:\users\rf\documents\arduinodata\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4\arm-none-eabi\include\sys\types.h:67:0,

             from c:\users\rf\documents\arduinodata\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4\arm-none-eabi\include\stdio.h:61,

             from C:\Users\rf\Documents\ArduinoData\packages\arduino\hardware\samd\1.8.10\cores\arduino\USB\samd21_host.c:20:

c:\users\rf\documents\arduinodata\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4\arm-none-eabi\include\machine\endian.h:17:0: note: this is the location of the previous definition

#define LITTLE_ENDIAN _LITTLE_ENDIAN

In file included from C:\Users\rf\Documents\ArduinoData\packages\arduino\tools\CMSIS-Atmel\1.2.0/CMSIS/Device/ATMEL/samd21/include/samd21.h:69:0,

             from C:\Users\rf\Documents\ArduinoData\packages\arduino\tools\CMSIS-Atmel\1.2.0/CMSIS/Device/ATMEL/samd.h:105,

             from C:\Users\rf\Documents\ArduinoData\packages\arduino\hardware\samd\1.8.10\cores\arduino/Arduino.h:34,

             from C:\Users\rf\Documents\ArduinoData\packages\arduino\hardware\samd\1.8.10\cores\arduino\Reset.cpp:19:

C:\Users\rf\Documents\ArduinoData\packages\arduino\tools\CMSIS-Atmel\1.2.0/CMSIS/Device/ATMEL/samd21/include/samd21g18a.h:226:0: warning: "LITTLE_ENDIAN" redefined

#define LITTLE_ENDIAN 1

In file included from c:\users\rf\documents\arduinodata\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4\arm-none-eabi\include\sys\types.h:67:0,

             from c:\users\rf\documents\arduinodata\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4\arm-none-eabi\include\stdio.h:61,

             from C:\Users\rf\Documents\ArduinoData\packages\arduino\hardware\samd\1.8.10\cores\arduino/api/Print.h:22,

             from C:\Users\rf\Documents\ArduinoData\packages\arduino\hardware\samd\1.8.10\cores\arduino/api/ArduinoAPI.h:31,

             from C:\Users\rf\Documents\ArduinoData\packages\arduino\hardware\samd\1.8.10\cores\arduino/Arduino.h:23,

             from C:\Users\rf\Documents\ArduinoData\packages\arduino\hardware\samd\1.8.10\cores\arduino\Reset.cpp:19:

c:\users\rf\documents\arduinodata\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4\arm-none-eabi\include\machine\endian.h:17:0: note: this is the location of the previous definition

#define LITTLE_ENDIAN _LITTLE_ENDIAN

In file included from C:\Users\rf\Documents\ArduinoData\packages\arduino\tools\CMSIS-Atmel\1.2.0/CMSIS/Device/ATMEL/samd21/include/samd21.h:69:0,

             from C:\Users\rf\Documents\ArduinoData\packages\arduino\tools\CMSIS-Atmel\1.2.0/CMSIS/Device/ATMEL/samd.h:105,

             from C:\Users\rf\Documents\ArduinoData\packages\arduino\hardware\samd\1.8.10\cores\arduino\Arduino.h:34,

             from C:\Users\rf\Documents\ArduinoData\packages\arduino\hardware\samd\1.8.10\cores\arduino\SERCOM.cpp:19:

C:\Users\rf\Documents\ArduinoData\packages\arduino\tools\CMSIS-Atmel\1.2.0/CMSIS/Device/ATMEL/samd21/include/samd21g18a.h:226:0: warning: "LITTLE_ENDIAN" redefined

#define LITTLE_ENDIAN 1

In file included from c:\users\rf\documents\arduinodata\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4\arm-none-eabi\include\sys\types.h:67:0,

             from c:\users\rf\documents\arduinodata\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4\arm-none-eabi\include\stdio.h:61,

             from C:\Users\rf\Documents\ArduinoData\packages\arduino\hardware\samd\1.8.10\cores\arduino\api/Print.h:22,

             from C:\Users\rf\Documents\ArduinoData\packages\arduino\hardware\samd\1.8.10\cores\arduino\api/ArduinoAPI.h:31,

             from C:\Users\rf\Documents\ArduinoData\packages\arduino\hardware\samd\1.8.10\cores\arduino\Arduino.h:23,

             from C:\Users\rf\Documents\ArduinoData\packages\arduino\hardware\samd\1.8.10\cores\arduino\SERCOM.cpp:19:

c:\users\rf\documents\arduinodata\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4\arm-none-eabi\include\machine\endian.h:17:0: note: this is the location of the previous definition

#define LITTLE_ENDIAN _LITTLE_ENDIAN

In file included from C:\Users\rf\Documents\ArduinoData\packages\arduino\tools\CMSIS-Atmel\1.2.0/CMSIS/Device/ATMEL/samd21/include/samd21.h:69:0,

             from C:\Users\rf\Documents\ArduinoData\packages\arduino\tools\CMSIS-Atmel\1.2.0/CMSIS/Device/ATMEL/samd.h:105,

             from C:\Users\rf\Documents\ArduinoData\packages\arduino\hardware\samd\1.8.10\cores\arduino\Arduino.h:34,

             from C:\Users\rf\Documents\ArduinoData\packages\arduino\hardware\samd\1.8.10\cores\arduino\Tone.cpp:19:

C:\Users\rf\Documents\ArduinoData\packages\arduino\tools\CMSIS-Atmel\1.2.0/CMSIS/Device/ATMEL/samd21/include/samd21g18a.h:226:0: warning: "LITTLE_ENDIAN" redefined

#define LITTLE_ENDIAN 1

In file included from c:\users\rf\documents\arduinodata\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4\arm-none-eabi\include\sys\types.h:67:0,

             from c:\users\rf\documents\arduinodata\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4\arm-none-eabi\include\stdio.h:61,

             from C:\Users\rf\Documents\ArduinoData\packages\arduino\hardware\samd\1.8.10\cores\arduino\api/Print.h:22,

             from C:\Users\rf\Documents\ArduinoData\packages\arduino\hardware\samd\1.8.10\cores\arduino\api/ArduinoAPI.h:31,

             from C:\Users\rf\Documents\ArduinoData\packages\arduino\hardware\samd\1.8.10\cores\arduino\Arduino.h:23,

             from C:\Users\rf\Documents\ArduinoData\packages\arduino\hardware\samd\1.8.10\cores\arduino\Tone.cpp:19:

c:\users\rf\documents\arduinodata\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4\arm-none-eabi\include\machine\endian.h:17:0: note: this is the location of the previous definition

#define LITTLE_ENDIAN _LITTLE_ENDIAN

In file included from C:\Users\rf\Documents\ArduinoData\packages\arduino\tools\CMSIS-Atmel\1.2.0/CMSIS/Device/ATMEL/samd21/include/samd21.h:69:0,

             from C:\Users\rf\Documents\ArduinoData\packages\arduino\tools\CMSIS-Atmel\1.2.0/CMSIS/Device/ATMEL/samd.h:105,

             from C:\Users\rf\Documents\ArduinoData\packages\arduino\hardware\samd\1.8.10\cores\arduino\Arduino.h:34,

             from C:\Users\rf\Documents\ArduinoData\packages\arduino\hardware\samd\1.8.10\cores\arduino\Uart.cpp:19:

C:\Users\rf\Documents\ArduinoData\packages\arduino\tools\CMSIS-Atmel\1.2.0/CMSIS/Device/ATMEL/samd21/include/samd21g18a.h:226:0: warning: "LITTLE_ENDIAN" redefined

#define LITTLE_ENDIAN 1

In file included from C:\Users\rf\Documents\ArduinoData\packages\arduino\tools\CMSIS-Atmel\1.2.0/CMSIS/Device/ATMEL/samd21/include/samd21.h:69:0,

             from C:\Users\rf\Documents\ArduinoData\packages\arduino\tools\CMSIS-Atmel\1.2.0/CMSIS/Device/ATMEL/samd.h:105,

             from C:\Users\rf\Documents\ArduinoData\packages\arduino\hardware\samd\1.8.10\cores\arduino\Arduino.h:34,

             from C:\Users\rf\Documents\ArduinoData\packages\arduino\hardware\samd\1.8.10\cores\arduino\main.cpp:20:

C:\Users\rf\Documents\ArduinoData\packages\arduino\tools\CMSIS-Atmel\1.2.0/CMSIS/Device/ATMEL/samd21/include/samd21g18a.h:226:0: warning: "LITTLE_ENDIAN" redefined

#define LITTLE_ENDIAN 1

In file included from c:\users\rf\documents\arduinodata\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4\arm-none-eabi\include\sys\types.h:67:0,

             from c:\users\rf\documents\arduinodata\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4\arm-none-eabi\include\stdio.h:61,

             from C:\Users\rf\Documents\ArduinoData\packages\arduino\hardware\samd\1.8.10\cores\arduino\api/Print.h:22,

             from C:\Users\rf\Documents\ArduinoData\packages\arduino\hardware\samd\1.8.10\cores\arduino\api/ArduinoAPI.h:31,

             from C:\Users\rf\Documents\ArduinoData\packages\arduino\hardware\samd\1.8.10\cores\arduino\Arduino.h:23,

             from C:\Users\rf\Documents\ArduinoData\packages\arduino\hardware\samd\1.8.10\cores\arduino\main.cpp:20:

c:\users\rf\documents\arduinodata\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4\arm-none-eabi\include\machine\endian.h:17:0: note: this is the location of the previous definition

#define LITTLE_ENDIAN _LITTLE_ENDIAN

In file included from c:\users\rf\documents\arduinodata\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4\arm-none-eabi\include\sys\types.h:67:0,

             from c:\users\rf\documents\arduinodata\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4\arm-none-eabi\include\stdio.h:61,

             from C:\Users\rf\Documents\ArduinoData\packages\arduino\hardware\samd\1.8.10\cores\arduino\api/Print.h:22,

             from C:\Users\rf\Documents\ArduinoData\packages\arduino\hardware\samd\1.8.10\cores\arduino\api/ArduinoAPI.h:31,

             from C:\Users\rf\Documents\ArduinoData\packages\arduino\hardware\samd\1.8.10\cores\arduino\Arduino.h:23,

             from C:\Users\rf\Documents\ArduinoData\packages\arduino\hardware\samd\1.8.10\cores\arduino\Uart.cpp:19:

c:\users\rf\documents\arduinodata\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4\arm-none-eabi\include\machine\endian.h:17:0: note: this is the location of the previous definition

#define LITTLE_ENDIAN _LITTLE_ENDIAN

In file included from C:\Users\rf\Documents\ArduinoData\packages\arduino\tools\CMSIS-Atmel\1.2.0/CMSIS/Device/ATMEL/samd21/include/samd21.h:69:0,

             from C:\Users\rf\Documents\ArduinoData\packages\arduino\tools\CMSIS-Atmel\1.2.0/CMSIS/Device/ATMEL/samd.h:105,

             from C:\Users\rf\Documents\ArduinoData\packages\arduino\hardware\samd\1.8.10\cores\arduino/Arduino.h:34,

             from C:\Users\rf\Documents\ArduinoData\packages\arduino\hardware\samd\1.8.10\cores\arduino\USB\CDC.cpp:19:

C:\Users\rf\Documents\ArduinoData\packages\arduino\tools\CMSIS-Atmel\1.2.0/CMSIS/Device/ATMEL/samd21/include/samd21g18a.h:226:0: warning: "LITTLE_ENDIAN" redefined

#define LITTLE_ENDIAN 1

In file included from c:\users\rf\documents\arduinodata\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4\arm-none-eabi\include\sys\types.h:67:0,

             from c:\users\rf\documents\arduinodata\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4\arm-none-eabi\include\stdio.h:61,

             from C:\Users\rf\Documents\ArduinoData\packages\arduino\hardware\samd\1.8.10\cores\arduino/api/Print.h:22,

             from C:\Users\rf\Documents\ArduinoData\packages\arduino\hardware\samd\1.8.10\cores\arduino/api/ArduinoAPI.h:31,

             from C:\Users\rf\Documents\ArduinoData\packages\arduino\hardware\samd\1.8.10\cores\arduino/Arduino.h:23,

             from C:\Users\rf\Documents\ArduinoData\packages\arduino\hardware\samd\1.8.10\cores\arduino\USB\CDC.cpp:19:

c:\users\rf\documents\arduinodata\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4\arm-none-eabi\include\machine\endian.h:17:0: note: this is the location of the previous definition

#define LITTLE_ENDIAN _LITTLE_ENDIAN

In file included from C:\Users\rf\Documents\ArduinoData\packages\arduino\tools\CMSIS-Atmel\1.2.0/CMSIS/Device/ATMEL/samd21/include/samd21.h:69:0,

             from C:\Users\rf\Documents\ArduinoData\packages\arduino\tools\CMSIS-Atmel\1.2.0/CMSIS/Device/ATMEL/samd.h:105,

             from C:\Users\rf\Documents\ArduinoData\packages\arduino\hardware\samd\1.8.10\cores\arduino/Arduino.h:34,

             from C:\Users\rf\Documents\ArduinoData\packages\arduino\hardware\samd\1.8.10\cores\arduino\USB\USBCore.cpp:21:

C:\Users\rf\Documents\ArduinoData\packages\arduino\tools\CMSIS-Atmel\1.2.0/CMSIS/Device/ATMEL/samd21/include/samd21g18a.h:226:0: warning: "LITTLE_ENDIAN" redefined

#define LITTLE_ENDIAN 1

In file included from c:\users\rf\documents\arduinodata\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4\arm-none-eabi\include\sys\types.h:67:0,

             from c:\users\rf\documents\arduinodata\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4\arm-none-eabi\include\stdio.h:61,

             from C:\Users\rf\Documents\ArduinoData\packages\arduino\hardware\samd\1.8.10\cores\arduino/api/Print.h:22,

             from C:\Users\rf\Documents\ArduinoData\packages\arduino\hardware\samd\1.8.10\cores\arduino/api/ArduinoAPI.h:31,

             from C:\Users\rf\Documents\ArduinoData\packages\arduino\hardware\samd\1.8.10\cores\arduino/Arduino.h:23,

             from C:\Users\rf\Documents\ArduinoData\packages\arduino\hardware\samd\1.8.10\cores\arduino\USB\USBCore.cpp:21:

c:\users\rf\documents\arduinodata\packages\arduino\tools\arm-none-eabi-gcc\7-2017q4\arm-none-eabi\include\machine\endian.h:17:0: note: this is the location of the previous definition

#define LITTLE_ENDIAN _LITTLE_ENDIAN

C:\Users\rf\Documents\Arduino\libraries\USBBlaster\src\cortex-m0plus\libusbblaster.a(USBConfig.cpp.o): In function `USBBlaster_::USBBlaster_()':

/home/martino/eslov-sk/libraries/USB_Blaster/src/USBConfig.cpp:119: undefined reference to `PluggableUSB_::plug(PluggableUSBModule*)'

collect2.exe: error: ld returned 1 exit status

exit status 1

Error compiling for board Arduino MKR Vidor 4000.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

so finally i downgraded to Arduino SAMD (32-bits ARM Cortex-M0+) Boards" platform at [its 1.8.8 release] and its working with USBblaster 1.0.0 and i kept the line 51 unchanged to - #include "USB/PluggableUSB.h"

Thanks a lot !

Thanks for taking the time to post an update with your solution.

I think that is a reasonable workaround. I thought of mentioning it, but changing the single #include directive seemed easy enough. I didn't encounter the other errors you got, probably because I only compiled a minimal sketch like this:

#include "Blaster.h"
void setup() {}
void loop() {}