Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blackpill-based custom board #25152

Merged
merged 21 commits into from
May 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
f8e799a
Basic code is added but the compilation errors need to be fixed
Dec 23, 2022
7c25903
No error while compiling
Dec 23, 2022
d7bdbaf
upload issue is fixed
Dec 26, 2022
82c7fca
Code cleanup and configuration files are set to defautl settings
Dec 26, 2022
c14bc6c
Merge branch 'bugfix-2.1.x' into pr/25152
thinkyhead Jan 8, 2023
28abf32
adjustments
thinkyhead Jan 8, 2023
866b6e7
Use platform board blackpill_f401cc
thinkyhead Jan 8, 2023
21feb09
Merge remote-tracking branch 'upstream/bugfix-2.1.x' into pr/25152
thinkyhead Feb 9, 2023
7c41590
Merge branch 'MarlinFirmware:bugfix-2.1.x' into bugfix-2.1.x
arslan437 Feb 21, 2023
feca4e7
Merge branch 'MarlinFirmware:bugfix-2.1.x' into bugfix-2.1.x
arslan437 Mar 9, 2023
7a31d6d
Merge branch 'MarlinFirmware:bugfix-2.1.x' into bugfix-2.1.x
arslan437 Mar 13, 2023
727fc84
Merge branch 'MarlinFirmware:bugfix-2.1.x' into bugfix-2.1.x
arslan437 Mar 15, 2023
23b8b9c
Pins are updated
arslan437 Mar 17, 2023
c7fe40e
Merge branch 'bugfix-2.1.x' of https://github.com/arslan437/Marlin in…
arslan437 Mar 17, 2023
9042201
Merge branch 'MarlinFirmware:bugfix-2.1.x' into bugfix-2.1.x
arslan437 Mar 17, 2023
41d4c1a
defaut configuration files are added
arslan437 Mar 17, 2023
a17d20e
Merge branch 'bugfix-2.1.x' of https://github.com/arslan437/Marlin in…
arslan437 Mar 17, 2023
a6c526a
Merge branch 'MarlinFirmware:bugfix-2.1.x' into bugfix-2.1.x
arslan437 Mar 21, 2023
21c163d
Merge branch 'bugfix-2.1.x' into pr/25152
thinkyhead May 10, 2023
bf085b3
followup
thinkyhead May 10, 2023
78d7f42
Merge branch 'MarlinFirmware:bugfix-2.1.x' into bugfix-2.1.x
arslan437 May 11, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Marlin/src/core/boards.h
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,7 @@
#define BOARD_MKS_SKIPR_V1 5244 // MKS SKIPR v1.0 all-in-one board (STM32F407VE)
#define BOARD_TRONXY_V10 5245 // TRONXY V10 (STM32F446ZE)
#define BOARD_CREALITY_F401RE 5246 // Creality CR4NS200141C13 (STM32F401RE) as found in the Ender-5 S1
#define BOARD_BLACKPILL_CUSTOM 5247 // Custom board based on STM32F401CDU6.

//
// ARM Cortex-M7
Expand Down
2 changes: 2 additions & 0 deletions Marlin/src/pins/pins.h
Original file line number Diff line number Diff line change
Expand Up @@ -792,6 +792,8 @@
#include "stm32f4/pins_TRONXY_V10.h" // STM32F4 env:STM32F446_tronxy
#elif MB(CREALITY_F401RE)
#include "stm32f4/pins_CREALITY_F401.h" // STM32F4 env:STM32F401RE_creality
#elif MB(BLACKPILL_CUSTOM)
#include "stm32f4/pins_BLACKPILL_CUSTOM.h" // STM32F4 env:STM32F401CD_blackpill_stlink

//
// ARM Cortex M7
Expand Down
8 changes: 0 additions & 8 deletions Marlin/src/pins/stm32f1/pins_CREALITY_V4.h
Original file line number Diff line number Diff line change
Expand Up @@ -299,11 +299,3 @@
#define UART4_RX_PIN PC11 // default uses sdcard SDIO_D3
#define UART5_TX_PIN PC12 // default uses sdcard SDIO_CK
#define UART5_RX_PIN PD2 // default uses sdcard SDIO_CMD

// SDIO pins
#define SDIO_D0_PIN PC8
#define SDIO_D1_PIN PC9
#define SDIO_D2_PIN PC10
#define SDIO_D3_PIN PC11
#define SDIO_CK_PIN PC12
#define SDIO_CMD_PIN PD2
140 changes: 140 additions & 0 deletions Marlin/src/pins/stm32f4/pins_BLACKPILL_CUSTOM.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
/**
* 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 <https://www.gnu.org/licenses/>.
*
*/
#pragma once

#include "env_validate.h"

#ifndef BOARD_INFO_NAME
#define BOARD_INFO_NAME "Custom Blackpill"
#endif

