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

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

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

Jump to solution
783 Views
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 Kudos
1 Solution
770 Views
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];

View solution in original post

0 Kudos
2 Replies
763 Views
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 Kudos
771 Views
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 Kudos