首先是生成代码时的报错信息,这个工程是直接使用IHM0003套件的默认配置,没有做任何修改:
日志内容:
2023-05-02 11:02:14,822 DEBUG [Main.lambda$run$0] Arguments: [-ioc, D:\STMicroelectronics\MC_SDK_5.4.8\Utilities\PC_Software\STMCWB\GCSP_Projects\IHM0003_kit_test\IHM0003_kit_test.ioc, -xdm, D:\STMicroelectronics\MC_SDK_5.4.8\Utilities\PC_Software\STMCWB\GCSP_Projects\IHM0003_kit_test\IHM0003_kit_test.wb_def]
2023-05-02 11:02:14,826 DEBUG [ArgsValue.readPropertiesFile] [AppConfig] pack.source = "D:\STMicroelectronics\MC_SDK_5.4.8\Middlewares\ST\MotorControl"
2023-05-02 11:02:14,826 DEBUG [ArgsValue.readPropertiesFile] [UserConfig] do not exist in "C:\Users\BoZhang\.st_motor_control\wb2mx.properties"
2023-05-02 11:02:14,827 DEBUG [ArgsValue.getConfigProperties] pack.source = "../../../../Middlewares/ST/MotorControl"
2023-05-02 11:02:14,835 DEBUG [ArgsValue.lambda$retrieve$2] CLI_ARG[xdm]: D:\STMicroelectronics\MC_SDK_5.4.8\Utilities\PC_Software\STMCWB\GCSP_Projects\IHM0003_kit_test\IHM0003_kit_test.wb_def
2023-05-02 11:02:14,836 DEBUG [ArgsValue.lambda$retrieve$2] CLI_ARG[ioc]: D:\STMicroelectronics\MC_SDK_5.4.8\Utilities\PC_Software\STMCWB\GCSP_Projects\IHM0003_kit_test\IHM0003_kit_test.ioc
2023-05-02 11:02:14,837 DEBUG [ArgsValue.retrieve] {xdm=D:\STMicroelectronics\MC_SDK_5.4.8\Utilities\PC_Software\STMCWB\GCSP_Projects\IHM0003_kit_test\IHM0003_kit_test.wb_def, updftl=templates/wb_ioc_mc-middleware.ftl, mx_timeout=-1, exp=templates/wb-defines_where_and_what.txt, ioc=D:\STMicroelectronics\MC_SDK_5.4.8\Utilities\PC_Software\STMCWB\GCSP_Projects\IHM0003_kit_test\IHM0003_kit_test.ioc, pack=../../../../Middlewares/ST/MotorControl, ftl=templates/wb_ioc_template.ftl}
2023-05-02 11:02:14,920 DEBUG [Main.run] Targeted MCU family = G4
2023-05-02 11:02:14,949 DEBUG [Main.run] Minimum associated CubeMx to the `G4` targeted MCU family is `5.2.0-a0`
2023-05-02 11:02:14,967 DEBUG [WindowsCubeMxFinder.lambda$findThem$2] Found 64-bit subkey HKEY_LOCAL_MACHINE\~~~\Uninstall\STM32CubeMX
2023-05-02 11:02:14,976 DEBUG [CubeMxCtx.EXE_version] Loaded path: 'D:\STMicroelectronics\STM32CubeMX\STM32CubeMX.exe'
2023-05-02 11:02:14,977 DEBUG [CubeMxCtx.EXE_version] Loaded updater jar: 'D:\STMicroelectronics\STM32CubeMX\plugins\updater.jar'
2023-05-02 11:02:14,996 DEBUG [CubeMxCtx.EXE_version] Loaded path: 'D:\STMicroelectronics\STM32CubeMX\STM32CubeMX.exe'
2023-05-02 11:02:14,996 DEBUG [CubeMxCtx.EXE_version] Loaded updater jar: 'D:\STMicroelectronics\STM32CubeMX\plugins\updater.jar'
2023-05-02 11:02:15,010 DEBUG [CubeMxCtx.EXE_version] Loaded path: 'D:\STMicroelectronics\STM32CubeMX\STM32CubeMX.exe'
2023-05-02 11:02:15,010 DEBUG [CubeMxCtx.EXE_version] Loaded updater jar: 'D:\STMicroelectronics\STM32CubeMX\plugins\updater.jar'
2023-05-02 11:02:18,289 DEBUG [CubeMxCtx.EXE_version] Loaded path: 'D:\STMicroelectronics\STM32CubeMX\STM32CubeMX.exe'
2023-05-02 11:02:18,289 DEBUG [CubeMxCtx.EXE_version] Loaded updater jar: 'D:\STMicroelectronics\STM32CubeMX\plugins\updater.jar'
2023-05-02 11:02:18,327 DEBUG [EnvironmentChecker.checkPack] STM32CubeMX.Version: 6.8.0-RC4
2023-05-02 11:02:21,275 ERROR [LineInfo_to_exitCode.manage_MCPackNotFound] MotorControl reference pack not found: "../../../../Middlewares/ST/MotorControl"
软件安装路径:
工程路径:
是要在CubeMX里面单独安装MCSDK才能识别吗,这个相对路径的参考路径是.stmcx文件所在路径吗,或者库的路径能不能手动配置成绝对路径,感谢解答! |
版本的问题,使用STM32CubeMX6.3.0的应该就没问题了
感谢回答,使用CubeMX6.8.0和MCWorkbench6.1.0已经可以正常编译工程了。然后我想问下新建的IHM03套件的工程速度检测里面为什么编码器选项是灰色的呢?这边需要开启编码器并使用位置闭环控制。或者怎样新建工程才能使能编码器呢?
[md]我使用6.1.2是可以选的
好的,是我工程配置的问题,感谢解答!
[md]请问一下是怎样解决这个问题的
[md]我使用的是6.10版本的cubemx,会产生路径错误