Hi Team,
Here’s an issue from the customer may need your help:
Customers use custom BootLoader. There is a problem with the boot program and needs to be modified. But the product is sealed, so they need to use the app to flash the boot program.
The original boot and app cmd files are as follows:
The instruction that boot jumps to app: asm(" mov &0xEDFE, PC;");
Since the new boot program is larger than the original, the app cannot be used to refresh the boot directly, so two apps are designed: app1 and app2. app1 is mainly used as a transit. The program jumps from the original boot to app1, app1 redirects the interrupt vector, and then jumps to app2; app2 receives the data and stores it in the memory (the memory space is the original boot+app1). The relevant cmd files are as follows:
A to B: success
B to C: APP2 receives and stores data. When it is stored to 0xF400, the program does not work (they use printing debugging information to monitor the program when updating the boot, and find that the program cannot run after the program receives the boot program data. It also cannot run after power off and restart).
They guessed that it might be due to the INT area. When the app refreshes the boot, the interrupt is used. It may be because the INT interrupt vector of app1 is rewritten when the app is refreshed, and the interrupt cannot be found and it does not work.
Thanks & Regards,
Yale Li