Hi,
I am using arm-none-eabi-gcov compiler & arm-none-eabi-ld linker file with ceedling for unit testing.I am getting below error during compilation.Please give me proper compiler & linker setting .
C:\Users\sameerk5\example-project>rake gcov:all
Error message :
Test 'test_led.c'
-----------------
Compiling test_led_runner.c...
arm-none-eabi-gcov: invalid option -- m
Usage: gcov [OPTION]... SOURCE|OBJ...
Print code coverage information.
-h, --help Print this help, then exit
-v, --version Print version number, then exit
-a, --all-blocks Show information for every basic block
-b, --branch-probabilities Include branch probabilities in output
-c, --branch-counts Given counts of branches taken
rather than percentages
-n, --no-output Do not create an output file
-l, --long-file-names Use long output file names for included
source files
-f, --function-summaries Output summaries for each function
-o, --object-directory DIR|FILE Search for object files in DIR or called FILE
-s, --source-prefix DIR Source prefix to elide
-r, --relative-only Only show data for relative sources
-p, --preserve-paths Preserve all pathname components
-u, --unconditional-branches Show unconditional branch counts too
-d, --display-progress Display progress information
For bug reporting instructions, please see:
<gcc.gnu.org/bugs.html>.
ERROR: Shell command failed.
> Shell executed command:
'arm-none-eabi-gcov -c build/test/runners/test_led_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"C:/Ruby23/lib/ruby/gems/2.
3.0/gems/ceedling-0.25.0/vendor/unity/src" -I"C:/Ruby23/lib/ruby/gems/2.3.0/gems
/ceedling-0.25.0/vendor/cmock/src" -I"build/test/mocks" -Dgcov -o build/gcov/out
/test_led_runner.o'
> And exited with status: [1].
rake aborted!
ShellExecutionException: ShellExecutionException
Tasks: TOP => build/gcov/results/test_led.pass => build/gcov/out/test_led.bin =>
build/gcov/out/test_led_runner.o
(See full trace by running task with --trace)
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------
ceedling yml file:
:gcov_compiler:
:executable: arm-none-eabi-gcov
:arguments:
- -c ${1}
- -std=c99 - -pedantic
- -g
- -fprofile-arcs
- -ftest-coverage
- -D$: COLLECTION_DEFINES_TEST_AND_VENDOR
- -I"$": COLLECTION_PATHS_TEST_SUPPORT_SOURCE_INCLUDE_VENDOR
- -Dgcov
- -c ${1} #source code input file (Ruby method call param list sub)
- -o ${2} #object file output (Ruby method call param list sub)
-:gcov_linker:
:executable: arm-none-eabi-ld
:arguments:
- -ftest-coverage
- -fprofile-arcs
# - -O0 # never optimize for this
- -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_fixture:
:executable: ${1}
:gcov_report:
:executable: arm-none-eabi-gcov
:arguments:
- -n
- -p
- -b
- -o "$": GCOV_BUILD_OUTPUT_PATH
- "\"${1}\""