cancel
Showing results for 
Search instead for 
Did you mean: 

ARM DSP with STM32f334c8

ASSAAD.ASSAAD
Associate II
Posted on November 11, 2015 at 12:20

Hello ;

I have a problem for the last few days it made be puzzled hope you could help me please . I am using keil compiler with STM32f334c8 ; I had a project based on stm32f429 using FFT from ARM DSP library ; there is a file arm_common_tables.c generate a code size of about 38kbye ; when I move to a new project based on STM32f334c8 the generated code is 160kbyte ! What I am missing here , any I dea please ?

arm_status status; 
float32_t maxValue; 
arm_cfft_radix4_instance_f32 S; 
//status = ARM_MATH_SUCCESS; 
/* Initialize the CFFT/CIFFT module */ 
status = arm_cfft_radix4_init_f32(&S, fftSize, 
ifftFlag, doBitReverse); 
/* Process the data through the CFFT/CIFFT module */ 
arm_cfft_radix4_f32(&S, testInput_f32_10khz); 
/* Process the data through the Complex Magnitude Module for 
calculating the magnitude at each bin */ 
arm_cmplx_mag_f32(testInput_f32_10khz, testOutput, 
fftSize); 
/* Calculates maxValue and returns corresponding BIN value */ 
arm_max_f32(testOutput, fftSize, &maxValue, &testIndex); 

I am using these code in too diffirent project ; but I get RO size diffirent . Thank you inadvanced
4 REPLIES 4
AvaTar
Lead
Posted on November 11, 2015 at 14:58

I don't think it has to do with the arm_common_tables.h file.

If I remember correctly, the CFFT example you are referring to (coming with the DSP Lib code), has it's ''input signal'' hardcoded as ''const'' data in a separate file. To confirm this, find out where the

testInput_f32_10khz[]

array is defined (not declared !). In your application, it will probably end up in the code section (i.e. Flash). Check the MAP file where this array is located - or if you have replaced it. In addition, check that your F334 project uses the FPU (build option ''-mfloat-abi'' is either ''softfp'' or ''hard''). Option ''soft'' (no FPU) will pull in additional emulation code. And of course, have equivalent optimisation settings in both projects.
Posted on November 11, 2015 at 15:15

I'm not sure Keil has the same soft/hard distinction, things are build with ''Use FPU'' or not.

I'd double check you're using the same version of the CMSIS library, and the defines passed into the compiler.

__TARGET_CPU_CORTEX_M4_FP 1

ARM_MATH_CM4 1

ARM_MATH_MATRIX_CHECK 1

ARM_MATH_ROUNDING 1

__FPU_PRESENT 1

And pulling in the right library file.

STM32F30x_DSP_StdPeriph_Lib_VX.X.X\Libraries\CMSIS\Lib\ARM\arm_cortexM4lf_math.lib

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
AvaTar
Lead
Posted on November 11, 2015 at 16:22

You are probably right. However, I don't have/use Keil, so I leave it to the O.P. to check those settings.

I guess for the price of this toolchain, on can expect a builtin ''single-click GUI solution'' to switch between FPU and emulation ...

ASSAAD.ASSAAD
Associate II
Posted on November 15, 2015 at 11:33

Thank you all ;

I will try it .