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

BL51 to LX51 problems

I'm a relative 8051 noob who's inherited a complex program. This is a banked application for the SiLabs 8051F125. I recently updated/upgraded the tools and want to switch to LX51. When I switched, the linker choked on my .lin file. It refuses to take the RAMSIZE(256) command. There is only an entry in the LX51 manual for RAMSIZE errors, but not the keyword itself... not sure what to make of that. When I remove the RAMSIZE directive, it links and loads fine, but dies almost immediately after the splash screen. Program runs fine linked with BL51. Are there some other changes I need to make? I'm using the L51_BANK.A51 file provided by SiLabs.

thanks for any advice...

Parents
  • "I recently updated/upgraded the tools and want to switch to LX51."

    Is there a particulat reason for needing to switch?
    If not, why not just stick with BL51?

    "I switched, the linker choked on my .lin file."

    I don't think there's any claim or suggestion that LX51 should just be a "drop-in" replacement for BL51?

    You need to study the BL51 Manual, and understand what each and every option in your .lin file is doing;
    Then you need to study the LX51 Manual, and determine what LX51 options you need to achieve the same result.

    "it links and loads fine, but dies almost immediately after the splash screen."

    What dies?
    What "splasg screen"?

    "I'm using the L51_BANK.A51 file provided by SiLabs."

    Is that intended to be compatible with both BL51 and LX51?

Reply
  • "I recently updated/upgraded the tools and want to switch to LX51."

    Is there a particulat reason for needing to switch?
    If not, why not just stick with BL51?

    "I switched, the linker choked on my .lin file."

    I don't think there's any claim or suggestion that LX51 should just be a "drop-in" replacement for BL51?

    You need to study the BL51 Manual, and understand what each and every option in your .lin file is doing;
    Then you need to study the LX51 Manual, and determine what LX51 options you need to achieve the same result.

    "it links and loads fine, but dies almost immediately after the splash screen."

    What dies?
    What "splasg screen"?

    "I'm using the L51_BANK.A51 file provided by SiLabs."

    Is that intended to be compatible with both BL51 and LX51?

Children
  • Andy... I appreciate you taking time to respond, but it seems to me that you quote my message strangely for maximum unhelpfulness. I was asking specific questions after having searched the manuals.

    I want to switch to LX51 because I'm nearing the code size limit for my program and was hoping to take advantage of the advertised 8% size reduction.

    How about this:

    When I attempt to link my program using LX51, the linker doesn't like the RAMSIZE directive in my .lin file (which worked fine for BL51). All of the other directives are in both manuals. Mysteriously, the LX51 manual does not have a page for the RAMSIZE directive, but does have a page for an error relating to it:

    http://www.keil.com/support/man/docs/lx51/lx51_l228.htm

    That's kind of strange I think.

    My program crashes when linked with LX51 but not BL51, and I was suspicious of the banking. The L51_BANK.A51 file says in its header:

    "This file is part of the BL51 / LX51 Banked Linker/Locater package"

    which makes me think it ought to be in principle compatible.

    I didn't have an expectation that LX51 is a drop in replacement, but I couldn't find anything obviously problematic. I was hoping someone might have been down this path before and have some advice.

  • Some of the directives are spelled the same way in both BL51 and LX51. But they are different tools, particularly when it comes to the "important" directives. There's no reason to think a BL51 linker file would be appropriate for LX51 -- even if LX51 doesn't generate any errors.

    The equivalent to BL51 RAMSIZE is LX51 CLASSES.
    http://www.keil.com/support/man/docs/lx51/lx51_classes.htm
    The defaults for LX51 listed in the manual are appropriate for a 256-byte variant (128 bytes in the DATA class, 256 in the IDATA class).

    Yep, it's weird that there's an error message listed in the manual for a directive that doesn't exist. You might use the Keil email address to report the bug (probably a documentation bug, but maybe there's a message in the code that can't be generated or should be edited).

    It seems most likely that the crash is due to incorrect linking.

    Have you reviewed the SiLabs-supplied L51_BANK.A51 file and confirmed that the setting in that file match your hardware and amount of memory (number of banks)?

    Are there reserved areas of memory for memory-mapped hardware? Have you checked the RESERVE and BANKAREA directives to make sure they're blocked off appropriately? Maybe you're missing a directive that you should add.

    It might be useful to post the linker file so we have some idea of what you're changing from the defaults.