 | Discussion Forum |  |
|
|
Relocation of segments in user-defined memory classNext Thread | Thread List | Previous Thread Start a Thread | Settings | Details | Message |
|---|
Read-Only Author Shane Griffin Posted 22-Jan-2003 20:14 GMT Toolset C51 |  Relocation of segments in user-defined memory class Shane Griffin I have defined my own memory class, ECODE_APP, in ECODE space. The memory range for this class is specified at link time. I have defined a segment in an assembly module, which I wish to locate at the start of this memory class. I have attempted to use the OFFSET relocation type to achieve this, as in the following directive:
VECTOR SEGMENT 'ECODE_APP' OFFS 0
When I link my code, this segment gets placed at the start of ECODE space, not at the start of my ECODE_APP space. In fact, this segment is placed outside of the memory range I have defined for ECODE_APP. Is my understanding of the OFFSET relocation type incorrect? If so, how else can I ensure that this segment gets located at the start of my ECODE_APP space?
Thanks, Shane.
| | Read-Only Author Keil Support Intl. Posted 23-Jan-2003 05:09 GMT Toolset C51 |  RE: Relocation of segments in user-defined memory class Keil Support Intl. The OFFS implies an absolute segment that starts at the base address of the basic memory class plus the OFFSET you are stating. It is useful for interrupt vector redirections, but I guess that you have different need. | | Read-Only Author Shane Griffin Posted 23-Jan-2003 12:23 GMT Toolset C51 |  RE: Relocation of segments in user-defined memory class Shane Griffin Interrupt vector redirection is exactly what I'm doing, but I don't want to relocate the whole ECODE memory class, just the memory class that I have defined myself. I need to ensure that my "secondary" interrupt vectors are located at the start of that user-defined memory class, so I need a way to specify the offset of that segment within that class.
My vector segment seems to be always located at the start of the memory class when I don't specify a relocation type, but I guess this is just lucky. How does the default relocation type (UNIT according to the map file) work?
Thanks, Shane.
| |
Next Thread | Thread List | Previous Thread Start a Thread | Settings |
|