problem using __SEG_END_ feature

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

problem using __SEG_END_ feature

Jump to solution
803 Views
rlw
Contributor I

I am using CodeWarrio ver 5.0, build 9061 for S12X with build tool update 5.0.1, build 10038

 

I put the following in my code:

#pragma DATA_SEG EOLPROGvunsigned short EOLcode;#pragma DATA_SEG DEFAULTextern unsigned short __SEG_END_EOLPROG[];

 

and then, in my PRM file, in the PLACEMENT section:

EOLPROG         INTO    NO_INIT     0x7F6C00'G TO 0x7F6FFF'G;

 

But,  the address of __SEG_END_EOLPROG was 0x7F6C02. I was expecting it to be 0x7F7000.

 

While I can unserstand that "EOLPROG INTO EOLRESERVED" would get that result, here I am directly defining the address range for EOLPROG, so it would be reasonable to expect the address of __SEG_END_EOLPROG would be 0x7F7000.

 

Any other way to get what I am looking for? (other than defining 2 ranges)

Labels (1)
Tags (1)
0 Kudos
1 Solution
555 Views
CrasyCat
Specialist III

Hello

 

The linker is always allocating a section at the beginning of the segment where it is placed.

 

You cannot direct it to allocate the section at the end of a memory area.

 

See following post for instruction on how to request an extension in the tool chain.

 

https://community.freescale.com/thread/77166 

 

CrasyCat

View solution in original post

0 Kudos
1 Reply
556 Views
CrasyCat
Specialist III

Hello

 

The linker is always allocating a section at the beginning of the segment where it is placed.

 

You cannot direct it to allocate the section at the end of a memory area.

 

See following post for instruction on how to request an extension in the tool chain.

 

https://community.freescale.com/thread/77166 

 

CrasyCat

0 Kudos