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
  • Using the bootloader in the chip is still a good idea, but having a custom frontend isn't necessarily a bad idea.
    No "bad idea" suggested, just so many reinvent the wheel when they do not immediately see the possibility of using the existing.

    I think Stefan and the undersigned are in the usual "discussion": should you question the motives of the OP or not.

    Erik

Reply
  • Using the bootloader in the chip is still a good idea, but having a custom frontend isn't necessarily a bad idea.
    No "bad idea" suggested, just so many reinvent the wheel when they do not immediately see the possibility of using the existing.

    I think Stefan and the undersigned are in the usual "discussion": should you question the motives of the OP or not.

    Erik

Children
  • "I think Stefan and the undersigned are in the usual "discussion": should you question the motives of the OP or not."

    Not at all, feel free to question. I was merely pointing out that there are occasions when FlashMagic is not the solution.

    It might be a little nicer if you asked something like:

    "Please explain why you want to write your own bootloader rather than use the existing bootloader with FlashMagic"

    rather than:

    "WHY, oh why do you muck with this."

  • It might be a little nicer if you asked something like:

    "Please explain why you want to write your own bootloader rather than use the existing bootloader with FlashMagic"

    rather than:

    "WHY, oh why do you muck with this."


    Sure, but that would not be honest. I really want to know "why the OP muck with this" because I consider reinventing wheels "mucking with stuff"

    Erik