From a4fb3c9fb50f561e3dfbece0e9a6f661aba49fb2 Mon Sep 17 00:00:00 2001 From: Keith Bennett <13375512+thisiskeithb@users.noreply.github.com> Date: Sun, 7 Apr 2024 12:05:35 -0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=A9=B9=20Fix=20MCU=20check=20for=20STM32H?= =?UTF-8?q?7-based=20BTT=20Octopus=20Pro=20V1=20(#26831)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 🩹 Fix MCU check for STM32H7-based BTT Octopus Pro V1 Co-authored-by: ellensp <530024+ellensp@users.noreply.github.com> * Update Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h --------- Co-authored-by: ellensp <530024+ellensp@users.noreply.github.com> --- Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h b/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h index 169cc9d8322a..294782029658 100644 --- a/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h +++ b/Marlin/src/pins/stm32f4/pins_BTT_OCTOPUS_V1_common.h @@ -21,7 +21,13 @@ */ #pragma once -#include "env_validate.h" +// The Octopus Pro V1 has shipped with both STM32F4 and STM32H7 MCUs. +// Ensure the correct env_validate.h file is included based on the build environment used. +#if NOT_TARGET(STM32H7) + #include "env_validate.h" +#else + #include "../stm32h7/env_validate.h" +#endif #define HAS_OTG_USB_HOST_SUPPORT // USB Flash Drive support #define USES_DIAG_JUMPERS