Makeburn.stm32-oocd 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. ## Upload Configuration for OpenOCD
  2. ## ================================
  3. ## When properly configured, you can conveniently use
  4. ## make clean all burn
  5. ## to build, upload and run the binary.
  6. ## Choose the programming adapter
  7. ## ------------------------------
  8. ## A file with this name and extension .cfg must exist in
  9. ## the OpenOCD interface directory.
  10. ## Use this with Turtelizer 2:
  11. # BURNDONGLE=turtelizer2
  12. ## Original configuration:
  13. BURNDONGLE = openocd-usb
  14. ## Choose the target board
  15. ## -----------------------
  16. ## A file with this name and extension .cfg must exist in
  17. ## the OpenOCD board directory.
  18. # BURNBOARD = myboard
  19. ## Try to determine this automatically.
  20. # ifeq ($(PLATFORM), ETHERNUT2)
  21. # BURNBOARD = ethernut5
  22. # endif
  23. ## Choose the target CPU
  24. ## ---------------------
  25. ## Typically this is specified in the board configuration.
  26. BURNTARGET = stm32
  27. ## Choose the command sequence
  28. ## ---------------------------
  29. ##
  30. ## Terminates configuration stage. Use with all targets.
  31. BURNCMDS = -c init
  32. ## Works fine with the latest eir config.
  33. #BURNCMDS += -c "run_flash_image ./$(TARG)"
  34. #BURNCMDS += -c shutdown
  35. ## Running Ethernut 3 RAM images.
  36. # BURNCMDS=-c init -c "run_ram_image ./$(TARG)" -c shutdown
  37. ## Example for an explicit command sequence.
  38. # BURNCMDS=-c init -c "reset init" -c "load_image $IMGFILE 0" -c "verify_image $IMGFILE 0" -c "resume 0" -c shutdown
  39. ## Example for an command line chaining.
  40. # BURNCMDS += -f $(top_srcdir)/tools/flash/flash.script
  41. BURNCMDS += -c "reset init"
  42. BURNCMDS += -c "halt"
  43. BURNCMDS += -c "flash write_image erase ./$(ITARG) 0x08000000 bin"
  44. BURNCMDS += -c "reset run"
  45. # BURNCMDS += -f $(top_srcdir)/tools/flash/flash-exit.script
  46. # Terminate OpenOCD. Use with all targets.
  47. BURNCMDS += -c shutdown
  48. # Choose the executable
  49. # ---------------------
  50. # Your OpenOCD executable may have a different name.
  51. #
  52. BURN=openocd
  53. # No change required
  54. # ------------------
  55. # Anything below this line will typically work out of the box.
  56. #
  57. ifneq ($(BURNDONGLE),)
  58. BURNCONFIG += -c "source [find interface/$(BURNDONGLE).cfg]"
  59. endif
  60. ifneq ($(BURNBOARD),)
  61. BURNCONFIG += -c "source [find board/$(BURNBOARD).cfg]"
  62. endif
  63. ifneq ($(BURNTARGET),)
  64. BURNCONFIG += -c "source [find target/$(BURNTARGET).cfg]"
  65. endif
  66. # BURNFLAGS=-s $(top_srcdir)/tools/turtelizer2 $(BURNCONFIG) $(BURNCMDS)
  67. BURNFLAGS=$(BURNCONFIG) $(BURNCMDS)