platformio / platform-atmelsam

Atmel SAM: development platform for PlatformIO
https://registry.platformio.org/platforms/platformio/atmelsam
Apache License 2.0
79 stars 107 forks source link

atmelsam@3.8.0 won't compile MIDIUSB@1.0.4 #69

Closed deladriere closed 4 years ago

deladriere commented 5 years ago

It works fine with atmelsam@3.7.0 here is my Platformio.ini

[env:adafruit_feather_m0]
platform = atmelsam@3.8.0
board = adafruit_feather_m0
framework = arduino

lib_deps =
  MIDIUSB@1.0.4
  SSD1306Ascii@1.2.4

It gives many errors

.platformio/packages/framework-arduinosam/cores/adafruit/USB/USBAPI.h:118:23: error: conflicting declaration 'USBDeviceClass USBDevice'
.platformio/packages/framework-arduinosam/cores/adafruit/USB/USBAPI.h:189:16: error: conflicting declaration 'Serial_ Serial'
.platformio/packages/framework-arduinosam/cores/adafruit/USB/USBAPI.h:118:23: error: conflicting declaration 'USBDeviceClass USBDevice'
smplman commented 5 years ago

@deladriere I ran into this issue with my SparkFun SamD21 Mini. I had to go into the library files mentioned in the errors and update references to Serial to be SerialUSB. This is because the default serial on most Arduinos is Serial and on the SamD21 it is SerialUSB for usb serial. I haven't been able to find a good work around besides editing the library manually.

valeros commented 4 years ago

Hi @deladriere ! Thanks for reporting the issue. Please try the latest platform from the development branch:

[env:adafruit_feather_m0]
platform = https://github.com/platformio/platform-atmelsam.git
board = adafruit_feather_m0
framework = arduino

lib_deps =
  MIDIUSB@1.0.4
  SSD1306Ascii@1.2.4
deladriere commented 4 years ago

hi @valeros this version platform = https://github.com/platformio/platform-atmelsam.git is working fine ! thanks a lot