IAP: Application Programming
In a recent project, I need to remotely upgrade the network and use the IAP function. There are also a lot of code for reference on the Internet. The implementation methods are bootloader + usercode, that is to say, a very small starting program implements IAP and user code jump. You can write a flashmagic-like tool to burn user code. bootloader can be written through ISP or JTAG.
The following describes my development steps and problems:
1. jump from bootloader to usercode: This is very simple. Generally, there will be no errors, and a pointer function will be OK.
2. It is very important to determine the position of the interrupt vector table, whether it is memory or flash.
3. The third step is to start thiapos.
Of course, in the first step, you need to check whether the user program needs to be updated in the ID at a specified position in the local memory. If necessary, IAP
There are a lot of online materials.
My problems:
1. interrupt: the bootloader has a uart0 interrupt, timer0 interrupt, and a simple application. The problem is that when the bootloader is interrupted, after jumping to the application, an Invalid Address is redirected because the application's interrupt vector table is not updated!
Confirm the cause: You don't have to say more about the solution!
2. Half-Host Mode: scan the internet!
My user programs include FS, net and so on, using a RL-ARM, in FS, the need to redirect the input and output, because the redirection file is not added at the second update project, cause error. After adding redirection, the problem is solved.
The first problem plagued me for almost a week. The second problem was immediately discovered.
I wrote it here for my reference and shared my bootloader. Thank you for your correction and common progress.
Advertisement:
I am unemployed now.
B/S (div + CSS,. Net C #, sqlserver) C/S (. NET C #) embedded development, etc.
Tel: 13060063607
QQ: 85669000
I'm in Chengdu