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_fysetc.py 884B

12345678910111213141516171819202122232425262728
  1. #
  2. # STM32F103RC_fysetc.py
  3. #
  4. import pioutil
  5. if pioutil.is_pio_build():
  6. import os
  7. from os.path import join
  8. from os.path import expandvars
  9. Import("env")
  10. # Custom HEX from ELF
  11. env.AddPostAction(
  12. join("$BUILD_DIR", "${PROGNAME}.elf"),
  13. env.VerboseAction(" ".join([
  14. "$OBJCOPY", "-O ihex", "$TARGET",
  15. "\"" + join("$BUILD_DIR", "${PROGNAME}.hex") + "\"", # Note: $BUILD_DIR is a full path
  16. ]), "Building $TARGET"))
  17. # In-line command with arguments
  18. UPLOAD_TOOL="stm32flash"
  19. platform = env.PioPlatform()
  20. if platform.get_package_dir("tool-stm32duino") != None:
  21. UPLOAD_TOOL=expandvars("\"" + join(platform.get_package_dir("tool-stm32duino"),"stm32flash","stm32flash") + "\"")
  22. env.Replace(
  23. UPLOADER=UPLOAD_TOOL,
  24. UPLOADCMD=expandvars(UPLOAD_TOOL + " -v -i rts,-dtr,dtr -R -b 115200 -g 0x8000000 -w \"" + join("$BUILD_DIR","${PROGNAME}.hex")+"\"" + " $UPLOAD_PORT")
  25. )