platformio / platform-atmelsam

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

Arduino IDE and Platform.io define issue FEATHER M0 #204

Open AlexisFetet opened 1 year ago

AlexisFetet commented 1 year ago

It looks like the defines for Adafruit Feather M0 are different on Arduino IDE and platform.io on VScode, I found out that the following codes work on one of the 2 IDEs, is there a way to have the same define? Am I missing a configuration process?

With Arduino IDE 1.8.19 , platform.io 6.1.5 (home 3.4.3):

#ifndef ADAFRUIT_FEATHER_M0
  #error "Ce sketch doit être compilé pour le type de carte 'Adafruit Feather M0'"
#endif

Compiles with Arduino IDE, not with platform.io

#ifndef ARDUINO_SAMD_FEATHER_M0
  #error "Ce sketch doit être compilé pour le type de carte 'Adafruit Feather M0'"
#endif

Compiles with platform.io, not with Arduino IDE

This seems to be related to this line.

platformio.ini :

; PlatformIO Project Configuration File
;
;   Build options: build flags, source filter
;   Upload options: custom upload port, speed and extra flags
;   Library options: dependencies, extra library storages
;   Advanced options: extra scripting
;
; Please visit documentation for the other options and examples
; https://docs.platformio.org/page/projectconf.html

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

Community Topic