Only download & compile required libraries (#18699)
This commit is contained in:
parent
c6233b1ea8
commit
4a55bdb165
@ -176,6 +176,13 @@
|
||||
#define HAS_TMC_SPI 1
|
||||
#endif
|
||||
|
||||
//
|
||||
// TMC26XX Stepper Drivers
|
||||
//
|
||||
#if HAS_DRIVER(TMC26X)
|
||||
#define HAS_TMC26X 1
|
||||
#endif
|
||||
|
||||
//
|
||||
// L64XX Stepper Drivers
|
||||
//
|
||||
|
@ -23,7 +23,10 @@
|
||||
|
||||
#include "xpt2046.h"
|
||||
#include "../../inc/MarlinConfig.h"
|
||||
#include "../../lcd/dogm/ultralcd_DOGM.h" // for LCD_FULL_PIXEL_WIDTH, etc.
|
||||
#if ENABLED(FSMC_GRAPHICAL_TFT)
|
||||
#include "../../lcd/dogm/ultralcd_DOGM.h" // for LCD_FULL_PIXEL_WIDTH, etc.
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Draw and Touch processing
|
||||
|
@ -2205,12 +2205,15 @@ static_assert(hbm[Z_AXIS] >= 0, "HOMING_BUMP_MM.Z must be greater than or equal
|
||||
+ ENABLED(MKS_12864OLED_SSD1306) \
|
||||
+ ENABLED(U8GLIB_SH1106_EINSTART) \
|
||||
+ ENABLED(OVERLORD_OLED) \
|
||||
+ ENABLED(FYSETC_242_OLED_12864) \
|
||||
+ ENABLED(DGUS_LCD_UI_ORIGIN) \
|
||||
+ ENABLED(DGUS_LCD_UI_FYSETC) \
|
||||
+ ENABLED(DGUS_LCD_UI_HIPRECY) \
|
||||
+ ENABLED(MALYAN_LCD) \
|
||||
+ ENABLED(TOUCH_UI_FTDI_EVE) \
|
||||
+ ENABLED(FSMC_GRAPHICAL_TFT)
|
||||
+ ENABLED(FSMC_GRAPHICAL_TFT) \
|
||||
+ ENABLED(TFT_LVGL_UI) \
|
||||
+ ENABLED(SPI_GRAPHICAL_TFT)
|
||||
#error "Please select no more than one LCD controller option."
|
||||
#endif
|
||||
|
||||
|
@ -23,10 +23,6 @@
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#ifndef LCD_CLASS
|
||||
#include <LiquidCrystal.h>
|
||||
#define LCD_CLASS LiquidCrystal
|
||||
#endif
|
||||
extern LCD_CLASS lcd;
|
||||
|
||||
int lcd_glyph_height() { return 1; }
|
||||
|
@ -30,7 +30,7 @@
|
||||
//
|
||||
// TMC26X Driver objects and inits
|
||||
//
|
||||
#if HAS_DRIVER(TMC26X)
|
||||
#if HAS_TMC26X
|
||||
|
||||
#include "TMC26X.h"
|
||||
|
||||
@ -141,4 +141,4 @@ void tmc26x_init_to_defaults() {
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif // TMC26X
|
||||
#endif // HAS_TMC26X
|
||||
|
@ -507,7 +507,7 @@
|
||||
#elif MB(MKS_ROBIN_MINI)
|
||||
#include "stm32f1/pins_MKS_ROBIN_MINI.h" // STM32F1 env:mks_robin_mini
|
||||
#elif MB(MKS_ROBIN_NANO)
|
||||
#include "stm32f1/pins_MKS_ROBIN_NANO.h" // STM32F1 env:mks_robin_nano env:mks_robin_nano35
|
||||
#include "stm32f1/pins_MKS_ROBIN_NANO.h" // STM32F1 env:mks_robin_nano
|
||||
#elif MB(MKS_ROBIN_LITE)
|
||||
#include "stm32f1/pins_MKS_ROBIN_LITE.h" // STM32F1 env:mks_robin_lite
|
||||
#elif MB(BTT_SKR_MINI_V1_1)
|
||||
@ -541,9 +541,9 @@
|
||||
#elif MB(CCROBOT_MEEB_3DP)
|
||||
#include "stm32f1/pins_CCROBOT_MEEB_3DP.h" // STM32F1 env:STM32F103RC_meeb
|
||||
#elif MB(CHITU3D_V5)
|
||||
#include "stm32f1/pins_CHITU3D_V5.h" // STM32F1 env:chitu_f103 env:chitu_v5_gpio_init env:chitu_f103_lvgl
|
||||
#include "stm32f1/pins_CHITU3D_V5.h" // STM32F1 env:chitu_f103 env:chitu_v5_gpio_init
|
||||
#elif MB(CHITU3D_V6)
|
||||
#include "stm32f1/pins_CHITU3D_V6.h" // STM32F1 env:chitu_f103 env:chitu_f103_lvgl
|
||||
#include "stm32f1/pins_CHITU3D_V6.h" // STM32F1 env:chitu_f103
|
||||
#elif MB(CREALITY_V4)
|
||||
#include "stm32f1/pins_CREALITY_V4.h" // STM32F1 env:STM32F103RET6_creality
|
||||
#elif MB(TRIGORILLA_PRO)
|
||||
|
@ -0,0 +1,50 @@
|
||||
/**
|
||||
* Marlin 3D Printer Firmware
|
||||
* Copyright (c) 2020 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 <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* The purpose of this file is just include Marlin Configuration files,
|
||||
* to discover which FEATURES are enabled, without any HAL include.
|
||||
* Used by common-features-dependencies.py
|
||||
*/
|
||||
|
||||
#ifndef __MARLIN_FIRMWARE__
|
||||
#define __MARLIN_FIRMWARE__
|
||||
#endif
|
||||
|
||||
//
|
||||
// Prefix header to acquire configurations
|
||||
//
|
||||
#include <stdint.h>
|
||||
|
||||
#include "../../../../Marlin/src/core/boards.h"
|
||||
#include "../../../../Marlin/src/core/macros.h"
|
||||
#include "../../../../Marlin/Configuration.h"
|
||||
|
||||
#include "../../../../Marlin/Version.h"
|
||||
|
||||
#include "../../../../Marlin/src/inc/Conditionals_LCD.h"
|
||||
|
||||
#include "../../../../Marlin/src/core/drivers.h"
|
||||
#include "../../../../Marlin/Configuration_adv.h"
|
||||
|
||||
#include "../../../../Marlin/src/inc/Conditionals_adv.h"
|
@ -0,0 +1,135 @@
|
||||
#
|
||||
# common-features-dependencies.py
|
||||
# Convenience script to check dependencies and add libs and sources for Marlin Enabled Features
|
||||
#
|
||||
import subprocess
|
||||
import os
|
||||
import re
|
||||
try:
|
||||
import configparser
|
||||
except ImportError:
|
||||
import ConfigParser as configparser
|
||||
from platformio.managers.package import PackageManager
|
||||
|
||||
Import("env")
|
||||
|
||||
FEATURE_DEPENDENCIES = {}
|
||||
|
||||
def load_config():
|
||||
config = configparser.ConfigParser()
|
||||
config.read("platformio.ini")
|
||||
items = config.items('features')
|
||||
for key in items:
|
||||
deps = re.sub(',\\s*', '\n', key[1]).strip().split('\n')
|
||||
if not key[0].upper() in FEATURE_DEPENDENCIES:
|
||||
FEATURE_DEPENDENCIES[key[0].upper()] = {
|
||||
'lib_deps': []
|
||||
}
|
||||
for dep in deps:
|
||||
parts = dep.split('=')
|
||||
name = parts.pop(0)
|
||||
rest = '='.join(parts)
|
||||
if name == 'extra_scripts':
|
||||
FEATURE_DEPENDENCIES[key[0].upper()]['extra_scripts'] = rest
|
||||
elif name == 'src_filter':
|
||||
FEATURE_DEPENDENCIES[key[0].upper()]['src_filter'] = rest
|
||||
else:
|
||||
FEATURE_DEPENDENCIES[key[0].upper()]['lib_deps'] += [dep]
|
||||
|
||||
def install_features_dependencies():
|
||||
load_config()
|
||||
for feature in FEATURE_DEPENDENCIES:
|
||||
if not env.MarlinFeatureIsEnabled(feature):
|
||||
continue
|
||||
|
||||
if 'lib_deps' in FEATURE_DEPENDENCIES[feature]:
|
||||
print("Adding lib_deps for %s... " % feature)
|
||||
|
||||
# deps to add
|
||||
deps_to_add = {}
|
||||
for dep in FEATURE_DEPENDENCIES[feature]['lib_deps']:
|
||||
name, _, _ = PackageManager.parse_pkg_uri(dep)
|
||||
deps_to_add[name] = dep
|
||||
|
||||
# first check if the env already have the dep
|
||||
deps = env.GetProjectOption("lib_deps")
|
||||
for dep in deps:
|
||||
name, _, _ = PackageManager.parse_pkg_uri(dep)
|
||||
if name in deps_to_add:
|
||||
del deps_to_add[name]
|
||||
|
||||
# check if we need ignore any lib
|
||||
lib_ignore = env.GetProjectOption("lib_ignore")
|
||||
for dep in deps:
|
||||
name, _, _ = PackageManager.parse_pkg_uri(dep)
|
||||
if name in deps_to_add:
|
||||
del deps_to_add[name]
|
||||
|
||||
# any left?
|
||||
if len(deps_to_add) <= 0:
|
||||
continue
|
||||
|
||||
# add only the missing deps
|
||||
proj = env.GetProjectConfig()
|
||||
proj.set("env:" + env["PIOENV"], "lib_deps", deps + list(deps_to_add.values()))
|
||||
|
||||
if 'extra_scripts' in FEATURE_DEPENDENCIES[feature]:
|
||||
print("Executing extra_scripts for %s... " % feature)
|
||||
env.SConscript(FEATURE_DEPENDENCIES[feature]['extra_scripts'], exports="env")
|
||||
|
||||
if 'src_filter' in FEATURE_DEPENDENCIES[feature]:
|
||||
print("Adding src_filter for %s... " % feature)
|
||||
proj = env.GetProjectConfig()
|
||||
src_filter = env.GetProjectOption("src_filter")
|
||||
|
||||
# first we need to remove the references to the same folder
|
||||
my_srcs = re.findall( r'[+-](<.*?>)', FEATURE_DEPENDENCIES[feature]['src_filter'])
|
||||
cur_srcs = re.findall( r'[+-](<.*?>)', src_filter[0])
|
||||
for d in my_srcs:
|
||||
if d in cur_srcs:
|
||||
src_filter[0] = re.sub(r'[+-]' + d, '', src_filter[0])
|
||||
|
||||
src_filter[0] = FEATURE_DEPENDENCIES[feature]['src_filter'] + ' ' + src_filter[0]
|
||||
proj.set("env:" + env["PIOENV"], "src_filter", src_filter)
|
||||
env.Replace(SRC_FILTER=src_filter)
|
||||
|
||||
# load marlin features
|
||||
def load_marlin_features():
|
||||
if "MARLIN_FEATURES" in env:
|
||||
return
|
||||
|
||||
# procces defines
|
||||
# print(env.Dump())
|
||||
build_flags = env.get('BUILD_FLAGS')
|
||||
build_flags = env.ParseFlagsExtended(build_flags)
|
||||
cmd = []
|
||||
# build flags from board.json
|
||||
# if 'BOARD' in env:
|
||||
# cmd += [env.BoardConfig().get("build.extra_flags")]
|
||||
for s in build_flags['CPPDEFINES']:
|
||||
if isinstance(s, tuple):
|
||||
cmd += ['-D' + s[0] + '=' + str(s[1])]
|
||||
else:
|
||||
cmd += ['-D' + s]
|
||||
# cmd += ['-w -dM -E -x c++ Marlin/src/inc/MarlinConfigPre.h']
|
||||
cmd += ['-w -dM -E -x c++ buildroot/share/PlatformIO/scripts/common-features-dependencies.h']
|
||||
cmd = [env.get('CXX')] + cmd
|
||||
cmd = ' '.join(cmd)
|
||||
print(cmd)
|
||||
define_list = subprocess.check_output(cmd, shell=True).splitlines()
|
||||
marlin_features = {}
|
||||
for define in define_list:
|
||||
feature = define[8:].strip().decode().split(' ')
|
||||
feature, definition = feature[0], ' '.join(feature[1:])
|
||||
marlin_features[feature] = definition
|
||||
env["MARLIN_FEATURES"] = marlin_features
|
||||
|
||||
def MarlinFeatureIsEnabled(env, feature):
|
||||
load_marlin_features()
|
||||
return feature in env["MARLIN_FEATURES"]
|
||||
|
||||
# add a method for others scripts to check if a feature is enabled
|
||||
env.AddMethod(MarlinFeatureIsEnabled)
|
||||
|
||||
# install all dependencies for features enabled in Configuration.h
|
||||
install_features_dependencies()
|
154
platformio.ini
154
platformio.ini
@ -25,25 +25,37 @@ include_dir = Marlin
|
||||
# The 'common' values are used for most Marlin builds
|
||||
#
|
||||
[common]
|
||||
default_src_filter = +<src/*> -<src/config> -<src/HAL> +<src/HAL/shared>
|
||||
extra_scripts = pre:buildroot/share/PlatformIO/scripts/common-cxxflags.py
|
||||
default_src_filter = +<src/*> -<src/config> -<src/HAL> +<src/HAL/shared> -<src/lcd/extui/lib/mks_ui>
|
||||
extra_scripts =
|
||||
pre:buildroot/share/PlatformIO/scripts/common-features-dependencies.py
|
||||
pre:buildroot/share/PlatformIO/scripts/common-cxxflags.py
|
||||
build_flags = -fmax-errors=5 -g -D__MARLIN_FIRMWARE__ -fmerge-all-constants
|
||||
lib_deps =
|
||||
LiquidCrystal@1.5.0
|
||||
TMCStepper@~0.7.1
|
||||
Adafruit MAX31865 library@~1.1.0
|
||||
Adafruit NeoPixel@1.5.0
|
||||
U8glib-HAL@0.4.1
|
||||
Arduino-L6470@0.8.0
|
||||
SlowSoftI2CMaster
|
||||
LiquidTWI2@1.2.7
|
||||
SailfishLCD=https://github.com/mikeshub/SailfishLCD/archive/master.zip
|
||||
|
||||
#
|
||||
# Feature Dependencies
|
||||
#
|
||||
[features]
|
||||
TFT_LVGL_UI = MKS-LittlevGL=https://github.com/makerbase-mks/MKS-LittlevGL/archive/master.zip
|
||||
src_filter=+<src/lcd/extui/lib/mks_ui>
|
||||
HAS_TRINAMIC_CONFIG = TMCStepper@~0.7.1
|
||||
SR_LCD_2W_NL = SailfishLCD=https://github.com/mikeshub/SailfishLCD/archive/master.zip
|
||||
SR_LCD_3W_NL = SailfishLCD=https://github.com/mikeshub/SailfishLCD/archive/master.zip
|
||||
DIGIPOT_MCP4018 = SlowSoftI2CMaster
|
||||
DIGIPOT_MCP4451 = SlowSoftI2CMaster
|
||||
HAS_TMC26X = TMC26XStepper=https://github.com/trinamic/TMC26XStepper/archive/master.zip
|
||||
HAS_L64XX = Arduino-L6470@0.8.0
|
||||
NEOPIXEL_LED = Adafruit NeoPixel@1.5.0
|
||||
MAX6675_IS_MAX31865 = Adafruit MAX31865 library@~1.1.0
|
||||
HAS_GRAPHICAL_LCD = U8glib-HAL@0.4.1
|
||||
HAS_CHARACTER_LCD = LiquidCrystal@1.5.0, LiquidTWI2@1.2.7
|
||||
|
||||
#
|
||||
# Default values apply to all 'env:' prefixed environments
|
||||
#
|
||||
[env]
|
||||
framework = arduino
|
||||
extra_scripts = ${common.extra_scripts}
|
||||
build_flags = ${common.build_flags}
|
||||
lib_deps = ${common.lib_deps}
|
||||
monitor_speed = 250000
|
||||
@ -69,8 +81,6 @@ monitor_speed = 250000
|
||||
#
|
||||
[common_avr8]
|
||||
board_build.f_cpu = 16000000L
|
||||
lib_deps = ${common.lib_deps}
|
||||
TMC26XStepper=https://github.com/trinamic/TMC26XStepper/archive/master.zip
|
||||
src_filter = ${common.default_src_filter} +<src/HAL/AVR>
|
||||
|
||||
#
|
||||
@ -157,7 +167,6 @@ board_upload.maximum_size = 126976
|
||||
platform = atmelavr
|
||||
extends = common_avr8
|
||||
board = sanguino_atmega1284p
|
||||
lib_ignore = TMCStepper
|
||||
upload_speed = 57600
|
||||
board_upload.maximum_size = 126976
|
||||
|
||||
@ -168,7 +177,6 @@ board_upload.maximum_size = 126976
|
||||
platform = atmelavr
|
||||
extends = common_avr8
|
||||
board = sanguino_atmega1284p
|
||||
lib_ignore = TMCStepper
|
||||
upload_speed = 115200
|
||||
|
||||
#
|
||||
@ -191,7 +199,6 @@ build_unflags = -g -ggdb
|
||||
platform = teensy
|
||||
extends = common_avr8
|
||||
board = at90usb1286
|
||||
lib_ignore = TMCStepper
|
||||
|
||||
#
|
||||
# AT90USB1286 boards using DFU bootloader
|
||||
@ -243,7 +250,8 @@ board = due
|
||||
src_filter = ${common.default_src_filter} +<src/HAL/DUE>
|
||||
build_flags = ${common.build_flags}
|
||||
-DARDUINO_SAM_ARCHIM -DARDUINO_ARCH_SAM -D__SAM3X8E__ -DUSBCON
|
||||
extra_scripts = Marlin/src/HAL/DUE/upload_extra_script.py
|
||||
extra_scripts = ${common.extra_scripts}
|
||||
Marlin/src/HAL/DUE/upload_extra_script.py
|
||||
|
||||
[env:DUE_archim]
|
||||
platform = ${common_DUE_archim.platform}
|
||||
@ -268,7 +276,6 @@ build_flags = ${common_DUE_archim.build_flags} -funwind-tables -mpoke-function
|
||||
platform = atmelsam
|
||||
board = adafruit_grandcentral_m4
|
||||
build_flags = ${common.build_flags} -std=gnu++17
|
||||
extra_scripts = ${common.extra_scripts}
|
||||
build_unflags = -std=gnu++11
|
||||
src_filter = ${common.default_src_filter} +<src/HAL/SAMD51>
|
||||
lib_deps = ${common.lib_deps}
|
||||
@ -290,7 +297,8 @@ platform = https://github.com/p3p/pio-nxplpc-arduino-lpc176x/archive/0.
|
||||
board = nxp_lpc1768
|
||||
lib_ldf_mode = off
|
||||
lib_compat_mode = strict
|
||||
extra_scripts = Marlin/src/HAL/LPC1768/upload_extra_script.py
|
||||
extra_scripts = ${common.extra_scripts}
|
||||
Marlin/src/HAL/LPC1768/upload_extra_script.py
|
||||
src_filter = ${common.default_src_filter} +<src/HAL/LPC1768>
|
||||
lib_deps = Servo
|
||||
LiquidCrystal@1.0.0
|
||||
@ -298,7 +306,8 @@ lib_deps = Servo
|
||||
TMCStepper@~0.7.1
|
||||
Adafruit NeoPixel=https://github.com/p3p/Adafruit_NeoPixel/archive/1.5.0.zip
|
||||
SailfishLCD=https://github.com/mikeshub/SailfishLCD/archive/master.zip
|
||||
build_flags = -DU8G_HAL_LINKS -IMarlin/src/HAL/LPC1768/include -IMarlin/src/HAL/LPC1768/u8g ${common.build_flags}
|
||||
build_flags = ${common.build_flags} -DU8G_HAL_LINKS -IMarlin/src/HAL/LPC1768/include -IMarlin/src/HAL/LPC1768/u8g
|
||||
lib_ignore = LiquidTWI2
|
||||
# debug options for backtrace
|
||||
#-funwind-tables
|
||||
#-mpoke-function-name
|
||||
@ -328,7 +337,6 @@ board = nxp_lpc1769
|
||||
[common_stm32]
|
||||
platform = ststm32@~6.1.0
|
||||
platform_packages = framework-arduinoststm32@>=4.10700,<4.10800
|
||||
lib_deps = ${common.lib_deps}
|
||||
lib_ignore = SoftwareSerial
|
||||
build_flags = ${common.build_flags}
|
||||
-IMarlin/src/HAL/STM32 -std=gnu++14
|
||||
@ -348,7 +356,6 @@ build_flags = !python Marlin/src/HAL/STM32F1/build_flags.py
|
||||
build_unflags = -std=gnu++11
|
||||
src_filter = ${common.default_src_filter} +<src/HAL/STM32F1>
|
||||
lib_ignore =
|
||||
Adafruit NeoPixel
|
||||
SPI
|
||||
lib_deps = ${common.lib_deps}
|
||||
SoftwareSerialM
|
||||
@ -379,7 +386,8 @@ build_flags = ${common_stm32f1.build_flags}
|
||||
-DUSE_USB_COMPOSITE
|
||||
-DVECT_TAB_OFFSET=0x2000
|
||||
-DGENERIC_BOOTLOADER
|
||||
extra_scripts = pre:buildroot/share/PlatformIO/scripts/STM32F1_create_variant.py
|
||||
extra_scripts = ${common.extra_scripts}
|
||||
pre:buildroot/share/PlatformIO/scripts/STM32F1_create_variant.py
|
||||
buildroot/share/PlatformIO/scripts/STM32F103RC_MEEB_3DP.py
|
||||
lib_deps =
|
||||
TMCStepper@~0.7.1
|
||||
@ -402,7 +410,8 @@ upload_protocol = dfu
|
||||
[env:STM32F103RC_fysetc]
|
||||
platform = ${common_stm32f1.platform}
|
||||
extends = env:STM32F103RC
|
||||
extra_scripts = buildroot/share/PlatformIO/scripts/STM32F103RC_fysetc.py
|
||||
extra_scripts = ${common.extra_scripts}
|
||||
buildroot/share/PlatformIO/scripts/STM32F103RC_fysetc.py
|
||||
build_flags = ${common_stm32f1.build_flags} -DDEBUG_LEVEL=0
|
||||
lib_ldf_mode = chain
|
||||
debug_tool = stlink
|
||||
@ -420,7 +429,8 @@ upload_protocol = serial
|
||||
[env:STM32F103RC_btt]
|
||||
platform = ${common_stm32f1.platform}
|
||||
extends = env:STM32F103RC
|
||||
extra_scripts = buildroot/share/PlatformIO/scripts/STM32F103RC_SKR_MINI.py
|
||||
extra_scripts = ${common.extra_scripts}
|
||||
buildroot/share/PlatformIO/scripts/STM32F103RC_SKR_MINI.py
|
||||
build_flags = ${common_stm32f1.build_flags}
|
||||
-DDEBUG_LEVEL=0 -DSS_TIMER=4
|
||||
monitor_speed = 115200
|
||||
@ -462,7 +472,8 @@ monitor_speed = 115200
|
||||
[env:STM32F103RE_btt]
|
||||
platform = ${common_stm32f1.platform}
|
||||
extends = env:STM32F103RE
|
||||
extra_scripts = buildroot/share/PlatformIO/scripts/STM32F103RE_SKR_E3_DIP.py
|
||||
extra_scripts = ${common.extra_scripts}
|
||||
buildroot/share/PlatformIO/scripts/STM32F103RE_SKR_E3_DIP.py
|
||||
build_flags = ${common_stm32f1.build_flags} -DDEBUG_LEVEL=0 -DSS_TIMER=4
|
||||
debug_tool = stlink
|
||||
upload_protocol = stlink
|
||||
@ -526,7 +537,8 @@ upload_protocol = serial
|
||||
platform = ${common_stm32f1.platform}
|
||||
extends = common_stm32f1
|
||||
board = genericSTM32F103VE
|
||||
extra_scripts = buildroot/share/PlatformIO/scripts/STM32F103VE_longer.py
|
||||
extra_scripts = ${common.extra_scripts}
|
||||
buildroot/share/PlatformIO/scripts/STM32F103VE_longer.py
|
||||
build_flags = ${common_stm32f1.build_flags}
|
||||
-DMCU_STM32F103VE -DSTM32F1xx -USERIAL_USB -DU20 -DTS_V12
|
||||
build_unflags = ${common_stm32f1.build_unflags}
|
||||
@ -541,7 +553,8 @@ lib_ignore = ${common_stm32f1.lib_ignore}
|
||||
platform = ${common_stm32f1.platform}
|
||||
extends = common_stm32f1
|
||||
board = genericSTM32F103VE
|
||||
extra_scripts = buildroot/share/PlatformIO/scripts/mks_robin_mini.py
|
||||
extra_scripts = ${common.extra_scripts}
|
||||
buildroot/share/PlatformIO/scripts/mks_robin_mini.py
|
||||
build_flags = ${common_stm32f1.build_flags}
|
||||
-DMCU_STM32F103VE
|
||||
|
||||
@ -553,20 +566,11 @@ platform = ${common_stm32f1.platform}
|
||||
extends = common_stm32f1
|
||||
board = genericSTM32F103VE
|
||||
platform_packages = tool-stm32duino
|
||||
extra_scripts = buildroot/share/PlatformIO/scripts/mks_robin_nano.py
|
||||
extra_scripts = ${common.extra_scripts}
|
||||
buildroot/share/PlatformIO/scripts/mks_robin_nano.py
|
||||
build_flags = ${common_stm32f1.build_flags}
|
||||
-DMCU_STM32F103VE -DSS_TIMER=4
|
||||
|
||||
#
|
||||
# MKS Robin Nano (STM32F103VET6) - MKS UI (LVGL)
|
||||
#
|
||||
[env:mks_robin_nano35]
|
||||
platform = ${common_stm32f1.platform}
|
||||
extends = env:mks_robin_nano
|
||||
extra_scripts = buildroot/share/PlatformIO/scripts/mks_robin_nano35.py
|
||||
lib_deps = ${common_stm32f1.lib_deps}
|
||||
MKS-LittlevGL=https://github.com/makerbase-mks/MKS-LittlevGL/archive/master.zip
|
||||
|
||||
#
|
||||
# MKS Robin (STM32F103ZET6)
|
||||
#
|
||||
@ -574,7 +578,8 @@ lib_deps = ${common_stm32f1.lib_deps}
|
||||
platform = ${common_stm32f1.platform}
|
||||
extends = common_stm32f1
|
||||
board = genericSTM32F103ZE
|
||||
extra_scripts = buildroot/share/PlatformIO/scripts/mks_robin.py
|
||||
extra_scripts = ${common.extra_scripts}
|
||||
buildroot/share/PlatformIO/scripts/mks_robin.py
|
||||
build_flags = ${common_stm32f1.build_flags}
|
||||
-DSS_TIMER=4 -DSTM32_XL_DENSITY
|
||||
|
||||
@ -584,7 +589,8 @@ build_flags = ${common_stm32f1.build_flags}
|
||||
[env:mks_robin_pro]
|
||||
platform = ${common_stm32f1.platform}
|
||||
extends = env:mks_robin
|
||||
extra_scripts = buildroot/share/PlatformIO/scripts/mks_robin_pro.py
|
||||
extra_scripts = ${common.extra_scripts}
|
||||
buildroot/share/PlatformIO/scripts/mks_robin_pro.py
|
||||
|
||||
|
||||
#
|
||||
@ -603,7 +609,8 @@ platform = ${common_stm32f1.platform}
|
||||
extends = common_stm32f1
|
||||
board = genericSTM32F103RC
|
||||
platform_packages = tool-stm32duino
|
||||
extra_scripts = buildroot/share/PlatformIO/scripts/mks_robin_e3.py
|
||||
extra_scripts = ${common.extra_scripts}
|
||||
buildroot/share/PlatformIO/scripts/mks_robin_e3.py
|
||||
build_flags = ${common_stm32f1.build_flags}
|
||||
-DDEBUG_LEVEL=0 -DSS_TIMER=4
|
||||
|
||||
@ -614,7 +621,8 @@ build_flags = ${common_stm32f1.build_flags}
|
||||
platform = ${common_stm32f1.platform}
|
||||
extends = common_stm32f1
|
||||
board = genericSTM32F103RC
|
||||
extra_scripts = buildroot/share/PlatformIO/scripts/mks_robin_lite.py
|
||||
extra_scripts = ${common.extra_scripts}
|
||||
buildroot/share/PlatformIO/scripts/mks_robin_lite.py
|
||||
|
||||
|
||||
#
|
||||
@ -624,7 +632,8 @@ extra_scripts = buildroot/share/PlatformIO/scripts/mks_robin_lite.py
|
||||
platform = ${common_stm32f1.platform}
|
||||
extends = common_stm32f1
|
||||
board = genericSTM32F103RC
|
||||
extra_scripts = buildroot/share/PlatformIO/scripts/mks_robin_lite3.py
|
||||
extra_scripts = ${common.extra_scripts}
|
||||
buildroot/share/PlatformIO/scripts/mks_robin_lite3.py
|
||||
|
||||
#
|
||||
# JGAurora A5S A1 (STM32F103ZET6)
|
||||
@ -633,7 +642,8 @@ extra_scripts = buildroot/share/PlatformIO/scripts/mks_robin_lite3.py
|
||||
platform = ${common_stm32f1.platform}
|
||||
extends = common_stm32f1
|
||||
board = genericSTM32F103ZE
|
||||
extra_scripts = buildroot/share/PlatformIO/scripts/jgaurora_a5s_a1_with_bootloader.py
|
||||
extra_scripts = ${common.extra_scripts}
|
||||
buildroot/share/PlatformIO/scripts/jgaurora_a5s_a1_with_bootloader.py
|
||||
build_flags = ${common_stm32f1.build_flags}
|
||||
-DSTM32F1xx -DSTM32_XL_DENSITY
|
||||
|
||||
@ -648,7 +658,7 @@ build_flags = ${common_stm32f1.build_flags}
|
||||
-DMCU_STM32F103CB -D__STM32F1__=1 -std=c++1y -DSERIAL_USB -ffunction-sections -fdata-sections
|
||||
-Wl,--gc-sections -DDEBUG_LEVEL=0 -D__MARLIN_FIRMWARE__
|
||||
lib_ignore = ${common_stm32f1.lib_ignore}
|
||||
LiquidCrystal, LiquidTWI2, TMCStepper, U8glib-HAL, SoftwareSerialM
|
||||
SoftwareSerialM
|
||||
|
||||
#
|
||||
# Malyan M200 v2 (STM32F070RB)
|
||||
@ -660,7 +670,7 @@ board = malyanM200v2
|
||||
build_flags = ${common_stm32.build_flags} -DSTM32F0xx -DUSB_PRODUCT=\"STM32F070RB\" -DHAL_PCD_MODULE_ENABLED
|
||||
-O2 -ffreestanding -fsigned-char -fno-move-loop-invariants -fno-strict-aliasing -std=gnu11 -std=gnu++11
|
||||
-DCUSTOM_STARTUP_FILE
|
||||
lib_ignore = LiquidCrystal, LiquidTWI2, Adafruit NeoPixel, TMCStepper, U8glib-HAL, SoftwareSerial
|
||||
lib_ignore = SoftwareSerial
|
||||
|
||||
#
|
||||
# Malyan M300 (STM32F070CB)
|
||||
@ -672,7 +682,6 @@ build_flags = ${common.build_flags}
|
||||
-DUSBCON -DUSBD_VID=0x0483 "-DUSB_MANUFACTURER=\"Unknown\"" "-DUSB_PRODUCT=\"MALYAN_M300\""
|
||||
-DHAL_PCD_MODULE_ENABLED -DUSBD_USE_CDC -DDISABLE_GENERIC_SERIALUSB -DHAL_UART_MODULE_ENABLED
|
||||
src_filter = ${common.default_src_filter} +<src/HAL/STM32>
|
||||
lib_ignore = LiquidCrystal, LiquidTWI2, Adafruit NeoPixel, TMCStepper, U8glib-HAL
|
||||
|
||||
#
|
||||
# Chitu boards like Tronxy X5s (STM32F103ZET6)
|
||||
@ -681,7 +690,8 @@ lib_ignore = LiquidCrystal, LiquidTWI2, Adafruit NeoPixel, TMCStepper, U8glib-H
|
||||
platform = ${common_stm32f1.platform}
|
||||
extends = common_stm32f1
|
||||
board = CHITU_F103
|
||||
extra_scripts = pre:buildroot/share/PlatformIO/scripts/STM32F1_create_variant.py
|
||||
extra_scripts = pre:buildroot/share/PlatformIO/scripts/common-features-dependencies.py
|
||||
pre:buildroot/share/PlatformIO/scripts/STM32F1_create_variant.py
|
||||
buildroot/share/PlatformIO/scripts/chitu_crypt.py
|
||||
build_flags = ${common_stm32f1.build_flags}
|
||||
-DSTM32F1xx -DSTM32_XL_DENSITY
|
||||
@ -697,17 +707,6 @@ platform = ${common_stm32f1.platform}
|
||||
extends = env:chitu_f103
|
||||
build_flags = ${env:chitu_f103.build_flags} -DCHITU_V5_Z_MIN_BUGFIX
|
||||
|
||||
#
|
||||
# Chitu boards like Tronxy X5SA (STM32F103ZET6) using TFT LVGL UI
|
||||
#
|
||||
[env:chitu_f103_lvgl]
|
||||
platform = ${common_stm32f1.platform}
|
||||
extends = env:chitu_f103
|
||||
src_filter = ${common.default_src_filter} +<src/HAL/STM32F1>
|
||||
lib_deps = ${common.lib_deps}
|
||||
SoftwareSerialM
|
||||
MKS-LittlevGL=https://github.com/makerbase-mks/MKS-LittlevGL/archive/master.zip
|
||||
|
||||
#
|
||||
# Creality (STM32F103RET6)
|
||||
#
|
||||
@ -717,9 +716,9 @@ extends = common_stm32f1
|
||||
board = genericSTM32F103RC
|
||||
build_flags = !python Marlin/src/HAL/STM32F1/build_flags.py
|
||||
${common.build_flags} -std=gnu++14 -DSTM32_XL_DENSITY -DTEMP_TIMER_CHAN=4
|
||||
extra_scripts = buildroot/share/PlatformIO/scripts/creality.py
|
||||
extra_scripts = ${common.extra_scripts}
|
||||
buildroot/share/PlatformIO/scripts/creality.py
|
||||
lib_ignore = ${common_stm32f1.lib_ignore}
|
||||
LiquidCrystal, LiquidTWI2, U8glib-HAL, Adafruit_MAX31865, Arduino-L6470, SailfishLCD, SlowSoftI2CMaster
|
||||
debug_tool = jlink
|
||||
upload_protocol = jlink
|
||||
monitor_speed = 115200
|
||||
@ -736,9 +735,10 @@ build_flags = ${common_stm32.build_flags}
|
||||
-DTARGET_STM32F4 -DARDUINO_STEVAL -DSTM32F401xE
|
||||
-DUSB_PRODUCT=\"STEVAL_F401VE\"
|
||||
-DDISABLE_GENERIC_SERIALUSB -DUSBD_USE_CDC_COMPOSITE -DUSE_USB_FS
|
||||
extra_scripts = pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
|
||||
extra_scripts = ${common.extra_scripts}
|
||||
pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
|
||||
buildroot/share/PlatformIO/scripts/STEVAL__F401XX.py
|
||||
lib_ignore = Adafruit NeoPixel, TMCStepper, SailfishLCD, SlowSoftI2CMaster, SoftwareSerial
|
||||
lib_ignore = SoftwareSerial
|
||||
|
||||
#
|
||||
# FLYF407ZG
|
||||
@ -750,7 +750,8 @@ board = FLYF407ZG
|
||||
build_flags = ${common_stm32.build_flags}
|
||||
-DSTM32F4 -DUSB_PRODUCT=\"STM32F407ZG\"
|
||||
-DTARGET_STM32F4 -DVECT_TAB_OFFSET=0x8000
|
||||
extra_scripts = pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
|
||||
extra_scripts = ${common.extra_scripts}
|
||||
pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
|
||||
|
||||
#
|
||||
# FYSETC S6 (STM32F446VET6 ARM Cortex-M4)
|
||||
@ -764,7 +765,8 @@ board = fysetc_s6
|
||||
build_flags = ${common_stm32.build_flags}
|
||||
-DTARGET_STM32F4 -DVECT_TAB_OFFSET=0x10000
|
||||
-DHAL_PCD_MODULE_ENABLED '-DUSB_PRODUCT="FYSETC_S6"'
|
||||
extra_scripts = pre:buildroot/share/PlatformIO/scripts/fysetc_STM32S6.py
|
||||
extra_scripts = ${common.extra_scripts}
|
||||
pre:buildroot/share/PlatformIO/scripts/fysetc_STM32S6.py
|
||||
debug_tool = stlink
|
||||
upload_protocol = dfu
|
||||
upload_command = dfu-util -a 0 -s 0x08010000:leave -D "$SOURCE"
|
||||
@ -782,8 +784,9 @@ build_flags = ${common_stm32.build_flags}
|
||||
-DTARGET_STM32F4 -DARDUINO_BLACK_F407VE
|
||||
-DUSB_PRODUCT=\"BLACK_F407VE\"
|
||||
-DUSBD_USE_CDC_COMPOSITE -DUSE_USB_FS
|
||||
extra_scripts = pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
|
||||
lib_ignore = Adafruit NeoPixel, TMCStepper, SailfishLCD, SlowSoftI2CMaster, SoftwareSerial
|
||||
extra_scripts = ${common.extra_scripts}
|
||||
pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
|
||||
lib_ignore = SoftwareSerial
|
||||
|
||||
#
|
||||
# BigTreeTech SKR Pro (STM32F407ZGT6 ARM Cortex-M4)
|
||||
@ -795,7 +798,8 @@ board = BigTree_SKR_Pro
|
||||
build_flags = ${common_stm32.build_flags}
|
||||
-DUSB_PRODUCT=\"STM32F407ZG\"
|
||||
-DTARGET_STM32F4 -DSTM32F407_5ZX -DVECT_TAB_OFFSET=0x8000
|
||||
extra_scripts = pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
|
||||
extra_scripts = ${common.extra_scripts}
|
||||
pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
|
||||
#upload_protocol = stlink
|
||||
#upload_command = "$PROJECT_PACKAGES_DIR/tool-stm32duino/stlink/ST-LINK_CLI.exe" -c SWD -P "$BUILD_DIR/firmware.bin" 0x8008000 -Rst -Run
|
||||
debug_tool = stlink
|
||||
@ -808,7 +812,8 @@ debug_init_break =
|
||||
platform = ststm32@>=5.7.0,<6.2.0
|
||||
extends = common_stm32
|
||||
board = BigTree_GTR_v1
|
||||
extra_scripts = pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
|
||||
extra_scripts = ${common.extra_scripts}
|
||||
pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
|
||||
build_flags = ${common_stm32.build_flags}
|
||||
-DUSB_PRODUCT=\"STM32F407IG\"
|
||||
-DTARGET_STM32F4 -DSTM32F407IX -DVECT_TAB_OFFSET=0x8000
|
||||
@ -827,8 +832,8 @@ build_flags = ${common_stm32.build_flags}
|
||||
-DHAVE_HWSERIAL3
|
||||
-DPIN_SERIAL2_RX=PD_6
|
||||
-DPIN_SERIAL2_TX=PD_5
|
||||
extra_scripts = pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
|
||||
lib_ignore = Adafruit NeoPixel, SailfishLCD, SlowSoftI2CMaster, SoftwareSerial
|
||||
extra_scripts = ${common.extra_scripts}
|
||||
pre:buildroot/share/PlatformIO/scripts/generic_create_variant.py
|
||||
|
||||
#
|
||||
# Lerdge base
|
||||
@ -838,7 +843,8 @@ platform = ${common_stm32.platform}
|
||||
extends = common_stm32
|
||||
board = LERDGE
|
||||
board_build.offset = 0x10000
|
||||
extra_scripts = pre:buildroot/share/PlatformIO/scripts/copy_marlin_variant_to_framework.py
|
||||
extra_scripts = ${common.extra_scripts}
|
||||
pre:buildroot/share/PlatformIO/scripts/copy_marlin_variant_to_framework.py
|
||||
buildroot/share/PlatformIO/scripts/stm32_bootloader.py
|
||||
buildroot/share/PlatformIO/scripts/lerdge.py
|
||||
build_flags = ${common_stm32.build_flags}
|
||||
@ -919,7 +925,6 @@ platform = teensy
|
||||
board = teensy31
|
||||
lib_deps = ${common.lib_deps}
|
||||
TMC26XStepper=https://github.com/trinamic/TMC26XStepper/archive/master.zip
|
||||
lib_ignore = Adafruit NeoPixel
|
||||
src_filter = ${common.default_src_filter} +<src/HAL/TEENSY31_32>
|
||||
|
||||
#
|
||||
@ -930,7 +935,6 @@ platform = teensy
|
||||
board = teensy35
|
||||
lib_deps = ${common.lib_deps}
|
||||
TMC26XStepper=https://github.com/trinamic/TMC26XStepper/archive/master.zip
|
||||
lib_ignore = Adafruit NeoPixel
|
||||
src_filter = ${common.default_src_filter} +<src/HAL/TEENSY35_36>
|
||||
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user