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 847B

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