platformio / platformio-vscode-ide

PlatformIO IDE for VSCode: The next generation integrated development environment for IoT
https://marketplace.visualstudio.com/items?itemName=platformio.platformio-ide
Apache License 2.0
1.22k stars 195 forks source link

#include <Servo.h> compile error for Metro M4 Express #2354

Closed ghost closed 3 years ago

ghost commented 3 years ago

#include <Servo.h> results in a compile error for the Metro M4 Express

#include <Servo.h> int main(void) {}

What I've Tried I have tried using the standard PlatformIO <Servo.h>. See logs below. I have tried rebuilding the library from Adafruit's version. See logs below. This same header compiles fine on the Arduino IDE with this BSP. Per this issue, the latest BSP has a working Servo library. See logs below.

Expected Outcome #include <Servo.h> compiles without error. PlatformIO matches the Arduino IDE in header support for Metro M4.

Using Standard Library Log

Processing adafruit_metro_m4 (platform: atmelsam; board: adafruit_metro_m4; framework: arduino)

Verbose mode can be enabled via -v, --verbose option CONFIGURATION: https://docs.platformio.org/page/boards/atmelsam/adafruit_metro_m4.html PLATFORM: Atmel SAM (5.1.1) > Adafruit Metro M4 HARDWARE: SAMD51J19A 120MHz, 192KB RAM, 512KB Flash DEBUG: Current (atmel-ice) External (atmel-ice, jlink) PACKAGES:

Using Adafruit's Library

Per this forum, I download this .zip , renamed it to 'Servo', then copied it to my PlatformIO project's 'lib' folder.

Log

Executing task: pio run <

Processing adafruit_metro_m4 (platform: atmelsam; board: adafruit_metro_m4; framework: arduino)

Verbose mode can be enabled via -v, --verbose option CONFIGURATION: https://docs.platformio.org/page/boards/atmelsam/adafruit_metro_m4.html PLATFORM: Atmel SAM (5.1.1) > Adafruit Metro M4 HARDWARE: SAMD51J19A 120MHz, 192KB RAM, 512KB Flash DEBUG: Current (atmel-ice) External (atmel-ice, jlink) PACKAGES:

Using Arduino IDE Configured with this BSP Logs Sketch uses 5584 bytes (1%) of program storage space. Maximum is 507904 bytes. Device : ATSAMD51x19 Version : v1.1 [Arduino:XYZ] May 17 2020 17:56:35 Address : 0x0 Pages : 1024 Page Size : 512 bytes Total Size : 512KB Planes : 1 Lock Regions : 32 Locked : none Security : false BOD : false BOR : true Write 5616 bytes to flash (11 pages) [==============================] 100% (11/11 pages) Done in 0.079 seconds Verify 5616 bytes of flash [==============================] 100% (11/11 pages) Verify successful Done in 0.132 seconds

ivankravets commented 3 years ago

Please forward to https://community.platformio.org/