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

Downloading and Running a Program from RAM

I have an application that boots up from Flash, and then downloads an application into RAM. The RAM program is downloaded from the .h86 file and then executed by a far jump. Most all of the downloaded RAM code runs fine, but a few of the functions behave oddly. Are there any system initialization operations that should be performed before jumping into the RAM code?

Parents
  • Hi,
    we do have exactly the same architecture and no problems. We start from internal flash at segment 0xc0. In the downloaded application we do have a second startup.a66.

    That's how we realized the jump:

    #define JUMP(ptr) ((void (far*)(void)) ptr)()
    
    PSW_IEN = 0;      //disable int's
    VECSEG &= 0xFF00; //set isr-segment to 0
    JUMP(0x0000);     //jmp to application
    

    It is important to loacate the isr jmp-table correctly. Second you have to think about the EINIT in the startup-code. After the first EINIT some of the initialisations of the applications init will not work.

    Bye
    ...Leo

Reply
  • Hi,
    we do have exactly the same architecture and no problems. We start from internal flash at segment 0xc0. In the downloaded application we do have a second startup.a66.

    That's how we realized the jump:

    #define JUMP(ptr) ((void (far*)(void)) ptr)()
    
    PSW_IEN = 0;      //disable int's
    VECSEG &= 0xFF00; //set isr-segment to 0
    JUMP(0x0000);     //jmp to application
    

    It is important to loacate the isr jmp-table correctly. Second you have to think about the EINIT in the startup-code. After the first EINIT some of the initialisations of the applications init will not work.

    Bye
    ...Leo

Children
No data