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:
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?
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?
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
Solved! Go to Solution.
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
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
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
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