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
  • 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.

Reply
  • 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.

Children
No data