My Marlin configs for Fabrikator Mini and CTC i3 Pro B
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

fysetc_STM32S6.py 1.1KB

123456789101112131415161718192021222324252627282930313233
  1. from os.path import join
  2. Import("env")
  3. import os,shutil
  4. from SCons.Script import DefaultEnvironment
  5. from platformio import util
  6. env = DefaultEnvironment()
  7. platform = env.PioPlatform()
  8. board = env.BoardConfig()
  9. FRAMEWORK_DIR = platform.get_package_dir("framework-arduinoststm32")
  10. #FRAMEWORK_DIR = platform.get_package_dir("framework-arduinoststm32@3.10500.190327")
  11. CMSIS_DIR = os.path.join(FRAMEWORK_DIR, "CMSIS", "CMSIS")
  12. assert os.path.isdir(FRAMEWORK_DIR)
  13. assert os.path.isdir(CMSIS_DIR)
  14. assert os.path.isdir("buildroot/share/PlatformIO/variants")
  15. mcu_type = board.get("build.mcu")[:-2]
  16. variant = board.get("build.variant")
  17. series = mcu_type[:7].upper() + "xx"
  18. variant_dir = os.path.join(FRAMEWORK_DIR, "variants", variant)
  19. source_dir = os.path.join("buildroot/share/PlatformIO/variants", variant)
  20. assert os.path.isdir(source_dir)
  21. if not os.path.isdir(variant_dir):
  22. os.mkdir(variant_dir)
  23. for file_name in os.listdir(source_dir):
  24. full_file_name = os.path.join(source_dir, file_name)
  25. if os.path.isfile(full_file_name):
  26. shutil.copy(full_file_name, variant_dir)