[USB Hub] Arduino portability?

Dear Users of Riot,

we are currently doing a project which tries to connect a barcode scanner to a Nucleo-f411 by using an Arduino USB Shield.

There is a project that makes it possible to connect USB devices to Arduinos: https://github.com/felis/USB_Host_Shield_2.0

They state it is also possible to use the library on a Nucleo board.

However when we tried running the Arduino files we got the output that you will find at the end of this mail.

We are now wondering what the best approach for getting the scanner to work.

We are open to every help and hope to hear from you soon!

Best regards

Felix Althammer

In file included from /home/RIOT/arduino_usb_desc/Usb.h:41:0, from /home/RIOT/arduino_usb_desc/usbhub.h:20, from /home/RIOT/arduino_usb_desc/usbhub.cpp:17: /home/RIOT/arduino_usb_desc/avrpins.h:814:0: error: “pgm_read_pointer” redefined [-Werror] #define pgm_read_pointer§ pgm_read_dword§

In file included from /homeRIOT/arduino_usb_desc/settings.h:102:0, from /home/RIOT/arduino_usb_desc/Usb.h:34, from /home/RIOT/arduino_usb_desc/usbhub.h:20, from /home/RIOT/arduino_usb_desc/usbhub.cpp:17: /home/RIOT/arduino_usb_desc/version_helper.h:189:0: note: this is the location of the previous definition #define pgm_read_pointer

In file included from /home/RIOT/arduino_usb_desc/Usb.h:41:0, from /home/RIOT/arduino_usb_desc/usbhub.h:20, from /home/RIOT/arduino_usb_desc/usbhub.cpp:17: /home/RIOT/arduino_usb_desc/avrpins.h:1211:2: error: #error “Please define board in avrpins.h” #error “Please define board in avrpins.h” ^~~~~ In file included from /home/RIOT/arduino_usb_desc/Usb.h:43:0, from /home/RIOT/arduino_usb_desc/usbhub.h:20, from /home/RIOT/arduino_usb_desc/usbhub.cpp:17: /home//RIOT/arduino_usb_desc/usbhost.h:124:2: error: #error “No SPI entry in usbhost.h” #error “No SPI entry in usbhost.h” ^~~~~ In file included from /home/RIOT//arduino_usb_desc/Usb.h:34:0, from /home/RIOT/arduino_usb_desc/usbhub.h:20, from /home/RIOT/arduino_usb_desc/usbhub.cpp:17: /home/RIOT/arduino_usb_desc/printhex.h: In function ‘void SerialPrintHex(T)’: /home/RIOT/arduino_usb_desc/settings.h:49:25: error: ‘Serial’ was not declared in this scope #define USB_HOST_SERIAL Serial ^ /home/RIOT/arduino_usb_desc/printhex.h:59:17: note: in expansion of macro ‘USB_HOST_SERIAL’ USB_HOST_SERIAL.print(v); ^~~~~~~~~~~~~~~ In file included from /home/RIOT/arduino_usb_desc/Usb.h:35:0, from /home/RIOT/arduino_usb_desc/usbhub.h:20, from /home/RIOT/arduino_usb_desc/usbhub.cpp:17: /home/RIOT/arduino_usb_desc/printhex.h: At global scope: /home/RIOT/arduino_usb_desc/printhex.h:64:16: error: variable or field ‘PrintHex2’ declared void void PrintHex2(Print *prn, T val) { ^~~~~ /home/RIOT/arduino_usb_desc/printhex.h:64:16: error: ‘Print’ was not declared in this scope /home/RIOT/arduino_usb_desc/printhex.h:64:16: note: suggested alternative: ‘printf’ void PrintHex2(Print *prn, T val) { ^~~~~ printf /home/RIOT/arduino_usb_desc/printhex.h:64:23: error: ‘prn’ was not declared in this scope void PrintHex2(Print *prn, T val) { ^~~ /home/RIOT/arduino_usb_desc/printhex.h:64:30: error: expected primary-expression before ‘val’ void PrintHex2(Print *prn, T val) { ^~~ In file included from /home/RIOT/arduino_usb_desc/Usb.h:34:0, from /home/RIOT/arduino_usb_desc/usbhub.h:20, from /home/RIOT/arduino_usb_desc/usbhub.cpp:17: /home/RIOT/arduino_usb_desc/usbhost.h: In static member function ‘static void SPi<SPI_CLK, SPI_MOSI, SPI_MISO, SPI_SS>::init()’: /home/RIOT//arduino_usb_desc/settings.h:33:17: error: ‘SPI’ was not declared in this scope #define USB_SPI SPI ^ /home/RIOT/arduino_usb_desc/usbhost.h:64:17: note: in expansion of macro ‘USB_SPI’ USB_SPI.begin(); ^~~~~~~ /home/RIOT/arduino_usb_desc/settings.h:33:17: note: suggested alternative: ‘SPi’ #define USB_SPI SPI ^ /home/RIOT/arduino_usb_desc/usbhost.h:64:17: note: in expansion of macro ‘USB_SPI’ USB_SPI.begin(); ^~~~~~~ /home/RIOT/arduino_usb_desc/usbhost.h: In member function ‘void MAX3421e<SPI_SS, INTR>::regWr(uint8_t, uint8_t)’: /home/RIOT/arduino_usb_desc/settings.h:33:17: error: ‘SPI’ was not declared in this scope #define USB_SPI SPI ^ /home/RIOT/arduino_usb_desc/usbhost.h:199:9: note: in expansion of macro ‘USB_SPI’ USB_SPI.transfer(reg | 0x02); ^~~~~~~ /home/RIOT/arduino_usb_desc/settings.h:33:17: note: suggested alternative: ‘SPi’ #define USB_SPI SPI