Skip to content

Commit 7a96a08

Browse files
I3DBeeTechthinkyheadthisiskeithb
authored
✨ BlackBeezMini 3D by I3DBEE (#26406)
Co-authored-by: Scott Lahteine <thinkyhead@users.noreply.github.com> Co-authored-by: thisiskeithb <13375512+thisiskeithb@users.noreply.github.com>
1 parent b78f001 commit 7a96a08

File tree

6 files changed

+202
-11
lines changed

6 files changed

+202
-11
lines changed

Marlin/src/core/boards.h

+1
Original file line numberDiff line numberDiff line change
@@ -462,6 +462,7 @@
462462
#define BOARD_I3DBEEZ9_V1 5247 // I3DBEEZ9 V1 (STM32F407ZG)
463463
#define BOARD_MELLOW_FLY_E3_V2 5248 // Mellow Fly E3 V2 (STM32F407VG)
464464
#define BOARD_FYSETC_CHEETAH_V30 5249 // FYSETC Cheetah V3.0 (STM32F446RC)
465+
#define BOARD_BLACKBEEZMINI_V1 5250 // BlackBeezMini V1 (STM32F401CCU6)
465466

466467
//
467468
// ARM Cortex-M7

Marlin/src/pins/pins.h

+2
Original file line numberDiff line numberDiff line change
@@ -810,6 +810,8 @@
810810
#include "stm32f4/pins_I3DBEEZ9.h" // STM32F4 env:I3DBEEZ9_V1
811811
#elif MB(MELLOW_FLY_E3_V2)
812812
#include "stm32f4/pins_MELLOW_FLY_E3_V2.h" // STM32F4 env:FLY_E3_V2
813+
#elif MB(BLACKBEEZMINI_V1)
814+
#include "stm32f4/pins_BLACKBEEZMINI.h" // STM32F4 env:BLACKBEEZMINI_V1
813815

814816
//
815817
// ARM Cortex-M7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,176 @@
1+
/**
2+
* Marlin 3D Printer Firmware
3+
* Copyright (c) 2023 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
4+
*
5+
* Based on Sprinter and grbl.
6+
* Copyright (c) 2011 Camiel Gubbels / Erik van der Zalm
7+
*
8+
* This program is free software: you can redistribute it and/or modify
9+
* it under the terms of the GNU General Public License as published by
10+
* the Free Software Foundation, either version 3 of the License, or
11+
* (at your option) any later version.
12+
*
13+
* This program is distributed in the hope that it will be useful,
14+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16+
* GNU General Public License for more details.
17+
*
18+
* You should have received a copy of the GNU General Public License
19+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
20+
*
21+
*/
22+
#pragma once
23+
24+
#if NOT_TARGET(STM32F4)
25+
#error "Oops! Select an STM32F4 board in 'Tools > Board.'"
26+
#elif HOTENDS > 1 || E_STEPPERS > 1
27+
#error "STM32F401CCU6 boards support one hotend / E-steppers only."
28+
#endif
29+
30+
#include "env_validate.h"
31+
32+
#ifndef DEFAULT_MACHINE_NAME
33+
#define DEFAULT_MACHINE_NAME "I3DBEE BP_01"
34+
#endif
35+
36+
#define TEMP_TIMER 5
37+
38+
//#define DISABLE_DEBUG // DISABLE_(DEBUG|JTAG) is not supported for STM32F4.
39+
//#define DISABLE_JTAG
40+
//#define ALLOW_STM32F4
41+
//#define BOARD_NO_NATIVE_USB
42+
43+
//
44+
// EEPROM
45+
//
46+
#if NO_EEPROM_SELECTED
47+
#define FLASH_EEPROM_EMULATION
48+
#define FLASH_EEPROM_LEVELING
49+
#define FLASH_SECTOR (FLASH_SECTOR_TOTAL - 1)
50+
#define FLASH_UNIT_SIZE 0x4000 // 16kB
51+
#define MARLIN_EEPROM_SIZE FLASH_UNIT_SIZE
52+
#undef NO_EEPROM_SELECTED
53+
#endif
54+
55+
/*
56+
#if NO_EEPROM_SELECTED
57+
#define IIC_BL24CXX_EEPROM // EEPROM on I2C-0
58+
#define SDCARD_EEPROM_EMULATION
59+
#endif
60+
*/
61+
62+
//
63+
// Limit Switches
64+
//
65+
#define X_STOP_PIN PB9
66+
#define Y_STOP_PIN PB3
67+
#define Z_STOP_PIN PA9
68+
69+
//
70+
// Steppers
71+
//
72+
#define X_STEP_PIN PB7
73+
#define X_DIR_PIN PB6
74+
#define X_ENABLE_PIN PB8
75+
76+
#define Y_STEP_PIN PB5
77+
#define Y_DIR_PIN PB4
78+
#define Y_ENABLE_PIN X_ENABLE_PIN
79+
80+
#define Z_STEP_PIN PA15
81+
#define Z_DIR_PIN PA10
82+
#define Z_ENABLE_PIN X_ENABLE_PIN
83+
84+
#define E0_STEP_PIN PA8
85+
#define E0_DIR_PIN PB15
86+
#define E0_ENABLE_PIN X_ENABLE_PIN
87+
88+
//
89+
// Temperature Sensors
90+
//
91+
#define TEMP_0_PIN PB1 // Analog Input (HOTEND thermistor)
92+
#define TEMP_BED_PIN PB0 // Analog Input (BED thermistor)
93+
94+
//
95+
// Heaters / Fans
96+
//
97+
#define HEATER_0_PIN PA2 // HOTEND MOSFET
98+
#define HEATER_BED_PIN PA0 // BED MOSFET
99+
100+
#define FAN1_PIN PA1 // FAN1 header on board - PRINT FAN
101+
102+
//
103+
// SD Card
104+
//
105+
#define SDSS PA4
106+
#define SD_DETECT_PIN -1
107+
#define SD_SCK_PIN PA5
108+
#define SD_MISO_PIN PA6
109+
#define SD_MOSI_PIN PA7
110+
111+
/**
112+
* ------ ------
113+
* (BEEPER) PB10 | 1 2 | PC13 (BTN_ENC) (MISO) PA6 | 1 2 | PA5 (SCK)
114+
* (LCD_EN) PB13 | 3 4 | PB12 (LCD_RS) (BTN_EN1) PC15 | 3 4 | PA4 (SD_SS)
115+
* (LCD_D4) PB14 5 6 | PA3 (LCD_D5) (BTN_EN2) PC14 5 6 | PA7 (MOSI)
116+
* (LCD_D6) - | 7 8 | - (LCD_D7) (SD_DET) - | 7 8 | RESET
117+
* GND | 9 10 | 5V GND | 9 10 | -
118+
* ------ ------
119+
* EXP1 EXP2
120+
*/
121+
#define EXP1_01_PIN PB10 // BEEPER
122+
#define EXP1_02_PIN PC13 // ENC
123+
#define EXP1_03_PIN PB13 // EN
124+
#define EXP1_04_PIN PB12 // RS
125+
#define EXP1_05_PIN PB14 // D4
126+
#define EXP1_06_PIN PA3 // D5
127+
#define EXP1_07_PIN -1
128+
#define EXP1_08_PIN -1
129+
130+
#define EXP2_01_PIN PA6 // MISO
131+
#define EXP2_02_PIN PA5 // SCK
132+
#define EXP2_03_PIN PC15 // EN1
133+
#define EXP2_04_PIN PA4 // SS
134+
#define EXP2_05_PIN PC14 // EN2
135+
#define EXP2_06_PIN PA7 // MOSI
136+
#define EXP2_07_PIN -1
137+
#define EXP2_08_PIN -1 // RESET
138+
#define EXP2_10_PIN -1
139+
140+
//
141+
// LCD / Controller
142+
//
143+
#if HAS_WIRED_LCD
144+
#define BEEPER_PIN EXP1_01_PIN
145+
146+
#define BTN_EN1 EXP2_03_PIN
147+
#define BTN_EN2 EXP2_05_PIN
148+
#define BTN_ENC EXP1_02_PIN
149+
150+
#define LCD_PINS_RS EXP1_04_PIN
151+
#define LCD_PINS_EN EXP1_03_PIN
152+
#define LCD_PINS_D4 EXP1_05_PIN
153+
#define LCD_PINS_D5 EXP1_06_PIN
154+
155+
#if ENABLED(FYSETC_MINI_12864)
156+
#define DOGLCD_CS EXP1_03_PIN
157+
#define DOGLCD_A0 EXP1_04_PIN
158+
//#define LCD_BACKLIGHT_PIN -1
159+
#define LCD_RESET_PIN EXP1_05_PIN // Must be high or open for LCD to operate normally.
160+
#if ENABLED(FYSETC_MINI_12864_2_1)
161+
#define NEOPIXEL_PIN EXP1_06_PIN
162+
#endif
163+
#endif
164+
165+
//
166+
// GLCD features
167+
//
168+
//#define LCD_CONTRAST 190
169+
170+
//
171+
// Dcreen orientation
172+
//
173+
//#define LCD_SCREEN_ROT_90
174+
//#define LCD_SCREEN_ROT_180
175+
//#define LCD_SCREEN_ROT_270
176+
#endif

Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h

+8-10
Original file line numberDiff line numberDiff line change
@@ -201,16 +201,14 @@
201201
#endif
202202

203203
/**
204-
* ---------------------------------BTT002 V1.0---------------------------------
205-
* ------ ------ |
206-
* (BEEPER) PE7 | 1 2 | PB1 (BTN_ENC) (MISO) PA6 | 1 2 | PA5 (SCK) |
207-
* (LCD_EN) PE9 | 3 4 | PE8 (LCD_RS) (BTN_EN1) PC5 | 3 4 | PA4 (SD_SS) |
208-
* (LCD_D4) PE10 5 6 | PE11 (LCD_D5) (BTN_EN2) PB0 5 6 | PA7 (MOSI) |
209-
* (LCD_D6) PE12 | 7 8 | PE13 (LCD_D7) (SD_DET) PC4 | 7 8 | RESET |
210-
* GND | 9 10 | 5V GND | 9 10 | PA3 |
211-
* ------ ------ |
212-
* EXP1 EXP2 |
213-
* ------------------------------------------------------------------------------
204+
* ------ ------
205+
* (BEEPER) PE7 | 1 2 | PB1 (BTN_ENC) (MISO) PA6 | 1 2 | PA5 (SCK)
206+
* (LCD_EN) PE9 | 3 4 | PE8 (LCD_RS) (BTN_EN1) PC5 | 3 4 | PA4 (SD_SS)
207+
* (LCD_D4) PE10 5 6 | PE11 (LCD_D5) (BTN_EN2) PB0 5 6 | PA7 (MOSI)
208+
* (LCD_D6) PE12 | 7 8 | PE13 (LCD_D7) (SD_DET) PC4 | 7 8 | RESET
209+
* GND | 9 10 | 5V GND | 9 10 | PA3
210+
* ------ ------
211+
* EXP1 EXP2
214212
*/
215213
#define EXP1_01_PIN PE7
216214
#define EXP1_02_PIN PB1

buildroot/share/PlatformIO/scripts/offset_and_rename.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#
22
# offset_and_rename.py
33
#
4-
# - If 'build.offset' is provided, either by JSON or by the environment...
4+
# - If 'board_build.offset' is provided, either by JSON or by the environment...
55
# - Set linker flag LD_FLASH_OFFSET and relocate the VTAB based on 'build.offset'.
66
# - Set linker flag LD_MAX_DATA_SIZE based on 'build.maximum_ram_size'.
77
# - Define STM32_FLASH_SIZE from 'upload.maximum_size' for use by Flash-based EEPROM emulation.

ini/stm32f4.ini

+14
Original file line numberDiff line numberDiff line change
@@ -820,6 +820,20 @@ build_flags = ${stm32_variant.build_flags} -DSTM32F407_5ZX
820820
debug_tool = stlink
821821
upload_protocol = stlink
822822

823+
#
824+
# BlackBeezMini (blackpill_f401cc)
825+
#
826+
[env:BLACKBEEZMINI_V1]
827+
platform = ststm32
828+
extends = common_stm32
829+
board = blackpill_f401cc
830+
board_build.offset = 0x0000
831+
build_flags = ${common_stm32.build_flags}
832+
-Os -DHAL_PCD_MODULE_ENABLED
833+
-DHAL_UART_MODULE_ENABLED
834+
monitor_speed = 250000
835+
upload_protocol = dfu
836+
823837
#
824838
# Mellow Fly E3 V2 (STM32F407VGT6 ARM Cortex-M4)
825839
#

0 commit comments

Comments
 (0)