diff --git a/Marlin/src/HAL/HAL_STM32F1/HAL.h b/Marlin/src/HAL/HAL_STM32F1/HAL.h
index d36c53aed02197019ffbe26c8f2957b40737478e..5a9aa8fd47df899ce5d77885e48584f809803833 100644
--- a/Marlin/src/HAL/HAL_STM32F1/HAL.h
+++ b/Marlin/src/HAL/HAL_STM32F1/HAL.h
@@ -42,7 +42,10 @@
 #include <util/atomic.h>
 
 #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 825af8cdb0d8ba79f7836e0828333b26d8bd2871..9f06ca5fdbf4d40cb4314f0bd5992070437aa9a3 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 <http://www.gnu.org/licenses/>.
  *
  */
-
 #pragma once
 
 #include <USBComposite.h>
diff --git a/platformio.ini b/platformio.ini
index c6ae62e1ff084f3e82d66deb469b8179ffc0a930..5225929732812057e82b3be70c1a9e7240e8d554 100644
--- a/platformio.ini
+++ b/platformio.ini
@@ -23,9 +23,7 @@ default_envs = megaatmega2560
 [common]
 default_src_filter = +<src/*> -<src/config> -<src/HAL> +<src/HAL/shared>
 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