Remote user-software upgrade for P89LV51RD2 micro-controller

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?

Parents
  • describing the principle
    org 0
    jump starttest
    org 3
    if boot
    jump EI0ISR // bootloader ISR
    else
    jump appbase+3
    org b
    if boot
    jump T0ISR
    else
    jump appbase+6
    ...
    ...

    starttest
    if boot
    jump to the beginning of the startup.a51 linked with the bootloader
    else
    jumo appbase+0

    then the application is linked to start a appbase
    org appbase
    jump to the beginning of the startup.a51 linked with the application
    jump to EI0ISR
    ....

    everything in the app done with the noiv qualifier

    Erik

Reply
  • describing the principle
    org 0
    jump starttest
    org 3
    if boot
    jump EI0ISR // bootloader ISR
    else
    jump appbase+3
    org b
    if boot
    jump T0ISR
    else
    jump appbase+6
    ...
    ...

    starttest
    if boot
    jump to the beginning of the startup.a51 linked with the bootloader
    else
    jumo appbase+0

    then the application is linked to start a appbase
    org appbase
    jump to the beginning of the startup.a51 linked with the application
    jump to EI0ISR
    ....

    everything in the app done with the noiv qualifier

    Erik

Children
More questions in this forum