Optional M42/M226; Add more features filters (#19664)
				
					
				
			This commit is contained in:
		| @@ -19,7 +19,6 @@ | ||||
|  * along with this program.  If not, see <https://www.gnu.org/licenses/>. | ||||
|  * | ||||
|  */ | ||||
| #pragma once | ||||
|  | ||||
| /** | ||||
|  * The purpose of this file is just include Marlin Configuration files, | ||||
| @@ -27,44 +26,9 @@ | ||||
|  * Used by common-dependencies.py | ||||
|  */ | ||||
|  | ||||
| #include <stdint.h> | ||||
| #define NUM_SERIAL 1 // Normally provided by HAL/HAL.h | ||||
|  | ||||
| // Include platform headers | ||||
| //#include "../../../../Marlin/src/HAL/platforms.h" | ||||
|  | ||||
| #include "../../../../Marlin/src/core/boards.h" | ||||
| #include "../../../../Marlin/src/core/macros.h" | ||||
| #include "../../../../Marlin/Configuration.h" | ||||
|  | ||||
| #include "../../../../Marlin/Version.h" | ||||
|  | ||||
| #include "../../../../Marlin/src/inc/Conditionals_LCD.h" | ||||
|  | ||||
| #ifdef HAL_PATH | ||||
|   #include HAL_PATH(../../../../Marlin/src/HAL, inc/Conditionals_LCD.h) | ||||
| #endif | ||||
|  | ||||
| #include "../../../../Marlin/src/core/drivers.h" | ||||
| #include "../../../../Marlin/Configuration_adv.h" | ||||
|  | ||||
| #include "../../../../Marlin/src/inc/Conditionals_adv.h" | ||||
|  | ||||
| #ifdef HAL_PATH | ||||
|   #include HAL_PATH(../../../../Marlin/src/HAL, inc/Conditionals_adv.h) | ||||
| #endif | ||||
|  | ||||
| //#include "../../../../Marlin/src/pins/pins.h" | ||||
|  | ||||
| #ifdef HAL_PATH | ||||
|   #include HAL_PATH(../../../../Marlin/src/HAL, timers.h) | ||||
|   #include HAL_PATH(../../../../Marlin/src/HAL, spi_pins.h) | ||||
| #endif | ||||
|  | ||||
| #include "../../../../Marlin/src/inc/Conditionals_post.h" | ||||
|  | ||||
| #ifdef HAL_PATH | ||||
|   #include HAL_PATH(../../../../Marlin/src/HAL, inc/Conditionals_post.h) | ||||
| #endif | ||||
| #include "../../../../Marlin/src/inc/MarlinConfig.h" | ||||
|  | ||||
| // | ||||
| // Conditionals only used for [features] | ||||
| @@ -89,6 +53,10 @@ | ||||
|   #define HAS_EXTRUDERS | ||||
| #endif | ||||
|  | ||||
| #if ENABLED(DUET_SMART_EFFECTOR) && PIN_EXISTS(SMART_EFFECTOR_MOD) | ||||
|   #define HAS_SMART_EFF_MOD | ||||
| #endif | ||||
|  | ||||
| #if HAS_LCD_MENU | ||||
|   #if ENABLED(BACKLASH_GCODE) | ||||
|     #define HAS_MENU_BACKLASH | ||||
| @@ -145,6 +113,3 @@ | ||||
|     #define HAS_MENU_UBL | ||||
|   #endif | ||||
| #endif | ||||
|  | ||||
| // Include pins for the current board. Platform tests will be skipped. No HAL-defined pins. | ||||
| #include "../../../../Marlin/src/pins/pins.h" | ||||
|   | ||||
| @@ -39,6 +39,12 @@ def parse_pkg_uri(spec): | ||||
| FEATURE_CONFIG = {} | ||||
|  | ||||
| def add_to_feat_cnf(feature, flines): | ||||
|  | ||||
| 	try: | ||||
| 		feat = FEATURE_CONFIG[feature] | ||||
| 	except: | ||||
| 		FEATURE_CONFIG[feature] = {} | ||||
|  | ||||
| 	feat = FEATURE_CONFIG[feature] | ||||
| 	atoms = re.sub(',\\s*', '\n', flines).strip().split('\n') | ||||
| 	for dep in atoms: | ||||
| @@ -238,7 +244,7 @@ def load_marlin_features(): | ||||
| 		else: | ||||
| 			cmd += ['-D' + s] | ||||
|  | ||||
| 	cmd += ['-D__MARLIN_PREBUILD__ -w -dM -E -x c++ buildroot/share/PlatformIO/scripts/common-dependencies.h'] | ||||
| 	cmd += ['-D__MARLIN_DEPS__ -w -dM -E -x c++ buildroot/share/PlatformIO/scripts/common-dependencies.h'] | ||||
| 	cmd = ' '.join(cmd) | ||||
| 	blab(cmd) | ||||
| 	define_list = subprocess.check_output(cmd, shell=True).splitlines() | ||||
|   | ||||
		Reference in New Issue
	
	Block a user