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

Conflict Bootloader vs variables

Hi all,

we need to (re)write a bootloader that uses XRAM to execute the bootloader code to modify the FLASH code memory.

How can i avoid overwritting variables from within the application firmware to write to the XRAM bootloader code?

How do one manage RAM memory in such a case?

Best Regards.

Parents
  • Never used the C51 but I can tell you how I do it for C166.

    I enter 0xC000-0xD7FF in the "Reserve" box on the "L166 Misc" tab under "Target options". This insure that the linker will not locate variables or anything else in this memory block. I then use xmemcpy as described in APNT138 to copy my FLASH utilites to that memory block starting at 0xC000.

    Hope this helps,
    Walt

Reply
  • Never used the C51 but I can tell you how I do it for C166.

    I enter 0xC000-0xD7FF in the "Reserve" box on the "L166 Misc" tab under "Target options". This insure that the linker will not locate variables or anything else in this memory block. I then use xmemcpy as described in APNT138 to copy my FLASH utilites to that memory block starting at 0xC000.

    Hope this helps,
    Walt

Children
No data