diff --git a/Marlin/src/core/boards.h b/Marlin/src/core/boards.h index 6c51cb01a4..90f38dcbe1 100644 --- a/Marlin/src/core/boards.h +++ b/Marlin/src/core/boards.h @@ -493,6 +493,8 @@ #define BOARD_ZNP_ROBIN_NANO_V1_3 5259 // Elegoo Neptune 2 v1.3 board #define BOARD_MKS_NEPTUNE_X 5260 // Elegoo Neptune X #define BOARD_MKS_NEPTUNE_3 5261 // Elegoo Neptune 3 +#define BOARD_LANGGO407_V1 5262 // Langgo407 BC.DZ.PC000007 (STM32F407VE) +#define BOARD_LANGGO407_V2 5263 // Langgo407 F4Z_MC (STM32F407VE) // // Other ARM Cortex-M4 diff --git a/Marlin/src/pins/pins.h b/Marlin/src/pins/pins.h index a89f1e1d52..ca70703fa5 100644 --- a/Marlin/src/pins/pins.h +++ b/Marlin/src/pins/pins.h @@ -822,6 +822,10 @@ #include "stm32f4/pins_MKS_NEPTUNE_X.h" // STM32F4 env:mks_neptune_x #elif MB(MKS_NEPTUNE_3) #include "stm32f4/pins_MKS_NEPTUNE_3.h" // STM32F4 env:mks_neptune_3 +#elif MB(LANGGO407_V1) + #include "stm32f4/pins_LANGGO407_V1.h" // STM32F4 env:LANGGO407VE +#elif MB(LANGGO407_V2) + #include "stm32f4/pins_LANGGO407_V2.h" // STM32F4 env:LANGGO407VE // // Other ARM Cortex-M4 diff --git a/Marlin/src/pins/sam/pins_RADDS.h b/Marlin/src/pins/sam/pins_RADDS.h index 513bccee5e..04bf74eaf2 100644 --- a/Marlin/src/pins/sam/pins_RADDS.h +++ b/Marlin/src/pins/sam/pins_RADDS.h @@ -292,6 +292,6 @@ #endif // HAS_WIRED_LCD -#ifndef SDSS +#ifndef SD_SS_PIN #define SD_SS_PIN 4 #endif diff --git a/Marlin/src/pins/stm32f1/pins_MD_D301.h b/Marlin/src/pins/stm32f1/pins_MD_D301.h index 629d22c83f..349f5191fd 100644 --- a/Marlin/src/pins/stm32f1/pins_MD_D301.h +++ b/Marlin/src/pins/stm32f1/pins_MD_D301.h @@ -148,7 +148,7 @@ // USB connect control // #define USB_CONNECT_PIN PA15 -#define USB_CONNECT_INVERTING false +#define USB_CONNECT_INVERTING false // // SD Support diff --git a/Marlin/src/pins/stm32f4/pins_LANGGO407_V1.h b/Marlin/src/pins/stm32f4/pins_LANGGO407_V1.h new file mode 100644 index 0000000000..b98dd4c408 --- /dev/null +++ b/Marlin/src/pins/stm32f4/pins_LANGGO407_V1.h @@ -0,0 +1,279 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2025 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 + +/** + * STM32F407VET6 with RAMPS-like shield + * 'Black' STM32F407VET6 board - https://www.stm32duino.com/viewtopic.php?t=485 + * Shield - https://github.com/jmz52/Hardware + */ +#include "env_validate.h" + +#if NOT_TARGET(STM32F4, STM32F4xx) + #error "Oops! Select an STM32F4 board in 'Tools > Board.'" +#elif HOTENDS > 2 || E_STEPPERS > 2 + #error "Black STM32F4VET6 supports up to 2 hotends / E-steppers." +#endif + +#ifndef BOARD_INFO_NAME + #define BOARD_INFO_NAME "BC.DZ.PC000007" + + #if ENABLED(ST32_SHIP) + #define CHIP_NAME "(S)" + #elif ENABLED(USE_GD32) + #define CHIP_NAME "(G)" + #endif + + #if ENABLED(R3_PRO) + #define ROBOT_NAME "-MAX" + #elif ENABLED(R4_PRO) + #define ROBOT_NAME "-PRO" + #else + #define ROBOT_NAME "" + #endif + + #if ENABLED(USE_TI_CHOKE) + #define MATERIALS_NAME "-Ti" + #else + #define MATERIALS_NAME "" + #endif +#endif + +#define DEFAULT_MACHINE_NAME "HP STM32F407VE" + +//#define I2C_EEPROM +#define W25QXX_SPI_EEPROM + +// +// Servos +// +//#define SERVO0_PIN PC6 +//#define SERVO1_PIN PC7 + +#ifdef HALL_PLATE + #define CALIB_PIN PB1 +#else + #define SERVO0_PIN PB1 +#endif + +// +// Z Probe must be this pins +// +#define Z_MIN_PROBE_PIN PB0 + +// +// Limit Switches +// +#define X_STOP_PIN PF12 +//#define X_STOP_PIN PA15 +#define Y_STOP_PIN PF14 +//#define Y_STOP_PIN PD12 +#define Z_STOP_PIN PB1 +//#define Z_STOP_PIN PD15 + +#define Z_MIN_PROBE_PIN PG0 + +#define RB_LED_PIN PB9 // Red-Blue LED + +// +// Steppers +// +#define X_ENABLE_PIN PD3 +#define X_STEP_PIN PD2 +#define X_DIR_PIN PC10 + +#define Y_ENABLE_PIN PC12 +#define Y_STEP_PIN PA10 +#define Y_DIR_PIN PA9 + +#define Z_ENABLE_PIN PC9 +#define Z_STEP_PIN PG8 +#define Z_DIR_PIN PG7 + +#define E0_ENABLE_PIN PD13 +#define E0_STEP_PIN PD12 +#define E0_DIR_PIN PD11 + +#define E1_ENABLE_PIN PG5 +#define E1_STEP_PIN PG4 +#define E1_DIR_PIN PG3 + +#if HAS_TMC_UART + // + // TMC220x stepper drivers + // + #define X_SERIAL_TX_PIN PD6 + #define Y_SERIAL_TX_PIN PC11 + #define Z_SERIAL_TX_PIN PA8 + #define E0_SERIAL_TX_PIN PG2 + #define E1_SERIAL_TX_PIN PG6 + + // Reduce baud rate to improve software serial reliability + #ifndef TMC_BAUD_RATE + #define TMC_BAUD_RATE 19200 + #endif +#endif + +// +// Filament Sensor +// +#ifndef FIL_RUNOUT_PIN + #define FIL_RUNOUT_PIN PG1 +#endif + +// +// Power Supply Control +// +#ifndef PS_ON_PIN + #define PS_ON_PIN PA1 +#endif + +// +// Temperature Sensors +// +#define TEMP_0_PIN PC4 // T0 +#define TEMP_BED_PIN PC5 // TB + +#ifndef TEMP_CHAMBER_PIN + #define TEMP_CHAMBER_PIN PC3 // TC +#endif + +// +// Heaters / Fans +// +#define HEATER_0_PIN PC6 +#define HEATER_BED_PIN PC8 + +#define FAN_PIN PC7 + +#define STEP_TIMER_NUM 5 // Stepper Timer Index +#define TEMP_TIMER_NUM 14 // Temperature Timer Index + +// +// USB connect control +// +#define USB_CONNECT_PIN PA15 +#define USB_CONNECT_INVERTING false + +#define SD_DETECT_PIN PE3 +#define BEEPER_PIN PG11 +#define LED_PIN PG9 + +#define NEOPIXEL_PIN PB9 + +// +// Misc. Functions +// +//#define KILL_PIN PB1 + +// +// LCD / Controller +// +//#define FSMC_GRAPHICAL_TFT // Use offical TFT LCD Controller? + +/** + * Note: Alfawise screens use various TFT controllers. Supported screens + * are based on the ILI9341, ILI9328 and ST7798V. Define init sequences for + * other screens in u8g_dev_tft_320x240_upscale_from_128x64.cpp + * + * If the screen stays white, disable 'LCD_RESET_PIN' to let the bootloader + * init the screen. + * + * Setting an 'LCD_RESET_PIN' may cause a flicker when entering the LCD menu + * because Marlin uses the reset as a failsafe to revive a glitchy LCD. + */ + +#define LCD_BACKLIGHT_PIN PG10 +#define FSMC_CS_PIN PD7 // FSMC_NE1 +#define FSMC_RS_PIN PE2 // A23 Register. Only one address needed +#define TFT_CS_PIN FSMC_CS_PIN +#define TFT_RS_PIN FSMC_RS_PIN +#define TFT_BACKLIGHT_PIN LCD_BACKLIGHT_PIN + +#define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT +#define FSMC_DMA_DEV DMA1 +#define FSMC_DMA_CHANNEL DMA_CH4 // Fixme in F4 + +#if ENABLED(TOUCH_SCREEN) + #define TOUCH_CS_PIN PB6 + #define TOUCH_SCK_PIN PB3 + #define TOUCH_MOSI_PIN PB5 + #define TOUCH_MISO_PIN PB4 + #define TOUCH_INT_PIN PB7 // PenIRQ coming from XPT2046 +#endif + +#define DOGLCD_MOSI -1 // Prevent auto-define by Conditionals_post.h +#define DOGLCD_SCK -1 + +//#define LCD_PINS_RS PE15 +//#define LCD_PINS_ENABLE PD8 +//#define LCD_PINS_D4 PE10 +//#define LCD_PINS_D5 PE12 +//#define LCD_PINS_D6 PD1 +//#define LCD_PINS_D7 PE8 +//#define BTN_ENC PD9 +//#define BTN_EN1 PD4 +//#define BTN_EN2 PD13 + +// +// Onboard SD support +// +#define SDIO_D0_PIN PA6 +#define SDIO_D1_PIN PC9 +#define SDIO_D2_PIN PC10 +#define SDIO_D3_PIN PA4 +#define SDIO_CK_PIN PA5 +#define SDIO_CMD_PIN PA7 + +#ifndef SDCARD_CONNECTION + #define SDCARD_CONNECTION ONBOARD +#endif +#if SD_CONNECTION_IS(ONBOARD) + //#define ONBOARD_SDIO // Use SDIO for onboard SD + #if DISABLED(ONBOARD_SDIO) + #define SOFTWARE_SPI // Use soft SPI for onboard SD + #define SD_SS_PIN SDIO_D3_PIN // A4 + #define SD_SCK_PIN SDIO_CK_PIN // A5 + #define SD_MISO_PIN SDIO_D0_PIN // A6 + #define SD_MOSI_PIN SDIO_CMD_PIN // A7 + #endif +#endif + +// +// WIFI +// + +/** + * ----- + * TX | 1 2 | GND Enable PG1 // Must be high for module to run + * Enable | 3 4 | GPIO2 Reset PG0 // active low, probably OK to leave floating + * Reset | 5 6 | GPIO0 GPIO2 PF15 // must be high (ESP3D software configures this with a pullup so OK to leave as floating) + * 3.3V | 7 8 | RX GPIO0 PF14 // Leave as unused (ESP3D software configures this with a pullup so OK to leave as floating) + * ----- + * W1 + */ +#define ESP_WIFI_MODULE_COM 6 // Must also set either SERIAL_PORT or SERIAL_PORT_2 to this +#define ESP_WIFI_MODULE_BAUDRATE BAUDRATE // Must use same BAUDRATE as SERIAL_PORT & SERIAL_PORT_2 +#define ESP_WIFI_MODULE_RESET_PIN PE5 +#define ESP_WIFI_MODULE_ENABLE_PIN PE4 +#define ESP_WIFI_MODULE_GPIO0_PIN ESP_WIFI_MODULE_ENABLE_PIN +//#define ESP_WIFI_MODULE_GPIO2_PIN PF15 diff --git a/Marlin/src/pins/stm32f4/pins_LANGGO407_V2.h b/Marlin/src/pins/stm32f4/pins_LANGGO407_V2.h new file mode 100644 index 0000000000..75d5a9b65d --- /dev/null +++ b/Marlin/src/pins/stm32f4/pins_LANGGO407_V2.h @@ -0,0 +1,286 @@ +/** + * Marlin 3D Printer Firmware + * Copyright (c) 2025 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 + +/** + * STM32F407VET6 with RAMPS-like shield + * 'Black' STM32F407VET6 board - https://www.stm32duino.com/viewtopic.php?t=485 + * Shield - https://github.com/jmz52/Hardware + */ +#include "env_validate.h" + +#if NOT_TARGET(STM32F4, STM32F4xx) + #error "Oops! Select an STM32F4 board in 'Tools > Board.'" +#elif HOTENDS > 2 || E_STEPPERS > 2 + #error "Black STM32F4VET6 supports up to 2 hotends / E-steppers." +#endif + +#ifndef BOARD_INFO_NAME + #define BOARD_INFO_NAME "F4Z_MC" + + #define CHIP_NAME "" + + #if ENABLED(R3_PRO) + #define ROBOT_NAME "-MAX" + #elif ENABLED(R4_PRO) + #define ROBOT_NAME "-PRO" + #else + #define ROBOT_NAME "" + #endif + + #if ENABLED(USE_TI_CHOKE) + #define MATERIALS_NAME "-Ti" + #define MATERIALS_NAME_TI "-Ti" + #else + #define MATERIALS_NAME "" + #define MATERIALS_NAME_TI "-Ti" + #endif +#endif + +#define DEFAULT_MACHINE_NAME "HP STM32F407VE" + +//#define I2C_EEPROM +#define W25QXX_SPI_EEPROM + +// +// Servos +// +#ifdef BLTOUCH + #define SERVO0_PIN PA4 // After ver3.0 + //#define SERVO0_PIN PC6 + //#define SERVO1_PIN PC7 +#else + //#define CALIB_PIN PD6 // Before ver3.0 + #define CALIB_PIN PA4 // After ver3.0 +#endif + +// +// Z Probe must be this pin +// +//#define Z_MIN_PROBE_PIN PD3 // Before ver3.0 +#define Z_MIN_PROBE_PIN PD6 // After ver3.0 + +// +// Limit Switches +// +#define X_STOP_PIN PF14 +//#define X_STOP_PIN PA15 +#define Y_STOP_PIN PF13 +//#define Y_STOP_PIN PD12 +#define Z_STOP_PIN PG0 +//#define Z_STOP_PIN PD15 +#define E0_STOP_PIN PD3 // after ver3.0 + +#define Z_MIN_PROBE_PIN PF11 + +//#define LED_RED_PIN PG9 +#define RB_LED_PIN PD7 // Red-Blue LED + +#if ENABLED(WS2812_LED) + #define WS2812_LED_PIN PD7 +#endif + +#define CAP_TOUCH_PIN PA0 + +// +// Steppers +// +#define X_ENABLE_PIN PE4 +#define X_STEP_PIN PE3 +#define X_DIR_PIN PE2 + +#define Y_ENABLE_PIN PF0 +#define Y_STEP_PIN PC13 +#define Y_DIR_PIN PE6 + +#define Z_ENABLE_PIN PF4 +#define Z_STEP_PIN PF3 +#define Z_DIR_PIN PF2 + +#define Z2_ENABLE_PIN PC2 +#define Z2_STEP_PIN PC1 +#define Z2_DIR_PIN PC0 + +#define E0_ENABLE_PIN PE0 +#define E0_STEP_PIN PB7 +#define E0_DIR_PIN PB6 + +#define E1_ENABLE_PIN PC5 +#define E1_STEP_PIN PC4 +#define E1_DIR_PIN PA1 + +#if HAS_TMC_UART + // + // TMC220x stepper drivers + // + #define X_SERIAL_TX_PIN PE5 + #define Y_SERIAL_TX_PIN PF1 + #define Z_SERIAL_TX_PIN PF9 // 此处应是PF10,但表与PF9反了 + #define Z2_SERIAL_TX_PIN PC3 + #define E0_SERIAL_TX_PIN PE1 + #define E1_SERIAL_TX_PIN PB0 + + // Reduce baud rate to improve software serial reliability + #ifndef TMC_BAUD_RATE + #define TMC_BAUD_RATE 19200 + #endif +#endif + +// +// Filament Sensor +// +#ifndef FIL_RUNOUT_PIN + #define FIL_RUNOUT_PIN PG10 +#endif + +// +// Power Supply Control +// +#ifndef PS_ON_PIN + #define PS_ON_PIN PG8 +#endif + +// +// Temperature Sensors +// +#define TEMP_0_PIN PF5 // T0 +#define TEMP_1_PIN PB1 // T1 +#define TEMP_BED_PIN PF6 // TB + +#ifndef TEMP_CHAMBER_PIN + //#define TEMP_CHAMBER_PIN PC3 // TC +#endif + +// +// Heaters / Fans +// +#define HEATER_0_PIN PD11 +#define HEATER_1_PIN PC7 +#define HEATER_BED_PIN PD13 + +#define FAN0_PIN PB9 +//#define FAN1_PIN PB8 + +#define STEP_TIMER_NUM 5 // Timer Index for Stepper +#define TEMP_TIMER_NUM 14 // Timer Index for Temperature + +// +// USB connect control +// +#define USB_CONNECT_PIN PG11 +#define USB_CONNECT_INVERTING false + +#define SD_DETECT_PIN PA8 +#define BEEPER_PIN PB12 +#define LED_PIN PB2 + +//#define NEOPIXEL_PIN PD7 + +/** + * Note: Alfawise screens use various TFT controllers. Supported screens + * are based on the ILI9341, ILI9328 and ST7798V. Define init sequences for + * other screens in u8g_dev_tft_320x240_upscale_from_128x64.cpp + * + * If the screen stays white, disable 'LCD_RESET_PIN' to let the bootloader + * init the screen. + * + * Setting an 'LCD_RESET_PIN' may cause a flicker when entering the LCD menu + * because Marlin uses the reset as a failsafe to revive a glitchy LCD. + */ + +#define LCD_BACKLIGHT_PIN PG1 +#define FSMC_CS_PIN PG12 // FSMC_NE1 +#define FSMC_RS_PIN PF12 // A23 Register. Only one address needed +#define TFT_CS_PIN FSMC_CS_PIN +#define TFT_RS_PIN FSMC_RS_PIN +#define TFT_BACKLIGHT_PIN LCD_BACKLIGHT_PIN + +#define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT +#define FSMC_DMA_DEV DMA1 +#define FSMC_DMA_CHANNEL DMA_CH4 // Fixme in F4 + +#if ENABLED(TOUCH_SCREEN) + #define TOUCH_CS_PIN PG0 + #define TOUCH_SCK_PIN PA5 + #define TOUCH_MOSI_PIN PA7 + #define TOUCH_MISO_PIN PA6 + #define TOUCH_INT_PIN PF15 // PenIRQ coming from XPT2046 触发 +#endif + +#define DOGLCD_MOSI -1 // Prevent auto-define by Conditionals_post.h +#define DOGLCD_SCK -1 + +// +// OCP +// +#define MOTORS_OCP_PIN PF7 +#define BED_OCP_PIN PF8 +#define HOTEND_OCP_PIN PF10 // 应该为PF9,但表PF9、PF10的值反了,只能用这个 +#define SHUTDOWN_HOTEND_PIN PD12 +#define SHUTDOWN_BED_PIN PG7 + +// +// Onboard SD support +// +#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 + +#ifndef SDCARD_CONNECTION + #define SDCARD_CONNECTION ONBOARD +#endif + +#if SD_CONNECTION_IS(ONBOARD) + //#define ONBOARD_SDIO // Use SDIO for onboard SD + #if DISABLED(ONBOARD_SDIO) + #define SOFTWARE_SPI // Use soft SPI for onboard SD + #define SD_SS_PIN SDIO_D3_PIN // A4 + #define SD_SCK_PIN SDIO_CK_PIN // A5 + #define SD_MISO_PIN SDIO_D0_PIN // A6 + #define SD_MOSI_PIN SDIO_CMD_PIN // A7 + #endif +#endif + +// +// WIFI +// + +/** + * ----- + * TX | 1 2 | GND Enable PG1 // Must be high for module to run + * Enable | 3 4 | GPIO2 Reset PG0 // active low, probably OK to leave floating + * Reset | 5 6 | GPIO0 GPIO2 PF15 // must be high (ESP3D software configures this with a pullup so OK to leave as floating) + * 3.3V | 7 8 | RX GPIO0 PF14 // Leave as unused (ESP3D software configures this with a pullup so OK to leave as floating) + * ----- + * W1 + */ +#define ESP_WIFI_MODULE_COM 6 // Must also set either SERIAL_PORT or SERIAL_PORT_2 to this +#define ESP_WIFI_MODULE_BAUDRATE BAUDRATE // Must use same BAUDRATE as SERIAL_PORT & SERIAL_PORT_2 +#define ESP_WIFI_MODULE_RESET_PIN PG2 +#define ESP_WIFI_MODULE_ENABLE_PIN PG3 +#define ESP_WIFI_MODULE_GPIO0_PIN PG5 +#define ESP_WIFI_MODULE_GPIO2_PIN PG4 + +//#define SHUTTER_CTRL_PIN PB13 diff --git a/Marlin/src/pins/teensy2/pins_PRINTRBOARD.h b/Marlin/src/pins/teensy2/pins_PRINTRBOARD.h index 653892f2a9..91b48aadba 100644 --- a/Marlin/src/pins/teensy2/pins_PRINTRBOARD.h +++ b/Marlin/src/pins/teensy2/pins_PRINTRBOARD.h @@ -172,6 +172,6 @@ #endif // HAS_WIRED_LCD && IS_NEWPANEL -#ifndef SDSS +#ifndef SD_SS_PIN #define SD_SS_PIN 26 // B6 SDCS #endif diff --git a/Marlin/src/pins/teensy2/pins_PRINTRBOARD_REVF.h b/Marlin/src/pins/teensy2/pins_PRINTRBOARD_REVF.h index 0c4a8028c8..3880431f02 100644 --- a/Marlin/src/pins/teensy2/pins_PRINTRBOARD_REVF.h +++ b/Marlin/src/pins/teensy2/pins_PRINTRBOARD_REVF.h @@ -271,7 +271,7 @@ // Misc. Functions // // PIN FASTIO PIN# ATUSB90 PIN# Teensy2.0++ PIN# Printrboard RevF Conn. -#ifndef SDSS +#ifndef SD_SS_PIN #define SD_SS_PIN 20 // 10 B0 #endif diff --git a/buildroot/share/PlatformIO/boards/marlin_STM32F407VE_LANGGO.json b/buildroot/share/PlatformIO/boards/marlin_STM32F407VE_LANGGO.json new file mode 100644 index 0000000000..d697198d31 --- /dev/null +++ b/buildroot/share/PlatformIO/boards/marlin_STM32F407VE_LANGGO.json @@ -0,0 +1,65 @@ +{ + "build": { + "core": "stm32", + "cpu": "cortex-m4", + "extra_flags": "-DSTM32F407xx", + "f_cpu": "168000000L", + "hwids": [ + [ + "0x1EAF", + "0x0003" + ], + [ + "0x0483", + "0x3748" + ] + ], + "mcu": "stm32f407vet6", + "variant": "MARLIN_F407VE", + "offset": "0x8000" + }, + "debug": { + "jlink_device": "STM32F407VE", + "openocd_target": "stm32f4x", + "svd_path": "STM32F40x.svd", + "tools": { + "stlink": { + "server": { + "arguments": [ + "-f", + "scripts/interface/stlink.cfg", + "-c", + "transport select hla_swd", + "-f", + "scripts/target/stm32f4x.cfg", + "-c", + "reset_config none" + ], + "executable": "bin/openocd", + "package": "tool-openocd" + } + } + } + }, + "frameworks": [ + "arduino", + "stm32cube" + ], + "name": "STM32F407VE (192k RAM. 512k Flash)", + "upload": { + "disable_flushing": false, + "maximum_ram_size": 131072, + "maximum_size": 514288, + "protocol": "jlink", + "protocols": [ + "stlink", + "dfu", + "jlink" + ], + "require_upload_port": true, + "use_1200bps_touch": false, + "wait_for_upload_port": false + }, + "url": "https://www.st.com/en/microcontrollers-microprocessors/stm32f407ve.html", + "vendor": "Generic" +} diff --git a/ini/stm32f4.ini b/ini/stm32f4.ini index 722e73b396..9bca1bf020 100644 --- a/ini/stm32f4.ini +++ b/ini/stm32f4.ini @@ -155,8 +155,8 @@ build_flags = ${stm32_variant.build_flags} extends = stm32_variant board = marlin_opulo_lumen_rev3 build_flags = ${stm32_variant.build_flags} - -DARDUINO_BLACK_F407VE - -DUSBD_USE_CDC_COMPOSITE -DUSE_USB_FS -DHAS_STM32_UID + -DARDUINO_BLACK_F407VE + -DUSBD_USE_CDC_COMPOSITE -DUSE_USB_FS -DHAS_STM32_UID extra_scripts = ${stm32_variant.extra_scripts} # @@ -166,10 +166,28 @@ extra_scripts = ${stm32_variant.extra_scripts} extends = stm32_variant board = marlin_opulo_lumen_rev4 build_flags = ${stm32_variant.build_flags} - -DARDUINO_BLACK_F407VE - -DUSBD_USE_CDC_COMPOSITE -DUSE_USB_FS -DHAS_STM32_UID + -DARDUINO_BLACK_F407VE + -DUSBD_USE_CDC_COMPOSITE -DUSE_USB_FS -DHAS_STM32_UID extra_scripts = ${stm32_variant.extra_scripts} +# +# Langgo407 (STM32F407VE) +# +[env:LANGGO407VE] +extends = stm32_variant +platform = ${common_stm32.platform} +board = marlin_STM32F407VE_LANGGO +board_build.offset = 0x8000 +board_build.offset_address = 0x08008000 +build_flags = ${common_stm32.build_flags} + -DARDUINO_BLACK_F407ZE + -DST32_SHIP + -DUSBCON -DUSBD_USE_CDC -DUSE_USB_HS -DUSE_USB_HS_IN_FS +lib_extra_dirs = Marlin/lib +lib_deps = Marlin/lib/rtt + Marlin/lib/fat_fs + Marlin/lib/STM32_USB_Host_Library + # # Anet ET4-MB_V1.x/ET4P-MB_V1.x (STM32F407VGT6 ARM Cortex-M4) #