首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >将CubeMx项目导入VisualGDB时的引用错误

将CubeMx项目导入VisualGDB时的引用错误
EN

Stack Overflow用户
提问于 2022-01-29 05:25:01
回答 1查看 76关注 0票数 0

当将新的cubeMX项目导入到VisualGDB中时,我遇到了一些问题。我得到了大量的错误,比如:undefined reference to 'vPortFree' (例如)

采取的步骤:

使用VS中的其他toolchain"

项目创建后,我尝试构建它,但是我得到了以下错误:

代码语言:javascript
复制
Severity Description                                            Project                          File                                                                                                                               Line
Error    undefined reference to `vPortFree'                     stm32nucleof429zi_freertos_tcpip C:\Repos\stm32nucleof429zi_freertos_tcpip.git\stm32nucleof429zi_freertos_tcpip.git\Middlewares\Third_Party\FreeRTOS\Source\tasks.c 3920
Error    undefined reference to `vPortFree'                     stm32nucleof429zi_freertos_tcpip C:\Repos\stm32nucleof429zi_freertos_tcpip.git\stm32nucleof429zi_freertos_tcpip.git\Middlewares\Third_Party\FreeRTOS\Source\tasks.c 3921
Error    undefined reference to `vPortFree'                     stm32nucleof429zi_freertos_tcpip C:\Repos\stm32nucleof429zi_freertos_tcpip.git\stm32nucleof429zi_freertos_tcpip.git\Middlewares\Third_Party\FreeRTOS\Source\tasks.c 3927
Error    Build failed: arm-none-eabi-g++.exe exited with code 1 stm32nucleof429zi_freertos_tcpip                                                                                                                                    1   
Error    ld returned 1 exit status                              stm32nucleof429zi_freertos_tcpip C:\Repos\stm32nucleof429zi_freertos_tcpip.git\stm32nucleof429zi_freertos_tcpip.git\collect2.exe                                    0   

但是,当我右键单击main.c并进行编译时,该项目将无错误地编译。当使用构建工具和调试器时,会出现这些错误。

在导入项目时,我从来没有遇到过这个问题。如有任何帮助,将不胜感激

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2022-01-31 15:05:48

在玩了一段时间的配置之后,我发现了问题。CubeMx创建的工具链文件没有告诉链接器包含FreeRTOS编译所需的所有文件。

只有当您正在使用CMSIS_RTOS_V2并且以下步骤为我修复它时,此问题才是相关的:

将CMSIS_RTOS_V2添加到项目空间,方法是: Add缺失包含:

  • 转到: Project->VisualGDP项目属性->MS构建设置>包含目录并将文件夹CMSIS_RTOS_V2添加到文件路径

若要解决未确定的引用“pvPortMalloc”错误:

“解决方案资源管理器”窗口中VS中的

并将其包括在heap_4.c中

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/70902539

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档