What are the issues in moving from the BL51 Linker to LX51? Has anyone out there tried it? What were your experiences? I'd be using it with the Triscend E5 immediately.
I can only comment on the issues surrounding the use of libraries when moving from BL51 to Lx51 ... and there was really only one :-) When we generate the Salvo libraries for use with BL51, we use the OE flag. For Lx51-compatible libraries, we use the OMF251 flag (same as O2). We had a problem where we were (mistakenly) using the OE and OMF251 flags when builidng the Lx51-compatible libraries in our makefile system. This caused a variety of link-time errors when we build projects that used those libraries. A careful read of the manual showed us the error in our ways ... We didn't have any issues with simple, source-code-build projects in uVision2. But Our experience with 8051 derivates that need the Lx51 linker is admittedly limited. Regards,
I have tried about 20 projects under LX51. The space savings are real, but the linker lies about the magnitude. I have found actual savings are only a fraction of the amount stated. To be fair, I am not sure what the savings are compared to. I am comparing the actual ROM usage when the same project is linked with BL51 and LX51. The only "bug" I've found concerns situations where the ROM does not start at location zero (0). UV2 does not include the definition of the CONST segment in "C Segments" section on the "LX51 Locate" tab. As a result, the linker attempts to locate constants starting at location zero. I had to manually add it to the "User Classes" section. In my case the ROM started at 0x2000 so I added CONST (C:0x2000-C:0xFFFF) to the user segments section. Otherwise I have no complaints.
the linker lies about the magnitude Bob, Can you please send me an example of where the linker inaccurately reports the size savings so I can figure out what's going on. The linker space savings calculation is based on the code size BEFORE linker optimizations. It should be correct, but if there's a problem we need to get it fixed. Jon
Jon You wanted an example of lies about the amplitude Try \\keil\c51\examples\measure A build with BL51 produces a code length of 7037. A build with LX51 (linker code packing off) produces a length of 7037. A build with LX51 (linker code packing on) produces a length of 6982, and the comment was 7313 reduction 4.6% Inspection of the linker lists files is the next step. This is describe as a linker optimization but is it? (1)It is enabled in the C51 tab of Options for target. (2)It only seems to work when the source is C, rather than assembler. Could you expand the explanation of this feature.