This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

P89LV51RD2 IAP Bootloader

Hi, I would like to use the IAP feature for firmware upgrade in future for bug fixs. But how do I organise my code such that I have a portion "bootloader" that is fixed, and the rest of the code are upgradeable ??

I have tried using the linker option to set my bootloader function at address 0x1000, and the rest of my functions at 0x2000 onwards. But I check the .hex file, what happen is when I changed something in the main body function, the 0x1000 address code also changed.

How should I go about it in implementing a "bootloader" section and upgradeable portion of code???

Thank You !!


Jerry Yeo

Parents
  • hello every body in this thread,
    I have gone through the whole thread and am once again forwarding a related query

    I have sucessfully tried to activate the iap facility and have created a pc side application and a bootloader located at f7fdh
    in the IC now this bootloader in synchronism with pc side application and downloads a file (its an application program compiled in kiel)in the flash at 50h location as specified by me
    I am givinging a call to the startup location+50 of the app prog(checked in .m51)
    from my bootloader
    Now if the app prog loaded is a simple prog like send some charc to serial by polling
    it is working
    however when i include a timer interrupt
    it creates a different situation n does not execute, though i have tried to compile the prog with interrupt vector at 00 and code at 5000 loction and i am writing the desired jumps (02004d) at the 0b location using the iap routine (its timer0 interrupt) the code does not execute.
    could anyone guide with the same.

Reply
  • hello every body in this thread,
    I have gone through the whole thread and am once again forwarding a related query

    I have sucessfully tried to activate the iap facility and have created a pc side application and a bootloader located at f7fdh
    in the IC now this bootloader in synchronism with pc side application and downloads a file (its an application program compiled in kiel)in the flash at 50h location as specified by me
    I am givinging a call to the startup location+50 of the app prog(checked in .m51)
    from my bootloader
    Now if the app prog loaded is a simple prog like send some charc to serial by polling
    it is working
    however when i include a timer interrupt
    it creates a different situation n does not execute, though i have tried to compile the prog with interrupt vector at 00 and code at 5000 loction and i am writing the desired jumps (02004d) at the 0b location using the iap routine (its timer0 interrupt) the code does not execute.
    could anyone guide with the same.

Children