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.

STM32F103RC_MEEB_3DP.py 939B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #
  2. # STM32F103RC_MEEB_3DP.py
  3. #
  4. import pioutil
  5. if pioutil.is_pio_build():
  6. try:
  7. import configparser
  8. except ImportError:
  9. import ConfigParser as configparser
  10. import os
  11. Import("env", "projenv")
  12. config = configparser.ConfigParser()
  13. config.read("platformio.ini")
  14. #
  15. # Upload actions
  16. #
  17. def before_upload(source, target, env):
  18. env.Execute("pwd")
  19. def after_upload(source, target, env):
  20. env.Execute("pwd")
  21. env.AddPreAction("upload", before_upload)
  22. env.AddPostAction("upload", after_upload)
  23. flash_size = 0
  24. vect_tab_addr = 0
  25. for define in env['CPPDEFINES']:
  26. if define[0] == "VECT_TAB_ADDR":
  27. vect_tab_addr = define[1]
  28. if define[0] == "STM32_FLASH_SIZE":
  29. flash_size = define[1]
  30. print('Use the {0:s} address as the marlin app entry point.'.format(vect_tab_addr))
  31. print('Use the {0:d}KB flash version of stm32f103rct6 chip.'.format(flash_size))
  32. import marlin
  33. marlin.custom_ld_script("STM32F103RC_MEEB_3DP.ld")