[tools] flash via bmp: reset and detach from target after uploading

closes #746