diff --git a/Marlin/src/pins/stm32g0/env_validate.h b/Marlin/src/pins/stm32g0/env_validate.h new file mode 100644 index 000000000000..a7be76bd8bb1 --- /dev/null +++ b/Marlin/src/pins/stm32g0/env_validate.h @@ -0,0 +1,26 @@ +/** + * 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 + +#if NOT_TARGET(STM32G0xx) || NOT_TARGET(STM32G0B1xx) + #error "Oops! Select an STM32G0 board in 'Tools > Board.'" +#endif diff --git a/Marlin/src/pins/stm32g0/pins_BTT_EBB42_V1_1.h b/Marlin/src/pins/stm32g0/pins_BTT_EBB42_V1_1.h index fc2be5401e10..cdd85a6d751c 100644 --- a/Marlin/src/pins/stm32g0/pins_BTT_EBB42_V1_1.h +++ b/Marlin/src/pins/stm32g0/pins_BTT_EBB42_V1_1.h @@ -21,6 +21,8 @@ */ #pragma once +#include "env_validate.h" + /** CAUTION ** * This board definition is to facilitate support for a Filament Extrusion * devices, used to convert waste plastic into 3D printable filament. diff --git a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_E3_EZ_V1_0.h b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_E3_EZ_V1_0.h index 97d21ab9b707..54c2c4c77b2d 100644 --- a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_E3_EZ_V1_0.h +++ b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_E3_EZ_V1_0.h @@ -21,6 +21,8 @@ */ #pragma once +#include "env_validate.h" + #ifndef BOARD_INFO_NAME #define BOARD_INFO_NAME "BTT Manta E3 EZ V1.0" #endif diff --git a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M4P_V1_0.h b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M4P_V1_0.h index 0ee9cc66987d..876475f88355 100644 --- a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M4P_V1_0.h +++ b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M4P_V1_0.h @@ -21,6 +21,8 @@ */ #pragma once +#include "env_validate.h" + //#define BOARD_CUSTOM_BUILD_FLAGS -DTONE_CHANNEL=4 -DTONE_TIMER=4 -DTIMER_TONE=4 #ifndef BOARD_INFO_NAME diff --git a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M5P_V1_0.h b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M5P_V1_0.h index 30f9ebb18120..f4ce5a16d3b0 100644 --- a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M5P_V1_0.h +++ b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M5P_V1_0.h @@ -21,6 +21,8 @@ */ #pragma once +#include "env_validate.h" + #ifndef BOARD_INFO_NAME #define BOARD_INFO_NAME "BTT Manta M5P V1.0" #endif diff --git a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_common.h b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_common.h index 58089eb0efad..0d4a74b6f95c 100644 --- a/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_common.h +++ b/Marlin/src/pins/stm32g0/pins_BTT_MANTA_M8P_common.h @@ -21,6 +21,8 @@ */ #pragma once +#include "env_validate.h" + //#define BOARD_CUSTOM_BUILD_FLAGS -DTONE_CHANNEL=4 -DTONE_TIMER=4 -DTIMER_TONE=4 #define USES_DIAG_JUMPERS diff --git a/Marlin/src/pins/stm32g0/pins_BTT_SKR_MINI_E3_V3_0.h b/Marlin/src/pins/stm32g0/pins_BTT_SKR_MINI_E3_V3_0.h index f931d9924acf..f71b7b40ebd1 100644 --- a/Marlin/src/pins/stm32g0/pins_BTT_SKR_MINI_E3_V3_0.h +++ b/Marlin/src/pins/stm32g0/pins_BTT_SKR_MINI_E3_V3_0.h @@ -21,6 +21,8 @@ */ #pragma once +#include "env_validate.h" + //#define BOARD_CUSTOM_BUILD_FLAGS -DTONE_CHANNEL=4 -DTONE_TIMER=4 -DTIMER_TONE=4 #ifndef BOARD_INFO_NAME