There are a number of common build issues at the moment that you may encounter when you attempt to build marlin in vscode / platformio.
These are all related to Marlin dependencies that have been updated since release, breaking Marlin building.
These issues have been addressed in bugfix, but older marlin will continue to break as they are not updated.
A new release is coming that will resolve these issue.
This is accurate as of 27 Jun 2020
Issue 1: You get this error.
The fix is up update your platformio.ini file
Find and replace the line "platform = ststm32" with "platform = ststm32@<6.2.0"
Issue 2: You get this error.
The fix is up update your platformio.ini file
Find the line "Adafruit_MAX31865=https://github.com/adafruit/Adafruit_MAX31865/archive/master.zip" and replace it with
"Adafruit MAX31865 library@~1.1.0"
Issue 3: You get these errors
#define HOMING_BUMP_MM { 5, 5, 2 }
when this version of code needs
#define X_HOME_BUMP_MM 5
#define Y_HOME_BUMP_MM 5
#define Z_HOME_BUMP_MM 2
Simply replace the first line with these 3 lines.
Issue 4: You get these warnings.
The cause is that platformio expects all projects to have a include directory in the project. Marlin doesn't do this.
Issue 5: You get this error
lib_ignore = Adafruit NeoPixel, SPI
remove the Adafruit NeoPixel part to make it "lib_ignore = SPI"
But this is often disabled for a good reasion.
Issue 6: You get this error
Adafruit NeoPixel to Adafruit NeoPixel@<=1.2.4
These are all related to Marlin dependencies that have been updated since release, breaking Marlin building.
These issues have been addressed in bugfix, but older marlin will continue to break as they are not updated.
A new release is coming that will resolve these issue.
This is accurate as of 27 Jun 2020
Issue 1: You get this error.
Marlin\src\HAL\STM32F1\dogm\../../../inc/../HAL/./STM32F1/fastio.h:30:10: fatal error: libmaple/gpio.h: No such file or directory:The cause is ST STM32 framework was updated to version 7. Marlin was built on version 6.
The fix is up update your platformio.ini file
Find and replace the line "platform = ststm32" with "platform = ststm32@<6.2.0"
Issue 2: You get this error.
Adafruit BusIO_ID6214\Adafruit_I2CDevice.cpp:160:79: error: no matching function for call to 'TwoWire::requestFrom(uint8_t, uint8_t, uint8_t)'Any errors that mention Adafruit BusIO
The fix is up update your platformio.ini file
Find the line "Adafruit_MAX31865=https://github.com/adafruit/Adafruit_MAX31865/archive/master.zip" and replace it with
"Adafruit MAX31865 library@~1.1.0"
Issue 3: You get these errors
error: 'X_HOME_BUMP_MM' was not declared in this scope error: 'Y_HOME_BUMP_MM' was not declared in this scope error: 'Z_HOME_BUMP_MM' was not declared in this scopeyour Configuration_adv.h has the following (this is newer than the code expects)
#define HOMING_BUMP_MM { 5, 5, 2 }
when this version of code needs
#define X_HOME_BUMP_MM 5
#define Y_HOME_BUMP_MM 5
#define Z_HOME_BUMP_MM 2
Simply replace the first line with these 3 lines.
Issue 4: You get these warnings.
c_cpp_properties.json", Cannot find "Marlin-2.0.x/include" Cannot find "Marlin-2.0.x/include"These are just warning an should be ignored.
The cause is that platformio expects all projects to have a include directory in the project. Marlin doesn't do this.
Issue 5: You get this error
Marlin\src\feature/leds/neopixel.h:34:10: fatal error: Adafruit_NeoPixel.h: No such file or directoryIn platformio.ini, some platforms have Adafruit NeoPixel disabled with the line
lib_ignore = Adafruit NeoPixel, SPI
remove the Adafruit NeoPixel part to make it "lib_ignore = SPI"
But this is often disabled for a good reasion.
Issue 6: You get this error
"NeoPixel_ID28/Adafruit_NeoPixel.h:361:3: error: 'GPIO_TypeDef' does not name a type"In platformio.ini normally found in [common] section you need to change
Adafruit NeoPixel to Adafruit NeoPixel@<=1.2.4