【问题标题】:Ceedling project file does not recognize paths and librariesCeedling 项目文件无法识别路径和库
【发布时间】:2017-09-06 06:23:57
【问题描述】:

我想使用 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 文件有误吗?

【问题讨论】:

    标签: c unit-testing testing makefile stm32


    【解决方案1】:

    对于未来的读者,我改用 cppUTest。它易于使用,并且您拥有 cpp 的强大功能,并且模拟非常棒。

    【讨论】:

      猜你喜欢
      • 2021-12-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-04-07
      • 1970-01-01
      • 2012-07-13
      • 2019-12-19
      • 1970-01-01
      相关资源
      最近更新 更多