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

bank switch link fail

Link fail !! when I set the bank switch area to 0000h~efffh ,
error message : ADRESS SPACE OVERFLOW CODE

but , 0000h~ffffh bank setting is OK ,and I'm
sure My bank0&1 code size < 40k.
Did I missing some thing?

  • The common bank also includes constants and and a copy of the initialized data.

    If your system uses full 64KB banks, as opposed to the 32KB + Nx 32KB bank scheme, then all of the common code, constants, etc, must be duplicated in each bank. So, the total memory consumed can be larger than the sum of the pieces.

    The address overflow message means that the linker can't find enough space for all the code (and other items). Increasing the memory makes the problem go away, which seems consistent.

  • Thanks for your kindly reply.
    I had tried to modified the bank area to 0000~fffe ,but the project linking was still failed.
    I guess the end of banking address can't be other setting execpt ffffh.
    May I have your advise again?
    Thank you.

  • If you are trying to prevent the linker from using a certain range of memory (because, for instance, you have hardware devices memory-mapped there), you might be interested in the RESERVE directive. See the LX51 Locate tab.