Problem in linker file of Comic compiler for the .data and .bss sections

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

Problem in linker file of Comic compiler for the .data and .bss sections

648 Views
ahmedfouda
Contributor I

I'm using cosmic compiler. For S12x micro controller.

 

In the linker file if I set the following

 

+seg .data       -b 0x2110 -o 0x2110 -m 0x1EF0  -n .data
+seg .bss                                       -n .bss

 

The System works fine but If I change it to

 

+seg .data       -b 0xFE000-o 0x2110 -m 0x1EF0  -n .data
+seg .bss                                       -n .bss

 

The system doesn't work.

 

The only difference is that in the second case I put the global address, Do you have any idea what is the problem.

I need to use the second option due to some constraints within my application.

Labels (1)
0 Kudos
1 Reply

339 Views
Pedro_
Contributor III

It would be best if you could provide info on how other segmets are configured.

For example, where is your stack? Why did you define your data with maximum size of 0x1EF0?

 

I believe the problem is that the physical and logical addresses don't match.

 

Try this:

+seg .data       -b 0xFE000 -o 0x2000 -m 0x1EF0  -n .data
+seg .bss        -a.data -n .bss

0 Kudos