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.

black_stm32f407vet6.py 962B

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