Skip to content

Commit

Permalink
🔨 Fix env STM32G0B1RE_btt, add …_manta_btt (MarlinFirmware#25431)
Browse files Browse the repository at this point in the history
  • Loading branch information
thisiskeithb authored Feb 27, 2023
1 parent 445181f commit 1068963
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 23 deletions.
6 changes: 3 additions & 3 deletions Marlin/src/pins/pins.h
Original file line number Diff line number Diff line change
Expand Up @@ -546,11 +546,11 @@
#elif MB(BTT_SKR_MINI_E3_V3_0)
#include "stm32g0/pins_BTT_SKR_MINI_E3_V3_0.h" // STM32G0 env:STM32G0B1RE_btt env:STM32G0B1RE_btt_xfer
#elif MB(BTT_MANTA_M4P_V1_0)
#include "stm32g0/pins_BTT_MANTA_M4P_V1_0.h" // STM32G0 env:STM32G0B1RE_btt env:STM32G0B1RE_btt_xfer
#include "stm32g0/pins_BTT_MANTA_M4P_V1_0.h" // STM32G0 env:STM32G0B1RE_manta_btt env:STM32G0B1RE_manta_btt_xfer
#elif MB(BTT_MANTA_M5P_V1_0)
#include "stm32g0/pins_BTT_MANTA_M5P_V1_0.h" // STM32G0 env:STM32G0B1RE_btt env:STM32G0B1RE_btt_xfer
#include "stm32g0/pins_BTT_MANTA_M5P_V1_0.h" // STM32G0 env:STM32G0B1RE_manta_btt env:STM32G0B1RE_manta_btt_xfer
#elif MB(BTT_MANTA_E3_EZ_V1_0)
#include "stm32g0/pins_BTT_MANTA_E3_EZ_V1_0.h" // STM32G0 env:STM32G0B1RE_btt env:STM32G0B1RE_btt_xfer
#include "stm32g0/pins_BTT_MANTA_E3_EZ_V1_0.h" // STM32G0 env:STM32G0B1RE_manta_btt env:STM32G0B1RE_manta_btt_xfer
#elif MB(BTT_MANTA_M8P_V1_0)
#include "stm32g0/pins_BTT_MANTA_M8P_V1_0.h" // STM32G0 env:STM32G0B1VE_btt env:STM32G0B1VE_btt_xfer
#elif MB(BTT_MANTA_M8P_V1_1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ extern "C" {
#define PIN_SERIAL_TX PA9

// Optional PIN_SERIALn_RX and PIN_SERIALn_TX where 'n' is the U(S)ART number
// Used when user instantiate a hardware Serial using its peripheral name.
// Used when the user instantiates a hardware Serial using its peripheral name.
// Example: HardwareSerial mySerial(USART3);
// will use PIN_SERIAL3_RX and PIN_SERIAL3_TX if defined.
#define PIN_SERIAL1_RX PA10
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ extern "C" {
#define PIN_SERIAL_TX PA9

// Optional PIN_SERIALn_RX and PIN_SERIALn_TX where 'n' is the U(S)ART number
// Used when user instantiate a hardware Serial using its peripheral name.
// Used when the user instantiates a hardware Serial using its peripheral name.
// Example: HardwareSerial mySerial(USART3);
// will use PIN_SERIAL3_RX and PIN_SERIAL3_TX if defined.
#define PIN_SERIAL1_RX PA10
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ extern "C" {
#define PIN_SERIAL_RX PA10
#define PIN_SERIAL_TX PA9

// Used when user instanciate a hardware Serial using its peripheral name.
// Used when the user instantiates a hardware Serial using its peripheral name.
// Example: HardwareSerial mySerial(USART3);
// will use PIN_SERIAL3_RX and PIN_SERIAL3_TX if defined.
#define PIN_SERIAL1_RX PA10
Expand Down Expand Up @@ -148,4 +148,4 @@ extern "C" {
#define SERIAL_PORT_HARDWARE_OPEN Serial2
#endif

#endif /* _VARIANT_ARDUINO_STM32_ */
#endif /* _VARIANT_ARDUINO_STM32_ */
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ extern "C" {
#define PIN_SERIAL_RX PA10
#define PIN_SERIAL_TX PA9

// Used when user instantiate a hardware Serial using its peripheral name.
// Used when the user instantiates a hardware Serial using its peripheral name.
// Example: HardwareSerial mySerial(USART3);
// will use PIN_SERIAL3_RX and PIN_SERIAL3_TX if defined.
#define PIN_SERIAL1_RX PA10
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ extern "C" {
#define PIN_SERIAL_TX PA9

// Optional PIN_SERIALn_RX and PIN_SERIALn_TX where 'n' is the U(S)ART number
// Used when user instantiate a hardware Serial using its peripheral name.
// Used when the user instantiates a hardware Serial using its peripheral name.
// Example: HardwareSerial mySerial(USART3);
// will use PIN_SERIAL3_RX and PIN_SERIAL3_TX if defined.
#define PIN_SERIAL1_RX PA10
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,6 @@
#endif

// UART Definitions
//#define ENABLE_HWSERIAL1 done automatically by the #define SERIAL_UART_INSTANCE below
#define ENABLE_HWSERIAL3

#ifndef SERIAL_UART_INSTANCE
#define SERIAL_UART_INSTANCE 2
#endif
Expand All @@ -174,15 +171,6 @@
#define PIN_SERIAL_TX PA2
#endif

// Optional PIN_SERIALn_RX and PIN_SERIALn_TX where 'n' is the U(S)ART number
// Used when user instantiate a hardware Serial using its peripheral name.
// Example: HardwareSerial mySerial(USART3);
// will use PIN_SERIAL3_RX and PIN_SERIAL3_TX if defined.
#define PIN_SERIAL1_RX PA3
#define PIN_SERIAL1_TX PA2
#define PIN_SERIAL3_RX PD9
#define PIN_SERIAL3_TX PD8

/*----------------------------------------------------------------------------
* Arduino objects - C++ only
*----------------------------------------------------------------------------*/
Expand Down
26 changes: 24 additions & 2 deletions ini/stm32g0.ini
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ upload_protocol = stlink
debug_tool = stlink

#
# BigTreeTech SKR Mini E3 V3.0 / Manta E3 EZ V1.0 / Manta M4P V1.0 / Manta M5P V1.0 (STM32G0B1RET6 ARM Cortex-M0+)
# BigTreeTech SKR Mini E3 V3.0 (STM32G0B1RET6 ARM Cortex-M0+)
#
[env:STM32G0B1RE_btt]
extends = stm32_variant
Expand All @@ -59,7 +59,7 @@ upload_protocol = stlink
debug_tool = stlink

#
# BigTreeTech SKR Mini E3 V3.0 / Manta E3 EZ V1.0 / Manta M4P V1.0 / Manta M5P V1.0 (STM32G0B1RET6 ARM Cortex-M0+)
# BigTreeTech SKR Mini E3 V3.0 (STM32G0B1RET6 ARM Cortex-M0+)
# Custom upload to SD via Marlin with Binary Protocol
# Requires Marlin with BINARY_FILE_TRANSFER already installed on the target board.
# If CUSTOM_FIRMWARE_UPLOAD is also installed, Marlin will reboot the board to install the firmware.
Expand All @@ -72,6 +72,28 @@ extra_scripts = ${env:STM32G0B1RE_btt.extra_scripts}
pre:buildroot/share/scripts/upload.py
upload_protocol = custom

#
# BigTreeTech Manta E3 EZ V1.0 / Manta M4P V1.0 / Manta M5P V1.0 (STM32G0B1RET6 ARM Cortex-M0+)
#
[env:STM32G0B1RE_manta_btt]
extends = env:STM32G0B1RE_btt
build_flags = ${env:STM32G0B1RE_btt.build_flags}
-DPIN_SERIAL3_RX=PD_9 -DPIN_SERIAL3_TX=PD_8 -DENABLE_HWSERIAL3

#
# BigTreeTech Manta E3 EZ V1.0 / Manta M4P V1.0 / Manta M5P V1.0 (STM32G0B1RET6 ARM Cortex-M0+)
# Custom upload to SD via Marlin with Binary Protocol
# Requires Marlin with BINARY_FILE_TRANSFER already installed on the target board.
# If CUSTOM_FIRMWARE_UPLOAD is also installed, Marlin will reboot the board to install the firmware.
# Currently CUSTOM_FIRMWARE_UPLOAD must also be enabled to use 'xfer' build envs.
#
[env:STM32G0B1RE_manta_btt_xfer]
extends = env:STM32G0B1RE_manta_btt
build_flags = ${env:STM32G0B1RE_manta_btt.build_flags} -DXFER_BUILD
extra_scripts = ${env:STM32G0B1RE_manta_btt.extra_scripts}
pre:buildroot/share/scripts/upload.py
upload_protocol = custom

#
# BigTreeTech Manta M8P V1.x (STM32G0B1VET6 ARM Cortex-M0+)
#
Expand Down

0 comments on commit 1068963

Please sign in to comment.