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

Freezing a link for further development

Hello,

I have developped a rommask on 8051 with C51 and BL51.

Today, I have to add a patch in EEPROM on this rommask.

But, only for easy debugging purpose, I would like to build the patch together with the rommask.

The problem is that the linker merges both codes (rommask+patch), so the debugged patch won't be the same than expected.

Does anybody know whether there is a way to 'freeze' the rommask link (e.g. like a library - tried Librarian, but unefficient) ?

Thanks for any reply (even if it is a bad new).

Laurent.

  • I'm not entirely positive, but the following two ways may both be applicable:

    1) link the ROM code as an already linked image file (linker output), instead of the individual object files, and then use an intelhex file tool to remove it from the generated file again.

    2) Use a manually tailored program to extract all used addresses from the map file of the ROM image, and #include that into the new code (by analogy to Windows DLL programming: create an "import library").

  • Thanks for your answer.

    1) I don't understand : once the rom code is linked, there's no way to import it in a uV2 project ?

    2) I have thought to this way, but the problem is in rom called functions parameters : I have to manually update the registers and local overlaped variables.

    In fact, I can force the linker to not merge both codes (by using another code segment), but I can't tell it to NOT update the intra-bank area (each time my patch calls a banked rom function).