Advertisement
Guest User

lpc55s36.cfg

a guest
Jan 24th, 2024
24
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.76 KB | None | 0 0
  1. source [find target/swj-dp.tcl]
  2.  
  3. if { [info exists CHIPNAME] } {
  4. set _CHIPNAME $CHIPNAME
  5. } else {
  6. set _CHIPNAME lpc55s36
  7. }
  8.  
  9. #
  10. # JTAG mode TAP
  11. #
  12. if { [info exists M33_JTAG_TAPID] } {
  13. set _JTAG_TAPID $M33_JTAG_TAPID
  14. } else {
  15. set _JTAG_TAPID 0x4ba00477
  16. }
  17.  
  18. #
  19. # SWD mode TAP
  20. #
  21. if { [info exists M33_SWD_TAPID] } {
  22. set _SWD_TAPID $M33_SWD_TAPID
  23. } else {
  24. # set _SWD_TAPID 0x2ba01477
  25. set _SWD_TAPID 0x0be12477
  26. #set _SWD_TAPID 0x410fd214
  27. }
  28.  
  29. if { [using_jtag] } {
  30. set _CPUTAPID $_JTAG_TAPID
  31. } {
  32. set _CPUTAPID $_SWD_TAPID
  33. }
  34.  
  35. swj_newdap $_CHIPNAME m4 -irlen 4 -ircapture 0x1 -irmask 0xf \
  36. -expected-id $_CPUTAPID
  37. dap create $_CHIPNAME.m4.dap -chain-position $_CHIPNAME.m4
  38. target create $_CHIPNAME.m4 cortex_m -dap $_CHIPNAME.m4.dap
  39.  
  40. # LPCSSS36-EVK has 112 KB SRAM
  41. if { [info exists WORKAREASIZE] } {
  42. set _WORKAREASIZE $WORKAREASIZE
  43. } else {
  44. set _WORKAREASIZE 0x1C000
  45. }
  46. $_CHIPNAME.m4 configure -work-area-phys 0x20000000 \
  47. -work-area-size $_WORKAREASIZE -work-area-backup 0
  48.  
  49. set _TARGETNAME $_CHIPNAME.cpu
  50. target create $_TARGETNAME cortex_m -dap $_CHIPNAME.m4.dap
  51.  
  52. set _FLASHNAME $_CHIPNAME.flash
  53.  
  54. #flash bank $_CHIPNAME.flash lpc2000 0 0 0 0 $_TARGETNAME
  55. flash bank $_FLASHNAME lpc2000 0 0 0 0 $_TARGETNAME auto 100000 calc_checksum
  56.  
  57. #if {![using_hla]} {
  58. # # on this CPU we should use VECTRESET to perform a soft reset and
  59. # # manually reset the periphery
  60. # # SRST or SYSRESETREQ disable the debug interface for the time of
  61. # # the reset and will not fit our requirements for a consistent debug
  62. # # session
  63. # cortex_m reset_config vectreset
  64. #}
  65.  
  66. #cortex_m reset_config sysresetreq
  67. adapter speed 1000
  68.  
  69. #adapter srst delay 100
  70. #adapter srst pulse_width 100
  71. #reset_config srst_nogate
  72.  
  73. # reset_config srst_only
  74.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement