Release Mode Optimizations and Binary Creation

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

Release Mode Optimizations and Binary Creation

433 Views
benjaminvespone
Contributor I

Hi All,

I have an application that is working well, but I am experiencing strange discrepancies when creating a binary (.hex) in release mode.

Processor: MKL17Z64

binary sizes under different circumstances:

Debug Mode, load onto Flash w/KDS: ~52kB (console reported binary size)

Debug Mode, generated .hex file: ~52kB

Release Mode, load onto Flash w/KDS: ~52kB (console reported binary size)

Release Mode, generated .hex file: ~35kB

If I attempt to flash the release mode .hex file with a production utility (Segger J-Flash), the code does not work. The debug version generated .hex file works fine flashing with Segger tool. Based on the code size difference, it seems to be that something was removed or optimized away. 

If it makes any difference, I'm using the Kinetis SDK. 

Any thoughts?

Thanks,

Ben

0 Kudos
1 Reply

325 Views
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Ben,

Please share more information about your quesiton:

-The version of KDS and SDK;

-What about your project ? Demo project or create by yourself? Could you please send it to me.

I will Help you check it on my side.

BR

Alice

0 Kudos