Rev 223 | Rev 229 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 223 | Rev 224 | ||
---|---|---|---|
Line 456... | Line 456... | ||
456 | public String[] flash_msgs; |
456 | public String[] flash_msgs; |
457 | int msg_pos=0; |
457 | int msg_pos=0; |
Line 458... | Line 458... | ||
458 | 458 | ||
- | 459 | ||
- | 460 | public boolean bootloader_intension_flash=false; |
|
- | 461 | ||
459 | 462 | public boolean bootloader_finish_ok=false; |
|
460 | public boolean bootloader_intension_flash=false; |
463 | |
Line -... | Line 464... | ||
- | 464 | public void jump_bootloader() |
|
461 | public void jump_bootloader() |
465 | { |
462 | { |
466 | |
463 | 467 | bootloader_finish_ok=false; |
|
464 | msg_pos=0; |
468 | msg_pos=0; |
465 | bootloader_stage= BOOTLOADER_STAGE_NONE; |
469 | bootloader_stage= BOOTLOADER_STAGE_NONE; |
Line 768... | Line 772... | ||
768 | writer.write( 't'); |
772 | writer.write( 't'); |
769 | writer.flush(); |
773 | writer.flush(); |
Line 770... | Line 774... | ||
770 | 774 | ||
Line 771... | Line 775... | ||
771 | int avr_sig=reader.read(); |
775 | int avr_sig=reader.read(); |
772 | 776 | ||
Line 773... | Line 777... | ||
773 | while (avr_sig==63) |
777 | //while (avr_sig==63) |
Line 774... | Line -... | ||
774 | avr_sig=reader.read(); |
- | |
- | 778 | // avr_sig=reader.read(); |
|
775 | 779 | ||
776 | flash_msgs[msg_pos++]="got avr sig " + avr_sig; |
780 | flash_msgs[msg_pos++]="got avr sig " + avr_sig; |
Line 777... | Line 781... | ||
777 | 781 | ||
778 | 782 | int avrsig_suff=reader.read(); |
|
779 | if (reader.read()!=0) |
783 | if (avrsig_suff!=0) |
780 | throw new Exception("val after avrsig isnt 0"); |
784 | throw new Exception("val after avrsig is" +avrsig_suff +"should b 0"); |
Line 813... | Line 817... | ||
813 | int send_buff_size=send_buff_size1*0x100+send_buff_size2; |
817 | int send_buff_size=send_buff_size1*0x100+send_buff_size2; |
Line 814... | Line 818... | ||
814 | 818 | ||
815 | flash_msgs[msg_pos++]="BUFF Size:" + send_buff_size; |
819 | flash_msgs[msg_pos++]="BUFF Size:" + send_buff_size; |
816 | // if (send_buff_size>128) |
820 | // if (send_buff_size>128) |
- | 821 | // send_buff_size=128; |
|
- | 822 | ||
817 | // send_buff_size=128; |
823 | // if (!bootloader_intension |
818 | if (bootloader_intension_flash) |
824 | if (bootloader_intension_flash) |
Line 819... | Line 825... | ||
819 | { |
825 | { |
Line 820... | Line 826... | ||
820 | 826 | ||
Line 1015... | Line 1021... | ||
1015 | catch (Exception e) { |
1021 | catch (Exception e) { |
1016 | flash_msgs[msg_pos++]="cant exit bootloader" ; |
1022 | flash_msgs[msg_pos++]="cant exit bootloader" ; |
1017 | } |
1023 | } |
1018 | flash_msgs[msg_pos++]="Exit BL done" ; |
1024 | flash_msgs[msg_pos++]="Exit BL done" ; |
Line 1019... | Line -... | ||
1019 | - | ||
- | 1025 | ||
1020 | 1026 | bootloader_finish_ok=true; |
|
Line 1021... | Line 1027... | ||
1021 | } |
1027 | } |
1022 | 1028 |