#ifndef DEFAULT_MACHINE_NAME
#define DEFAULT_MACHINE_NAME "SLA Printer"
#endif

#define DISABLE_DEBUG false // DISABLE_(DEBUG|JTAG) is not supported for STM32F4.
#define ALLOW_STM32F4
#define BOARD_NO_NATIVE_USB

//
// EEPROM
//
#if NO_EEPROM_SELECTED
#define IIC_BL24CXX_EEPROM // EEPROM on I2C-0
//#define SDCARD_EEPROM_EMULATION
#endif

//
// Servos
//
#if !defined(SERVO0_PIN) && !defined(HAS_PIN_27_BOARD)
#define SERVO0_PIN PC13 // BLTouch OUT
#endif

#define LED_PIN PC13

//
// Limit Switches
//
#define Z_STOP_PIN PA15
#define X_STOP_PIN PA11
#define Y_STOP_PIN PA12

//
// Filament Runout Sensor
//
#define FIL_RUNOUT_PIN PB15 // "Pulled-high"

//
// Steppers
//
#define X_STEP_PIN PB0
#define X_DIR_PIN PB1
#define X_ENABLE_PIN PB2 // Shared

#define Y_STEP_PIN PB3
#define Y_DIR_PIN PB4
#define Y_ENABLE_PIN X_ENABLE_PIN

#define Z_STEP_PIN PB8
#define Z_DIR_PIN PB5
#define Z_ENABLE_PIN X_ENABLE_PIN

#define E0_STEP_PIN PB9
#define E0_DIR_PIN PB10
#define E0_ENABLE_PIN X_ENABLE_PIN

//
// Temperature Sensors
//
#define TEMP_0_PIN PA0 // TH1
#define TEMP_BED_PIN PA1 // TB1

//
// Heaters / Fans
//
#define HEATER_BED_PIN PA2 // HOT BED
#define FAN1_PIN PA8 // extruder fan
#define HEATER_0_PIN PA3 // HEATER1

//
// Encoder pins
//
#if ENABLED(OLED_PANEL_TINYBOY2)
#define BTN_EN1 PB12
#define BTN_EN2 PB13
#define BTN_ENC PB14
#define BEEPER_PIN PC15
#endif

//
// SD Card
//
#define ONBOARD_SPI_DEVICE 1
// #define ONBOARD_SD_CS_PIN PA4 // SDSS

#define SD_DETECT_PIN -1
#define SDCARD_CONNECTION ONBOARD
//#define SDIO_SUPPORT
#define NO_SD_HOST_DRIVE // This board's SD is only seen by the printer

#if SD_CONNECTION_IS(ONBOARD)
#define SDSS PA4
#define SD_SCK_PIN PA5
#define SD_MISO_PIN PA6
#define SD_MOSI_PIN PA7
#endif

// Pins for documentation and sanity checks only.
// Changing these will not change the pin they are on.

// Hardware UART pins
#define UART1_TX_PIN PA9 // default uses CH340 RX
#define UART1_RX_PIN PA10 // default uses CH340 TX
#define UART2_TX_PIN PA2 // default uses HEATER_BED_PIN
#define UART2_RX_PIN PA3 // not connected
#define UART3_TX_PIN PB10 // default uses LCD connector
#define UART3_RX_PIN PB11 // default uses LCD connector
#define UART4_TX_PIN PC10 // default uses sdcard SDIO_D2
#define UART4_RX_PIN PC11 // default uses sdcard SDIO_D3
#define UART5_TX_PIN PC12 // default uses sdcard SDIO_CK
#define UART5_RX_PIN PD2 // default uses sdcard SDIO_CMD
7 changes: 0 additions & 7 deletions Marlin/src/pins/stm32f4/pins_TRONXY_V10.h
Original file line number Diff line number Diff line change
Expand Up @@ -255,10 +255,3 @@
#define SD_DETECT_PIN -1 // PF0, but not connected
#define SDIO_CLOCK 4500000
#define SDIO_READ_RETRIES 16

#define SDIO_D0_PIN PC8
#define SDIO_D1_PIN PC9
#define SDIO_D2_PIN PC10
#define SDIO_D3_PIN PC11
#define SDIO_CK_PIN PC12
#define SDIO_CMD_PIN PD2
10 changes: 10 additions & 0 deletions ini/stm32f4.ini
Original file line number Diff line number Diff line change
Expand Up @@ -772,3 +772,13 @@ build_flags = ${stm32_variant.build_flags}
-DSTM32F4xx
build_unflags = ${stm32_variant.build_unflags} -fno-rtti
-DUSBCON -DUSBD_USE_CDC

#
# Blackpill
#
[env:STM32F401CD_blackpill_stlink]
platform = ${common_stm32.platform}
extends = common_stm32
board = blackpill_f401cc
upload_protocol = stlink
monitor_speed = 115200