mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2025-07-12 17:27:49 -06:00
BigTree SKR Pro V1.1 board support (#14523)
This commit is contained in:
parent
3a75342508
commit
439e28783b
13 changed files with 2109 additions and 1 deletions
29
buildroot/share/PlatformIO/scripts/generic_create_variant.py
Normal file
29
buildroot/share/PlatformIO/scripts/generic_create_variant.py
Normal file
|
@ -0,0 +1,29 @@
|
|||
import os,shutil
|
||||
from SCons.Script import DefaultEnvironment
|
||||
from platformio import util
|
||||
|
||||
env = DefaultEnvironment()
|
||||
platform = env.PioPlatform()
|
||||
board = env.BoardConfig()
|
||||
|
||||
FRAMEWORK_DIR = platform.get_package_dir("framework-arduinoststm32")
|
||||
CMSIS_DIR = os.path.join(FRAMEWORK_DIR, "CMSIS", "CMSIS")
|
||||
assert os.path.isdir(FRAMEWORK_DIR)
|
||||
assert os.path.isdir(CMSIS_DIR)
|
||||
assert os.path.isdir("buildroot/share/PlatformIO/variants")
|
||||
|
||||
mcu_type = board.get("build.mcu")[:-2]
|
||||
variant = board.get("build.variant")
|
||||
series = mcu_type[:7].upper() + "xx"
|
||||
variant_dir = os.path.join(FRAMEWORK_DIR, "variants", variant)
|
||||
|
||||
source_dir = os.path.join("buildroot/share/PlatformIO/variants", variant)
|
||||
assert os.path.isdir(source_dir)
|
||||
|
||||
if not os.path.isdir(variant_dir):
|
||||
os.mkdir(variant_dir)
|
||||
|
||||
for file_name in os.listdir(source_dir):
|
||||
full_file_name = os.path.join(source_dir, file_name)
|
||||
if os.path.isfile(full_file_name):
|
||||
shutil.copy(full_file_name, variant_dir)
|
Loading…
Add table
Add a link
Reference in a new issue