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

Linker Code packing causing problems

Hi,
I am porting my code from compiler C51 ver6.23 and BL51 to the new compiler and linker , C51 ver 7.00 and LX51 ver3.30 . This was to take advantage of the optimisation features of the LX51's linker code packing.
The code when compiled and linked while disabling the Linker code packing works just fine. But once I enable the linker code packing the executable doesn't function properly on the target hardware. I feel some corruption of my data is occurring. Just by using this feature I could straight away reduce the code size by 3%.
Any suggestions on how I could debug this??

And another problem I faced is untill I decalare my PDATA variables as static PDATA the LX51 linker doesn't put them into PDATA Segment...!!

Thanks,
-Binu

Parents
  • Just in case you didn't know you can viev a combined assembly/source listing by selecting:
    "Options for target", "Listing", "Linker code listing".

    If you have a reasonable idea where the program is going wrong you may be able to spot the problem in the generated assembler.

    It may be worth reducing the optimisation level to zero with the code packing switched on - this will give the code packer different code to work with. If your problem disappears, work up through the optimisation levels until the problem reappears then compare the .cod files from the working and faulty builds.

    I'd be very grateful if you'd let me know what problem you find as I am also using LX51 V3.30.

Reply
  • Just in case you didn't know you can viev a combined assembly/source listing by selecting:
    "Options for target", "Listing", "Linker code listing".

    If you have a reasonable idea where the program is going wrong you may be able to spot the problem in the generated assembler.

    It may be worth reducing the optimisation level to zero with the code packing switched on - this will give the code packer different code to work with. If your problem disappears, work up through the optimisation levels until the problem reappears then compare the .cod files from the working and faulty builds.

    I'd be very grateful if you'd let me know what problem you find as I am also using LX51 V3.30.

Children
No data