From 5bf635cec2b9f511c7ab3d87c21993cae0407208 Mon Sep 17 00:00:00 2001 From: Tanguy Pruvot Date: Fri, 13 Sep 2019 01:35:27 +0200 Subject: [PATCH] STM32F1: Only include USBComposite if flagged (#15243) --- Marlin/src/HAL/HAL_STM32F1/HAL.h | 11 ++++------- Marlin/src/HAL/HAL_STM32F1/msc_sd.h | 1 - platformio.ini | 4 +--- 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/Marlin/src/HAL/HAL_STM32F1/HAL.h b/Marlin/src/HAL/HAL_STM32F1/HAL.h index d36c53aed0..5a9aa8fd47 100644 --- a/Marlin/src/HAL/HAL_STM32F1/HAL.h +++ b/Marlin/src/HAL/HAL_STM32F1/HAL.h @@ -42,7 +42,10 @@ #include #include "../../inc/MarlinConfigPre.h" -#include "msc_sd.h" + +#ifdef USE_USB_COMPOSITE + #include "msc_sd.h" +#endif // ------------------------ // Defines @@ -60,12 +63,6 @@ #define MSerial4 Serial4 #define MSerial5 Serial5 #else - #ifndef USE_USB_COMPOSITE - extern USBSerial SerialUSB; - #define UsbSerial SerialUSB - #else - #define UsbSerial MarlinCompositeSerial - #endif #define MSerial1 Serial #define MSerial2 Serial1 #define MSerial3 Serial2 diff --git a/Marlin/src/HAL/HAL_STM32F1/msc_sd.h b/Marlin/src/HAL/HAL_STM32F1/msc_sd.h index 825af8cdb0..9f06ca5fdb 100644 --- a/Marlin/src/HAL/HAL_STM32F1/msc_sd.h +++ b/Marlin/src/HAL/HAL_STM32F1/msc_sd.h @@ -13,7 +13,6 @@ * along with this program. If not, see . * */ - #pragma once #include diff --git a/platformio.ini b/platformio.ini index c6ae62e1ff..5225929732 100644 --- a/platformio.ini +++ b/platformio.ini @@ -23,9 +23,7 @@ default_envs = megaatmega2560 [common] default_src_filter = + - - + extra_scripts = pre:buildroot/share/PlatformIO/scripts/common-cxxflags.py -build_flags = -fmax-errors=5 - -g - -ggdb +build_flags = -fmax-errors=5 -g lib_deps = U8glib-HAL=https://github.com/MarlinFirmware/U8glib-HAL/archive/bugfix.zip LiquidCrystal@1.3.4