# converted to .tcl by html2tcl.tcl set buffer "" append buffer { OpenOCD debugger } set console "" set upload_filename /ram/upload append buffer {
OpenOCD
} append buffer [capture version] append buffer {
 
} set toggle_details [formfetch toggle_details] if {[string length $toggle_details]==0} { set toggle_details 0 } set show_details [load_var show_details] if {[string length $show_details]==0} { set show_details 0 } if {$toggle_details==1} { set show_details [expr 1-$show_details] save_var show_details $show_details } if {[string length $console]!=0} { append buffer { } } append buffer {
 

Erase Flash

} set form_address [formfetch form_address] set form_length [formfetch form_length] set form_action [formfetch form_action] if {[string compare $form_length ""]==0} { set form_length 0x10000 } if {[string compare $form_address ""]==0} { if {[catch {[first_flash_base]} result]==0} { set form_address "0x[tohex $result]" } } if {[string compare $form_address ""]!=0} { if {[string compare $form_action "Erase"]==0} { append buffer "" append console [encode [capture_catch { reset init flash erase_address $form_address $form_length}]] append buffer } } append buffer {
Address
Length
 
 

} if {$show_details==1} { append buffer < append buffer {td style="background-color:#dddddd;padding-left:5px;padding-right:5px;padding-top:3px;padding-bottom:3px;"} append buffer > } else { append buffer < append buffer {td style="background-image:url('menu_cuts/h_tab_free.png');width:110px;height:29px;background-repeat: no-repeat;background-position:top left;"} append buffer > } append buffer { } if {$show_details==1} { append buffer "Hide details" append buffer
} else { append buffer {
} append buffer "Show details" append buffer {
} } append buffer {
} if {$show_details==1} { append buffer $console } append buffer {} if {$show_details!=1} { append buffer {} } append buffer {
   
 
Documentation
 
OpenOCD Manual

Note that flash programming will erase flash if required.

Reset and init CPU, then erase address range.

The length field is specified in number of bytes.

 
} start_chunked "html" write_chunked $buffer end_chunked