tcl: ngultra: add target config file
[fw/openocd] / tcl / target / snps_hsdk.cfg
index 634e07adc467b06837381a602f7c02123592f312..b4f368425cad3561a724ac91222b30440549302e 100644 (file)
@@ -1,8 +1,8 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+
 #  Copyright (C) 2019,2020 Synopsys, Inc.
 #  Anton Kolesov <anton.kolesov@synopsys.com>
 #  Didin Evgeniy <didin@synopsys.com>
-#
-# SPDX-License-Identifier: GPL-2.0-or-later
 
 #
 # HS Development Kit SoC.
@@ -13,7 +13,7 @@
 source [find cpu/arc/hs.tcl]
 
 set _coreid 0
-set _dbgbase [expr ($_coreid << 13)]
+set _dbgbase [expr {$_coreid << 13}]
 
 # CHIPNAME will be used to choose core family (600, 700 or EM). As far as
 # OpenOCD is concerned EM and HS are identical.
@@ -30,8 +30,8 @@ $_TARGETNAME configure -coreid $_coreid
 $_TARGETNAME configure -dbgbase $_dbgbase
 # Flush L2$.
 $_TARGETNAME configure -event reset-assert "arc_hs_reset $_TARGETNAME"
-set _coreid [expr $_coreid + 1]
-set _dbgbase [expr ($_coreid << 13)]
+set _coreid [expr {$_coreid + 1}]
+set _dbgbase [expr {$_coreid << 13}]
 
 arc_hs_init_regs
 
@@ -46,8 +46,8 @@ target create $_TARGETNAME arcv2 -chain-position $_TARGETNAME
 $_TARGETNAME configure -coreid $_coreid
 $_TARGETNAME configure -dbgbase $_dbgbase
 $_TARGETNAME configure -event reset-assert "arc_common_reset $_TARGETNAME"
-set _coreid [expr $_coreid + 1]
-set _dbgbase [expr ($_coreid << 13)]
+set _coreid [expr {$_coreid + 1}]
+set _dbgbase [expr {$_coreid << 13}]
 
 arc_hs_init_regs
 
@@ -62,8 +62,8 @@ target create $_TARGETNAME arcv2 -chain-position $_TARGETNAME
 $_TARGETNAME configure -coreid $_coreid
 $_TARGETNAME configure -dbgbase $_dbgbase
 $_TARGETNAME configure -event reset-assert "arc_common_reset $_TARGETNAME"
-set _coreid [expr $_coreid + 1]
-set _dbgbase [expr ($_coreid << 13)]
+set _coreid [expr {$_coreid + 1}]
+set _dbgbase [expr {$_coreid << 13}]
 
 arc_hs_init_regs
 
@@ -78,8 +78,8 @@ target create $_TARGETNAME arcv2 -chain-position $_TARGETNAME
 $_TARGETNAME configure -coreid $_coreid
 $_TARGETNAME configure -dbgbase $_dbgbase
 $_TARGETNAME configure -event reset-assert "arc_common_reset $_TARGETNAME"
-set _coreid [expr $_coreid + 1]
-set _dbgbase [expr 0x00000000 | ($_coreid << 13)]
+set _coreid [expr {$_coreid + 1}]
+set _dbgbase [expr {0x00000000 | ($_coreid << 13)}]
 arc_hs_init_regs
 
 # Enable L2 cache support for core 1.