- Category:
- SCM
- Tags:
-
[C/C++]
[源码]
- File Size:
- 27kb
- Update:
- 2014-12-18
- Downloads:
- 0 Times
- Uploaded by:
- 大鹏集成
Description: 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
To Search:
File list (Check if you may need any files):
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