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

split a program into two and locate at different addreses

I want to split my program in two and locate at differenct addreses.

main program may be located at 0x1000. and only one function called by main shall be located at say 0x8000. how to create that function and compile using CA51 and load it into the Cygnal F124.

this is required because we frequenctly change these function not all the main program. i shall be able compile the single function and load it into the code memory at 0x8000.

  • "this is required because we frequenctly change these function not all the main program."

    But what is the benefit of downloading only the changed part, over downloading the whole application? Is it worth the effort?

    If you're only updating part of your code, you have the additional problem of ensuring that the updated part is still 101% compatible with the non-updated part. Is this worth the risk?

    Why not just update the whole thing and be done with it?!

  • I'am a ASIC designer, I have the same question. I want to put some kernel code written by c on the ROM emmbeded in the chip, and the application code(written by c too) out the chip can call the kernel code. How to implement the idea.

  • If you really must try this, there are several things to keep in mind:

    1) The entire "ROM" code will have to be compiled as reentrant, or at least with overlaying completely turned off. That's
    because there's no way the call tree analysis usually done by Keil tools can have the same results irrespective of what the "application" code is doing, so you must avoid call tree analysis completely.

    2) You'll either have to link the "ROM" code into every build of the application code, then massage the resulting HEX file to isolate the application code (and make sure the ROM code generated didn't change in the process), or generate a list of located declarations of all global variables and functions of the ROM code from its map file, to #include in the application code (if you've done Windows programming, you'll recognize the concept of an "import library").

  • I want to provide a facility to my end user so that they change the program as per their requirement. all the main kernel will have to do is to call the "userapp()".

    i want to know how create only the userapp() function and load it in memory.

    Thanks for your reply.

    Haribabu