Seeking Guidance on the Impact of -O1 Optimization on Flash Size and Potential Issues in S32DS (S32K

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

Seeking Guidance on the Impact of -O1 Optimization on Flash Size and Potential Issues in S32DS (S32K

Jump to solution
374 Views
ChandlerX
Contributor I

Dear NXP Team,

I hope this message finds you well.

I am currently working on a project using S32DS with the S32K146 SDK. Initially, I was using the -O0 optimization level for my program. However, I encountered an issue where the Flash space exceeded the specified limit. To address this, I switched the optimization level from -O0 to -O1, which has successfully reduced the Flash size.

While this change has improved the Flash usage, I am unsure whether this optimization could lead to any potential issues or affect the functionality of the program. I would appreciate it if you could provide guidance on the following:

  1. Impact of Switching from -O0 to -O1:
    Does switching from -O0 to -O1 pose any potential issues or risks in terms of functionality or behavior, particularly within the S32K146 SDK environment? Are there any specific aspects I should be aware of when making this change in the context of embedded systems?

  2. Future Adjustments to Higher Optimization Levels:
    If I were to further adjust the optimization level to -O2 or -O3 in the future, what potential issues should I anticipate, especially concerning Flash memory usage and program stability? Would such higher optimization levels affect the functionality or cause compatibility issues with the Flash memory layout or other system components?

  3. Optimizing Flash Size:
    Given that Flash space is a critical concern in embedded systems, I would also like to ask if there are any recommended methods or best practices to further reduce Flash size . For instance, are there specific flags, strategies, or optimizations that would help optimize memory usage without compromising performance?

Your expert guidance on these points would be greatly appreciated, as it will help ensure the stability and efficiency of the system moving forward.

Thank you for your time, and I look forward to your response.

Best regards,
ChandlerX

0 Kudos
Reply
1 Solution
321 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Please find the SDK revision you use in this link:

https://www.nxp.com/webapp/swlicensing/sso/downloadSoftware.sp?catid=SW32K14-SDK1D

Each revision has its own release notes.

 

Best regards,

Daniel

View solution in original post

0 Kudos
Reply
4 Replies
348 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Hi @ChandlerX,

Refer to the release notes of the SDK you use, it specifies the optimization level at which it has been developed and tested.

We cannot guarantee the functionality of the drivers at different optimization levels.

All the compiler options must be set as per the release notes.

 

Regards,

Daniel

 

 

0 Kudos
Reply
333 Views
ChandlerX
Contributor I

Hi Daniel,

Could you kindly share the link to the SDK release notes you mentioned? I'm not very familiar with them.

I appreciate your assistance.

Best regards,
ChandlerX

0 Kudos
Reply
322 Views
danielmartynek
NXP TechSupport
NXP TechSupport

Please find the SDK revision you use in this link:

https://www.nxp.com/webapp/swlicensing/sso/downloadSoftware.sp?catid=SW32K14-SDK1D

Each revision has its own release notes.

 

Best regards,

Daniel

0 Kudos
Reply
229 Views
ChandlerX
Contributor I
Thank you
0 Kudos
Reply