Generate a WRONG S19 file after files are excluded and included again without changing any code

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

Generate a WRONG S19 file after files are excluded and included again without changing any code

Jump to solution
1,241 Views
citycom
Contributor I

We found a big problem with the CodeWarrior IDE for HCS08. When a group of files are excluded and included again (without changing any source code and file inclusion) in a target, the complier would generate a WRONG S19 file for the target and some of the functions during the operation will be fail (e.g. jump to a dummy interrupt) and cause the MCU hang. Following is an example to show this big problem.

 

We use the Demo project provided by Freecale, which is the example for 802.15.4. Following are the testing steps:

1.      Create a new target (Test01) by “Clone existing target” and select “My Wireless App Ex08b”.

2.      Change the Application Filename path to “My_Wireless_App_Data\Test01\Test01.elf” in the target setting.

3.      Remove all the object code of all targets.

4.      Select the target “My Wireless App Ex08b” and “Make” the S19 file for the target.

5.      Select the new target “Test01” and “Make” the S19 file for the target.

6.      By using the “Compare Files” function of the CodeWarrior, it is found that the two generated S19 files are the same. (Only one line recording the date and time of the S19 file is different)

7.      Rename the file “Test01.s19” to “Test01_orig.s19”.

8.      Select the target “Test01”

9.      Use the mouse to include all the files in “MyApps” to the target as shown in Figure 1.

Figure 1

10. Use the mouse to click the same point again to exclude all the files in “MyApps” from the target as shown in Figure 2.

Figure 2

11. Include the file “MyApp_Ex08b.c” and “ToolBox.h” to the target again to make it change back to the original file inclusion.

Figure 3

12. Clear the object code of the “Test01” target and “Make” the S19 file.

13. By using the “Compare Files” function of the CodeWarrior, it is found that most of the contents of the new generated S19 file “Test01.s19” are different with the original one “Test01_orig.s19”.

 

This is a big problem of the CodeWarrior, since our developer may clone the target and include different files for different targets base on a core target. The problem cause the new generated application targets fail and hang during the operation. It is expected that NO any change of the S19 file should made by the complier when the file is exclude form and include into the target again.

 

Please advise any solution to solve this problem.

 

Attached please find our test project.

Our CodeWarrior IDE version is 5.7.0 Build 1932.

Labels (1)
Tags (1)
0 Kudos
Reply
1 Solution
652 Views
CompilerGuru
NXP Employee
NXP Employee

Is the link order of the two targets the same? If not (I would guess the readded file gets added at the bottom), then the different code generated is to be expected.

Make sure the link order is the same (drag and drop in the link tab of the project).

 

Daniel

View solution in original post

0 Kudos
Reply
2 Replies
653 Views
CompilerGuru
NXP Employee
NXP Employee

Is the link order of the two targets the same? If not (I would guess the readded file gets added at the bottom), then the different code generated is to be expected.

Make sure the link order is the same (drag and drop in the link tab of the project).

 

Daniel

0 Kudos
Reply
652 Views
citycom
Contributor I

Thanks for your reply. 

Do you mean the link order will affect the operation of the program and make it fail?

In our development, we find that the program always hang when writing the NVRAM (by calling the function Update_NV_RAM which is provided in MAC layer library).

0 Kudos
Reply