Memory class question

Is it possible to place some critical variables, as near memory type, in the on-chip 1K memory, yet other non-critical variables, still declared as near memory type, in the external memory? In other words, how do you explicitly place two variables, both declared as near, into two seperate memory spaces - on-chip 1k and external memory?

Parents
  • You have 2 groups of XDATA:
    INT: 0x0000-0x3FFF
    EXT: 0x0400-0xFFFF

    Here is one way. Declare all the xdata variables that you want to be located in memory space EXT in one file, say "ExtDecl.c".

    Then in the "BL51 Locate" options tab of the project options add "?XD?EXTDECL(0x0400)", with no quotes, to the XDATA line. This tells the linker to take all xdata variables found in ExtDecl and to start placing them at location 0x400.

Reply
  • You have 2 groups of XDATA:
    INT: 0x0000-0x3FFF
    EXT: 0x0400-0xFFFF

    Here is one way. Declare all the xdata variables that you want to be located in memory space EXT in one file, say "ExtDecl.c".

    Then in the "BL51 Locate" options tab of the project options add "?XD?EXTDECL(0x0400)", with no quotes, to the XDATA line. This tells the linker to take all xdata variables found in ExtDecl and to start placing them at location 0x400.

Children
More questions in this forum