diff --git a/Marlin/src/HAL/LPC1768/HAL.h b/Marlin/src/HAL/LPC1768/HAL.h
index 15d61d30d1f6..6d5824f7a151 100644
--- a/Marlin/src/HAL/LPC1768/HAL.h
+++ b/Marlin/src/HAL/LPC1768/HAL.h
@@ -165,7 +165,9 @@ int16_t PARSED_PIN_INDEX(const char code, const int16_t dval);
// Defines
// ------------------------
-#define PLATFORM_M997_SUPPORT
+#ifndef PLATFORM_M997_SUPPORT
+ #define PLATFORM_M997_SUPPORT
+#endif
void flashFirmware(const int16_t);
#define HAL_CAN_SET_PWM_FREQ // This HAL supports PWM Frequency adjustment
diff --git a/Marlin/src/HAL/LPC1768/tft/tft_spi.cpp b/Marlin/src/HAL/LPC1768/tft/tft_spi.cpp
index abf1cf5e439d..10555762b1a0 100644
--- a/Marlin/src/HAL/LPC1768/tft/tft_spi.cpp
+++ b/Marlin/src/HAL/LPC1768/tft/tft_spi.cpp
@@ -20,6 +20,8 @@
*
*/
+#ifdef TARGET_LPC1768
+
#include "../../../inc/MarlinConfig.h"
#if HAS_SPI_TFT
@@ -143,3 +145,4 @@ void TFT_SPI::TransmitDMA(uint32_t MemoryIncrease, uint16_t *Data, uint16_t Coun
}
#endif // HAS_SPI_TFT
+#endif // TARGET_LPC1768
diff --git a/Marlin/src/HAL/LPC1768/tft/xpt2046.cpp b/Marlin/src/HAL/LPC1768/tft/xpt2046.cpp
index 68a2176f5ed6..910511612b9b 100644
--- a/Marlin/src/HAL/LPC1768/tft/xpt2046.cpp
+++ b/Marlin/src/HAL/LPC1768/tft/xpt2046.cpp
@@ -20,6 +20,8 @@
*
*/
+#ifdef TARGET_LPC1768
+
#include "../../../inc/MarlinConfig.h"
#if HAS_TFT_XPT2046 || HAS_RES_TOUCH_BUTTONS
@@ -130,4 +132,5 @@ uint16_t XPT2046::SoftwareIO(uint16_t data) {
return result;
}
-#endif // HAS_TFT_XPT2046
+#endif // HAS_TFT_XPT2046 || HAS_RES_TOUCH_BUTTONS
+#endif // TARGET_LPC1768
diff --git a/Marlin/src/HAL/STM32/HAL.h b/Marlin/src/HAL/STM32/HAL.h
index 26fcc2a2e173..54359c5b0987 100644
--- a/Marlin/src/HAL/STM32/HAL.h
+++ b/Marlin/src/HAL/STM32/HAL.h
@@ -175,7 +175,9 @@ typedef libServo hal_servo_t;
#define JTAGSWD_RESET() AFIO_DBGAFR_CONFIG(AFIO_MAPR_SWJ_CFG_RESET); // Reset: FULL SWD+JTAG
#endif
-#define PLATFORM_M997_SUPPORT
+#ifndef PLATFORM_M997_SUPPORT
+ #define PLATFORM_M997_SUPPORT
+#endif
void flashFirmware(const int16_t);
// Maple Compatibility
diff --git a/Marlin/src/HAL/STM32F1/HAL.h b/Marlin/src/HAL/STM32F1/HAL.h
index b14b5f7e7926..954281a4be3e 100644
--- a/Marlin/src/HAL/STM32F1/HAL.h
+++ b/Marlin/src/HAL/STM32F1/HAL.h
@@ -205,7 +205,9 @@ void analogWrite(const pin_t pin, int pwm_val8); // PWM only! mul by 257 in mapl
#define JTAG_DISABLE() afio_cfg_debug_ports(AFIO_DEBUG_SW_ONLY)
#define JTAGSWD_DISABLE() afio_cfg_debug_ports(AFIO_DEBUG_NONE)
-#define PLATFORM_M997_SUPPORT
+#ifndef PLATFORM_M997_SUPPORT
+ #define PLATFORM_M997_SUPPORT
+#endif
void flashFirmware(const int16_t);
#define HAL_CAN_SET_PWM_FREQ // This HAL supports PWM Frequency adjustment
diff --git a/Marlin/src/HAL/shared/fauxpins.h b/Marlin/src/HAL/shared/fauxpins.h
new file mode 100644
index 000000000000..8bc52c69265c
--- /dev/null
+++ b/Marlin/src/HAL/shared/fauxpins.h
@@ -0,0 +1,367 @@
+/**
+ * Marlin 3D Printer Firmware
+ * Copyright (c) 2023 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
+ *
+ * Based on Sprinter and grbl.
+ * Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ *
+ */
+#pragma once
+
+//
+// Faux pins for Dependency Check
+//
+
+//
+// STM32 Pin Names
+//
+#define PA0 0x10
+#define PA1 0x11
+#define PA2 0x12
+#define PA3 0x13
+#define PA4 0x14
+#define PA5 0x15
+#define PA6 0x16
+#define PA7 0x17
+#define PA8 0x18
+#define PA9 0x19
+#define PA10 0x1A
+#define PA11 0x1B
+#define PA12 0x1C
+#define PA13 0x1D
+#define PA14 0x1E
+#define PA15 0x1F
+
+#define PB0 0x20
+#define PB1 0x21
+#define PB2 0x22
+#define PB3 0x23
+#define PB4 0x24
+#define PB5 0x25
+#define PB6 0x26
+#define PB7 0x27
+#define PB8 0x28
+#define PB9 0x29
+#define PB10 0x2A
+#define PB11 0x2B
+#define PB12 0x2C
+#define PB13 0x2D
+#define PB14 0x2E
+#define PB15 0x2F
+
+#define PC0 0x30
+#define PC1 0x31
+#define PC2 0x32
+#define PC3 0x33
+#define PC4 0x34
+#define PC5 0x35
+#define PC6 0x36
+#define PC7 0x37
+#define PC8 0x38
+#define PC9 0x39
+#define PC10 0x3A
+#define PC11 0x3B
+#define PC12 0x3C
+#define PC13 0x3D
+#define PC14 0x3E
+#define PC15 0x3F
+
+#define PD0 0x40
+#define PD1 0x41
+#define PD2 0x42
+#define PD3 0x43
+#define PD4 0x44
+#define PD5 0x45
+#define PD6 0x46
+#define PD7 0x47
+#define PD8 0x48
+#define PD9 0x49
+#define PD10 0x4A
+#define PD11 0x4B
+#define PD12 0x4C
+#define PD13 0x4D
+#define PD14 0x4E
+#define PD15 0x4F
+
+#define PE0 0x50
+#define PE1 0x51
+#define PE2 0x52
+#define PE3 0x53
+#define PE4 0x54
+#define PE5 0x55
+#define PE6 0x56
+#define PE7 0x57
+#define PE8 0x58
+#define PE9 0x59
+#define PE10 0x5A
+#define PE11 0x5B
+#define PE12 0x5C
+#define PE13 0x5D
+#define PE14 0x5E
+#define PE15 0x5F
+
+#define PF0 0x60
+#define PF1 0x61
+#define PF2 0x62
+#define PF3 0x63
+#define PF4 0x64
+#define PF5 0x65
+#define PF6 0x66
+#define PF7 0x67
+#define PF8 0x68
+#define PF9 0x69
+#define PF10 0x6A
+#define PF11 0x6B
+#define PF12 0x6C
+#define PF13 0x6D
+#define PF14 0x6E
+#define PF15 0x6F
+
+#define PG0 0x70
+#define PG1 0x71
+#define PG2 0x72
+#define PG3 0x73
+#define PG4 0x74
+#define PG5 0x75
+#define PG6 0x76
+#define PG7 0x77
+#define PG8 0x78
+#define PG9 0x79
+#define PG10 0x7A
+#define PG11 0x7B
+#define PG12 0x7C
+#define PG13 0x7D
+#define PG14 0x7E
+#define PG15 0x7F
+
+#define PH0 0x80
+#define PH1 0x81
+#define PH2 0x82
+#define PH3 0x83
+#define PH4 0x84
+#define PH5 0x85
+#define PH6 0x86
+#define PH7 0x87
+#define PH8 0x88
+#define PH9 0x89
+#define PH10 0x8A
+#define PH11 0x8B
+#define PH12 0x8C
+#define PH13 0x8D
+#define PH14 0x8E
+#define PH15 0x8F
+
+#define PI0 0x90
+#define PI1 0x91
+#define PI2 0x92
+#define PI3 0x93
+#define PI4 0x94
+#define PI5 0x95
+#define PI6 0x96
+#define PI7 0x97
+#define PI8 0x98
+#define PI9 0x99
+#define PI10 0x9A
+#define PI11 0x9B
+#define PI12 0x9C
+#define PI13 0x9D
+#define PI14 0x9E
+#define PI15 0x9F
+
+#define PJ0 0xA0
+#define PJ1 0xA1
+#define PJ2 0xA2
+#define PJ3 0xA3
+#define PJ4 0xA4
+#define PJ5 0xA5
+#define PJ6 0xA6
+#define PJ7 0xA7
+#define PJ8 0xA8
+#define PJ9 0xA9
+#define PJ10 0xAA
+#define PJ11 0xAB
+#define PJ12 0xAC
+#define PJ13 0xAD
+#define PJ14 0xAE
+#define PJ15 0xAF
+
+//
+// LPC Pin Names
+//
+#define P0_0 100
+#define P0_1 101
+#define P0_2 102
+#define P0_3 103
+#define P0_4 104
+#define P0_5 105
+#define P0_6 106
+#define P0_7 107
+#define P0_8 108
+#define P0_9 109
+#define P0_10 110
+#define P0_11 111
+#define P0_12 112
+#define P0_13 113
+#define P0_14 114
+#define P0_15 115
+#define P0_16 116
+#define P0_17 117
+#define P0_18 118
+#define P0_19 119
+#define P0_20 120
+#define P0_21 121
+#define P0_22 122
+#define P0_23 123
+#define P0_24 124
+#define P0_25 125
+#define P0_26 126
+#define P0_27 127
+#define P0_28 128
+#define P0_29 129
+#define P0_30 130
+#define P0_31 131
+
+#define P1_0 200
+#define P1_1 201
+#define P1_2 202
+#define P1_3 203
+#define P1_4 204
+#define P1_5 205
+#define P1_6 206
+#define P1_7 207
+#define P1_8 208
+#define P1_9 209
+#define P1_10 210
+#define P1_11 211
+#define P1_12 212
+#define P1_13 213
+#define P1_14 214
+#define P1_15 215
+#define P1_16 216
+#define P1_17 217
+#define P1_18 218
+#define P1_19 219
+#define P1_20 220
+#define P1_21 221
+#define P1_22 222
+#define P1_23 223
+#define P1_24 224
+#define P1_25 225
+#define P1_26 226
+#define P1_27 227
+#define P1_28 228
+#define P1_29 229
+#define P1_30 230
+#define P1_31 231
+
+#define P2_0 300
+#define P2_1 301
+#define P2_2 302
+#define P2_3 303
+#define P2_4 304
+#define P2_5 305
+#define P2_6 306
+#define P2_7 307
+#define P2_8 308
+#define P2_9 309
+#define P2_10 310
+#define P2_11 311
+#define P2_12 312
+#define P2_13 313
+#define P2_14 314
+#define P2_15 315
+#define P2_16 316
+#define P2_17 317
+#define P2_18 318
+#define P2_19 319
+#define P2_20 320
+#define P2_21 321
+#define P2_22 322
+#define P2_23 323
+#define P2_24 324
+#define P2_25 325
+#define P2_26 326
+#define P2_27 327
+#define P2_28 328
+#define P2_29 329
+#define P2_30 330
+#define P2_31 331
+
+#define P3_0 400
+#define P3_1 401
+#define P3_2 402
+#define P3_3 403
+#define P3_4 404
+#define P3_5 405
+#define P3_6 406
+#define P3_7 407
+#define P3_8 408
+#define P3_9 409
+#define P3_10 410
+#define P3_11 411
+#define P3_12 412
+#define P3_13 413
+#define P3_14 414
+#define P3_15 415
+#define P3_16 416
+#define P3_17 417
+#define P3_18 418
+#define P3_19 419
+#define P3_20 420
+#define P3_21 421
+#define P3_22 422
+#define P3_23 423
+#define P3_24 424
+#define P3_25 425
+#define P3_26 426
+#define P3_27 427
+#define P3_28 428
+#define P3_29 429
+#define P3_30 430
+#define P3_31 431
+
+#define P4_0 500
+#define P4_1 501
+#define P4_2 502
+#define P4_3 503
+#define P4_4 504
+#define P4_5 505
+#define P4_6 506
+#define P4_7 507
+#define P4_8 508
+#define P4_9 509
+#define P4_10 510
+#define P4_11 511
+#define P4_12 512
+#define P4_13 513
+#define P4_14 514
+#define P4_15 515
+#define P4_16 516
+#define P4_17 517
+#define P4_18 518
+#define P4_19 519
+#define P4_20 520
+#define P4_21 521
+#define P4_22 522
+#define P4_23 523
+#define P4_24 524
+#define P4_25 525
+#define P4_26 526
+#define P4_27 527
+#define P4_28 528
+#define P4_29 529
+#define P4_30 530
+#define P4_31 531
diff --git a/Marlin/src/gcode/control/M993_M994.cpp b/Marlin/src/gcode/control/M993_M994.cpp
index f6fe0f34adee..bc634ae13c0d 100644
--- a/Marlin/src/gcode/control/M993_M994.cpp
+++ b/Marlin/src/gcode/control/M993_M994.cpp
@@ -22,7 +22,7 @@
#include "../../inc/MarlinConfig.h"
-#if ALL(SPI_FLASH, HAS_MEDIA, MARLIN_DEV_MODE)
+#if SPI_FLASH_BACKUP
#include "../gcode.h"
#include "../../sd/cardreader.h"
@@ -85,4 +85,4 @@ void GcodeSuite::M994() {
card.closefile();
}
-#endif // SPI_FLASH && HAS_MEDIA && MARLIN_DEV_MODE
+#endif // SPI_FLASH_BACKUP
diff --git a/Marlin/src/gcode/gcode.cpp b/Marlin/src/gcode/gcode.cpp
index 931c30c26d8a..013a2bfb742e 100644
--- a/Marlin/src/gcode/gcode.cpp
+++ b/Marlin/src/gcode/gcode.cpp
@@ -1061,7 +1061,7 @@ void GcodeSuite::process_parsed_command(const bool no_ok/*=false*/) {
case 422: M422(); break; // M422: Set Z Stepper automatic alignment position using probe
#endif
- #if ALL(SPI_FLASH, HAS_MEDIA, MARLIN_DEV_MODE)
+ #if SPI_FLASH_BACKUP
case 993: M993(); break; // M993: Backup SPI Flash to SD
case 994: M994(); break; // M994: Load a Backup from SD to SPI Flash
#endif
diff --git a/Marlin/src/gcode/gcode.h b/Marlin/src/gcode/gcode.h
index 6a66fa911aa1..05175abd9d24 100644
--- a/Marlin/src/gcode/gcode.h
+++ b/Marlin/src/gcode/gcode.h
@@ -1207,7 +1207,7 @@ class GcodeSuite {
static void M995();
#endif
- #if BOTH(SPI_FLASH, HAS_MEDIA)
+ #if SPI_FLASH_BACKUP
static void M993();
static void M994();
#endif
diff --git a/Marlin/src/gcode/control/M400.cpp b/Marlin/src/gcode/motion/M400.cpp
similarity index 100%
rename from Marlin/src/gcode/control/M400.cpp
rename to Marlin/src/gcode/motion/M400.cpp
diff --git a/Marlin/src/gcode/temp/M155.cpp b/Marlin/src/gcode/temp/M155.cpp
index 48c23986aeb5..f1744c8a1eeb 100644
--- a/Marlin/src/gcode/temp/M155.cpp
+++ b/Marlin/src/gcode/temp/M155.cpp
@@ -22,7 +22,7 @@
#include "../../inc/MarlinConfig.h"
-#if BOTH(AUTO_REPORT_TEMPERATURES, HAS_TEMP_SENSOR)
+#if ENABLED(AUTO_REPORT_TEMPERATURES)
#include "../gcode.h"
#include "../../module/temperature.h"
@@ -37,4 +37,4 @@ void GcodeSuite::M155() {
}
-#endif // AUTO_REPORT_TEMPERATURES && HAS_TEMP_SENSOR
+#endif // AUTO_REPORT_TEMPERATURES
diff --git a/Marlin/src/inc/Conditionals_LCD.h b/Marlin/src/inc/Conditionals_LCD.h
index f012bd9e3610..c28a49c8dfad 100644
--- a/Marlin/src/inc/Conditionals_LCD.h
+++ b/Marlin/src/inc/Conditionals_LCD.h
@@ -540,6 +540,10 @@
#define HAS_LCDPRINT 1
#endif
+#if HAS_DISPLAY || HAS_LCDPRINT
+ #define HAS_UTF8_UTILS 1
+#endif
+
#if HAS_DISPLAY || HAS_DWIN_E3V2
#define HAS_STATUS_MESSAGE 1
#endif
@@ -1797,3 +1801,7 @@
#if defined(NEOPIXEL_BKGD_INDEX_FIRST) && !defined(NEOPIXEL_BKGD_INDEX_LAST)
#define NEOPIXEL_BKGD_INDEX_LAST NEOPIXEL_BKGD_INDEX_FIRST
#endif
+
+#if ALL(SPI_FLASH, HAS_MEDIA, MARLIN_DEV_MODE)
+ #define SPI_FLASH_BACKUP 1
+#endif
diff --git a/Marlin/src/inc/Conditionals_post.h b/Marlin/src/inc/Conditionals_post.h
index 9e8e8ed17ff1..bb78178ad517 100644
--- a/Marlin/src/inc/Conditionals_post.h
+++ b/Marlin/src/inc/Conditionals_post.h
@@ -2503,6 +2503,24 @@
#undef AUTO_POWER_COOLER_FAN
#endif
+/**
+ * Controller Fan Settings
+ */
+#if PIN_EXISTS(CONTROLLER_FAN)
+ #define HAS_CONTROLLER_FAN 1
+#endif
+
+#if HAS_CONTROLLER_FAN
+ #if ENABLED(CONTROLLER_FAN_USE_BOARD_TEMP)
+ #define HAS_CONTROLLER_FAN_BOARD_TEMP_TRIGGER 1
+ #ifndef CONTROLLER_FAN_TRIGGER_TEMP
+ #define CONTROLLER_FAN_TRIGGER_TEMP 30
+ #endif
+ #else
+ #undef CONTROLLER_FAN_TRIGGER_TEMP
+ #endif
+#endif
+
// Print Cooling fans (limit)
#ifdef NUM_M106_FANS
#define MAX_FANS NUM_M106_FANS
@@ -2512,11 +2530,12 @@
#define _IS_E_AUTO(N,F) (PIN_EXISTS(E##N##_AUTO_FAN) && E##N##_AUTO_FAN_PIN == FAN##F##_PIN)
#define _HAS_FAN(F) (F < MAX_FANS && PIN_EXISTS(FAN##F) \
- && CONTROLLER_FAN_PIN != FAN##F##_PIN \
+ && !(HAS_CONTROLLER_FAN && CONTROLLER_FAN_PIN == FAN##F##_PIN) \
&& !_IS_E_AUTO(0,F) && !_IS_E_AUTO(1,F) \
&& !_IS_E_AUTO(2,F) && !_IS_E_AUTO(3,F) \
&& !_IS_E_AUTO(4,F) && !_IS_E_AUTO(5,F) \
&& !_IS_E_AUTO(6,F) && !_IS_E_AUTO(7,F))
+
#if _HAS_FAN(0)
#define HAS_FAN0 1
#endif
@@ -2583,24 +2602,6 @@
#define HAS_FANMUX 1 // Part Cooling fan multipliexer
#endif
-/**
- * Controller Fan Settings
- */
-#if PIN_EXISTS(CONTROLLER_FAN)
- #define HAS_CONTROLLER_FAN 1
-#endif
-
-#if HAS_CONTROLLER_FAN
- #if ENABLED(CONTROLLER_FAN_USE_BOARD_TEMP)
- #define HAS_CONTROLLER_FAN_BOARD_TEMP_TRIGGER 1
- #ifndef CONTROLLER_FAN_TRIGGER_TEMP
- #define CONTROLLER_FAN_TRIGGER_TEMP 30
- #endif
- #else
- #undef CONTROLLER_FAN_TRIGGER_TEMP
- #endif
-#endif
-
/**
* MIN/MAX fan PWM scaling
*/
diff --git a/Marlin/src/inc/MarlinConfig.h b/Marlin/src/inc/MarlinConfig.h
index c6c0bfbe2131..dda1480e02a9 100644
--- a/Marlin/src/inc/MarlinConfig.h
+++ b/Marlin/src/inc/MarlinConfig.h
@@ -27,7 +27,9 @@
#include "MarlinConfigPre.h"
-#ifndef __MARLIN_DEPS__
+#ifdef __MARLIN_DEPS__
+ #include "../HAL/shared/fauxpins.h"
+#else
#include "../HAL/HAL.h"
#endif
diff --git a/Marlin/src/inc/SanityCheck.h b/Marlin/src/inc/SanityCheck.h
index 35da7935de46..d4f9423080f2 100644
--- a/Marlin/src/inc/SanityCheck.h
+++ b/Marlin/src/inc/SanityCheck.h
@@ -3700,10 +3700,14 @@ static_assert(_PLUS_TEST(4), "HOMING_FEEDRATE_MM_M values must be positive.");
#endif
-#if ENABLED(COOLANT_MIST) && !PIN_EXISTS(COOLANT_MIST)
- #error "COOLANT_MIST requires COOLANT_MIST_PIN to be defined."
-#elif ENABLED(COOLANT_FLOOD) && !PIN_EXISTS(COOLANT_FLOOD)
- #error "COOLANT_FLOOD requires COOLANT_FLOOD_PIN to be defined."
+#if ENABLED(COOLANT_CONTROL)
+ #if NONE(COOLANT_MIST, COOLANT_FLOOD)
+ #error "COOLANT_CONTROL requires either COOLANT_MIST or COOLANT_FLOOD."
+ #elif ENABLED(COOLANT_MIST) && !PIN_EXISTS(COOLANT_MIST)
+ #error "COOLANT_MIST requires COOLANT_MIST_PIN to be defined."
+ #elif ENABLED(COOLANT_FLOOD) && !PIN_EXISTS(COOLANT_FLOOD)
+ #error "COOLANT_FLOOD requires COOLANT_FLOOD_PIN to be defined."
+ #endif
#endif
#if HAS_ADC_BUTTONS && defined(ADC_BUTTON_DEBOUNCE_DELAY) && ADC_BUTTON_DEBOUNCE_DELAY < 16
diff --git a/Marlin/src/lcd/HD44780/marlinui_HD44780.h b/Marlin/src/lcd/HD44780/marlinui_HD44780.h
index 62c0c7620220..719514fb11df 100644
--- a/Marlin/src/lcd/HD44780/marlinui_HD44780.h
+++ b/Marlin/src/lcd/HD44780/marlinui_HD44780.h
@@ -103,5 +103,4 @@
#endif
-#include "../fontutils.h"
#include "../lcdprint.h"
diff --git a/Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.h b/Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.h
index c399b907e460..3e447fa19617 100644
--- a/Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.h
+++ b/Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.h
@@ -57,7 +57,6 @@ class TFTGLCD {
extern TFTGLCD lcd;
-#include "../fontutils.h"
#include "../lcdprint.h"
// Use panel encoder - free old encoder pins
diff --git a/Marlin/src/lcd/dogm/lcdprint_u8g.cpp b/Marlin/src/lcd/dogm/lcdprint_u8g.cpp
index 74a49b095021..ea0db357b64a 100644
--- a/Marlin/src/lcd/dogm/lcdprint_u8g.cpp
+++ b/Marlin/src/lcd/dogm/lcdprint_u8g.cpp
@@ -16,7 +16,6 @@
#include "../marlinui.h"
#include "../../MarlinCore.h"
-#include "../fontutils.h"
#include "u8g_fontutf8.h"
#include "../lcdprint.h"
diff --git a/Marlin/src/lcd/dogm/marlinui_DOGM.cpp b/Marlin/src/lcd/dogm/marlinui_DOGM.cpp
index 76fa7842a31d..2552df3b88f4 100644
--- a/Marlin/src/lcd/dogm/marlinui_DOGM.cpp
+++ b/Marlin/src/lcd/dogm/marlinui_DOGM.cpp
@@ -47,7 +47,6 @@
#endif
#include "../lcdprint.h"
-#include "../fontutils.h"
#include "../../libs/numtostr.h"
#include "../marlinui.h"
diff --git a/Marlin/src/lcd/dogm/status_screen_lite_ST7920.cpp b/Marlin/src/lcd/dogm/status_screen_lite_ST7920.cpp
index a4ace1ce8a0d..bc961dbf15d4 100644
--- a/Marlin/src/lcd/dogm/status_screen_lite_ST7920.cpp
+++ b/Marlin/src/lcd/dogm/status_screen_lite_ST7920.cpp
@@ -73,7 +73,6 @@
#if ENABLED(LIGHTWEIGHT_UI)
#include "../marlinui.h"
-#include "../fontutils.h"
#include "../lcdprint.h"
#include "../../libs/duration_t.h"
#include "../../module/motion.h"
diff --git a/Marlin/src/lcd/dogm/u8g_fontutf8.cpp b/Marlin/src/lcd/dogm/u8g_fontutf8.cpp
index e9d15350963a..79fabfd80547 100644
--- a/Marlin/src/lcd/dogm/u8g_fontutf8.cpp
+++ b/Marlin/src/lcd/dogm/u8g_fontutf8.cpp
@@ -12,7 +12,7 @@
#if HAS_MARLINUI_U8GLIB
#include
-#include "../fontutils.h"
+#include "../utf8.h"
#include "u8g_fontutf8.h"
typedef void font_t;
diff --git a/Marlin/src/lcd/dogm/u8g_fontutf8.h b/Marlin/src/lcd/dogm/u8g_fontutf8.h
index 660eb28ffeb3..281894509d6f 100644
--- a/Marlin/src/lcd/dogm/u8g_fontutf8.h
+++ b/Marlin/src/lcd/dogm/u8g_fontutf8.h
@@ -9,7 +9,7 @@
#pragma once
#include
-#include "../fontutils.h"
+#include "../utf8.h"
// the macro to indicate a UTF-8 string
// You should to save the C/C++ source in UTF-8 encoding!
diff --git a/Marlin/src/lcd/e3v2/creality/dwin.cpp b/Marlin/src/lcd/e3v2/creality/dwin.cpp
index 66baff1611f7..73621851df40 100644
--- a/Marlin/src/lcd/e3v2/creality/dwin.cpp
+++ b/Marlin/src/lcd/e3v2/creality/dwin.cpp
@@ -45,7 +45,7 @@
#define JUST_BABYSTEP 1
#endif
-#include "../../fontutils.h"
+#include "../../utf8.h"
#include "../../marlinui.h"
#include "../../../sd/cardreader.h"
diff --git a/Marlin/src/lcd/e3v2/marlinui/dwin_string.cpp b/Marlin/src/lcd/e3v2/marlinui/dwin_string.cpp
index 6d60608426e8..10a478f75650 100644
--- a/Marlin/src/lcd/e3v2/marlinui/dwin_string.cpp
+++ b/Marlin/src/lcd/e3v2/marlinui/dwin_string.cpp
@@ -25,7 +25,7 @@
#if IS_DWIN_MARLINUI
#include "dwin_string.h"
-//#include "../../fontutils.h"
+//#include "../../utf8.h"
char DWIN_String::data[];
uint16_t DWIN_String::span;
diff --git a/Marlin/src/lcd/e3v2/marlinui/dwin_string.h b/Marlin/src/lcd/e3v2/marlinui/dwin_string.h
index 686b1aa2b17a..4224b264589b 100644
--- a/Marlin/src/lcd/e3v2/marlinui/dwin_string.h
+++ b/Marlin/src/lcd/e3v2/marlinui/dwin_string.h
@@ -23,7 +23,7 @@
// TODO: Make AVR-compatible with separate ROM / RAM string methods
-#include "../../fontutils.h"
+#include "../../utf8.h"
#include "../../marlinui.h"
#include
diff --git a/Marlin/src/lcd/e3v2/marlinui/ui_common.cpp b/Marlin/src/lcd/e3v2/marlinui/ui_common.cpp
index 4b34d6510025..58a84ac34e51 100644
--- a/Marlin/src/lcd/e3v2/marlinui/ui_common.cpp
+++ b/Marlin/src/lcd/e3v2/marlinui/ui_common.cpp
@@ -28,9 +28,8 @@
#include "dwin_lcd.h"
#include "dwin_string.h"
-//#include "../../lcdprint.h"
#include "lcdprint_dwin.h"
-#include "../../fontutils.h"
+#include "../../utf8.h"
#include "../../../libs/numtostr.h"
#include "../../marlinui.h"
diff --git a/Marlin/src/lcd/e3v2/marlinui/ui_status_480x272.cpp b/Marlin/src/lcd/e3v2/marlinui/ui_status_480x272.cpp
index cfa326667aa5..70c7c2d8f0ba 100644
--- a/Marlin/src/lcd/e3v2/marlinui/ui_status_480x272.cpp
+++ b/Marlin/src/lcd/e3v2/marlinui/ui_status_480x272.cpp
@@ -29,7 +29,7 @@
#include "dwin_string.h"
#include "lcdprint_dwin.h"
-#include "../../fontutils.h"
+#include "../../utf8.h"
#include "../../../libs/numtostr.h"
#include "../../marlinui.h"
diff --git a/Marlin/src/lcd/e3v2/proui/dwin.cpp b/Marlin/src/lcd/e3v2/proui/dwin.cpp
index af157921d511..a372ae5b4d7e 100644
--- a/Marlin/src/lcd/e3v2/proui/dwin.cpp
+++ b/Marlin/src/lcd/e3v2/proui/dwin.cpp
@@ -31,7 +31,7 @@
#if ENABLED(DWIN_LCD_PROUI)
-#include "../../fontutils.h"
+#include "../../utf8.h"
#include "../../marlinui.h"
#include "../../../sd/cardreader.h"
diff --git a/Marlin/src/lcd/lcdprint.h b/Marlin/src/lcd/lcdprint.h
index 623c9dd4b91f..9ba514791894 100644
--- a/Marlin/src/lcd/lcdprint.h
+++ b/Marlin/src/lcd/lcdprint.h
@@ -30,7 +30,7 @@
*/
#pragma once
-#include "fontutils.h"
+#include "utf8.h"
#include "../inc/MarlinConfig.h"
diff --git a/Marlin/src/lcd/marlinui.cpp b/Marlin/src/lcd/marlinui.cpp
index 75e24e231344..ec929753ae42 100644
--- a/Marlin/src/lcd/marlinui.cpp
+++ b/Marlin/src/lcd/marlinui.cpp
@@ -42,7 +42,7 @@ MarlinUI ui;
#if HAS_DISPLAY
#include "../gcode/queue.h"
- #include "fontutils.h"
+ #include "utf8.h"
#endif
#if ENABLED(DWIN_CREALITY_LCD)
diff --git a/Marlin/src/lcd/menu/menu_configuration.cpp b/Marlin/src/lcd/menu/menu_configuration.cpp
index 2fe4b7701843..0611bda84b32 100644
--- a/Marlin/src/lcd/menu/menu_configuration.cpp
+++ b/Marlin/src/lcd/menu/menu_configuration.cpp
@@ -59,9 +59,13 @@
#include "../../libs/buzzer.h"
#endif
-#include "../../core/debug_out.h"
+#if EITHER(LCD_PROGRESS_BAR_TEST, LCD_ENDSTOP_TEST)
+ #include "../lcdprint.h"
+ #define HAS_DEBUG_MENU 1
+#endif
-#define HAS_DEBUG_MENU EITHER(LCD_PROGRESS_BAR_TEST, LCD_ENDSTOP_TEST)
+//#define DEBUG_OUT 1
+#include "../../core/debug_out.h"
void menu_advanced_settings();
#if EITHER(DELTA_CALIBRATION_MENU, DELTA_AUTO_CALIBRATION)
@@ -70,8 +74,6 @@ void menu_advanced_settings();
#if ENABLED(LCD_PROGRESS_BAR_TEST)
- #include "../lcdprint.h"
-
static void progress_bar_test() {
static int8_t bar_percent = 0;
if (ui.use_click()) {
@@ -96,8 +98,6 @@ void menu_advanced_settings();
#if ENABLED(LCD_ENDSTOP_TEST)
- #include "../lcdprint.h"
-
#define __STOP_ITEM(F,S) PSTRING_ITEM_F_P(F, TEST(stops, S) ? PSTR(STR_ENDSTOP_HIT) : PSTR(STR_ENDSTOP_OPEN), SS_FULL)
#define _STOP_ITEM(L,S) __STOP_ITEM(F(L), S)
#define STOP_ITEM(A,I) _STOP_ITEM(STRINGIFY(A) STRINGIFY(I) " " TERN(A##_HOME_TO_MAX, "Max", "Min"), A##I##_ENDSTOP)
diff --git a/Marlin/src/lcd/tft/tft_string.cpp b/Marlin/src/lcd/tft/tft_string.cpp
index 82444a4398ee..19ea5b2079e9 100644
--- a/Marlin/src/lcd/tft/tft_string.cpp
+++ b/Marlin/src/lcd/tft/tft_string.cpp
@@ -25,7 +25,7 @@
#if HAS_GRAPHICAL_TFT
#include "tft_string.h"
-#include "../fontutils.h"
+#include "../utf8.h"
#include "../marlinui.h"
//#define DEBUG_TFT_FONT
diff --git a/Marlin/src/lcd/tft/tft_string.h b/Marlin/src/lcd/tft/tft_string.h
index 85966670477b..3df6afe49bc0 100644
--- a/Marlin/src/lcd/tft/tft_string.h
+++ b/Marlin/src/lcd/tft/tft_string.h
@@ -23,7 +23,7 @@
#include
-#include "../fontutils.h"
+#include "../utf8.h"
#define NO_GLYPH 0xFF
diff --git a/Marlin/src/lcd/fontutils.cpp b/Marlin/src/lcd/utf8.cpp
similarity index 97%
rename from Marlin/src/lcd/fontutils.cpp
rename to Marlin/src/lcd/utf8.cpp
index 46329fd4be62..075f8b0c7c93 100644
--- a/Marlin/src/lcd/fontutils.cpp
+++ b/Marlin/src/lcd/utf8.cpp
@@ -21,14 +21,18 @@
*/
/**
- * @file fontutils.cpp
- * @brief help functions for font and char
+ * @file utf8.cpp
+ * @brief Helper functions for UTF-8 strings
* @author Yunhui Fu (yhfudev@gmail.com)
* @version 1.0
* @date 2016-08-19
* @copyright GPL/BSD
*/
+#include "../inc/MarlinConfigPre.h"
+
+#if HAS_UTF8_UTILS
+
#include "../inc/MarlinConfig.h"
#if HAS_WIRED_LCD
@@ -36,7 +40,7 @@
#include "../MarlinCore.h"
#endif
-#include "fontutils.h"
+#include "utf8.h"
uint8_t read_byte_ram(const uint8_t *str) { return *str; }
uint8_t read_byte_rom(const uint8_t *str) { return pgm_read_byte(str); }
@@ -203,3 +207,5 @@ uint8_t utf8_byte_pos_by_char_num(const char *pstart, const uint8_t charnum) {
uint8_t utf8_byte_pos_by_char_num_P(PGM_P pstart, const uint8_t charnum) {
return utf8_byte_pos_by_char_num_cb(pstart, read_byte_rom, charnum);
}
+
+#endif // HAS_UTF8_UTILS
diff --git a/Marlin/src/lcd/fontutils.h b/Marlin/src/lcd/utf8.h
similarity index 97%
rename from Marlin/src/lcd/fontutils.h
rename to Marlin/src/lcd/utf8.h
index 69edf1a0c839..603181857174 100644
--- a/Marlin/src/lcd/fontutils.h
+++ b/Marlin/src/lcd/utf8.h
@@ -21,8 +21,8 @@
*/
/**
- * @file fontutils.h
- * @brief help functions for font and char
+ * @file utf8.h
+ * @brief Helper functions for UTF-8 strings
* @author Yunhui Fu (yhfudev@gmail.com)
* @version 1.0
* @date 2016-08-19
diff --git a/Marlin/src/pins/ramps/pins_MKS_GEN_L.h b/Marlin/src/pins/ramps/pins_MKS_GEN_L.h
index 06bb35c72b77..73e7aa577d50 100644
--- a/Marlin/src/pins/ramps/pins_MKS_GEN_L.h
+++ b/Marlin/src/pins/ramps/pins_MKS_GEN_L.h
@@ -38,7 +38,7 @@
// Heaters / Fans
//
-#define MOSFET_A_PIN 10 // HE0
+#define MOSFET_A_PIN 10 // HE0
#define MOSFET_B_PIN 7 // HE1 or FAN Hotend Cooling
#define MOSFET_C_PIN 8 // HBED
#define FAN0_PIN 9 // FAN Part Cooling
diff --git a/buildroot/share/PlatformIO/scripts/common-dependencies.h b/buildroot/share/PlatformIO/scripts/common-dependencies.h
index 9bdcac5db17f..4438b4efe189 100644
--- a/buildroot/share/PlatformIO/scripts/common-dependencies.h
+++ b/buildroot/share/PlatformIO/scripts/common-dependencies.h
@@ -105,3 +105,16 @@
#define HAS_MENU_UBL
#endif
#endif
+
+#if HAS_GRAPHICAL_TFT
+ #define NOTOSANS 1
+ #define UNIFONT 2
+ #define HELVETICA 3
+ #if TFT_FONT == NOTOSANS
+ #define TFT_FONT_NOTOSANS
+ #elif TFT_FONT == UNIFONT
+ #define TFT_FONT_UNIFONT
+ #elif TFT_FONT == HELVETICA
+ #define TFT_FONT_HELVETICA
+ #endif
+#endif
diff --git a/buildroot/share/PlatformIO/scripts/common-dependencies.py b/buildroot/share/PlatformIO/scripts/common-dependencies.py
index 6b5a9aea5792..58d9cfcb4d74 100644
--- a/buildroot/share/PlatformIO/scripts/common-dependencies.py
+++ b/buildroot/share/PlatformIO/scripts/common-dependencies.py
@@ -5,7 +5,9 @@
import pioutil
if pioutil.is_pio_build():
- import subprocess,os,re
+ import subprocess,os,re,fnmatch,glob
+ srcfilepattern = re.compile(r".*[.](cpp|c)$")
+ marlinbasedir = os.path.join(os.getcwd(), "Marlin/")
Import("env")
from platformio.package.meta import PackageSpec
@@ -128,6 +130,7 @@ def force_ignore_unused_libs():
def apply_features_config():
load_features()
blab("========== Apply enabled features...")
+ build_filters = ' '.join(env.GetProjectOption('src_filter'))
for feature in FEATURE_CONFIG:
if not env.MarlinHas(feature):
continue
@@ -174,23 +177,87 @@ def apply_features_config():
if 'src_filter' in feat:
blab("========== Adding build_src_filter for %s... " % feature, 2)
- src_filter = ' '.join(env.GetProjectOption('src_filter'))
- # first we need to remove the references to the same folder
- my_srcs = re.findall(r'[+-](<.*?>)', feat['src_filter'])
- cur_srcs = re.findall(r'[+-](<.*?>)', src_filter)
- for d in my_srcs:
- if d in cur_srcs:
- src_filter = re.sub(r'[+-]' + d, '', src_filter)
-
- src_filter = feat['src_filter'] + ' ' + src_filter
- set_env_field('build_src_filter', [src_filter])
- env.Replace(SRC_FILTER=src_filter)
+ build_filters = build_filters + ' ' + feat['src_filter']
+ # Just append the filter in the order that the build environment specifies.
+ # Important here is the order of entries in the "features.ini" file.
if 'lib_ignore' in feat:
blab("========== Adding lib_ignore for %s... " % feature, 2)
lib_ignore = env.GetProjectOption('lib_ignore') + [feat['lib_ignore']]
set_env_field('lib_ignore', lib_ignore)
+ src_filter = ""
+ if True:
+ # Build the actual equivalent build_src_filter list based on the inclusions by the features.
+ # PlatformIO doesn't do it this way, but maybe in the future....
+ cur_srcs = set()
+ # Remove the references to the same folder
+ my_srcs = re.findall(r'([+-]<.*?>)', build_filters)
+ for d in my_srcs:
+ # Assume normalized relative paths
+ plain = d[2:-1]
+ if d[0] == '+':
+ def addentry(fullpath, info=None):
+ relp = os.path.relpath(fullpath, marlinbasedir)
+ if srcfilepattern.match(relp):
+ if info:
+ blab("Added src file %s (%s)" % (relp, str(info)))
+ else:
+ blab("Added src file %s " % relp)
+ cur_srcs.add(relp)
+ # Special rule: If a direct folder is specified add all files within.
+ fullplain = os.path.join(marlinbasedir, plain)
+ if os.path.isdir(fullplain):
+ blab("Directory content addition for %s " % plain)
+ gpattern = os.path.join(fullplain, "**")
+ for fname in glob.glob(gpattern, recursive=True):
+ addentry(fname, "dca")
+ else:
+ # Add all the things from the pattern by GLOB.
+ def srepl(matchi):
+ g0 = matchi.group(0)
+ return r"**" + g0[1:]
+ gpattern = re.sub(r'[*]($|[^*])', srepl, plain)
+ gpattern = os.path.join(marlinbasedir, gpattern)
+
+ for fname in glob.glob(gpattern, recursive=True):
+ addentry(fname)
+ else:
+ # Special rule: If a direct folder is specified then remove all files within.
+ def onremove(relp, info=None):
+ if info:
+ blab("Removed src file %s (%s)" % (relp, str(info)))
+ else:
+ blab("Removed src file %s " % relp)
+ fullplain = os.path.join(marlinbasedir, plain)
+ if os.path.isdir(fullplain):
+ blab("Directory content removal for %s " % plain)
+ def filt(x):
+ common = os.path.commonpath([plain, x])
+ if not common == os.path.normpath(plain): return True
+ onremove(x, "dcr")
+ return False
+ cur_srcs = set(filter(filt, cur_srcs))
+ else:
+ # Remove matching source entries.
+ def filt(x):
+ if not fnmatch.fnmatch(x, plain): return True
+ onremove(x)
+ return False
+ cur_srcs = set(filter(filt, cur_srcs))
+ # Transform the resulting set into a string.
+ for x in cur_srcs:
+ if len(src_filter) > 0: src_filter += ' '
+ src_filter += "+<" + x + ">"
+
+ #blab("Final src_filter: " + src_filter)
+ else:
+ src_filter = build_filters
+
+ # Update in PlatformIO
+ set_env_field('build_src_filter', [src_filter])
+ env.Replace(SRC_FILTER=src_filter)
+
#
# Use the compiler to get a list of all enabled features
#
@@ -226,6 +293,8 @@ def MarlinHas(env, feature):
elif val in env['MARLIN_FEATURES']:
some_on = env.MarlinHas(val)
+ #blab("%s is %s" % (feature, str(some_on)))
+
return some_on
validate_pio()
diff --git a/ini/features.ini b/ini/features.ini
index d459c2bee9c2..660e3fb2c8a1 100644
--- a/ini/features.ini
+++ b/ini/features.ini
@@ -9,6 +9,8 @@
# #
#################################
+# The order of the features matters for source-filter resolution inside of common-dependencies.py.
+
[features]
YHCB2004 = red-scorp/LiquidCrystal_AIP31068@^1.0.4, red-scorp/SoftSPIB@^1.1.1
HAS_TFT_LVGL_UI = lvgl=https://github.com/makerbase-mks/LVGL-6.1.1-MKS/archive/master.zip
@@ -23,6 +25,7 @@ HAS_TRINAMIC_CONFIG = TMCStepper@~0.7.3
HAS_T(RINAMIC_CONFIG|MC_SPI) = src_filter=+
HAS_STEALTHCHOP = src_filter=+
SR_LCD_3W_NL = SailfishLCD=https://github.com/mikeshub/SailfishLCD/archive/master.zip
+HAS_MOTOR_CURRENT_(I2C|DAC|SPI|PWM) = src_filter=+
HAS_MOTOR_CURRENT_I2C = SlowSoftI2CMaster
src_filter=+
HAS_TMC26X = TMC26XStepper=https://github.com/MarlinFirmware/TMC26XStepper/archive/master.zip
@@ -39,9 +42,12 @@ HAS_LCDPRINT = src_filter=+
HAS_MARLINUI_HD44780 = src_filter=+
HAS_MARLINUI_U8GLIB = marlinfirmware/U8glib-HAL@~0.5.2
src_filter=+
-HAS_(FSMC|SPI|LTDC)_TFT = src_filter=+ + +
+HAS_(FSMC|SPI|LTDC)_TFT = src_filter=+
+HAS_LTDC_TFT = src_filter=+
HAS_FSMC_TFT = src_filter=+ +
-HAS_SPI_TFT = src_filter=+ +
+HAS_SPI_TFT = src_filter=+ + +
+HAS_TFT_XPT2046 = src_filter=+ + +
+TFT_TOUCH_DEVICE_GT911 = src_filter=+
I2C_EEPROM = src_filter=+
SOFT_I2C_EEPROM = SlowSoftI2CMaster, SlowSoftWire=https://github.com/felias-fogg/SlowSoftWire/archive/master.zip
SPI_EEPROM = src_filter=+
@@ -50,10 +56,13 @@ DWIN_CREALITY_LCD = src_filter=+
DWIN_LCD_PROUI = src_filter=+
DWIN_CREALITY_LCD_JYERSUI = src_filter=+
IS_DWIN_MARLINUI = src_filter=+
-HAS_GRAPHICAL_TFT = src_filter=+
+HAS_GRAPHICAL_TFT = src_filter=+ -
+TFT_FONT_HELVETICA = src_filter=+
+TFT_FONT_NOTOSANS = src_filter=+
+TFT_FONT_UNIFONT = src_filter=+
IS_TFTGLCD_PANEL = src_filter=+
HAS_TOUCH_BUTTONS = src_filter=+
-HAS_MARLINUI_MENU = src_filter=+
+HAS_MARLINUI_MENU = src_filter=+ -
HAS_GAMES = src_filter=+
MARLIN_BRICKOUT = src_filter=+
MARLIN_INVADERS = src_filter=+
@@ -80,6 +89,7 @@ HAS_MENU_TMC = src_filter=+
HAS_MENU_TOUCH_SCREEN = src_filter=+
HAS_MENU_TRAMMING_WIZARD = src_filter=+
HAS_MENU_UBL = src_filter=+
+EXTENSIBLE_UI = src_filter=+
ANYCUBIC_LCD_(CHIRON|VYPER) = src_filter=+
ANYCUBIC_LCD_CHIRON = src_filter=+
ANYCUBIC_LCD_VYPER = src_filter=+
@@ -171,7 +181,6 @@ HAS_EXTRA_ENDSTOPS = src_filter=+
DIRECT_PIN_CONTROL = src_filter=+ +
PINS_DEBUGGING = src_filter=+
-NO_VOLUMETRICS = src_filter=-
HAS_MULTI_EXTRUDER = src_filter=+
HAS_HOTEND_OFFSET = src_filter=+
EDITABLE_SERVO_ANGLES = src_filter=+
@@ -179,6 +188,7 @@ PIDTEMP = src_filter=+
PREVENT_COLD_EXTRUSION = src_filter=+
PIDTEMPBED = src_filter=+
HAS_USER_THERMISTORS = src_filter=+
+PIDTEMPCHAMBER = src_filter=+
SD_ABORT_ON_ENDSTOP_HIT = src_filter=+
BAUD_RATE_GCODE = src_filter=+
HAS_SMART_EFF_MOD = src_filter=+
@@ -187,7 +197,9 @@ AIR_EVACUATION = src_filter=+
SERVO_DETACH_GCODE = src_filter=+
HAS_DUPLICATION_MODE = src_filter=+
-FT_MOTION = src_filter=+ +
+SPI_FLASH_BACKUP = src_filter=+
+PLATFORM_M997_SUPPORT = src_filter=+
+FT_MOTION = src_filter=+ +
LIN_ADVANCE = src_filter=+
PHOTO_GCODE = src_filter=+
CONTROLLER_FAN_EDITABLE = src_filter=+
@@ -223,10 +235,15 @@ MAGNETIC_PARKING_EXTRUDER = src_filter=+
HAS_MEDIA = src_filter=+ + + + + + +
HAS_MEDIA_SUBCALLS = src_filter=+
GCODE_REPEAT_MARKERS = src_filter=+ +
-HAS_EXTRUDERS = src_filter=+ + +
-HAS_TEMP_PROBE = src_filter=+
+HAS_EXTRUDERS = src_filter=+ +
+HAS_HOTEND = src_filter=+
+HAS_FAN = src_filter=+
+HAS_HEATED_BED = src_filter=+
+HAS_HEATED_CHAMBER = src_filter=+
HAS_COOLER = src_filter=+
AUTO_REPORT_TEMPERATURES = src_filter=+
+HAS_TEMP_PROBE = src_filter=+
+HAS_PID_HEATING = src_filter=+
MPCTEMP = src_filter=+
INCH_MODE_SUPPORT = src_filter=+
TEMPERATURE_UNITS_SUPPORT = src_filter=+
diff --git a/ini/lpc176x.ini b/ini/lpc176x.ini
index 223ba3cabd16..548baaa4107a 100644
--- a/ini/lpc176x.ini
+++ b/ini/lpc176x.ini
@@ -20,12 +20,13 @@ lib_ldf_mode = off
lib_compat_mode = strict
extra_scripts = ${common.extra_scripts}
Marlin/src/HAL/LPC1768/upload_extra_script.py
-build_src_filter = ${common.default_src_filter} + +
+build_src_filter = ${common.default_src_filter} + - +
lib_deps = ${common.lib_deps}
Servo
custom_marlin.USES_LIQUIDCRYSTAL = arduino-libraries/LiquidCrystal@~1.0.7
custom_marlin.NEOPIXEL_LED = Adafruit NeoPixel=https://github.com/p3p/Adafruit_NeoPixel/archive/1.5.0.zip
-build_flags = ${common.build_flags} -DU8G_HAL_LINKS -IMarlin/src/HAL/LPC1768/include -IMarlin/src/HAL/LPC1768/u8g
+build_flags = ${common.build_flags} -DU8G_HAL_LINKS -DPLATFORM_M997_SUPPORT
+ -IMarlin/src/HAL/LPC1768/include -IMarlin/src/HAL/LPC1768/u8g
# debug options for backtrace
#-funwind-tables
#-mpoke-function-name
diff --git a/ini/stm32-common.ini b/ini/stm32-common.ini
index c8f28cd0e314..464d8f475744 100644
--- a/ini/stm32-common.ini
+++ b/ini/stm32-common.ini
@@ -12,13 +12,11 @@
[common_stm32]
platform = ststm32@~12.1
board_build.core = stm32
-build_flags = ${common.build_flags}
- -std=gnu++14 -DHAL_STM32
- -DUSBCON -DUSBD_USE_CDC
- -DTIM_IRQ_PRIO=13
- -DADC_RESOLUTION=12
+build_flags = ${common.build_flags} -std=gnu++14
+ -DHAL_STM32 -DPLATFORM_M997_SUPPORT
+ -DUSBCON -DUSBD_USE_CDC -DTIM_IRQ_PRIO=13 -DADC_RESOLUTION=12
build_unflags = -std=gnu++11
-build_src_filter = ${common.default_src_filter} + +
+build_src_filter = ${common.default_src_filter} + - +
extra_scripts = ${common.extra_scripts}
pre:buildroot/share/PlatformIO/scripts/stm32_serialbuffer.py
diff --git a/ini/stm32f0.ini b/ini/stm32f0.ini
index d62ac3acf54f..d23ee2a6038e 100644
--- a/ini/stm32f0.ini
+++ b/ini/stm32f0.ini
@@ -48,4 +48,4 @@ board = malyanm300_f070cb
build_flags = ${common_stm32.build_flags}
-DHAL_PCD_MODULE_ENABLED -DDISABLE_GENERIC_SERIALUSB
-DHAL_UART_MODULE_ENABLED
-build_src_filter = ${common.default_src_filter} +
+build_src_filter = ${common.default_src_filter} + -
diff --git a/ini/stm32f1-maple.ini b/ini/stm32f1-maple.ini
index d361a0d40a98..3560c1fd2a87 100644
--- a/ini/stm32f1-maple.ini
+++ b/ini/stm32f1-maple.ini
@@ -26,9 +26,9 @@
platform = ststm32@~12.1
board_build.core = maple
build_flags = !python Marlin/src/HAL/STM32F1/build_flags.py
- ${common.build_flags} -DARDUINO_ARCH_STM32 -DMAPLE_STM32F1
+ ${common.build_flags} -DARDUINO_ARCH_STM32 -DMAPLE_STM32F1 -DPLATFORM_M997_SUPPORT
build_unflags = -std=gnu11 -std=gnu++11
-build_src_filter = ${common.default_src_filter} +
+build_src_filter = ${common.default_src_filter} + -
lib_ignore = SPI, FreeRTOS701, FreeRTOS821
lib_deps = ${common.lib_deps}
SoftwareSerialM
diff --git a/ini/stm32f1.ini b/ini/stm32f1.ini
index 230f1ae774cb..d19de4d2ddde 100644
--- a/ini/stm32f1.ini
+++ b/ini/stm32f1.ini
@@ -253,7 +253,7 @@ board = malyanm200_f103cb
build_flags = ${common_stm32.build_flags}
-DHAL_PCD_MODULE_ENABLED -DDISABLE_GENERIC_SERIALUSB
-DHAL_UART_MODULE_ENABLED
-build_src_filter = ${common.default_src_filter} +
+build_src_filter = ${common.default_src_filter} + -
#
# FLYmaker FLY Mini (STM32F103RCT6)
diff --git a/platformio.ini b/platformio.ini
index 885fdd87d6b5..e3bdb6f58676 100644
--- a/platformio.ini
+++ b/platformio.ini
@@ -52,218 +52,79 @@ extra_scripts =
pre:buildroot/share/PlatformIO/scripts/preflight-checks.py
post:buildroot/share/PlatformIO/scripts/common-dependencies-post.py
lib_deps =
-default_src_filter = + - - + -
- - - - - -
- - -
- - - - - -
- -
- - - -
- - -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- -
- - - - -
- - - - - -
- -
- -
- -
- -
- -
- -
- -
+default_src_filter = + - -
+ ; LCDs and Controllers
+ - - - - -
+ - - - -
-
- -
- - -
- -
- - - - - - -
+ ; Marlin HAL
+ -
+ +
-
-
-
-
- - -
- -
- -
- -
- - -
- - -
- - -
- - -
- - -
- -
- - -
- -
- - -
- - -
- -
- - -
- - -
- - -
- - -
- -
- -
- -
- -