From 723d4d6f610e922dbdc56e7f4f69e4a15ebb0fc8 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 4 Apr 2020 02:18:01 -0500 Subject: [PATCH] Fix Archim 2 build for PIO --- Marlin/Makefile | 2 +- Marlin/src/pins/pins.h | 2 +- platformio.ini | 19 +++++++++++++++++++ 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/Marlin/Makefile b/Marlin/Makefile index 0a9b3a45d7..33a787fb64 100644 --- a/Marlin/Makefile +++ b/Marlin/Makefile @@ -686,7 +686,7 @@ ifeq ($(HARDWARE_VARIANT), Teensy) else ifeq ($(HARDWARE_VARIANT), archim) CDEFS += -DARDUINO_SAM_ARCHIM -DARDUINO_ARCH_SAM -D__SAM3X8E__ -DUSB_VID=0x27b1 -DUSB_PID=0x0001 -DUSBCON '-DUSB_MANUFACTURER="UltiMachine"' '-DUSB_PRODUCT="Archim"' - LIB_CXXSRC += variant.cpp IPAddress.cpp Reset.cpp RingBuffer.cpp Stream.cpp UARTClass.cpp USARTClass.cpp abi.cpp new.cpp watchdog.cpp CDC.cpp PluggableUSB.cpp USBCore.cpp + LIB_CXXSRC += variant.cpp IPAddress.cpp Reset.cpp RingBuffer.cpp Stream.cpp UARTClass.cpp USARTClass.cpp abi.cpp new.cpp watchdog.cpp CDC.cpp PluggableUSB.cpp USBCore.cpp LIB_SRC += cortex_handlers.c iar_calls_sam3.c syscalls_sam3.c dtostrf.c itoa.c ifeq ($(U8GLIB), 1) diff --git a/Marlin/src/pins/pins.h b/Marlin/src/pins/pins.h index 5de75a1f0e..a1095e23e2 100644 --- a/Marlin/src/pins/pins.h +++ b/Marlin/src/pins/pins.h @@ -454,7 +454,7 @@ #elif MB(ARCHIM1) #include "sam/pins_ARCHIM1.h" // SAM3X8E env:DUE env:DUE_debug #elif MB(ARCHIM2) - #include "sam/pins_ARCHIM2.h" // SAM3X8E env:DUE env:DUE_debug + #include "sam/pins_ARCHIM2.h" // SAM3X8E env:DUE_archim env:DUE_archim_debug #elif MB(ALLIGATOR) #include "sam/pins_ALLIGATOR_R2.h" // SAM3X8E env:DUE env:DUE_debug #elif MB(ADSK) diff --git a/platformio.ini b/platformio.ini index 4e801713a0..bf3dea01bc 100644 --- a/platformio.ini +++ b/platformio.ini @@ -206,6 +206,25 @@ build_flags = ${common.build_flags} -funwind-tables -mpoke-function-name +# +# Archim SAM +# +[env:DUE_archim] +platform = atmelsam +board = due +src_filter = ${common.default_src_filter} + +build_flags = ${common.build_flags} + -DARDUINO_SAM_ARCHIM -DARDUINO_ARCH_SAM -D__SAM3X8E__ -DUSBCON + +[env:DUE_archim_debug] +# Used when WATCHDOG_RESET_MANUAL is enabled +platform = atmelsam +board = due +src_filter = ${common.default_src_filter} + +build_flags = ${common.build_flags} + -DARDUINO_SAM_ARCHIM -DARDUINO_ARCH_SAM -D__SAM3X8E__ -DUSBCON + -funwind-tables -mpoke-function-name + # # NXP LPC176x ARM Cortex-M3 #