The release build issue

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

The release build issue

520 次查看
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 项奖励
回复
2 回复数

475 次查看
jasonedn
Contributor II

Hi Edwin,

Thanks for your reply.

Jason

0 项奖励
回复

494 次查看
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 项奖励
回复