Skip to content

Commit

Permalink
Replace mem2array with read_memory.
Browse files Browse the repository at this point in the history
The function "mem2array" is deprecated. Replace it with "read_memory",
which has a slightly different footprint.
  • Loading branch information
docbacardi committed Oct 27, 2023
1 parent c736a31 commit 95e8821
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
8 changes: 2 additions & 6 deletions plugins/romloader/jtag/openocd/tcl/chip_init.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -244,9 +244,7 @@ proc init_chip {iChiptyp} {

puts "Configuring pad ctrl for MMIO4-7 (input, disable pull-down)"
proc read_data32 {addr} {
set value(0) 0
mem2array value 32 $addr 1
return $value(0)
return [read_memory $addr 32 1]
}

proc unlock_asic_ctrl {} {
Expand Down Expand Up @@ -296,9 +294,7 @@ proc init_chip {iChiptyp} {
puts "Init netIOL (preliminary)"

proc read_data32 {addr} {
set value(0) 0
mem2array value 32 $addr 1
return $value(0)
return [read_memory $addr 32 1]
}

# Initialize the PLL.
Expand Down
4 changes: 1 addition & 3 deletions plugins/romloader/jtag/openocd/tcl/jtag_detect_init.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -510,9 +510,7 @@ proc probe_cpu {strCpu} {
# ###################################################################

proc mread32 {addr} {
set value(0) 0
mem2array value 32 $addr 1
return $value(0)
return [read_memory $addr 32 1]
}

# todo: pass target name from plugin
Expand Down

0 comments on commit 95e8821

Please sign in to comment.