Hello world, I am using P89LV51RD2 micro-controller and using u-vision V2.40a! I want to remotely update user application on the micro-controller.
For doing it,first I need to download user-application image into the external flash. Once the user application is downloaded, I want the bootloader to write the downloaded image into internal flash of the micro-controller.
On power-reset, the bootloader has to check whether the user-application has to be upgraded or not. If the user-application has to be upgraded, then the bootloader has to write downloaded user application image into the internal flash.
Where should I add the bootloader? Can I modify the STARTUP.A51 file to add the bootloader routine just before when the instruction "LJMP ?C_START" is executed? After bootloder executes,How can make sure that interrupt vector table gets redirected to a given location in user application,Can I get help regarding this?
How can I control this?
You shouldn't be trying to. You're trying to fight the tools instead of using them. You'll lose that fight.
Among all the CPU architectures still in active use today, the '51 is about the worst possible you could use for what you're trying to do. That limitation can be overcome by experts, if absolutely necessary, but I rather heavily doubt you're really in that situation.
Whatever your actual problem is: you need to re-think your approach to it from square one.
Thanks Per Westermark and Hans-Bernhard Broeker for your valuable inputs :) !! Once I do complete,will be revert back to discussion forum :) !