Welcome! Log In Create A New Profile

Advanced

Compiling Marlin V2.0 with VSCODE

Posted by [email protected] 
Compiling Marlin V2.0 with VSCODE
December 01, 2019 03:11AM
Hi there, but

I cannot get Marlin V.2 to compile in VSCODE and Atom. One of my older versions of Marlin bugfix 2.0 do compile with no problems. Any newer versions all give me the error below. I have uninstalled the NXP platform and let it download the latest but it did not work. Can anyone give me pointers on what to try next. The platform.io file in the older version that compiles is precisely the same as the one in the new version that is not compiling. Am I missing something here?

The output on my build:

> Executing task: C:\Users\scrat\.platformio\penv\Scripts\platformio.exe run <

Can not remove temporary directory `d:\Nic\Prusa I3 3d printer\Firmware\Current - HyperCube\MarlinFirmware\.pioenvs`. Please remove it manually to avoid build issues
Processing LPC1768 (platform: [github.com]; framework: arduino; board: nxp_lpc1768)
--------------------------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: [docs.platformio.org]
PLATFORM: NXP Arduino LPC176x 0.1.0 > NXP LPC1768
HARDWARE: LPC1768 100MHz, 31.97KB RAM, 464KB Flash
DEBUG: Current (cmsis-dap) On-board (cmsis-dap) External (blackmagic, jlink)
PACKAGES: framework-arduino-lpc176x 0.1.3, toolchain-gccarmnoneeabi 1.80201.190214 (8.2.1)
Converting Marlin.ino
LDF: Library Dependency Finder -> [bit.ly]
LDF Modes: Finder ~ off, Compatibility ~ strict
Found 5 compatible libraries
Scanning dependencies...
Dependency Graph
|-- 1.0.0
|-- 1.0.0
|-- 0.4
|-- 0.6.1
|-- 1.2.4
Building in release mode
upload disk: E:
Compiling .pioenvs\LPC1768\src\src\HAL\HAL_LPC1768\DebugMonitor.cpp.o
Compiling .pioenvs\LPC1768\src\src\HAL\HAL_LPC1768\HAL.cpp.o
Compiling .pioenvs\LPC1768\src\src\HAL\HAL_LPC1768\HAL_SPI.cpp.o
Compiling .pioenvs\LPC1768\src\src\HAL\HAL_LPC1768\main.cpp.o
Compiling .pioenvs\LPC1768\src\src\HAL\HAL_LPC1768\persistent_store_flash.cpp.o
Compiling .pioenvs\LPC1768\src\src\HAL\HAL_LPC1768\persistent_store_sdcard.cpp.o
Compiling .pioenvs\LPC1768\src\src\HAL\HAL_LPC1768\timers.cpp.o
Compiling .pioenvs\LPC1768\src\src\HAL\HAL_LPC1768\u8g\u8g_com_HAL_LPC1768_hw_spi.cpp.o
Compiling .pioenvs\LPC1768\src\src\HAL\HAL_LPC1768\u8g\u8g_com_HAL_LPC1768_ssd_hw_i2c.cpp.o
Compiling .pioenvs\LPC1768\src\src\HAL\HAL_LPC1768\u8g\u8g_com_HAL_LPC1768_st7920_hw_spi.cpp.o
Compiling .pioenvs\LPC1768\src\src\HAL\HAL_LPC1768\u8g\u8g_com_HAL_LPC1768_st7920_sw_spi.cpp.o
Compiling .pioenvs\LPC1768\src\src\HAL\HAL_LPC1768\watchdog.cpp.o
In file included from Marlin\src\HAL\HAL_LPC1768\../../core/../inc/MarlinConfig.h:39,
from Marlin\src\HAL\HAL_LPC1768\../../core/serial.h:24,
from Marlin\src\HAL\HAL_LPC1768\DebugMonitor.cpp:26:
Marlin\src\HAL\HAL_LPC1768\../../core/../inc/../HAL/HAL_LPC1768/inc/SanityCheck.h:25:4: error: #error "nxplpc-arduino-lpc176x package is out of date, Please update the PlatformIO platforms, frameworks and libraries. You may need to remove the platform and let it reinstall automatically."
#error "nxplpc-arduino-lpc176x package is out of date, Please update the PlatformIO platforms, frameworks and libraries. You may need to remove the platform and let it reinstall automatically."
^~~~~
In file included from Marlin\src\HAL\HAL_LPC1768\../../core/../inc/MarlinConfig.h:39,
from Marlin\src\HAL\HAL_LPC1768\../../core/serial.h:24,
from Marlin\src\HAL\HAL_LPC1768\DebugMonitor.cpp:26:
Marlin\src\HAL\HAL_LPC1768\../../core/../inc/../HAL/HAL_LPC1768/inc/SanityCheck.h:28:4: error: #error "framework-arduino-lpc176x package is out of date, Please update the PlatformIO platforms, frameworks and libraries."
#error "framework-arduino-lpc176x package is out of date, Please update the PlatformIO platforms, frameworks and libraries."
^~~~~
Marlin\src\HAL\HAL_LPC1768\../../core/../inc/../HAL/HAL_LPC1768/inc/SanityCheck.h:36:4: error: #error "TEMP_BED_PIN must be defined using the Pn_nn or Pn_nn_An format. (See the included pins files)."
#error "TEMP_BED_PIN must be defined using the Pn_nn or Pn_nn_An format. (See the included pins files)."
^~~~~
In file included from Marlin\src\HAL\HAL_LPC1768\../../inc/MarlinConfig.h:39,
from Marlin\src\HAL\HAL_LPC1768\HAL.cpp:25:
Marlin\src\HAL\HAL_LPC1768\../../inc/../HAL/HAL_LPC1768/inc/SanityCheck.h:25:4: error: #error "nxplpc-arduino-lpc176x package is out of date, Please update the PlatformIO platforms, frameworks and libraries. You may need to remove the platform and let it reinstall automatically."
#error "nxplpc-arduino-lpc176x package is out of date, Please update the PlatformIO platforms, frameworks and libraries. You may need to remove the platform and let it reinstall automatically."
^~~~~
In file included from Marlin\src\HAL\HAL_LPC1768\../../inc/MarlinConfig.h:39,
from Marlin\src\HAL\HAL_LPC1768\HAL.cpp:25:
Marlin\src\HAL\HAL_LPC1768\../../inc/../HAL/HAL_LPC1768/inc/SanityCheck.h:28:4: error: #error "framework-arduino-lpc176x package is out of date, Please update the PlatformIO platforms, frameworks and libraries."
#error "framework-arduino-lpc176x package is out of date, Please update the PlatformIO platforms, frameworks and libraries."
^~~~~
Marlin\src\HAL\HAL_LPC1768\../../inc/../HAL/HAL_LPC1768/inc/SanityCheck.h:36:4: error: #error "TEMP_BED_PIN must be defined using the Pn_nn or Pn_nn_An format. (See
the included pins files)."
#error "TEMP_BED_PIN must be defined using the Pn_nn or Pn_nn_An format. (See the included pins files)."
^~~~~
In file included from .piolibdeps\LPC1768\U8glib-HAL_ID1932\src/U8glib.h:47,
from Marlin\src\HAL\HAL_LPC1768\u8g\u8g_com_HAL_LPC1768_hw_spi.cpp:62:
.piolibdeps\LPC1768\U8glib-HAL_ID1932\src/clib/u8g.h:658:12: fatal error: HAL_LCD_defines.h: No such file or directory

