2015-07-04 06:46 AM
Hi, I'm trying to setup a project using System Workbench and CubeMX on an Nucleo Board (411RE).
Could someone tell me a step by step on how to do that? I have an example fromSTM32Cube\Repository\STM32Cube_FW_F4_V1.5.0\Drivers\CMSIS\DSP_Lib\Examples\arm_fft_bin_example\ARMarm_fft_bin_example_f32 and can't make it compile. I addARM_MATH_CM4 symbol on project properties, I've enable fpu hardware on project properties too, I've add__FPU_PRESENT symbol, but nothing of it seems to solve my problem:10:36:37 **** Incremental Build of configuration Debug for project FFT_01 ****
make all
'Building target: FFT_elf'
'Invoking: MCU GCC Linker'
arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -L''C:\Users\Leo Garbe\workspace_stdlib\nucleo-f411re_hal_lib\Debug'' -L''C:\Users\Leo Garbe\STM32Cube\Repository\STM32Cube_FW_F4_V1.5.0\Drivers\CMSIS\Lib\ARM'' -T''C:\Users\Leo Garbe\workspace_stdlib\FFT_01\LinkerScript.ld'' -Wl,-Map=output.map -Wl,--gc-sections -lm -o ''FFT_elf'' @''objects.list'' -lnucleo-f411re_hal_lib
src/main.o: In function `main':
C:\Users\Leo Garbe\workspace_stdlib\FFT_01\Debug/../src/main.c:49: undefined reference to `arm_cfft_f32'
C:\Users\Leo Garbe\workspace_stdlib\FFT_01\Debug/../src/main.c:53: undefined reference to `arm_cmplx_mag_f32'
C:\Users\Leo Garbe\workspace_stdlib\FFT_01\Debug/../src/main.c:56: undefined reference to `arm_max_f32'
C:\Users\Leo Garbe\workspace_stdlib\FFT_01\Debug/../src/main.c:73: undefined reference to `arm_cfft_sR_f32_len1024'
collect2.exe: error: ld returned 1 exit status
make: *** [FFT_elf] Error 1
On the source code I have a bug symbol on
/* Process the data through the CFFT/CIFFT module */
arm_cfft_f32(&arm_cfft_sR_f32_len1024, testInput_f32_10khz, ifftFlag, doBitReverse);
I put the cursor onarm_cfft_f32 and press F3 and took me to arm_math.h:
void arm_cfft_f32(
const arm_cfft_instance_f32 * S,
float32_t * p1,
uint8_t ifftFlag,
uint8_t bitReverseFlag);
but I don't figure out where the source code of this function is. Is on aarm_cortexM4XX_math.lib file onSTM32Cube\Repository\STM32Cube_FW_F4_V1.5.0\Drivers\CMSIS\Lib\ARM ?
if it is, I have a couple of them:
arm_cortexM4b_math.lib
arm_cortexM4bf_math.lib
arm_cortexM4l_math.lib
arm_cortexM4lf_math.lib
wich one should I use?
and how to add them to the project?
Thank and best regards!
2015-07-04 07:10 AM
Need to add
arm_cortexM4lf_math.lib for little endian, fpu, m4, ie STM32F4 Not sure how you add to project, would gets you Add, or drop it in the tree, or if there's a configuration pane for the linker. Needs to end up explicitly on the linker command line, to provide the missing definitions.2015-07-04 07:52 AM
2015-07-06 07:16 AM
Hello elgarbe,
try to put '':''just befor the name of the library to be included ('':arm_cortexM4lf_math.lib''), then pay attention to the paths you provided for the libraries (use the browser).
Please let me know if it is OK with this suggestion.-Mayla-To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2015-07-08 02:17 PM
Ok, thats works, but I have this new errors:
18:13:20 **** Incremental Build of configuration Debug for project FFT_01 ****
make all
'Building target: FFT_elf'
'Invoking: MCU GCC Linker'
arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -L''C:\Users\Leo Garbe\workspace_stdlib
ucleo-f411re_hal_lib\Debug'' -L''C:\Users\Leo Garbe\STM32Cube\Repository\STM32Cube_FW_F4_V1.5.0\Drivers\CMSIS\Lib\ARM'' -T''C:\Users\Leo Garbe\workspace_stdlib\FFT_01\LinkerScript.ld'' -Wl,-Map=output.map -Wl,--gc-sections -lm -o ''FFT_elf'' @''objects.list'' -lnucleo-f411re_hal_lib -l:arm_cortexM4lf_math.lib
c:/ac6/systemworkbench/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.2.0.201505291716/tools/compiler/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: error: C:\Users\Leo Garbe\STM32Cube\Repository\STM32Cube_FW_F4_V1.5.0\Drivers\CMSIS\Lib\ARM\arm_cortexM4lf_math.lib(arm_cmplx_mag_fo): Conflicting CPU architectures 13/0
c:/ac6/systemworkbench/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.2.0.201505291716/tools/compiler/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: failed to merge target specific data of file C:\Users\Leo Garbe\STM32Cube\Repository\STM32Cube_FW_F4_V1.5.0\Drivers\CMSIS\Lib\ARM\arm_cortexM4lf_math.lib(arm_cmplx_mag_fo)
c:/ac6/systemworkbench/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.2.0.201505291716/tools/compiler/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: error: C:\Users\Leo Garbe\STM32Cube\Repository\STM32Cube_FW_F4_V1.5.0\Drivers\CMSIS\Lib\ARM\arm_cortexM4lf_math.lib(arm_cfft_fo): Conflicting CPU architectures 13/0
c:/ac6/systemworkbench/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.2.0.201505291716/tools/compiler/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: failed to merge target specific data of file C:\Users\Leo Garbe\STM32Cube\Repository\STM32Cube_FW_F4_V1.5.0\Drivers\CMSIS\Lib\ARM\arm_cortexM4lf_math.lib(arm_cfft_fo)
c:/ac6/systemworkbench/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.2.0.201505291716/tools/compiler/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: error: C:\Users\Leo Garbe\STM32Cube\Repository\STM32Cube_FW_F4_V1.5.0\Drivers\CMSIS\Lib\ARM\arm_cortexM4lf_math.lib(arm_cfft_radix8_fo): Conflicting CPU architectures 13/0
c:/ac6/systemworkbench/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.2.0.201505291716/tools/compiler/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: failed to merge target specific data of file C:\Users\Leo Garbe\STM32Cube\Repository\STM32Cube_FW_F4_V1.5.0\Drivers\CMSIS\Lib\ARM\arm_cortexM4lf_math.lib(arm_cfft_radix8_fo)
c:/ac6/systemworkbench/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.2.0.201505291716/tools/compiler/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: error: C:\Users\Leo Garbe\STM32Cube\Repository\STM32Cube_FW_F4_V1.5.0\Drivers\CMSIS\Lib\ARM\arm_cortexM4lf_math.lib(arm_max_fo): Conflicting CPU architectures 13/0
c:/ac6/systemworkbench/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.2.0.201505291716/tools/compiler/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: failed to merge target specific data of file C:\Users\Leo Garbe\STM32Cube\Repository\STM32Cube_FW_F4_V1.5.0\Drivers\CMSIS\Lib\ARM\arm_cortexM4lf_math.lib(arm_max_fo)
c:/ac6/systemworkbench/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.2.0.201505291716/tools/compiler/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: error: C:\Users\Leo Garbe\STM32Cube\Repository\STM32Cube_FW_F4_V1.5.0\Drivers\CMSIS\Lib\ARM\arm_cortexM4lf_math.lib(arm_const_structs.o): Conflicting CPU architectures 13/0
c:/ac6/systemworkbench/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.2.0.201505291716/tools/compiler/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: failed to merge target specific data of file C:\Users\Leo Garbe\STM32Cube\Repository\STM32Cube_FW_F4_V1.5.0\Drivers\CMSIS\Lib\ARM\arm_cortexM4lf_math.lib(arm_const_structs.o)
c:/ac6/systemworkbench/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.2.0.201505291716/tools/compiler/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: error: C:\Users\Leo Garbe\STM32Cube\Repository\STM32Cube_FW_F4_V1.5.0\Drivers\CMSIS\Lib\ARM\arm_cortexM4lf_math.lib(arm_common_tables.o): Conflicting CPU architectures 13/0
c:/ac6/systemworkbench/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.2.0.201505291716/tools/compiler/bin/../lib/gcc/arm-none-eabi/4.9.3/../../../../arm-none-eabi/bin/ld.exe: failed to merge target specific data of file C:\Users\Leo Garbe\STM32Cube\Repository\STM32Cube_FW_F4_V1.5.0\Drivers\CMSIS\Lib\ARM\arm_cortexM4lf_math.lib(arm_common_tables.o)
collect2.exe: error: ld returned 1 exit status
make: *** [FFT_elf] Error 1
18:13:20 Build Finished (took 468ms)
what is the easiest way to make fft work on F411? using CMSIS DSP? another library?
why ST give HAL to us and don't support it?
regards!
2015-07-10 05:26 AM
It dosen't work, so I take source code for the CMSIS dsp math lib and add to my project. Now I can compile and FFT is working ok.
Regards2015-07-10 05:58 AM
Hello elgarbe,
It is great you finally succeeded to use the DSP lib with SW4STM32.Please note that the last reported issue is under investigation.I'l come back to you as soon as I have more information to share.-Mayla-To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2015-07-10 11:55 AM
Just one more question, is there any library from ST to give fft and other DSP functions? The only option I have is CMSIS library?
Regards