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

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