*************************************************************************
* Looking for HAL_LCD_defines.h dependency? Check our library registry!
*
* CLI > platformio lib search "header:HAL_LCD_defines.h"
* Web > [platformio.org]
*
*************************************************************************

#include
^~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from Marlin\src\HAL\HAL_LPC1768\../../inc/MarlinConfig.h:39,
from Marlin\src\HAL\HAL_LPC1768\HAL_SPI.cpp:51:
Marlin\src\HAL\HAL_LPC1768\../../inc/../HAL/HAL_LPC1768/inc/SanityCheck.h:25:4: error: #error "nxplpc-arduino-lpc176x package is out of date, Please update the PlatformIO platforms, frameworks and libraries. You may need to remove the platform and let it reinstall automatically."
#error "nxplpc-arduino-lpc176x package is out of date, Please update the PlatformIO platforms, frameworks and libraries. You may need to remove the platform and let it reinstall automatically."
^~~~~
In file included from Marlin\src\HAL\HAL_LPC1768\../../inc/MarlinConfig.h:39,
from Marlin\src\HAL\HAL_LPC1768\HAL_SPI.cpp:51:
Marlin\src\HAL\HAL_LPC1768\../../inc/../HAL/HAL_LPC1768/inc/SanityCheck.h:28:4: error: #error "framework-arduino-lpc176x package is out of date, Please update the PlatformIO platforms, frameworks and libraries."
#error "framework-arduino-lpc176x package is out of date, Please update the PlatformIO platforms, frameworks and libraries."
^~~~~
Marlin\src\HAL\HAL_LPC1768\../../inc/../HAL/HAL_LPC1768/inc/SanityCheck.h:36:4: error: #error "TEMP_BED_PIN must be defined using the Pn_nn or Pn_nn_An format. (See
the included pins files)."
#error "TEMP_BED_PIN must be defined using the Pn_nn or Pn_nn_An format. (See the included pins files)."
^~~~~
*** [.pioenvs\LPC1768\src\src\HAL\HAL_LPC1768\u8g\u8g_com_HAL_LPC1768_hw_spi.cpp.o] Error 1
In file included from .piolibdeps\LPC1768\U8glib-HAL_ID1932\src/U8glib.h:47,
from Marlin\src\HAL\HAL_LPC1768\u8g\u8g_com_HAL_LPC1768_ssd_hw_i2c.cpp:82:
.piolibdeps\LPC1768\U8glib-HAL_ID1932\src/clib/u8g.h:658:12: fatal error: HAL_LCD_defines.h: No such file or directory

*************************************************************************
* Looking for HAL_LCD_defines.h dependency? Check our library registry!
*
* CLI > platformio lib search "header:HAL_LCD_defines.h"
* Web > [platformio.org]
*
*************************************************************************

#include
^~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from .piolibdeps\LPC1768\U8glib-HAL_ID1932\src/U8glib.h:47,
from Marlin\src\HAL\HAL_LPC1768\u8g\u8g_com_HAL_LPC1768_st7920_sw_spi.cpp:62:
.piolibdeps\LPC1768\U8glib-HAL_ID1932\src/clib/u8g.h:658:12: fatal error: HAL_LCD_defines.h: No such file or directory

*************************************************************************
* Looking for HAL_LCD_defines.h dependency? Check our library registry!
*
* CLI > platformio lib search "header:HAL_LCD_defines.h"
* Web > [platformio.org]
*
*************************************************************************

#include
^~~~~~~~~~~~~~~~~~~
*** [.pioenvs\LPC1768\src\src\HAL\HAL_LPC1768\u8g\u8g_com_HAL_LPC1768_ssd_hw_i2c.cpp.o] Error 1
compilation terminated.
In file included from .piolibdeps\LPC1768\U8glib-HAL_ID1932\src/U8glib.h:47,
from Marlin\src\HAL\HAL_LPC1768\u8g\u8g_com_HAL_LPC1768_st7920_hw_spi.cpp:62:
.piolibdeps\LPC1768\U8glib-HAL_ID1932\src/clib/u8g.h:658:12: fatal error: HAL_LCD_defines.h: No such file or directory

