The release build issue

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

The release build issue

372 Views
jasonedn
Contributor II

The RT1062 project debug build worked properly, but when the release build and the optimize most(-O3) are selected for fsl_spdif.c, it always enters HardFault_Handler().

The disassembly codes were analyzed as below and they seemed not correct. ".IsRxAutioSync" was interpreted as ".IsTxAutioSync", and some variables such as .txClkSource were ignored. 

spdif_getdefaultconfig.png

0 Kudos
2 Replies

327 Views
jasonedn
Contributor II

Hi Edwin,

Thanks for your reply.

Jason

0 Kudos

346 Views
EdwinHz
NXP TechSupport
NXP TechSupport

Hi @jasonedn,

This is definitely an unintended side effect of the aggressive optimization efforts of the GNU -O3 optimization level. Since that depends on the compiler, I'm afraid there is not much I can recommend other than to refrain from using -O3 and stick to -O2 instead.

BR,
Edwin.

0 Kudos