gpt4 book ai didi

Ceedling 项目文件无法识别路径和库

转载 作者:太空宇宙 更新时间:2023-11-04 03:21:11 25 4
gpt4 key购买 nike

我想使用 ceedling 对 STM32 系列的 C 代码进行单元测试。我按照他们在 GitHub Ceedling 上的页面所示安装了它并成功运行示例测试。

project.yml 文件我已经修改了路径,因为我有不同的头文件路径(路径:include)和源文件(路径:src):

:paths:
:test:
- +:test/**
- -:test/support
:source:
- build/STM32F2xx_StdPeriph_Driver/include/**
- build/STM32F2xx_StdPeriph_Driver/src/**
- include/**
- src/**
:support:
- test/support


:defines:
:commmon: &common_defines
#Define for header files
- STM32F2XX


:libraries:
:placement: :end
:flag: "${1}" # or "-L ${1}" for example
:common: &common_libraries []
:test:
- *common_libraries
#toolchain of STM32F2
- build/STM32F2xx_StdPeriph_Driver/include/**
- build/STM32F2xx_StdPeriph_Driver/src/**
- build/STM32F2xx/include/

但不知何故,路径和库无法识别,我收到未知变量的错误。

我的.yml文件有错吗?

最佳答案

为了将来的读者,我切换到了 cppUTest。它易于使用,并且您拥有 cpp 的强大功能,并且模拟非常棒。

关于Ceedling 项目文件无法识别路径和库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46068192/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com