From 4bd1e70b9d3d1a9ef728050e17b5e65a5c8f5fbe Mon Sep 17 00:00:00 2001
From: I3DBeeTech <129617321+I3DBeeTech@users.noreply.github.com>
Date: Thu, 9 Nov 2023 22:28:48 +0530
Subject: [PATCH 1/7] BlackBeezMini 3d Board
The board is based on STM32F401CCU6 Blackpill.
It supports only Neopixel mini 12864 lcds, D6/D7 had no pins to share.
---
Marlin/src/core/boards.h | 1 +
Marlin/src/pins/pins.h | 4 +-
Marlin/src/pins/stm32f4/pins_BLACKBEEZMINI.h | 170 +++++++++++++++++++
ini/stm32f4.ini | 14 ++
4 files changed, 188 insertions(+), 1 deletion(-)
create mode 100644 Marlin/src/pins/stm32f4/pins_BLACKBEEZMINI.h
diff --git a/Marlin/src/core/boards.h b/Marlin/src/core/boards.h
index 8715b49fc0bb..c1597d39c432 100644
--- a/Marlin/src/core/boards.h
+++ b/Marlin/src/core/boards.h
@@ -461,6 +461,7 @@
#define BOARD_I3DBEEZ9_V1 5247 // I3DBEEZ9 V1 (STM32F407ZG)
#define BOARD_MELLOW_FLY_E3_V2 5248 // Mellow Fly E3 V2 (STM32F407VG)
#define BOARD_FYSETC_CHEETAH_V30 5249 // FYSETC Cheetah V3.0 (STM32F446RC)
+#define BOARD_BLACKBEEZMINI_V1 5250 // BlackBeezMini V1 (STM32F401CCU6)
//
// ARM Cortex-M7
diff --git a/Marlin/src/pins/pins.h b/Marlin/src/pins/pins.h
index 122c9b937c47..43b5ee3c7201 100644
--- a/Marlin/src/pins/pins.h
+++ b/Marlin/src/pins/pins.h
@@ -808,7 +808,9 @@
#include "stm32f4/pins_I3DBEEZ9.h" // STM32F4 env:I3DBEEZ9_V1
#elif MB(MELLOW_FLY_E3_V2)
#include "stm32f4/pins_MELLOW_FLY_E3_V2.h" // STM32F4 env:FLY_E3_V2
-
+#elif MB(BLACKBEEZMINI_V1)
+ #include "stm32f4/pins_BLACKBEEZMINI.h" // STM32F4 env:BLACKBEEZMINI_V1
+
//
// ARM Cortex-M7
//
diff --git a/Marlin/src/pins/stm32f4/pins_BLACKBEEZMINI.h b/Marlin/src/pins/stm32f4/pins_BLACKBEEZMINI.h
new file mode 100644
index 000000000000..3fa77bc09ecb
--- /dev/null
+++ b/Marlin/src/pins/stm32f4/pins_BLACKBEEZMINI.h
@@ -0,0 +1,170 @@
+/**
+ * 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(STM32F4)
+ #error "Oops! Select an STM32F4 board in 'Tools > Board.'"
+#elif HOTENDS > 1 || E_STEPPERS > 1
+ #error "STM32F401CCU6 boards support one hotend / E-steppers only."
+#endif
+
+#include "env_validate.h"
+
+#ifndef DEFAULT_MACHINE_NAME
+ #define DEFAULT_MACHINE_NAME "I3DBEE BP_01"
+#endif
+#define TEMP_TIMER 5
+//#define DISABLE_DEBUG false // DISABLE_(DEBUG|JTAG) is not supported for STM32F4.
+//#define ALLOW_STM32F4
+//#define BOARD_NO_NATIVE_USB
+
+//
+// EEPROM
+//
+ #define FLASH_EEPROM_EMULATION
+ #define FLASH_EEPROM_LEVELING
+ #define EEPROM_SIZE 0x4000 // 16kB
+ #define FLASH_SECTOR (FLASH_SECTOR_TOTAL - 1)
+ #define FLASH_UNIT_SIZE 0x4000 // 16kB
+/*
+#if NO_EEPROM_SELECTED
+ #define IIC_BL24CXX_EEPROM // EEPROM on I2C-0
+ #define SDCARD_EEPROM_EMULATION
+#endif
+*/
+
+//
+// Limit Switches
+//
+#ifndef X_STOP_PIN
+ #ifndef X_MIN_PIN
+ #define X_MIN_PIN PB9
+ #endif
+ #ifndef X_MAX_PIN
+ #define X_MAX_PIN PB9
+ #endif
+#endif
+#ifndef Y_STOP_PIN
+ #ifndef Y_MIN_PIN
+ #define Y_MIN_PIN PB3
+ #endif
+ #ifndef Y_MAX_PIN
+ #define Y_MAX_PIN PB3
+ #endif
+#endif
+#ifndef Z_STOP_PIN
+ #ifndef Z_MIN_PIN
+ #define Z_MIN_PIN PA9
+ #endif
+ #ifndef Z_MAX_PIN
+ #define Z_MAX_PIN PA9
+ #endif
+#endif
+
+//
+// Steppers
+//
+// X & Y enable are the same
+#define X_STEP_PIN PB7
+#define X_DIR_PIN PB6
+#define X_ENABLE_PIN PB8
+
+#define Y_STEP_PIN PB5
+#define Y_DIR_PIN PB4
+#define Y_ENABLE_PIN X_ENABLE_PIN
+
+#define Z_STEP_PIN PA15
+#define Z_DIR_PIN PA10
+#define Z_ENABLE_PIN X_ENABLE_PIN
+
+#define E0_STEP_PIN PA8
+#define E0_DIR_PIN PB15
+#define E0_ENABLE_PIN X_ENABLE_PIN
+
+//
+// Temperature Sensors
+//
+#define TEMP_0_PIN PB1 // Analog Input (HOTEND thermistor)
+#define TEMP_BED_PIN PB0 // Analog Input (BED thermistor)
+
+//
+// Heaters / Fans
+//
+#define HEATER_0_PIN PA2 // HOTEND MOSFET
+#define HEATER_BED_PIN PA0 // BED MOSFET
+
+#define FAN1_PIN PA1 // FAN1 header on board - PRINT FAN
+
+
+//Encoder
+#define BTN_EN1 PC15
+#define BTN_EN2 PC14
+#define BTN_ENC PC13
+
+// SDCard
+#define SDSS PA4
+#define SD_DETECT_PIN -1
+#define BEEPER_PIN PB10
+#define KILL_PIN -1
+
+//
+// SPI
+//
+#define SD_SCK_PIN PA5
+#define SD_MISO_PIN PA6
+#define SD_MOSI_PIN PA7
+
+
+
+
+//LCD REPRAP_DISCOUNT_SMART_CONTROLLER
+//
+ #define LCD_PINS_RS PB12
+ #define LCD_PINS_EN PB13
+ #define LCD_PINS_D4 PB14
+ #define LCD_PINS_D5 PA3
+ //#define LCD_PINS_D6 PB1//
+ //#define LCD_PINS_D7 PB2///<- Ты вонючий алкашь, что блядь это такое, сука, я тебя спрашиваю!
+
+
+
+ #if ENABLED(FYSETC_MINI_12864)
+ #define DOGLCD_CS PB13
+ #define DOGLCD_A0 PB12
+ //#define LCD_BACKLIGHT_PIN -1
+ #define LCD_RESET_PIN PB14 // Must be high or open for LCD to operate normally.
+ #if ENABLED(FYSETC_MINI_12864_2_1)
+ #define NEOPIXEL_PIN PA3
+ #endif
+ #endif // !FYSETC_MINI_12864
+ // GLCD features
+ //
+ //#define LCD_CONTRAST 190
+
+ // Uncomment screen orientation
+ //
+ //#define LCD_SCREEN_ROT_90
+ //#define LCD_SCREEN_ROT_180
+ //#define LCD_SCREEN_ROT_270
+
+//#define DISABLE_JTAG
+//#define FAN_SOFT_PWM
\ No newline at end of file
diff --git a/ini/stm32f4.ini b/ini/stm32f4.ini
index b8e989642c8f..c33b5b1361c2 100644
--- a/ini/stm32f4.ini
+++ b/ini/stm32f4.ini
@@ -810,6 +810,20 @@ build_flags = ${stm32_variant.build_flags} -DSTM32F407_5ZX
debug_tool = stlink
upload_protocol = stlink
+#
+# BlackBeezMini (blackpill_f401cc)
+#
+[env:BLACKBEEZMINI_V1]
+platform = ststm32
+extends = common_stm32
+board = blackpill_f401cc
+board_build.offset = 0x0000
+build_flags = ${common_stm32.build_flags}
+ -Os -DHAL_PCD_MODULE_ENABLED
+ -DHAL_UART_MODULE_ENABLED
+monitor_speed = 250000
+upload_protocol = dfu
+
#
# Mellow Fly E3 V2 (STM32F407VGT6 ARM Cortex-M4)
#
From a77cbf65656df35f9aa057eb0af6276642b9f4ed Mon Sep 17 00:00:00 2001
From: Scott Lahteine
Date: Thu, 9 Nov 2023 20:40:41 -0600
Subject: [PATCH 2/7] run formatter, clean up
---
Marlin/src/pins/pins.h | 2 +-
Marlin/src/pins/stm32f4/pins_BLACKBEEZMINI.h | 120 +++++++++---------
.../PlatformIO/scripts/offset_and_rename.py | 2 +-
ini/stm32f4.ini | 18 +--
4 files changed, 68 insertions(+), 74 deletions(-)
diff --git a/Marlin/src/pins/pins.h b/Marlin/src/pins/pins.h
index 43b5ee3c7201..11a8cf81efd8 100644
--- a/Marlin/src/pins/pins.h
+++ b/Marlin/src/pins/pins.h
@@ -810,7 +810,7 @@
#include "stm32f4/pins_MELLOW_FLY_E3_V2.h" // STM32F4 env:FLY_E3_V2
#elif MB(BLACKBEEZMINI_V1)
#include "stm32f4/pins_BLACKBEEZMINI.h" // STM32F4 env:BLACKBEEZMINI_V1
-
+
//
// ARM Cortex-M7
//
diff --git a/Marlin/src/pins/stm32f4/pins_BLACKBEEZMINI.h b/Marlin/src/pins/stm32f4/pins_BLACKBEEZMINI.h
index 3fa77bc09ecb..e974a29109c8 100644
--- a/Marlin/src/pins/stm32f4/pins_BLACKBEEZMINI.h
+++ b/Marlin/src/pins/stm32f4/pins_BLACKBEEZMINI.h
@@ -55,76 +55,75 @@
//
// Limit Switches
//
-#ifndef X_STOP_PIN
- #ifndef X_MIN_PIN
- #define X_MIN_PIN PB9
- #endif
- #ifndef X_MAX_PIN
- #define X_MAX_PIN PB9
- #endif
-#endif
-#ifndef Y_STOP_PIN
- #ifndef Y_MIN_PIN
- #define Y_MIN_PIN PB3
- #endif
- #ifndef Y_MAX_PIN
- #define Y_MAX_PIN PB3
- #endif
-#endif
-#ifndef Z_STOP_PIN
- #ifndef Z_MIN_PIN
- #define Z_MIN_PIN PA9
- #endif
- #ifndef Z_MAX_PIN
- #define Z_MAX_PIN PA9
- #endif
-#endif
+#ifndef X_STOP_PIN
+ #ifndef X_MIN_PIN
+ #define X_MIN_PIN PB9
+ #endif
+ #ifndef X_MAX_PIN
+ #define X_MAX_PIN PB9
+ #endif
+#endif
+#ifndef Y_STOP_PIN
+ #ifndef Y_MIN_PIN
+ #define Y_MIN_PIN PB3
+ #endif
+ #ifndef Y_MAX_PIN
+ #define Y_MAX_PIN PB3
+ #endif
+#endif
+#ifndef Z_STOP_PIN
+ #ifndef Z_MIN_PIN
+ #define Z_MIN_PIN PA9
+ #endif
+ #ifndef Z_MAX_PIN
+ #define Z_MAX_PIN PA9
+ #endif
+#endif
//
// Steppers
//
// X & Y enable are the same
-#define X_STEP_PIN PB7
-#define X_DIR_PIN PB6
-#define X_ENABLE_PIN PB8
+#define X_STEP_PIN PB7
+#define X_DIR_PIN PB6
+#define X_ENABLE_PIN PB8
-#define Y_STEP_PIN PB5
-#define Y_DIR_PIN PB4
-#define Y_ENABLE_PIN X_ENABLE_PIN
+#define Y_STEP_PIN PB5
+#define Y_DIR_PIN PB4
+#define Y_ENABLE_PIN X_ENABLE_PIN
-#define Z_STEP_PIN PA15
-#define Z_DIR_PIN PA10
-#define Z_ENABLE_PIN X_ENABLE_PIN
+#define Z_STEP_PIN PA15
+#define Z_DIR_PIN PA10
+#define Z_ENABLE_PIN X_ENABLE_PIN
-#define E0_STEP_PIN PA8
-#define E0_DIR_PIN PB15
-#define E0_ENABLE_PIN X_ENABLE_PIN
+#define E0_STEP_PIN PA8
+#define E0_DIR_PIN PB15
+#define E0_ENABLE_PIN X_ENABLE_PIN
//
// Temperature Sensors
//
-#define TEMP_0_PIN PB1 // Analog Input (HOTEND thermistor)
-#define TEMP_BED_PIN PB0 // Analog Input (BED thermistor)
+#define TEMP_0_PIN PB1 // Analog Input (HOTEND thermistor)
+#define TEMP_BED_PIN PB0 // Analog Input (BED thermistor)
//
// Heaters / Fans
//
-#define HEATER_0_PIN PA2 // HOTEND MOSFET
-#define HEATER_BED_PIN PA0 // BED MOSFET
-
-#define FAN1_PIN PA1 // FAN1 header on board - PRINT FAN
+#define HEATER_0_PIN PA2 // HOTEND MOSFET
+#define HEATER_BED_PIN PA0 // BED MOSFET
+#define FAN1_PIN PA1 // FAN1 header on board - PRINT FAN
//Encoder
-#define BTN_EN1 PC15
-#define BTN_EN2 PC14
-#define BTN_ENC PC13
+#define BTN_EN1 PC15
+#define BTN_EN2 PC14
+#define BTN_ENC PC13
// SDCard
#define SDSS PA4
#define SD_DETECT_PIN -1
#define BEEPER_PIN PB10
-#define KILL_PIN -1
+#define KILL_PIN -1
//
// SPI
@@ -133,32 +132,27 @@
#define SD_MISO_PIN PA6
#define SD_MOSI_PIN PA7
-
-
-
//LCD REPRAP_DISCOUNT_SMART_CONTROLLER
//
- #define LCD_PINS_RS PB12
- #define LCD_PINS_EN PB13
- #define LCD_PINS_D4 PB14
- #define LCD_PINS_D5 PA3
- //#define LCD_PINS_D6 PB1//
- //#define LCD_PINS_D7 PB2///<- Ты вонючий алкашь, что блядь это такое, сука, я тебя спрашиваю!
-
-
+ #define LCD_PINS_RS PB12
+ #define LCD_PINS_EN PB13
+ #define LCD_PINS_D4 PB14
+ #define LCD_PINS_D5 PA3
+ //#define LCD_PINS_D6 PB1 //
+ //#define LCD_PINS_D7 PB2 ///<- Ты вонючий алкашь, что блядь это такое, сука, я тебя спрашиваю!
#if ENABLED(FYSETC_MINI_12864)
- #define DOGLCD_CS PB13
- #define DOGLCD_A0 PB12
+ #define DOGLCD_CS PB13
+ #define DOGLCD_A0 PB12
//#define LCD_BACKLIGHT_PIN -1
- #define LCD_RESET_PIN PB14 // Must be high or open for LCD to operate normally.
+ #define LCD_RESET_PIN PB14 // Must be high or open for LCD to operate normally.
#if ENABLED(FYSETC_MINI_12864_2_1)
- #define NEOPIXEL_PIN PA3
+ #define NEOPIXEL_PIN PA3
#endif
#endif // !FYSETC_MINI_12864
// GLCD features
//
- //#define LCD_CONTRAST 190
+ //#define LCD_CONTRAST 190
// Uncomment screen orientation
//
@@ -167,4 +161,4 @@
//#define LCD_SCREEN_ROT_270
//#define DISABLE_JTAG
-//#define FAN_SOFT_PWM
\ No newline at end of file
+//#define FAN_SOFT_PWM
diff --git a/buildroot/share/PlatformIO/scripts/offset_and_rename.py b/buildroot/share/PlatformIO/scripts/offset_and_rename.py
index 20f2b78024b8..353518600853 100644
--- a/buildroot/share/PlatformIO/scripts/offset_and_rename.py
+++ b/buildroot/share/PlatformIO/scripts/offset_and_rename.py
@@ -1,7 +1,7 @@
#
# offset_and_rename.py
#
-# - If 'build.offset' is provided, either by JSON or by the environment...
+# - If 'board_build.offset' is provided, either by JSON or by the environment...
# - Set linker flag LD_FLASH_OFFSET and relocate the VTAB based on 'build.offset'.
# - Set linker flag LD_MAX_DATA_SIZE based on 'build.maximum_ram_size'.
# - Define STM32_FLASH_SIZE from 'upload.maximum_size' for use by Flash-based EEPROM emulation.
diff --git a/ini/stm32f4.ini b/ini/stm32f4.ini
index c33b5b1361c2..33efe36404ab 100644
--- a/ini/stm32f4.ini
+++ b/ini/stm32f4.ini
@@ -814,15 +814,15 @@ upload_protocol = stlink
# BlackBeezMini (blackpill_f401cc)
#
[env:BLACKBEEZMINI_V1]
-platform = ststm32
-extends = common_stm32
-board = blackpill_f401cc
-board_build.offset = 0x0000
-build_flags = ${common_stm32.build_flags}
- -Os -DHAL_PCD_MODULE_ENABLED
- -DHAL_UART_MODULE_ENABLED
-monitor_speed = 250000
-upload_protocol = dfu
+platform = ststm32
+extends = common_stm32
+board = blackpill_f401cc
+board_build.offset = 0x0000
+build_flags = ${common_stm32.build_flags}
+ -Os -DHAL_PCD_MODULE_ENABLED
+ -DHAL_UART_MODULE_ENABLED
+monitor_speed = 250000
+upload_protocol = dfu
#
# Mellow Fly E3 V2 (STM32F407VGT6 ARM Cortex-M4)
From 62908633b20ac31fee16f459292350d60abbbeb4 Mon Sep 17 00:00:00 2001
From: thisiskeithb <13375512+thisiskeithb@users.noreply.github.com>
Date: Fri, 10 Nov 2023 12:20:38 -0800
Subject: [PATCH 3/7] De-tab
---
Marlin/src/core/boards.h | 2 +-
Marlin/src/pins/pins.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Marlin/src/core/boards.h b/Marlin/src/core/boards.h
index c1597d39c432..b43f317ff086 100644
--- a/Marlin/src/core/boards.h
+++ b/Marlin/src/core/boards.h
@@ -461,7 +461,7 @@
#define BOARD_I3DBEEZ9_V1 5247 // I3DBEEZ9 V1 (STM32F407ZG)
#define BOARD_MELLOW_FLY_E3_V2 5248 // Mellow Fly E3 V2 (STM32F407VG)
#define BOARD_FYSETC_CHEETAH_V30 5249 // FYSETC Cheetah V3.0 (STM32F446RC)
-#define BOARD_BLACKBEEZMINI_V1 5250 // BlackBeezMini V1 (STM32F401CCU6)
+#define BOARD_BLACKBEEZMINI_V1 5250 // BlackBeezMini V1 (STM32F401CCU6)
//
// ARM Cortex-M7
diff --git a/Marlin/src/pins/pins.h b/Marlin/src/pins/pins.h
index 11a8cf81efd8..763b67049c46 100644
--- a/Marlin/src/pins/pins.h
+++ b/Marlin/src/pins/pins.h
@@ -809,7 +809,7 @@
#elif MB(MELLOW_FLY_E3_V2)
#include "stm32f4/pins_MELLOW_FLY_E3_V2.h" // STM32F4 env:FLY_E3_V2
#elif MB(BLACKBEEZMINI_V1)
- #include "stm32f4/pins_BLACKBEEZMINI.h" // STM32F4 env:BLACKBEEZMINI_V1
+ #include "stm32f4/pins_BLACKBEEZMINI.h" // STM32F4 env:BLACKBEEZMINI_V1
//
// ARM Cortex-M7
From 420c7961286bdffc18299c28fe5915b1dbbf98b1 Mon Sep 17 00:00:00 2001
From: I3DBeeTech <129617321+I3DBeeTech@users.noreply.github.com>
Date: Sat, 11 Nov 2023 06:35:21 +0530
Subject: [PATCH 4/7] Typo
we should have minded checking it ...!
---
Marlin/src/pins/stm32f4/pins_BLACKBEEZMINI.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Marlin/src/pins/stm32f4/pins_BLACKBEEZMINI.h b/Marlin/src/pins/stm32f4/pins_BLACKBEEZMINI.h
index e974a29109c8..bcbf39f1c39e 100644
--- a/Marlin/src/pins/stm32f4/pins_BLACKBEEZMINI.h
+++ b/Marlin/src/pins/stm32f4/pins_BLACKBEEZMINI.h
@@ -139,7 +139,7 @@
#define LCD_PINS_D4 PB14
#define LCD_PINS_D5 PA3
//#define LCD_PINS_D6 PB1 //
- //#define LCD_PINS_D7 PB2 ///<- Ты вонючий алкашь, что блядь это такое, сука, я тебя спрашиваю!
+ //#define LCD_PINS_D7 PB2 //
#if ENABLED(FYSETC_MINI_12864)
#define DOGLCD_CS PB13
From 249323d45fb7e5146d67b24a661ca1ce481ed37e Mon Sep 17 00:00:00 2001
From: I3DBeeTech <129617321+I3DBeeTech@users.noreply.github.com>
Date: Sat, 11 Nov 2023 06:47:52 +0530
Subject: [PATCH 5/7] not used
---
Marlin/src/pins/stm32f4/pins_BLACKBEEZMINI.h | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/Marlin/src/pins/stm32f4/pins_BLACKBEEZMINI.h b/Marlin/src/pins/stm32f4/pins_BLACKBEEZMINI.h
index bcbf39f1c39e..110abaee8e17 100644
--- a/Marlin/src/pins/stm32f4/pins_BLACKBEEZMINI.h
+++ b/Marlin/src/pins/stm32f4/pins_BLACKBEEZMINI.h
@@ -138,8 +138,7 @@
#define LCD_PINS_EN PB13
#define LCD_PINS_D4 PB14
#define LCD_PINS_D5 PA3
- //#define LCD_PINS_D6 PB1 //
- //#define LCD_PINS_D7 PB2 //
+
#if ENABLED(FYSETC_MINI_12864)
#define DOGLCD_CS PB13
From a8c4dd014d4aab4704d06e12c35b030e9d9f6fea Mon Sep 17 00:00:00 2001
From: Scott Lahteine
Date: Tue, 14 Nov 2023 02:45:03 -0600
Subject: [PATCH 6/7] cleanup
---
Marlin/src/pins/stm32f4/pins_BLACKBEEZMINI.h | 116 ++++++++-----------
1 file changed, 50 insertions(+), 66 deletions(-)
diff --git a/Marlin/src/pins/stm32f4/pins_BLACKBEEZMINI.h b/Marlin/src/pins/stm32f4/pins_BLACKBEEZMINI.h
index 110abaee8e17..97804a3da91a 100644
--- a/Marlin/src/pins/stm32f4/pins_BLACKBEEZMINI.h
+++ b/Marlin/src/pins/stm32f4/pins_BLACKBEEZMINI.h
@@ -32,19 +32,26 @@
#ifndef DEFAULT_MACHINE_NAME
#define DEFAULT_MACHINE_NAME "I3DBEE BP_01"
#endif
+
#define TEMP_TIMER 5
-//#define DISABLE_DEBUG false // DISABLE_(DEBUG|JTAG) is not supported for STM32F4.
+
+//#define DISABLE_DEBUG // DISABLE_(DEBUG|JTAG) is not supported for STM32F4.
+//#define DISABLE_JTAG
//#define ALLOW_STM32F4
//#define BOARD_NO_NATIVE_USB
//
// EEPROM
//
+#if NO_EEPROM_SELECTED
#define FLASH_EEPROM_EMULATION
#define FLASH_EEPROM_LEVELING
- #define EEPROM_SIZE 0x4000 // 16kB
#define FLASH_SECTOR (FLASH_SECTOR_TOTAL - 1)
#define FLASH_UNIT_SIZE 0x4000 // 16kB
+ #define MARLIN_EEPROM_SIZE FLASH_UNIT_SIZE
+ #undef NO_EEPROM_SELECTED
+#endif
+
/*
#if NO_EEPROM_SELECTED
#define IIC_BL24CXX_EEPROM // EEPROM on I2C-0
@@ -55,35 +62,13 @@
//
// Limit Switches
//
-#ifndef X_STOP_PIN
- #ifndef X_MIN_PIN
- #define X_MIN_PIN PB9
- #endif
- #ifndef X_MAX_PIN
- #define X_MAX_PIN PB9
- #endif
-#endif
-#ifndef Y_STOP_PIN
- #ifndef Y_MIN_PIN
- #define Y_MIN_PIN PB3
- #endif
- #ifndef Y_MAX_PIN
- #define Y_MAX_PIN PB3
- #endif
-#endif
-#ifndef Z_STOP_PIN
- #ifndef Z_MIN_PIN
- #define Z_MIN_PIN PA9
- #endif
- #ifndef Z_MAX_PIN
- #define Z_MAX_PIN PA9
- #endif
-#endif
+#define X_STOP_PIN PB9
+#define Y_STOP_PIN PB3
+#define Z_STOP_PIN PA9
//
// Steppers
//
-// X & Y enable are the same
#define X_STEP_PIN PB7
#define X_DIR_PIN PB6
#define X_ENABLE_PIN PB8
@@ -114,50 +99,49 @@
#define FAN1_PIN PA1 // FAN1 header on board - PRINT FAN
-//Encoder
-#define BTN_EN1 PC15
-#define BTN_EN2 PC14
-#define BTN_ENC PC13
-
-// SDCard
-#define SDSS PA4
-#define SD_DETECT_PIN -1
-#define BEEPER_PIN PB10
-#define KILL_PIN -1
-
//
-// SPI
+// SD Card
//
+#define SDSS PA4
+#define SD_DETECT_PIN -1
#define SD_SCK_PIN PA5
#define SD_MISO_PIN PA6
#define SD_MOSI_PIN PA7
-//LCD REPRAP_DISCOUNT_SMART_CONTROLLER
//
- #define LCD_PINS_RS PB12
- #define LCD_PINS_EN PB13
- #define LCD_PINS_D4 PB14
- #define LCD_PINS_D5 PA3
-
-
- #if ENABLED(FYSETC_MINI_12864)
- #define DOGLCD_CS PB13
- #define DOGLCD_A0 PB12
- //#define LCD_BACKLIGHT_PIN -1
- #define LCD_RESET_PIN PB14 // Must be high or open for LCD to operate normally.
- #if ENABLED(FYSETC_MINI_12864_2_1)
- #define NEOPIXEL_PIN PA3
- #endif
- #endif // !FYSETC_MINI_12864
- // GLCD features
- //
- //#define LCD_CONTRAST 190
-
- // Uncomment screen orientation
- //
- //#define LCD_SCREEN_ROT_90
- //#define LCD_SCREEN_ROT_180
- //#define LCD_SCREEN_ROT_270
+// LCD / Controller
+//
+#if HAS_WIRED_LCD
+ #define BEEPER_PIN PB10
+
+ #define BTN_EN1 PC15
+ #define BTN_EN2 PC14
+ #define BTN_ENC PC13
+
+ #define LCD_PINS_RS PB12
+ #define LCD_PINS_EN PB13
+ #define LCD_PINS_D4 PB14
+ #define LCD_PINS_D5 PA3
+
+ #if ENABLED(FYSETC_MINI_12864)
+ #define DOGLCD_CS PB13
+ #define DOGLCD_A0 PB12
+ //#define LCD_BACKLIGHT_PIN -1
+ #define LCD_RESET_PIN PB14 // Must be high or open for LCD to operate normally.
+ #if ENABLED(FYSETC_MINI_12864_2_1)
+ #define NEOPIXEL_PIN PA3
+ #endif
+ #endif
-//#define DISABLE_JTAG
-//#define FAN_SOFT_PWM
+ //
+ // GLCD features
+ //
+ //#define LCD_CONTRAST 190
+
+ //
+ // Dcreen orientation
+ //
+ //#define LCD_SCREEN_ROT_90
+ //#define LCD_SCREEN_ROT_180
+ //#define LCD_SCREEN_ROT_270
+#endif
From 02902d106ff9b881b460417c09d7f49dd8a7bb84 Mon Sep 17 00:00:00 2001
From: Scott Lahteine
Date: Mon, 20 Nov 2023 20:39:47 -0600
Subject: [PATCH 7/7] most EXP1/2 pins
---
Marlin/src/pins/stm32f4/pins_BLACKBEEZMINI.h | 53 ++++++++++++++-----
.../src/pins/stm32f4/pins_BTT_BTT002_V1_0.h | 18 +++----
2 files changed, 49 insertions(+), 22 deletions(-)
diff --git a/Marlin/src/pins/stm32f4/pins_BLACKBEEZMINI.h b/Marlin/src/pins/stm32f4/pins_BLACKBEEZMINI.h
index 97804a3da91a..33b2219655ea 100644
--- a/Marlin/src/pins/stm32f4/pins_BLACKBEEZMINI.h
+++ b/Marlin/src/pins/stm32f4/pins_BLACKBEEZMINI.h
@@ -108,28 +108,57 @@
#define SD_MISO_PIN PA6
#define SD_MOSI_PIN PA7
+/**
+ * ------ ------
+ * (BEEPER) PB10 | 1 2 | PC13 (BTN_ENC) (MISO) PA6 | 1 2 | PA5 (SCK)
+ * (LCD_EN) PB13 | 3 4 | PB12 (LCD_RS) (BTN_EN1) PC15 | 3 4 | PA4 (SD_SS)
+ * (LCD_D4) PB14 5 6 | PA3 (LCD_D5) (BTN_EN2) PC14 5 6 | PA7 (MOSI)
+ * (LCD_D6) - | 7 8 | - (LCD_D7) (SD_DET) - | 7 8 | RESET
+ * GND | 9 10 | 5V GND | 9 10 | -
+ * ------ ------
+ * EXP1 EXP2
+ */
+#define EXP1_01_PIN PB10 // BEEPER
+#define EXP1_02_PIN PC13 // ENC
+#define EXP1_03_PIN PB13 // EN
+#define EXP1_04_PIN PB12 // RS
+#define EXP1_05_PIN PB14 // D4
+#define EXP1_06_PIN PA3 // D5
+#define EXP1_07_PIN -1
+#define EXP1_08_PIN -1
+
+#define EXP2_01_PIN PA6 // MISO
+#define EXP2_02_PIN PA5 // SCK
+#define EXP2_03_PIN PC15 // EN1
+#define EXP2_04_PIN PA4 // SS
+#define EXP2_05_PIN PC14 // EN2
+#define EXP2_06_PIN PA7 // MOSI
+#define EXP2_07_PIN -1
+#define EXP2_08_PIN -1 // RESET
+#define EXP2_10_PIN -1
+
//
// LCD / Controller
//
#if HAS_WIRED_LCD
- #define BEEPER_PIN PB10
+ #define BEEPER_PIN EXP1_01_PIN
- #define BTN_EN1 PC15
- #define BTN_EN2 PC14
- #define BTN_ENC PC13
+ #define BTN_EN1 EXP2_03_PIN
+ #define BTN_EN2 EXP2_05_PIN
+ #define BTN_ENC EXP1_02_PIN
- #define LCD_PINS_RS PB12
- #define LCD_PINS_EN PB13
- #define LCD_PINS_D4 PB14
- #define LCD_PINS_D5 PA3
+ #define LCD_PINS_RS EXP1_04_PIN
+ #define LCD_PINS_EN EXP1_03_PIN
+ #define LCD_PINS_D4 EXP1_05_PIN
+ #define LCD_PINS_D5 EXP1_06_PIN
#if ENABLED(FYSETC_MINI_12864)
- #define DOGLCD_CS PB13
- #define DOGLCD_A0 PB12
+ #define DOGLCD_CS EXP1_03_PIN
+ #define DOGLCD_A0 EXP1_04_PIN
//#define LCD_BACKLIGHT_PIN -1
- #define LCD_RESET_PIN PB14 // Must be high or open for LCD to operate normally.
+ #define LCD_RESET_PIN EXP1_05_PIN // Must be high or open for LCD to operate normally.
#if ENABLED(FYSETC_MINI_12864_2_1)
- #define NEOPIXEL_PIN PA3
+ #define NEOPIXEL_PIN EXP1_06_PIN
#endif
#endif
diff --git a/Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h b/Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h
index bc80720916fb..d7196b75fc34 100644
--- a/Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h
+++ b/Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h
@@ -201,16 +201,14 @@
#endif
/**
- * ---------------------------------BTT002 V1.0---------------------------------
- * ------ ------ |
- * (BEEPER) PE7 | 1 2 | PB1 (BTN_ENC) (MISO) PA6 | 1 2 | PA5 (SCK) |
- * (LCD_EN) PE9 | 3 4 | PE8 (LCD_RS) (BTN_EN1) PC5 | 3 4 | PA4 (SD_SS) |
- * (LCD_D4) PE10 5 6 | PE11 (LCD_D5) (BTN_EN2) PB0 5 6 | PA7 (MOSI) |
- * (LCD_D6) PE12 | 7 8 | PE13 (LCD_D7) (SD_DET) PC4 | 7 8 | RESET |
- * GND | 9 10 | 5V GND | 9 10 | PA3 |
- * ------ ------ |
- * EXP1 EXP2 |
- * ------------------------------------------------------------------------------
+ * ------ ------
+ * (BEEPER) PE7 | 1 2 | PB1 (BTN_ENC) (MISO) PA6 | 1 2 | PA5 (SCK)
+ * (LCD_EN) PE9 | 3 4 | PE8 (LCD_RS) (BTN_EN1) PC5 | 3 4 | PA4 (SD_SS)
+ * (LCD_D4) PE10 5 6 | PE11 (LCD_D5) (BTN_EN2) PB0 5 6 | PA7 (MOSI)
+ * (LCD_D6) PE12 | 7 8 | PE13 (LCD_D7) (SD_DET) PC4 | 7 8 | RESET
+ * GND | 9 10 | 5V GND | 9 10 | PA3
+ * ------ ------
+ * EXP1 EXP2
*/
#define EXP1_01_PIN PE7
#define EXP1_02_PIN PB1