Menu

Microchip XC16 - how not to rewrite bootloader

meereck
2015-12-08
2015-12-09
  • meereck

    meereck - 2015-12-08

    Hello,
    can anybody give me a clue how not to rewrite a booloader area with an user application?
    Is there any pragma directive to reserve the bootloader area?

    Thanks and regards, Meereck

     
  • Dan

    Dan - 2015-12-09

    Hi,meereck

    In 16-bit PIC,

    Regardless of the compiler,

    GOTO instruction to $ 0000, the jump destination address in the $ 0002 is written.

    Special compilation options should not be necessary.

    Bootloader Host to replace the jump destination address to the start address of the bootloader.

    User program restrictions:

    User Program size < (Max Flash size - Bootloader size)

    Best regards,
    Dan

     
  • meereck

    meereck - 2015-12-09

    Hi Dan,
    are you saying the bootloader will never rewrite the area where it resides, even if the user application hex file contains something which would overwrite the bootloader?

    Thanks!

     
  • Dan

    Dan - 2015-12-09

    Hi,meereck

    Yes.

    If the user program overlaps with the bootloader area,

    The host does not perform the writing, it will return an error message.

    It must have "piccodes.ini" for its.

    Best regards,
    Dan

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.