Flash, FRAM and EEPROM driver for STM32 QUAD-/OCTOSPI interface
[fw/openocd] / tcl / target / psoc4.cfg
index 5d6dcede33b7ed09a6119d04c3ff334bbbae4654..b56828207984037576c628afc5bc1be010f8ec97 100644 (file)
@@ -26,16 +26,17 @@ if { [info exists CPUTAPID] } {
 }
 
 swj_newdap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf -expected-id $_CPUTAPID
+dap create $_CHIPNAME.dap -chain-position $_CHIPNAME.cpu
 
 set _TARGETNAME $_CHIPNAME.cpu
-target create $_TARGETNAME cortex_m -chain-position $_TARGETNAME
+target create $_TARGETNAME cortex_m -dap $_CHIPNAME.dap
 
 $_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size $_WORKAREASIZE -work-area-backup 0
 
 set _FLASHNAME $_CHIPNAME.flash
 flash bank $_FLASHNAME psoc4 0 0 0 0 $_TARGETNAME
 
-adapter_khz 1500
+adapter speed 1500
 
 # Reset, bloody PSoC 4 reset
 #
@@ -117,7 +118,7 @@ proc ocd_process_reset_inner { MODE } {
        }
 
        if { ! [info exists PSOC4_USE_ACQUIRE] } {
-               if { 0 == [string compare [adapter_name] kitprog ] } {
+               if { 0 == [string compare [adapter name] kitprog ] } {
                        set PSOC4_USE_ACQUIRE 1
                } else {
                        set PSOC4_USE_ACQUIRE 0
@@ -137,7 +138,7 @@ proc ocd_process_reset_inner { MODE } {
        $t invoke-event reset-assert-pre
 
        if { $halt && $PSOC4_USE_ACQUIRE } {
-               catch { [adapter_name] acquire_psoc }
+               catch { [adapter name] acquire_psoc }
                $t arp_examine
        } else {
                if { $PSOC4_TEST_MODE_WORKAROUND } {
@@ -178,7 +179,7 @@ proc ocd_process_reset_inner { MODE } {
                }
 
                # Check if PSoC CPU is stopped in system ROM
-               set pc [ocd_reg pc]
+               set pc [reg pc]
                regsub {pc[^:]*: } $pc "" pc
                if { $pc < 0x10000000 || $pc > 0x1000ffff } {
                        set hint ""