Mismatch between generated S19 file and XMAP file?

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

Mismatch between generated S19 file and XMAP file?

1,116 Views
PederOlav
Contributor I

Hi

 

My S19 file shows data in address (ROM) where the XMAP file tells me there should not be any data...

What am I missing?

 

I have some code for MCF52235 and compiled/linked in CW 6.3.

This code I place from address 0x0001 C000 (se linker file).

Max. internal flash (ROM) is 0x0003 FFFF (256K)

 

The linker generates an error if i use length 0x00024000 for ROM, so I just use 0x26000 for testing.

 

From lcf file

# NB! Should have been LENGTH = 0x00024000
   rom     (RX) : ORIGIN = 0x0001C000,  LENGTH = 0x00026000

 

I do program this code anyway and it seems to run fine...

 

From the XMAP file the ROM ends at 0003E190:

>0003E190          ___DATA_ROM (linker command file)

 

But in the S19 data continues to about  00040B58

 

Please can anyone explain to me what is happening here?

What is this data in S19 that goes beoynd the XMAP last ROM address 0003E190?

 

Thanks

 

Peder Olav

 

PS! I have atteched lcf, s19 and xmap files (the xmap and lcf files are just renamed to txt due some restrictions at this forum)

Labels (1)
0 Kudos
3 Replies

451 Views
CrasyCat
Specialist III

Hello

 

The sections size displayed in the .XMAP file represents the actual section size from output section .text.

In your .lcf file you have the line

 

    .data_bss : AT(___DATA_ROM)
which tells the linker to store initialization value for the output section .data at address __DATA_ROM (i.e. after the section .text).

 

This is why your .srecord file contains data after the address 0003E190.

 

CrasyCat

0 Kudos

451 Views
CompilerGuru
NXP Employee
NXP Employee

It might also be a good idea to splitup  .data_bss in the lcf to 2 sections, one for initialized data and one for uninitialized data.

 

When not using the AT for the .bss part, there would be no ROM memory allocated for the 0 initialized data. See the lcf's in the CW samples.

 

0 Kudos

451 Views
PederOlav
Contributor I

Thanks :smileyhappy:

 

I will look more into how the link file works.

0 Kudos