2024-01-18 06:57 AM
Hi,
I am trying to generate profiler FW for my board (B-G431B-ESC1),
I have checked the "Motor Profiler" checkbox and created the project for STM32CubeIDE.
In the "MCSDK_v6.2.1-Full\MotorControl\MCSDK\MCLib\Any\Src" I am missing 3 files:
mp_hall_tuning.c
mp_one_touch_tuning.c
mp_self_com_ctrl.c
I do see the corresponding .h files in "..\Inc"
I tried the same with MCSDK 6.2.0, same result.
Thanks,
Yoav
Solved! Go to Solution.
2024-01-19 02:23 AM - edited 2024-01-19 02:27 AM
Hello @Wattever,
Your link issue comes from the version of cubeIDE.
From your installation path, I see that you are using version 1.12.1.
In order to be able to link with the profiler library you must have at least version 1.14.0.
This requirement is specified in the release note.
Regards
Cedric
2024-01-18 07:05 AM
Hi, the files are not provided as source file but are embedded into libraries located into the libMP directory of the MCSDK package. As soon as you have generated a motor Profiler project, the lib containing the motor profiler algorithm will be present int your source directory.
Best regards
Fabrice
2024-01-18 07:20 AM
Hi,
Thanks for your reply.
When I try to compile the code I get the following errors:
..MCSDK_v6.2.0-Full/MotorControl/libMP\libmp-IAR_ARMv7-M.a(mp_one_touch_tuning.o): unknown mandatory EABI object attribute 50
c:\st\stm32cubeide_1.12.1\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.10.3-2021.10.win32_1.0.200.202301161003\tools\arm-none-eabi\bin\ld.exe: failed to merge target specific data of file ../../MCSDK_v6.2.0-Full/MotorControl/libMP\libmp-IAR_ARMv7-M.a(mp_one_touch_tuning.o)
MCSDK_v6.2.0-Full/MotorControl/libMP\libmp-IAR_ARMv7-M.a(mp_self_com_ctrl.o): unknown mandatory EABI object attribute 50
c:\st\stm32cubeide_1.12.1\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.10.3-2021.10.win32_1.0.200.202301161003\tools\arm-none-eabi\bin\ld.exe: failed to merge target specific data of file ../../MCSDK_v6.2.0-Full/MotorControl/libMP\libmp-IAR_ARMv7-M.a(mp_self_com_ctrl.o)
MCSDK_v6.2.0-Full/MotorControl/libMP\libmp-IAR_ARMv7-M.a(mp_hall_tuning.o): unknown mandatory EABI object attribute 50
c:\st\stm32cubeide_1.12.1\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.10.3-2021.10.win32_1.0.200.202301161003\tools\arm-none-eabi\bin\ld.exe: failed to merge target specific data of file ../../MCSDK_v6.2.0-Full/MotorControl/libMP\libmp-IAR_ARMv7-M.a(mp_hall_tuning.o)
2024-01-18 09:19 AM
Hi,
We manage the compilation and link of the generated project with the STM32CubeIde IDE tool. The project generated with the MCSDKWB tool generate a .project with all information required for the tool.
The link is then executed with the following arm-none-eabi-gcc -o -Wl command and not ld.exe.
example of linker line execution with -Wl option for link with no ld command:
arm-none-eabi-gcc -o "test_forum_6_2_0.elf" @"objects.list" -l:libmp-IAR_ARMv7-M.a -mcpu=cortex-m4 -T"test_forum_6_2_0\STM32CubeIDE\STM32G431CBUX_FLASH.ld" --specs=nosys.specs -Wl,-Map="test_forum_6_2_0.map" -Wl,--gc-sections -static -L../../MCSDK_v6.2.0-Full/MotorControl/libMP --specs=nano.specs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -Wl,--start-group -lc -lm -Wl,--end-group
Best regards
Fabrice
2024-01-19 02:23 AM - edited 2024-01-19 02:27 AM
Hello @Wattever,
Your link issue comes from the version of cubeIDE.
From your installation path, I see that you are using version 1.12.1.
In order to be able to link with the profiler library you must have at least version 1.14.0.
This requirement is specified in the release note.
Regards
Cedric
2024-01-21 12:28 AM
Hi Cedric,
Thank you, upgrade CubeIDE to 1.14.1 indeed solved the issue.
B.R.
Yoav