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

MDK 4.12 linker issue

Hello,

I have had a few exchanges with Alexander of Keil support concerning a problem with the new linker - it seems to somehow misjudge the load region size required for an application (LPC2478 target), which is problematic for programs that have a tight ROM budget and are on the edge of it (yes, I'm on the edge...). The problem is that linking fails. It does not seem to have any impact on smaller targets nor on the correctness of the code. It can be bypassed by increasing the size of the load/execution regions to allow linking to succeed, but for obvious reason that it inadvisable.

Parents
  • Tamir,

    I have noticed this same problem.
    Increase the linking ROM space, compile then it fits.

    However in my project you can then decrease the ROM space to the correct size and the on the second compile the linker will then magically work!

    In fact in a number of my projects, the first compile is bigger than subsequent compiles, without me making any changes, just clicking the compile button. I have noticed one project shrink 3 times!

    You can see this by deleting all compiler temporary files manually and then watch as it magically shrinks on subsequent compiles. (The compile all button does not have the same effect as deleting all the temporary files.)

    Stuart.

Reply
  • Tamir,

    I have noticed this same problem.
    Increase the linking ROM space, compile then it fits.

    However in my project you can then decrease the ROM space to the correct size and the on the second compile the linker will then magically work!

    In fact in a number of my projects, the first compile is bigger than subsequent compiles, without me making any changes, just clicking the compile button. I have noticed one project shrink 3 times!

    You can see this by deleting all compiler temporary files manually and then watch as it magically shrinks on subsequent compiles. (The compile all button does not have the same effect as deleting all the temporary files.)

    Stuart.

Children
  • Stuart,

    Thank for your reply. Alexander told me that the compiler/linker teams are working on a patch to address some of the issues. The fact that subsequent builds are smaller is normal and due to optimization (the first build generates the linker feedback file). I have also noticed that if the size of my binary "creeps" upwards to 4[KB] (bootloader size limit), it fits even with MDK 4.11. But if the project is then cleaned - the very same come will never link again...! As I said, they're working on it. I am forced to use 4.11 until these issues are addressed.

  • Hi,
    I've got a problem with the LPC2103 which may be this issue... my application (which only just fits in the 32K of flash) builds and runs fine on 4.11. However with 4.12 first of all it wouldn't fit on the chip, but magically it did fit after tinkering with the build options (not changing anything significant though), it's bigger than with 4.11 and crashes after a short time (then the watchdog bites).
    Going back to 4.11 it works fine.
    John

  • Is this issue resolved yet? or has it been a silent change to 4.12?