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

Building hex file with external function

Hello,

I want to build a system where all the standard functions are already in FLASH (something like a BIOS), this is no problem to generate this.

But, how can I build and link/locate an other application without having the functions which are already in the flash.

So how can I tell the linker/locator that the library functions are available and are at there addreses?

Regards Mark,

Parents
  • As Thomas suggested, you should be able to locate the BIOS functions at certain addresses and call them using those addresses. It can be done with macros:

    #define bios_func ((void (*)(void))0x123456)
    ...
    bios_func();
    


    If the BIOS uses any static variables, you must make sure they don't clash with the main program's variables.

Reply
  • As Thomas suggested, you should be able to locate the BIOS functions at certain addresses and call them using those addresses. It can be done with macros:

    #define bios_func ((void (*)(void))0x123456)
    ...
    bios_func();
    


    If the BIOS uses any static variables, you must make sure they don't clash with the main program's variables.

Children
No data