您好,
我正在使用带有 ceedling的arm-none-eabi-gcov编译器和arm-none-eabi-ld链接器文件进行单元测试。我在编译时遇到以下错误。请给出正确的编译器和链接器设置。
C:\Users\sameerk5\example-project>rake gcov:all
错误消息:
测试'test_led。c'
--------
正在编译test_led流道...
arm-none-eabi-gcov:无效选项-- m
用法:gcov [选项]... 源|对象...
打印代码覆盖率信息。
-h,-help打印此帮助,然后退出
-v,--version打印版本号,然后退出
-a,--all-blocks显示每个基本块的信息
-b,--branch-probabilities包括输出中的分支概率
-c,--branch-counts给定的分支计数
而不是百分比
-n,--no-output不创建输出文件
-l,--llong文件名将长输出文件名用于included
源文件
-f,--function-summaries每个函数的输出摘要
-o,--object-directory DIR|文件在DIR或被调用文件中搜索目标文件
-s,--source-prefix DIR Source prefix to elide
-r,--relative仅显示相对源的数据
-p,--preserve-paths保留所有路径名组件
-u,--cond条 件分支也显示无条件分支的计数
-d,--display-progress显示进度信息
有关错误报告说明,请参阅:
gcc.gnu.org/bugs.html>。
错误:Shell命令失败。
> Shell执行的命令:
'arm-none-eabi-gcov -c built/test/runs/set_leed_runner.c -mthumb-mcpu=cortex
-m4 -std=c99 -g -fprofile-arcs -ftest-coverage -DTest -DCODE_coverage -i"test"-
i "src"-i" lib/TivaWare"-i" lib/TivaWare/driverlib"-i"-I"C:/Ruby23/lib/ruby/GEMS/2.
3.0 /GEMS/ceedling-GEMS.0/vender/unity/srC" 0.25 -i "C:2.3 /Ruby23/lib/ruby/GEMS/GEMS.0/GEMS./GEMS.
/ceedling-Dgcov 0.25 -o build/gcov/out
/test_led_runner.o'
>并退出,状态为:[1]。
RAKE已中止!
ShellExecutionException: ShellExecutionException
任务:top => built/gcov/results/test_led.pass => built/gcov/out test_led.bin =>
build_gcov/out / test_led跑者.o
(通过使用--trace运行任务来查看完整跟踪)
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
ceedling yml文件:
:gcov_compiler:
:executable:arm-none-eabi-gcov
:参数:
--c ${1}
--std=c99 --pedantic
--g
--fprofile-arc
---FTEST-覆盖范围
-D$:collection_defines_test_and_vendor
-I"$":collection_paths_test_support_source_include_vendor
--Dgcov
--c ${1}#源代码输入文件(Ruby方法调用参数列表子项)
- o ${2}#object文件输出(Ruby方法调用参数列表子项)
-:gcov_linker:
:可执行文件: arm-none-eabi-ld
:参数:
---FTEST-覆盖范围
--fprofile-arc
#--O0 #从不为此进行优化
--T gcc.ld
-${1}
-D$:collection_defines_test_and_vendor
-I"$":collection_paths_test_support_source_include_vendor
-I"$":collection_paths_test_toolchain_include
- lib/gcc-arm-none-eabi-4_8-2014q3/lib/gcc/arm-none-eabi/libgcov.a
--o ${2}
:gcov_夹 具:
:可执行文件:${1}
:gcov_report:
:executable:arm-none-eabi-gcov
:参数:
--n
--p
--b
--o "$":GCOV_build_output_path
-"\"${1}\"