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

Segment Naming in linker directive file

Hi,
I am using the linker LX51 ver3.30. I have two questions regarding the linker directive control file:
1. Whats the difference between using the
linker directive ?PR?*?module_name and ?PR?module_name
2. I am using PDATA inside one of my functions:

 
//mod1.c
void func1(void)
{
  static PDATA BYTE var1;
  ....
}

I need to place var1 at a particular location in the data memory(for ex: 0xc000) how can I tell the linker to do it?

-Mathews

Parents
  • ?PR?*?module_name specifies all segments that match these wildcard. For example:
    ?PR?func1?module_name
    ?PR?abc?module_name
    ...

    ?PR?module_name matches only with the segment that has exactly this name.

    Overlayable data segments of functions can be located with LX51 SEGMENTS directive. In uVision2 you can enter this under Options - LX51 Locate - User Segments. When you enter in this field: ?PD?func1?mod1 (X:0xC000) it should do the job, provided that your pdata page is in the address range X:0xC000 .. X:0xC000.

Reply
  • ?PR?*?module_name specifies all segments that match these wildcard. For example:
    ?PR?func1?module_name
    ?PR?abc?module_name
    ...

    ?PR?module_name matches only with the segment that has exactly this name.

    Overlayable data segments of functions can be located with LX51 SEGMENTS directive. In uVision2 you can enter this under Options - LX51 Locate - User Segments. When you enter in this field: ?PD?func1?mod1 (X:0xC000) it should do the job, provided that your pdata page is in the address range X:0xC000 .. X:0xC000.

Children
No data