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.
 
 
 
 
 
 

57 lines
1.3 KiB

  1. #
  2. # This file was created using as references the stm32f1x.cfg and aduc702x.cfg
  3. #
  4. source [find target/swj-dp.tcl]
  5. # Chip name
  6. if { [info exists CHIPNAME] } {
  7. set _CHIPNAME $CHIPNAME
  8. } else {
  9. set _CHIPNAME aducm360
  10. }
  11. # Endianness
  12. if { [info exists ENDIAN] } {
  13. set _ENDIAN $ENDIAN
  14. } else {
  15. set _ENDIAN little
  16. }
  17. # Work-area is a space in RAM used for flash programming
  18. # Eventually, the whole SRAM of ADuCM360 will be used (8kB)
  19. if { [info exists WORKAREASIZE] } {
  20. set _WORKAREASIZE $WORKAREASIZE
  21. } else {
  22. set _WORKAREASIZE 0x2000
  23. }
  24. #jtag scan chain
  25. if { [info exists CPUTAPID] } {
  26. set _CPUTAPID $CPUTAPID
  27. } else {
  28. set _CPUTAPID 0x2ba01477
  29. }
  30. swj_newdap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID
  31. dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.cpu
  32. # SWD/JTAG speed
  33. adapter speed 1000
  34. ##
  35. ## Target configuration
  36. ##
  37. set _TARGETNAME $_CHIPNAME.cpu
  38. target create $_TARGETNAME cortex_m -endian $_ENDIAN -dap $_CHIPNAME.dap
  39. # allocate the working area
  40. $_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size $_WORKAREASIZE -work-area-backup 0
  41. # flash size will be probed
  42. set _FLASHNAME $_CHIPNAME.flash
  43. flash bank $_FLASHNAME aducm360 0x00 0 0 0 $_TARGETNAME
  44. adapter srst delay 100
  45. cortex_m reset_config sysresetreq