lpcware

__CLZ and SSAT in DSP_LIB are broken and crash with UndefInsr

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by Dmitry on Sun Nov 13 05:11:46 MST 2011
I am modifying the example project [B]adc_semihosting[/B] to work with DSP library and do some FFTs. Here's my setup:

uP: LPC1769 on LPCXpresso board
dsplib: CMSISv2p00_DSPLIB_CM3

I added the library .a file to the library search paths, and "${workspace_loc:/CMSISv2p00_DSPLIB_CM3/inc}" to include directory.

It builds OK with the following warnings:
[FONT=Lucida Console]warning: implicit declaration of function '__CLZ'
and
warning: implicit declaration of function '__SSAT'[/FONT]

I initialise the FFT like so:
[FONT=Courier New]arm_rfft_init_q15(&S,&S_CFFT,N_samples,ifftFlag,doBitReverse);[/FONT]
(same as in the example code)

When I run the program it crashes on the line
[FONT=Courier New]arm_rfft_q15(&S, ADC_samples,OutputFFT);[/FONT]
and ends up in  [FONT=Courier New]HardFault_Handler(void)[/FONT]
Looking at Core Registers in debugger, it shows a [I]UndefInsr[/I] in Faults register.

I am wondering why the compiler is not recognising the CLZ and SSAT instructions, and why program crashes with such result?
Am I missing some includes or what?

Thanks for looking!

Outcomes