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.

fysetc_STM32F1.py 1.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. from os.path import join
  2. Import("env", "projenv")
  3. platform = env.PioPlatform()
  4. # Relocate firmware from 0x08000000 to 0x08002000
  5. #env['CPPDEFINES'].remove(("VECT_TAB_ADDR", 134217728))
  6. #env['CPPDEFINES'].append(("VECT_TAB_ADDR", "0x08010000"))
  7. #env.Replace(LDSCRIPT_PATH="buildroot/share/PlatformIO/ldscripts/fysetc_aio_ii.ld")
  8. # Custom HEX from ELF
  9. env.AddPostAction(
  10. "$BUILD_DIR/${PROGNAME}.elf",
  11. env.VerboseAction(" ".join([
  12. "$OBJCOPY",
  13. "-O",
  14. "ihex",
  15. "$BUILD_DIR/${PROGNAME}.elf",
  16. "$BUILD_DIR/${PROGNAME}.hex"
  17. ]), "Building $TARGET"))
  18. # please keep $SOURCE variable, it will be replaced with a path to firmware
  19. # Generic
  20. #env.Replace(
  21. # UPLOADER="serial_upload.bat"
  22. # UPLOADCMD="$UPLOADER stm32loader.py $SOURCE"
  23. #)
  24. # In-line command with arguments
  25. env.Replace(
  26. UPLOADER=platform.get_package_dir("tool-stm32duino") + '/stm32flash/stm32flash',
  27. UPLOADCMD='"${UPLOADER}" -v -i rts,-dtr,dtr,-rts -R -b 115200 -g 0x8000000 -w "${BUILD_DIR}/${PROGNAME}.hex" ${UPLOAD_PORT}'
  28. )
  29. # Python callback
  30. #def on_upload(source, target, env):
  31. # print source, target
  32. # firmware_path = str(source[0])
  33. # # do something
  34. # env.Execute(".\serial_upload.bat")
  35. #env.Replace(UPLOADCMD=on_upload)