*************************************************************************
* Looking for HAL_LCD_defines.h dependency? Check our library registry!
*
* CLI > platformio lib search "header:HAL_LCD_defines.h"
* Web > [platformio.org]
*
*************************************************************************

#include
^~~~~~~~~~~~~~~~~~~
compilation terminated.
*** [.pioenvs\LPC1768\src\src\HAL\HAL_LPC1768\u8g\u8g_com_HAL_LPC1768_st7920_sw_spi.cpp.o] Error 1
*** [.pioenvs\LPC1768\src\src\HAL\HAL_LPC1768\u8g\u8g_com_HAL_LPC1768_st7920_hw_spi.cpp.o] Error 1
In file included from Marlin\src\HAL\HAL_LPC1768\../../sd/../inc/MarlinConfig.h:39,
from Marlin\src\HAL\HAL_LPC1768\../../sd/cardreader.h:24,
from Marlin\src\HAL\HAL_LPC1768\main.cpp:38:
Marlin\src\HAL\HAL_LPC1768\../../sd/../inc/../HAL/HAL_LPC1768/inc/SanityCheck.h:25:4: error: #error "nxplpc-arduino-lpc176x package is out of date, Please update the PlatformIO platforms, frameworks and libraries. You may need to remove the platform and let it reinstall automatically."
#error "nxplpc-arduino-lpc176x package is out of date, Please update the PlatformIO platforms, frameworks and libraries. You may need to remove the platform and let it reinstall automatically."
^~~~~
In file included from Marlin\src\HAL\HAL_LPC1768\../../sd/../inc/MarlinConfig.h:39,
from Marlin\src\HAL\HAL_LPC1768\../../sd/cardreader.h:24,
from Marlin\src\HAL\HAL_LPC1768\main.cpp:38:
Marlin\src\HAL\HAL_LPC1768\../../sd/../inc/../HAL/HAL_LPC1768/inc/SanityCheck.h:28:4: error: #error "framework-arduino-lpc176x package is out of date, Please update
the PlatformIO platforms, frameworks and libraries."
#error "framework-arduino-lpc176x package is out of date, Please update the PlatformIO platforms, frameworks and libraries."
^~~~~
Marlin\src\HAL\HAL_LPC1768\../../sd/../inc/../HAL/HAL_LPC1768/inc/SanityCheck.h:36:4: error: #error "TEMP_BED_PIN must be defined using the Pn_nn or Pn_nn_An format. (See the included pins files)."
#error "TEMP_BED_PIN must be defined using the Pn_nn or Pn_nn_An format. (See the included pins files)."
^~~~~
In file included from Marlin\src\HAL\HAL_LPC1768\../../inc/MarlinConfig.h:39,
from Marlin\src\HAL\HAL_LPC1768\persistent_store_flash.cpp:44:
Marlin\src\HAL\HAL_LPC1768\../../inc/../HAL/HAL_LPC1768/inc/SanityCheck.h:25:4: error: #error "nxplpc-arduino-lpc176x package is out of date, Please update the PlatformIO platforms, frameworks and libraries. You may need to remove the platform and let it reinstall automatically."
#error "nxplpc-arduino-lpc176x package is out of date, Please update the PlatformIO platforms, frameworks and libraries. You may need to remove the platform and let it reinstall automatically."
^~~~~
In file included from Marlin\src\HAL\HAL_LPC1768\../../inc/MarlinConfig.h:39,
from Marlin\src\HAL\HAL_LPC1768\persistent_store_flash.cpp:44:
Marlin\src\HAL\HAL_LPC1768\../../inc/../HAL/HAL_LPC1768/inc/SanityCheck.h:28:4: error: #error "framework-arduino-lpc176x package is out of date, Please update the PlatformIO platforms, frameworks and libraries."
#error "framework-arduino-lpc176x package is out of date, Please update the PlatformIO platforms, frameworks and libraries."
^~~~~
Marlin\src\HAL\HAL_LPC1768\../../inc/../HAL/HAL_LPC1768/inc/SanityCheck.h:36:4: error: #error "TEMP_BED_PIN must be defined using the Pn_nn or Pn_nn_An format. (See
the included pins files)."
#error "TEMP_BED_PIN must be defined using the Pn_nn or Pn_nn_An format. (See the included pins files)."
^~~~~
In file included from Marlin\src\HAL\HAL_LPC1768\../../inc/MarlinConfig.h:39,
from Marlin\src\HAL\HAL_LPC1768\persistent_store_sdcard.cpp:29:
Marlin\src\HAL\HAL_LPC1768\../../inc/../HAL/HAL_LPC1768/inc/SanityCheck.h:25:4: error: #error "nxplpc-arduino-lpc176x package is out of date, Please update the PlatformIO platforms, frameworks and libraries. You may need to remove the platform and let it reinstall automatically."
#error "nxplpc-arduino-lpc176x package is out of date, Please update the PlatformIO platforms, frameworks and libraries. You may need to remove the platform and let it reinstall automatically."
^~~~~
In file included from Marlin\src\HAL\HAL_LPC1768\../../inc/MarlinConfig.h:39,
from Marlin\src\HAL\HAL_LPC1768\persistent_store_sdcard.cpp:29:
Marlin\src\HAL\HAL_LPC1768\../../inc/../HAL/HAL_LPC1768/inc/SanityCheck.h:28:4: error: #error "framework-arduino-lpc176x package is out of date, Please update the PlatformIO platforms, frameworks and libraries."
#error "framework-arduino-lpc176x package is out of date, Please update the PlatformIO platforms, frameworks and libraries."
^~~~~
Marlin\src\HAL\HAL_LPC1768\../../inc/../HAL/HAL_LPC1768/inc/SanityCheck.h:36:4: error: #error "TEMP_BED_PIN must be defined using the Pn_nn or Pn_nn_An format. (See
the included pins files)."
#error "TEMP_BED_PIN must be defined using the Pn_nn or Pn_nn_An format. (See the included pins files)."
^~~~~
In file included from Marlin\src\HAL\HAL_LPC1768\../../inc/MarlinConfig.h:39,
from Marlin\src\HAL\HAL_LPC1768\timers.cpp:31:
Marlin\src\HAL\HAL_LPC1768\../../inc/../HAL/HAL_LPC1768/inc/SanityCheck.h:25:4: error: #error "nxplpc-arduino-lpc176x package is out of date, Please update the PlatformIO platforms, frameworks and libraries. You may need to remove the platform and let it reinstall automatically."
#error "nxplpc-arduino-lpc176x package is out of date, Please update the PlatformIO platforms, frameworks and libraries. You may need to remove the platform and let it reinstall automatically."
^~~~~
In file included from Marlin\src\HAL\HAL_LPC1768\../../inc/MarlinConfig.h:39,
from Marlin\src\HAL\HAL_LPC1768\timers.cpp:31:
Marlin\src\HAL\HAL_LPC1768\../../inc/../HAL/HAL_LPC1768/inc/SanityCheck.h:28:4: error: #error "framework-arduino-lpc176x package is out of date, Please update the PlatformIO platforms, frameworks and libraries."
#error "framework-arduino-lpc176x package is out of date, Please update the PlatformIO platforms, frameworks and libraries."
^~~~~
Marlin\src\HAL\HAL_LPC1768\../../inc/../HAL/HAL_LPC1768/inc/SanityCheck.h:36:4: error: #error "TEMP_BED_PIN must be defined using the Pn_nn or Pn_nn_An format. (See
the included pins files)."
#error "TEMP_BED_PIN must be defined using the Pn_nn or Pn_nn_An format. (See the included pins files)."
^~~~~
In file included from Marlin\src\HAL\HAL_LPC1768\../../inc/MarlinConfig.h:39,
from Marlin\src\HAL\HAL_LPC1768\watchdog.cpp:25:
Marlin\src\HAL\HAL_LPC1768\../../inc/../HAL/HAL_LPC1768/inc/SanityCheck.h:25:4: error: #error "nxplpc-arduino-lpc176x package is out of date, Please update the PlatformIO platforms, frameworks and libraries. You may need to remove the platform and let it reinstall automatically."
#error "nxplpc-arduino-lpc176x package is out of date, Please update the PlatformIO platforms, frameworks and libraries. You may need to remove the platform and let it reinstall automatically."
^~~~~
In file included from Marlin\src\HAL\HAL_LPC1768\../../inc/MarlinConfig.h:39,
from Marlin\src\HAL\HAL_LPC1768\watchdog.cpp:25:
Marlin\src\HAL\HAL_LPC1768\../../inc/../HAL/HAL_LPC1768/inc/SanityCheck.h:28:4: error: #error "framework-arduino-lpc176x package is out of date, Please update the PlatformIO platforms, frameworks and libraries."
#error "framework-arduino-lpc176x package is out of date, Please update the PlatformIO platforms, frameworks and libraries."
^~~~~
Marlin\src\HAL\HAL_LPC1768\../../inc/../HAL/HAL_LPC1768/inc/SanityCheck.h:36:4: error: #error "TEMP_BED_PIN must be defined using the Pn_nn or Pn_nn_An format. (See
the included pins files)."
#error "TEMP_BED_PIN must be defined using the Pn_nn or Pn_nn_An format. (See the included pins files)."
^~~~~
In file included from Marlin\src\HAL\HAL_LPC1768\../../core/../inc/../HAL/HAL.h:26,
from Marlin\src\HAL\HAL_LPC1768\../../core/../inc/MarlinConfig.h:30,
from Marlin\src\HAL\HAL_LPC1768\../../core/serial.h:24,
from Marlin\src\HAL\HAL_LPC1768\DebugMonitor.cpp:26:
Marlin\src\HAL\HAL_LPC1768\../../core/../inc/../HAL/./HAL_LPC1768/HAL.h: In function 'void HAL_start_adc(pin_t)':
Marlin\src\HAL\HAL_LPC1768\../../core/../inc/../HAL/./HAL_LPC1768/HAL.h:140:34: error: 'read' is not a member of 'FilteredADC' {aka 'LPC176x::ADC<2, 23>'}
HAL_adc_reading = FilteredADC::read(pin) >> (16 - HAL_ADC_RESOLUTION); // returns 16bit value, reduce to required bits
^~~~
Marlin\src\HAL\HAL_LPC1768\../../core/../inc/../HAL/./HAL_LPC1768/HAL.h: At global scope:
Marlin\src\HAL\HAL_LPC1768\../../core/../inc/../HAL/./HAL_LPC1768/HAL.h:153:16: error: redefinition of 'constexpr bool VALID_PIN(pin_t)'
constexpr bool VALID_PIN(const pin_t pin) {
^~~~~~~~~
In file included from C:\users\scrat\.platformio\packages\framework-arduino-lpc176x\cores\arduino/Arduino.h:34,
from Marlin\src\HAL\HAL_LPC1768\../../core/../inc/../HAL/./HAL_LPC1768/../shared/Marduino.h:36,
from Marlin\src\HAL\HAL_LPC1768\../../core/../inc/../HAL/./HAL_LPC1768/HAL.h:39,
from Marlin\src\HAL\HAL_LPC1768\../../core/../inc/../HAL/HAL.h:26,
from Marlin\src\HAL\HAL_LPC1768\../../core/../inc/MarlinConfig.h:30,
from Marlin\src\HAL\HAL_LPC1768\../../core/serial.h:24,
from Marlin\src\HAL\HAL_LPC1768\DebugMonitor.cpp:26:
C:\users\scrat\.platformio\packages\framework-arduino-lpc176x\cores\arduino/pinmapping.h:240:16: note: 'constexpr bool VALID_PIN(pin_t)' previously defined here
constexpr bool VALID_PIN(const pin_t pin) {
^~~~~~~~~
compilation terminated due to -fmax-errors=5.
In file included from Marlin\src\HAL\HAL_LPC1768\../../inc/../HAL/HAL.h:26,
from Marlin\src\HAL\HAL_LPC1768\../../inc/MarlinConfig.h:30,
from Marlin\src\HAL\HAL_LPC1768\HAL.cpp:25:
Marlin\src\HAL\HAL_LPC1768\../../inc/../HAL/./HAL_LPC1768/HAL.h: In function 'void HAL_start_adc(pin_t)':
Marlin\src\HAL\HAL_LPC1768\../../inc/../HAL/./HAL_LPC1768/HAL.h:140:34: error: 'read' is not a member of 'FilteredADC' {aka 'LPC176x::ADC<2, 23>'}
HAL_adc_reading = FilteredADC::read(pin) >> (16 - HAL_ADC_RESOLUTION); // returns 16bit value, reduce to required bits
^~~~
Marlin\src\HAL\HAL_LPC1768\../../inc/../HAL/./HAL_LPC1768/HAL.h: At global scope:
Marlin\src\HAL\HAL_LPC1768\../../inc/../HAL/./HAL_LPC1768/HAL.h:153:16: error: redefinition of 'constexpr bool VALID_PIN(pin_t)'
constexpr bool VALID_PIN(const pin_t pin) {
^~~~~~~~~
In file included from C:\users\scrat\.platformio\packages\framework-arduino-lpc176x\cores\arduino/Arduino.h:34,
from Marlin\src\HAL\HAL_LPC1768\../../inc/../HAL/./HAL_LPC1768/../shared/Marduino.h:36,
from Marlin\src\HAL\HAL_LPC1768\../../inc/../HAL/./HAL_LPC1768/HAL.h:39,
from Marlin\src\HAL\HAL_LPC1768\../../inc/../HAL/HAL.h:26,
from Marlin\src\HAL\HAL_LPC1768\../../inc/MarlinConfig.h:30,
from Marlin\src\HAL\HAL_LPC1768\HAL.cpp:25:
C:\users\scrat\.platformio\packages\framework-arduino-lpc176x\cores\arduino/pinmapping.h:240:16: note: 'constexpr bool VALID_PIN(pin_t)' previously defined here
constexpr bool VALID_PIN(const pin_t pin) {
^~~~~~~~~
compilation terminated due to -fmax-errors=5.
*** [.pioenvs\LPC1768\src\src\HAL\HAL_LPC1768\DebugMonitor.cpp.o] Error 1
*** [.pioenvs\LPC1768\src\src\HAL\HAL_LPC1768\HAL.cpp.o] Error 1
In file included from Marlin\src\HAL\HAL_LPC1768\../../inc/../HAL/HAL.h:26,
from Marlin\src\HAL\HAL_LPC1768\../../inc/MarlinConfig.h:30,
from Marlin\src\HAL\HAL_LPC1768\HAL_SPI.cpp:51:
Marlin\src\HAL\HAL_LPC1768\../../inc/../HAL/./HAL_LPC1768/HAL.h: In function 'void HAL_start_adc(pin_t)':
Marlin\src\HAL\HAL_LPC1768\../../inc/../HAL/./HAL_LPC1768/HAL.h:140:34: error: 'read' is not a member of 'FilteredADC' {aka 'LPC176x::ADC<2, 23>'}
HAL_adc_reading = FilteredADC::read(pin) >> (16 - HAL_ADC_RESOLUTION); // returns 16bit value, reduce to required bits
^~~~
Marlin\src\HAL\HAL_LPC1768\../../inc/../HAL/./HAL_LPC1768/HAL.h: At global scope:
Marlin\src\HAL\HAL_LPC1768\../../inc/../HAL/./HAL_LPC1768/HAL.h:153:16: error: redefinition of 'constexpr bool VALID_PIN(pin_t)'
constexpr bool VALID_PIN(const pin_t pin) {
^~~~~~~~~
In file included from C:\users\scrat\.platformio\packages\framework-arduino-lpc176x\cores\arduino/Arduino.h:34,
from Marlin\src\HAL\HAL_LPC1768\../../inc/../HAL/./HAL_LPC1768/../shared/Marduino.h:36,
from Marlin\src\HAL\HAL_LPC1768\../../inc/../HAL/./HAL_LPC1768/HAL.h:39,
from Marlin\src\HAL\HAL_LPC1768\../../inc/../HAL/HAL.h:26,
from Marlin\src\HAL\HAL_LPC1768\../../inc/MarlinConfig.h:30,
from Marlin\src\HAL\HAL_LPC1768\HAL_SPI.cpp:51:
C:\users\scrat\.platformio\packages\framework-arduino-lpc176x\cores\arduino/pinmapping.h:240:16: note: 'constexpr bool VALID_PIN(pin_t)' previously defined here
constexpr bool VALID_PIN(const pin_t pin) {
^~~~~~~~~
compilation terminated due to -fmax-errors=5.
In file included from Marlin\src\HAL\HAL_LPC1768\../../sd/../inc/../HAL/HAL.h:26,
from Marlin\src\HAL\HAL_LPC1768\../../sd/../inc/MarlinConfig.h:30,
from Marlin\src\HAL\HAL_LPC1768\../../sd/cardreader.h:24,
from Marlin\src\HAL\HAL_LPC1768\main.cpp:38:
Marlin\src\HAL\HAL_LPC1768\../../sd/../inc/../HAL/./HAL_LPC1768/HAL.h: In function 'void HAL_start_adc(pin_t)':
Marlin\src\HAL\HAL_LPC1768\../../sd/../inc/../HAL/./HAL_LPC1768/HAL.h:140:34: error: 'read' is not a member of 'FilteredADC' {aka 'LPC176x::ADC<2, 23>'}
HAL_adc_reading = FilteredADC::read(pin) >> (16 - HAL_ADC_RESOLUTION); // returns 16bit value, reduce to required bits
^~~~
Marlin\src\HAL\HAL_LPC1768\../../sd/../inc/../HAL/./HAL_LPC1768/HAL.h: At global scope:
Marlin\src\HAL\HAL_LPC1768\../../sd/../inc/../HAL/./HAL_LPC1768/HAL.h:153:16: error: redefinition of 'constexpr bool VALID_PIN(pin_t)'
constexpr bool VALID_PIN(const pin_t pin) {
^~~~~~~~~
In file included from C:\users\scrat\.platformio\packages\framework-arduino-lpc176x\cores\arduino/Arduino.h:34,
from C:\users\scrat\.platformio\packages\framework-arduino-lpc176x\cores\arduino/CDCSerial.h:34,
from Marlin\src\HAL\HAL_LPC1768\main.cpp:31:
C:\users\scrat\.platformio\packages\framework-arduino-lpc176x\cores\arduino/pinmapping.h:240:16: note: 'constexpr bool VALID_PIN(pin_t)' previously defined here
constexpr bool VALID_PIN(const pin_t pin) {
^~~~~~~~~
compilation terminated due to -fmax-errors=5.
*** [.pioenvs\LPC1768\src\src\HAL\HAL_LPC1768\HAL_SPI.cpp.o] Error 1
*** [.pioenvs\LPC1768\src\src\HAL\HAL_LPC1768\main.cpp.o] Error 1
In file included from Marlin\src\HAL\HAL_LPC1768\../../inc/../HAL/HAL.h:26,
from Marlin\src\HAL\HAL_LPC1768\../../inc/MarlinConfig.h:30,
from Marlin\src\HAL\HAL_LPC1768\persistent_store_flash.cpp:44:
Marlin\src\HAL\HAL_LPC1768\../../inc/../HAL/./HAL_LPC1768/HAL.h: In function 'void HAL_start_adc(pin_t)':
Marlin\src\HAL\HAL_LPC1768\../../inc/../HAL/./HAL_LPC1768/HAL.h:140:34: error: 'read' is not a member of 'FilteredADC' {aka 'LPC176x::ADC<2, 23>'}
HAL_adc_reading = FilteredADC::read(pin) >> (16 - HAL_ADC_RESOLUTION); // returns 16bit value, reduce to required bits
^~~~
Marlin\src\HAL\HAL_LPC1768\../../inc/../HAL/./HAL_LPC1768/HAL.h: At global scope:
Marlin\src\HAL\HAL_LPC1768\../../inc/../HAL/./HAL_LPC1768/HAL.h:153:16: error: redefinition of 'constexpr bool VALID_PIN(pin_t)'
constexpr bool VALID_PIN(const pin_t pin) {
^~~~~~~~~
In file included from C:\users\scrat\.platformio\packages\framework-arduino-lpc176x\cores\arduino/Arduino.h:34,
from Marlin\src\HAL\HAL_LPC1768\../../inc/../HAL/./HAL_LPC1768/../shared/Marduino.h:36,
from Marlin\src\HAL\HAL_LPC1768\../../inc/../HAL/./HAL_LPC1768/HAL.h:39,
from Marlin\src\HAL\HAL_LPC1768\../../inc/../HAL/HAL.h:26,
from Marlin\src\HAL\HAL_LPC1768\../../inc/MarlinConfig.h:30,
from Marlin\src\HAL\HAL_LPC1768\persistent_store_flash.cpp:44:
C:\users\scrat\.platformio\packages\framework-arduino-lpc176x\cores\arduino/pinmapping.h:240:16: note: 'constexpr bool VALID_PIN(pin_t)' previously defined here
constexpr bool VALID_PIN(const pin_t pin) {
^~~~~~~~~
compilation terminated due to -fmax-errors=5.
*** [.pioenvs\LPC1768\src\src\HAL\HAL_LPC1768\persistent_store_flash.cpp.o] Error 1
In file included from Marlin\src\HAL\HAL_LPC1768\../../inc/../HAL/HAL.h:26,
from Marlin\src\HAL\HAL_LPC1768\../../inc/MarlinConfig.h:30,
from Marlin\src\HAL\HAL_LPC1768\persistent_store_sdcard.cpp:29:
Marlin\src\HAL\HAL_LPC1768\../../inc/../HAL/./HAL_LPC1768/HAL.h: In function 'void HAL_start_adc(pin_t)':
Marlin\src\HAL\HAL_LPC1768\../../inc/../HAL/./HAL_LPC1768/HAL.h:140:34: error: 'read' is not a member of 'FilteredADC' {aka 'LPC176x::ADC<2, 23>'}
HAL_adc_reading = FilteredADC::read(pin) >> (16 - HAL_ADC_RESOLUTION); // returns 16bit value, reduce to required bits
^~~~
Marlin\src\HAL\HAL_LPC1768\../../inc/../HAL/./HAL_LPC1768/HAL.h: At global scope:
Marlin\src\HAL\HAL_LPC1768\../../inc/../HAL/./HAL_LPC1768/HAL.h:153:16: error: redefinition of 'constexpr bool VALID_PIN(pin_t)'
constexpr bool VALID_PIN(const pin_t pin) {
^~~~~~~~~
In file included from C:\users\scrat\.platformio\packages\framework-arduino-lpc176x\cores\arduino/Arduino.h:34,
from Marlin\src\HAL\HAL_LPC1768\../../inc/../HAL/./HAL_LPC1768/../shared/Marduino.h:36,
from Marlin\src\HAL\HAL_LPC1768\../../inc/../HAL/./HAL_LPC1768/HAL.h:39,
from Marlin\src\HAL\HAL_LPC1768\../../inc/../HAL/HAL.h:26,
from Marlin\src\HAL\HAL_LPC1768\../../inc/MarlinConfig.h:30,
from Marlin\src\HAL\HAL_LPC1768\persistent_store_sdcard.cpp:29:
C:\users\scrat\.platformio\packages\framework-arduino-lpc176x\cores\arduino/pinmapping.h:240:16: note: 'constexpr bool VALID_PIN(pin_t)' previously defined here
constexpr bool VALID_PIN(const pin_t pin) {
^~~~~~~~~
compilation terminated due to -fmax-errors=5.
*** [.pioenvs\LPC1768\src\src\HAL\HAL_LPC1768\persistent_store_sdcard.cpp.o] Error 1
In file included from Marlin\src\HAL\HAL_LPC1768\../../inc/../HAL/HAL.h:26,
from Marlin\src\HAL\HAL_LPC1768\../../inc/MarlinConfig.h:30,
from Marlin\src\HAL\HAL_LPC1768\timers.cpp:31:
Marlin\src\HAL\HAL_LPC1768\../../inc/../HAL/./HAL_LPC1768/HAL.h: In function 'void HAL_start_adc(pin_t)':
Marlin\src\HAL\HAL_LPC1768\../../inc/../HAL/./HAL_LPC1768/HAL.h:140:34: error: 'read' is not a member of 'FilteredADC' {aka 'LPC176x::ADC<2, 23>'}
HAL_adc_reading = FilteredADC::read(pin) >> (16 - HAL_ADC_RESOLUTION); // returns 16bit value, reduce to required bits
^~~~
Marlin\src\HAL\HAL_LPC1768\../../inc/../HAL/./HAL_LPC1768/HAL.h: At global scope:
Marlin\src\HAL\HAL_LPC1768\../../inc/../HAL/./HAL_LPC1768/HAL.h:153:16: error: redefinition of 'constexpr bool VALID_PIN(pin_t)'
constexpr bool VALID_PIN(const pin_t pin) {
^~~~~~~~~
In file included from C:\users\scrat\.platformio\packages\framework-arduino-lpc176x\cores\arduino/Arduino.h:34,
from Marlin\src\HAL\HAL_LPC1768\../../inc/../HAL/./HAL_LPC1768/../shared/Marduino.h:36,
from Marlin\src\HAL\HAL_LPC1768\../../inc/../HAL/./HAL_LPC1768/HAL.h:39,
from Marlin\src\HAL\HAL_LPC1768\../../inc/../HAL/HAL.h:26,
from Marlin\src\HAL\HAL_LPC1768\../../inc/MarlinConfig.h:30,
from Marlin\src\HAL\HAL_LPC1768\timers.cpp:31:
C:\users\scrat\.platformio\packages\framework-arduino-lpc176x\cores\arduino/pinmapping.h:240:16: note: 'constexpr bool VALID_PIN(pin_t)' previously defined here
constexpr bool VALID_PIN(const pin_t pin) {
^~~~~~~~~
compilation terminated due to -fmax-errors=5.
*** [.pioenvs\LPC1768\src\src\HAL\HAL_LPC1768\timers.cpp.o] Error 1
In file included from Marlin\src\HAL\HAL_LPC1768\../../inc/../HAL/HAL.h:26,
from Marlin\src\HAL\HAL_LPC1768\../../inc/MarlinConfig.h:30,
from Marlin\src\HAL\HAL_LPC1768\watchdog.cpp:25:
Marlin\src\HAL\HAL_LPC1768\../../inc/../HAL/./HAL_LPC1768/HAL.h: In function 'void HAL_start_adc(pin_t)':
Marlin\src\HAL\HAL_LPC1768\../../inc/../HAL/./HAL_LPC1768/HAL.h:140:34: error: 'read' is not a member of 'FilteredADC' {aka 'LPC176x::ADC<2, 23>'}
HAL_adc_reading = FilteredADC::read(pin) >> (16 - HAL_ADC_RESOLUTION); // returns 16bit value, reduce to required bits
^~~~
Marlin\src\HAL\HAL_LPC1768\../../inc/../HAL/./HAL_LPC1768/HAL.h: At global scope:
Marlin\src\HAL\HAL_LPC1768\../../inc/../HAL/./HAL_LPC1768/HAL.h:153:16: error: redefinition of 'constexpr bool VALID_PIN(pin_t)'
constexpr bool VALID_PIN(const pin_t pin) {
^~~~~~~~~
In file included from C:\users\scrat\.platformio\packages\framework-arduino-lpc176x\cores\arduino/Arduino.h:34,
from Marlin\src\HAL\HAL_LPC1768\../../inc/../HAL/./HAL_LPC1768/../shared/Marduino.h:36,
from Marlin\src\HAL\HAL_LPC1768\../../inc/../HAL/./HAL_LPC1768/HAL.h:39,
from Marlin\src\HAL\HAL_LPC1768\../../inc/../HAL/HAL.h:26,
from Marlin\src\HAL\HAL_LPC1768\../../inc/MarlinConfig.h:30,
from Marlin\src\HAL\HAL_LPC1768\watchdog.cpp:25:
C:\users\scrat\.platformio\packages\framework-arduino-lpc176x\cores\arduino/pinmapping.h:240:16: note: 'constexpr bool VALID_PIN(pin_t)' previously defined here
constexpr bool VALID_PIN(const pin_t pin) {
^~~~~~~~~
compilation terminated due to -fmax-errors=5.
*** [.pioenvs\LPC1768\src\src\HAL\HAL_LPC1768\watchdog.cpp.o] Error 1
==================================================================== [FAILED] Took 2.39 seconds ====================================================================

Environment Status Duration
-------------------- -------- ------------
megaatmega2560 IGNORED
megaatmega1280 IGNORED
at90usb1286_cdc IGNORED
at90usb1286_dfu IGNORED
DUE IGNORED
DUE_USB IGNORED
DUE_debug IGNORED
LPC1768 FAILED 00:00:02.392
LPC1769 IGNORED
melzi IGNORED
melzi_optiboot IGNORED
rambo IGNORED
sanguino_atmega644p IGNORED
sanguino_atmega1284p IGNORED
STM32F1 IGNORED
STM32F4 IGNORED
ARMED IGNORED
mks_robin IGNORED
black_stm32f407ve IGNORED
teensy35 IGNORED
malyanm200 IGNORED
esp32 IGNORED
fysetc_f6_13 IGNORED
linux_native IGNORED
============================================================== 1 failed, 0 succeeded in 00:00:02.392 ==============================================================
The terminal process terminated with exit code: 1

Terminal will be reused by tasks, press any key to close it.

Regards

Nic

Edited 1 time(s). Last edit at 12/01/2019 03:19AM by scratchbuild52@gmail.com.
Re: Compiling Marlin V2.0 with VSCODE
December 01, 2019 03:51AM
You have so many error it is not funny...

First issue is obvious

"Can not remove temporary directory `d:\Nic\Prusa I3 3d printer\Firmware\Current - HyperCube\MarlinFirmware\.pioenvs`. Please remove it manually to avoid build issues"

delete this .pioenvs directory. Platformio will then just recreate it

The second error is also obvious
"error: #error "nxplpc-arduino-lpc176x package is out of date, Please update the PlatformIO platforms, frameworks and libraries. You may need to remove the platform and let it reinstall automatically."

So update everything. At the bottom of VScode is a tiny little house icon. click this. This should show you the platformio home page and all libraries and platforms that need updated. update them all.

Also along the bottom is a trash can, click this to clean out all old build files.

The lpc1768/9 platform is under heavy development. You need the latest marlin from the official repository.

Recent changes.
The way Analog pins are defined has changed. This results in errors like the following
#error "TEMP_BED_PIN must be defined using the Pn_nn or Pn_nn_An format.
Many Configuration.h define names have changed

Downloading old version of marlin 2.0 from random places, will not work (Just to many changes to mention)
Downloading old config files from random random places will not work (Most of these will trigger obvious errors that the keyword as been changed)
Downloading random pin files from random places will not work.

Always start with a fresh copy of marlin2.0 from the official marlin repository. [github.com]

So grab the official marlin change these 3 things only and try and compile it. This is to test your build environment.

1) in platformio.ini

find

[platformio]
src_dir = Marlin
boards_dir = buildroot/share/PlatformIO/boards
default_envs = megaatmega2560

and change the last line to default_envs = LPC1768

2) in Configuration.h

Change #define SERIAL_PORT 0 to #define SERIAL_PORT -1

3) in Configuration.h
Change #define MOTHERBOARD BOARD_RAMPS_14_EFB to your motherboard probably a BOARD_BIGTREE_SKR_V1_3 or a BOARD_RAMPS_14_RE_ARM_EFB

and try and compile.

If it compiles then start editing the Configuration files to suit your printer.

Edited 4 time(s). Last edit at 12/01/2019 04:05AM by Dust.
Re: Compiling Marlin V2.0 with VSCODE
December 01, 2019 05:11AM
#error "nxplpc-arduino-lpc176x package is out of date, Please update the PlatformIO platforms, frameworks and libraries. You may need to remove the platform and let it reinstall automatically."
check platformio.ini
may be "platform" parameter


[platformio]
src_dir = Marlin
boards_dir = buildroot/share/PlatformIO/boards
default_envs = LPC1768

a little omitted


# NXP LPC176x ARM Cortex-M3
#
[env:LPC1768]
platform = https ://github.com/p3p/pio-nxplpc-arduino-lpc176x/archive/0.1.2.zip
board = nxp_lpc1768
build_flags = -DU8G_HAL_LINKS -IMarlin/src/HAL/HAL_LPC1768/include -IMarlin/src/HAL/HAL_LPC1768/u8g ${common.build_flags}
# debug options for backtrace
# -funwind-tables
# -mpoke-function-name
lib_ldf_mode = off
lib_compat_mode = strict
extra_scripts = Marlin/src/HAL/HAL_LPC1768/upload_extra_script.py
src_filter = ${common.default_src_filter} +
monitor_speed = 250000
lib_deps = Servo
LiquidCrystal
U8glib-HAL=https://github.com/MarlinFirmware/U8glib-HAL/archive/bugfix.zip
TMCStepper@>=0.6.1,<1.0.0
Adafruit NeoPixel=https://github.com/p3p/Adafruit_NeoPixel/archive/release.zip
SailfishLCD=https://github.com/mikeshub/SailfishLCD/archive/master.zip

[env:LPC1769]
extends = env:LPC1768
board = nxp_lpc1769



Edited 1 time(s). Last edit at 12/01/2019 05:15AM by colorful.milktea.
Re: Compiling Marlin V2.0 with VSCODE
December 01, 2019 07:18AM
Thanks so much for your detailed reply. It was my nxp environment that was stuck on the old version of the environment. I had to do some footwork manually to get it unstuck but it is compiling now. Thanks. The other problems went away as soon as I got the latest version of the nxp environment.
Sorry, only registered users may post in this forum.

Click here to login