CodeWarrior 5.2 S19 Compare

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

CodeWarrior 5.2 S19 Compare

Jump to solution
2,040 Views
fanziyu
Contributor IV

MCU MC9S12G128

TOOL Codewarrior 5.2 

Problem:

I have a project "A" ,then i make a new project "B" which have the same code with project "A" ,then i make another new project "C" which have the same code with project "A".Finally i find that the S19 files of the three projects are all different.I do not use "import project" function to make the three projects.What is more,the three project all work well in the mcu,all functions are normal.

In my mind,as long as the code is the same,the files to be programed into the mcu should be the same.

Could you help me ?

0 Kudos
Reply
1 Solution
2,002 Views
RadekS
NXP Employee
NXP Employee

Hello fanziyu,

interesting topic. Generally yes, if all conditions are the same, you should get the same result.

From your picture:

  • please ignore the first line starting with S0 - it is just a header - no relationship to MCU memory content.
  • The initial part of code (approx. 0xC000~0xC050) is identical - that will be most probably startup code.
  • The next code looks quite similar with differences at dedicated places - it looks like some offset in addresses. For example 0887AA 0887AF 08 97B9 vs 08ACA1 08ACA6 08ACB0.

If you would like to investigate, please compare the map files and check whether variables are on the same places in memory.

Of course, as first you should compare the content of linker files and check whether you have the same compiler and linker settings.
For example: The linker file may contain some constant names in ENTRIES section. These constants will be not excluded by linker as unused (default behavior). This may be also confirmed in map file where all unused variables/constants are listed in one of the sections. 

I hope it helps you.

Best regards

RadekS  

View solution in original post

0 Kudos
Reply
2 Replies
2,003 Views
RadekS
NXP Employee
NXP Employee

Hello fanziyu,

interesting topic. Generally yes, if all conditions are the same, you should get the same result.

From your picture:

  • please ignore the first line starting with S0 - it is just a header - no relationship to MCU memory content.
  • The initial part of code (approx. 0xC000~0xC050) is identical - that will be most probably startup code.
  • The next code looks quite similar with differences at dedicated places - it looks like some offset in addresses. For example 0887AA 0887AF 08 97B9 vs 08ACA1 08ACA6 08ACB0.

If you would like to investigate, please compare the map files and check whether variables are on the same places in memory.

Of course, as first you should compare the content of linker files and check whether you have the same compiler and linker settings.
For example: The linker file may contain some constant names in ENTRIES section. These constants will be not excluded by linker as unused (default behavior). This may be also confirmed in map file where all unused variables/constants are listed in one of the sections. 

I hope it helps you.

Best regards

RadekS  

0 Kudos
Reply
2,026 Views
lama
NXP TechSupport
NXP TechSupport

Hi,

I do not believe we will be able to help you.. Why? Original project was probably done under different version of the CW. A new project has probably different optimization, compiler setup, variables setup, ….. I can not imagine how to compare two existing projects for all possible setup options in the environment. There is also possibility that there was some patch installed. There could be anything.

Best regards,

Ladislav

Tags (1)
0 Kudos
Reply