Inter-procedural analysis (CW 10.6 DSC motor control)

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

Inter-procedural analysis (CW 10.6 DSC motor control)

701 Views
fasihahmed
Contributor IV

Hey,

I am using Code Warrior development studio 10.6 for DSC MC56F82478. My flash has been consumed to almost 93% so I made optimization in project settings by turning on Inter-Procedural Analysis from Off to File. This reduced by flash consumption down by roughly 20%. 

pastedImage_1.png

However the code did not run, so after comparing two elf.xMAP files for both non-optimised and optimised versions, we saw that vector.txt file was left out, which is important for code to run properly.

So I found this file was lying in Vectors.c and I turned off IPA for that specific .c file. This made the vector.txt file to come back again but also the flash size came back to 93%.

pastedImage_5.png

So my question is, is there a way where we can chose certain c files to be left out in IPA optimization which will allow me have a decreased flash size but still keep certain parts of program. 

best regards

Fasih

0 Kudos
2 Replies

570 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi Fasih,

 -ipa is only available in commandline mode.

To reduce code size, We normally use size optimization .

pastedImage_1.png

BR

Jennie Zhang

0 Kudos

570 Views
fasihahmed
Contributor IV

We found that vector.c basically handles all the interrupt calls, so when it was cleared during optimization, all the different function called inside ISRs were also removed, which was the reason why so much flash was saved. 

So this means that the code can not be optimized further down. So do some of your experts have some tips how to use/save flash more smartly? 

0 Kudos