tcl: add flash programming helper