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.
 
 
 
 
 
 

51 lines
1.2 KiB

  1. # Hitex stm32 performance stick
  2. if { [info exists CHIPNAME] } {
  3. set _CHIPNAME $CHIPNAME
  4. } else {
  5. set _CHIPNAME stm32_hitex
  6. }
  7. if { [info exists ENDIAN] } {
  8. set _ENDIAN $ENDIAN
  9. } else {
  10. set _ENDIAN little
  11. }
  12. # set jtag speed
  13. jtag_khz 500
  14. jtag_nsrst_delay 100
  15. jtag_ntrst_delay 100
  16. #use combined on interfaces or targets that can't set TRST/SRST separately
  17. reset_config trst_and_srst
  18. #jtag scan chain
  19. # The CPU
  20. if { [info exists CPUTAPID ] } {
  21. set _CPUTAPID $CPUTAPID
  22. } else {
  23. # See STM Document RM0008
  24. # Section 26.6.3
  25. set _CPUTAPID 0x3ba00477
  26. }
  27. jtag newtap $_CHIPNAME cpu -irlen 4 -ircapture 0xf -irmask 0xe -expected-id $_CPUTAPID
  28. # The boundery scan register, leave the "expected-id" undefined.
  29. jtag newtap $_CHIPNAME bs -irlen 5 -ircapture 0x1 -irmask 0x1e
  30. # configure str750 connected to jtag chain
  31. jtag newtap $_CHIPNAME unknown -irlen 4 -ircapture 0x1 -irmask 0x0f
  32. set _TARGETNAME [format "%s.cpu" $_CHIPNAME]
  33. target create $_TARGETNAME cortex_m3 -endian $_ENDIAN -chain-position $_TARGETNAME
  34. $_TARGETNAME configure -work-area-virt 0 -work-area-phys 0x20000000 -work-area-size 16384 -work-area-backup 0
  35. #
  36. flash bank stm32x 0 0 0 0 0
  37. # For more information about the configuration files, take a look at:
  38. # openocd.texi