文件名称:1838072vugnqmqhqcthggm
- 所属分类:
- 单片机(51,AVR,MSP430等)
- 资源属性:
- [C/C++] [源码]
- 上传时间:
- 2014-12-18
- 文件大小:
- 27kb
- 下载次数:
- 0次
- 提 供 者:
- 大***
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
特点: 升错文件不会变砖,app程序不需要知道boot的存在
方法: 38400波特率,板子复位后键盘敲“d”, 正常接收后串口会不停打印“C” 后把bin文件通过xmodem传送过去即可。
原理: 升级app时,把第一条jmp指令换成跳转到boot的jmp指令。 然后把app原来的跳转jmp指令放到0x1bfc的位置(就是boot区的前四个字节)。boot执行完了后执行存在0x1bfc位置的jmp指令即可跳转到app程序区。简单来说就是劫持app的第一条jmp指令。
因此流程是 起始的jmp > boot区第一个jmp > boot区代码 > jmp 0x1fbc > app 执行.
此方法适用于GCC编出来的程序,只要第一条指令是个jmp指令即可 (普通编译器都是,除非是汇编)-Features: l the wrong file will not brick, the app program does not need to know the existence of boot
Methods: 38400 baud rate, the board reset knock on the keyboard d , the normal after receiving the serial will not stop printing C after the bin file through XMODEM transmitted to the past.
Principle: when upgrading app, the first JMP instructions into the jump to the boot JMP instruction. Then put the original app jump JMP instructions into the position of the 0x1bfc (boot zone is the first four bytes). Implementation of the existence of the location of 0x1bfc JMP commands to jump to the app program area after boot implementation. The first JMP instruction is simply to hijack app.
So the process is starting the JMP > boot area of the first JMP- > boot- > JMP- > app 0x1fbc code execution.
This method is applicable to GCC out of the program, as long as the first instruction is a JMP commands
方法: 38400波特率,板子复位后键盘敲“d”, 正常接收后串口会不停打印“C” 后把bin文件通过xmodem传送过去即可。
原理: 升级app时,把第一条jmp指令换成跳转到boot的jmp指令。 然后把app原来的跳转jmp指令放到0x1bfc的位置(就是boot区的前四个字节)。boot执行完了后执行存在0x1bfc位置的jmp指令即可跳转到app程序区。简单来说就是劫持app的第一条jmp指令。
因此流程是 起始的jmp > boot区第一个jmp > boot区代码 > jmp 0x1fbc > app 执行.
此方法适用于GCC编出来的程序,只要第一条指令是个jmp指令即可 (普通编译器都是,除非是汇编)-Features: l the wrong file will not brick, the app program does not need to know the existence of boot
Methods: 38400 baud rate, the board reset knock on the keyboard d , the normal after receiving the serial will not stop printing C after the bin file through XMODEM transmitted to the past.
Principle: when upgrading app, the first JMP instructions into the jump to the boot JMP instruction. Then put the original app jump JMP instructions into the position of the 0x1bfc (boot zone is the first four bytes). Implementation of the existence of the location of 0x1bfc JMP commands to jump to the app program area after boot implementation. The first JMP instruction is simply to hijack app.
So the process is starting the JMP > boot area of the first JMP- > boot- > JMP- > app 0x1fbc code execution.
This method is applicable to GCC out of the program, as long as the first instruction is a JMP commands
(系统自动生成,下载前可以参看下载内容)
下载文件列表
default
.......\build.bat
.......\dep
.......\...\LGT_main.o.d
.......\LGT_main.o
.......\LGT_Template.bin
.......\LGT_Template.eep
.......\LGT_Template.elf
.......\LGT_Template.hex
.......\LGT_Template.lss
.......\LGT_Template.map
.......\Makefile
.......\Makefile.bak
.......\rebuild.bat
iolgt8f0xa.h
LGT_main.c