SROM Sections

I have an XC167 application that needs to place the code from two modules into the SROM class in order to copy code from Flash to the internal program memory. I can use the following in the User Sections of the Linker but this will not adapt automatically to the growth of the first module.

?PR?ABC%ABC_CODE(0xe00000)[],
?PR?DEF%DEF_CODE(0xe00400)[]

Is there a way of specifying that the sections are placed immediately after one another?

Parents
  • Hi Barry,

    unfortunetaly no, as far as I know.
    You have to get the length from a look inside the map file.
    But may be, you can combine your code
    in one class (using #pragma rename CODECLASS=YOURCLASS) for this module
    and locate the whole class, for e.g.
    MYCLASS(0xE00000-0xE00420)
    instead of:
    ?PR?ABC%ABC_CODE(0xe00000),
    ?PR?DEF%DEF_CODE(0xe00400)

    But you have also to get the length, from the
    map. I hope KEIL support can answer this question.

    Stefan

Reply
  • Hi Barry,

    unfortunetaly no, as far as I know.
    You have to get the length from a look inside the map file.
    But may be, you can combine your code
    in one class (using #pragma rename CODECLASS=YOURCLASS) for this module
    and locate the whole class, for e.g.
    MYCLASS(0xE00000-0xE00420)
    instead of:
    ?PR?ABC%ABC_CODE(0xe00000),
    ?PR?DEF%DEF_CODE(0xe00400)

    But you have also to get the length, from the
    map. I hope KEIL support can answer this question.

    Stefan

Children
More questions in this forum