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

Bootloader in same Flash as application?

Is it possible to have a separate bootloader and application in the same flash? The problem I see is hooking the interrupts from the low memory (the bootloader's to go into 0x0000)into the application which uses them.

Do I have to compile these applications into
one application, to get the interrupts
hooked in? I'd rather these programs
not be dependent on each other.

Parents
  • Hi,

    You need check the existing of application in bootloder, if applcation exists, the address of interrupt entry should be add the first address of application. For example:
    bootloder starts from 0000H and application starts from 4000h,one interrupt entry at 0023h.

    ORG 0000H ; BOOTLODER
    ORG 0023 ; INTERRUPT ENTRY IN BOOT.
    JB APP_EXIST,4023H
    LJMP BOOT_INT_SERVICE

    ORG 4000H ; APPLICATION STARTS
    ORG 4023 ; INTERRUPT IN APP.
    LJMP APP_INT_SERVICE

Reply
  • Hi,

    You need check the existing of application in bootloder, if applcation exists, the address of interrupt entry should be add the first address of application. For example:
    bootloder starts from 0000H and application starts from 4000h,one interrupt entry at 0023h.

    ORG 0000H ; BOOTLODER
    ORG 0023 ; INTERRUPT ENTRY IN BOOT.
    JB APP_EXIST,4023H
    LJMP BOOT_INT_SERVICE

    ORG 4000H ; APPLICATION STARTS
    ORG 4023 ; INTERRUPT IN APP.
    LJMP APP_INT_SERVICE

Children
No data