Remove all occurrences of 'mem2array' and 'array2mem'
[openocd.git] / tcl / target / stm32h7x.cfg
index 26d0d9301a4f912f85af7fe4fb9d2c93ae420e0c..ca685c2f27e3863b2a415691e2256290ee44a9ca 100644 (file)
@@ -142,7 +142,7 @@ if {[using_jtag]} {
 # usage does not work with HLA, so is not done by default. That change could be
 # made in a local configuration file if connect_assert_srst mode is needed for
 # a specific application and a non-HLA adapter is in use.
-reset_config srst_only srst_nogate
+reset_config srst_nogate
 
 if {![using_hla]} {
    # if srst is not fitted use SYSRESETREQ to
@@ -208,7 +208,7 @@ proc stm32h7x_get_chipname {} {
        if {$sep == -1} {
                return $t
        }
-       return [string range $t 0 [expr $sep - 1]]
+       return [string range $t 0 [expr {$sep - 1}]]
 }
 
 if {[set $_CHIPNAME.DUAL_CORE]} {
@@ -232,15 +232,13 @@ if {[set $_CHIPNAME.DUAL_CORE]} {
 
 # like mrw, but with target selection
 proc stm32h7x_mrw {used_target reg} {
-       set value ""
-       $used_target mem2array value 32 $reg 1
-       return $value(0)
+       return [$used_target read_memory $reg 32 1]
 }
 
 # like mmw, but with target selection
 proc stm32h7x_mmw {used_target reg setbits clearbits} {
        set old [stm32h7x_mrw $used_target $reg]
-       set new [expr ($old & ~$clearbits) | $setbits]
+       set new [expr {($old & ~$clearbits) | $setbits}]
        $used_target mww $reg $new
 }
 
@@ -251,10 +249,10 @@ proc stm32h7x_dbgmcu_mmw {reg_offset setbits clearbits} {
        if {![using_hla]} {
                set _CHIPNAME [stm32h7x_get_chipname]
                set used_target $_CHIPNAME.ap2
-               set reg_addr [expr 0xE00E1000 + $reg_offset]
+               set reg_addr [expr {0xE00E1000 + $reg_offset}]
        } {
                set used_target [target current]
-               set reg_addr [expr 0x5C001000 + $reg_offset]
+               set reg_addr [expr {0x5C001000 + $reg_offset}]
        }
 
        stm32h7x_mmw $used_target $reg_addr $setbits $clearbits

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)