Link to CMSIS-DSP with optimization to size don't work

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

Link to CMSIS-DSP with optimization to size don't work

跳至解决方案
2,101 次查看
jespermadsen
Contributor III

I'm using MCUXpresso IDE v11.2.1 and made a project for LPC_11xx with lpcopen and CMSIS-DSP.

when I change the optimization to size i get a hardfault when it calls the CMSIS-DSP arm_fir_fast_q15 function.

Seems to work at the -O3 optimization.

 

0 项奖励
回复
1 解答
2,088 次查看
jespermadsen
Contributor III

I found out that the fir data has to be aligned with 4 bytes:

static __attribute__((aligned(4))) q15_t firStateQ15[BLOCK_SIZE + NUM_TAPS - 1];

在原帖中查看解决方案

0 项奖励
回复
2 回复数
2,081 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello jespermadsen,

You can run into that function, and check the disassemble to confirm which code

made hardfault.

 

 

Regards,

Alice

 

         

0 项奖励
回复
2,089 次查看
jespermadsen
Contributor III

I found out that the fir data has to be aligned with 4 bytes:

static __attribute__((aligned(4))) q15_t firStateQ15[BLOCK_SIZE + NUM_TAPS - 1];

0 项奖励
回复