mirror of
https://github.com/sandeepmistry/rtl8710-openocd.git
synced 2025-07-31 19:21:03 +00:00
doc
This commit is contained in:
parent
0cf1ebbce2
commit
2b07e47fb8
3 changed files with 55 additions and 40 deletions
|
|
@ -114,6 +114,19 @@ set rtl8710_flasher_auto_erase 0
|
|||
set rtl8710_flasher_auto_verify 0
|
||||
set rtl8710_flasher_auto_erase_sector 0xFFFFFFFF
|
||||
|
||||
proc array2file {a local_filename loc} {
|
||||
for {set offset 0} {$offset < [array size a]} {set offset [expr {$offset + 1}]} {
|
||||
append bindata [binary format c $a([expr $offset])]
|
||||
}
|
||||
set fp [open $local_filename "a+"]
|
||||
close $fp
|
||||
set fp [open $local_filename "r+"]
|
||||
fconfigure $fp -translation binary
|
||||
seek $fp $loc
|
||||
puts -nonewline $fp $bindata
|
||||
close $fp
|
||||
}
|
||||
|
||||
proc rtl8710_flasher_init {} {
|
||||
global rtl8710_flasher_firmware_ptr
|
||||
global rtl8710_flasher_buffer
|
||||
|
|
@ -138,21 +151,6 @@ proc rtl8710_flasher_init {} {
|
|||
return ""
|
||||
}
|
||||
|
||||
proc array2file {a local_filename loc} {
|
||||
echo $a
|
||||
echo [array size a]
|
||||
for {set offset 0} {$offset < [array size a]} {set offset [expr {$offset + 1}]} {
|
||||
append bindata [binary format c $a([expr $offset])]
|
||||
}
|
||||
set fp [open $local_filename "a+"]
|
||||
close $fp
|
||||
set fp [open $local_filename "r+"]
|
||||
fconfigure $fp -translation binary
|
||||
seek $fp $loc
|
||||
puts -nonewline $fp $bindata
|
||||
close $fp
|
||||
}
|
||||
|
||||
proc rtl8710_flasher_mrw {reg} {
|
||||
set value ""
|
||||
mem2array value 32 $reg 1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue