2015-11-11 03:20 AM
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
2015-11-11 05:58 AM
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 thetestInput_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.
2015-11-11 06:15 AM
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 1ARM_MATH_CM4 1ARM_MATH_MATRIX_CHECK 1ARM_MATH_ROUNDING 1__FPU_PRESENT 1And pulling in the right library file.STM32F30x_DSP_StdPeriph_Lib_VX.X.X\Libraries\CMSIS\Lib\ARM\arm_cortexM4lf_math.lib2015-11-11 07:22 AM
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 ...2015-11-15 02:33 AM