Running Windows 10 targeting an ATMega328p and having issues compiling basic tests for AVR - it won't seem to use avr-gcc over gcc, no matter what I change. I have avr-gcc installed and available on the command line. I installed WinAVR and avrdude as well.
What am I doing wrong?
Here's my terminal output:
PS C:\Users\Tyler\projects\rc-car> ceedling
Test 'test_general_util.c'
--------------------------
In file included from test/test_general_util.c:2:0:
src/util/general_util.h:8:20: fatal error: avr/io.h: No such file or directory
#include <avr/io.h>
^
compilation terminated.
ERROR: Shell command failed.
> Shell executed command:
'gcc.exe -E -I"test" -I"test/built" -I"test/support" -I"src" -I"src/constants" -I"src/protocols" -I"src/remotes" -I"src/types" -I"src/util" -I"C:/Users/Tyler/projects/rc-car/vendor
/ceedling/vendor/unity/src" -I"C:/Users/Tyler/projects/rc-car/vendor/ceedling/vendor/cmock/src" -I"test/built/test/mocks" -DTEST -DTEST -DGNU_COMPILER "test/test_general_util.c" -o
"test/built/test/preprocess/files/test_general_util.c"'
> And exited with status: [1].
rake aborted!
ShellExecutionException: ShellExecutionException
C:/Users/Tyler/projects/rc-car/vendor/ceedling/lib/ceedling/tool_executor.rb:78:in `exec'
C:/Users/Tyler/projects/rc-car/vendor/ceedling/lib/ceedling/preprocessinator_file_handler.rb:12:in `preprocess_file'
C:/Users/Tyler/projects/rc-car/vendor/ceedling/lib/ceedling/preprocessinator.rb:40:in `preprocess_file'
C:/Users/Tyler/projects/rc-car/vendor/ceedling/lib/ceedling/preprocessinator.rb:12:in `block in setup'
C:/Users/Tyler/projects/rc-car/vendor/ceedling/lib/ceedling/preprocessinator_helper.rb:33:in `preprocess_test_file'
C:/Users/Tyler/projects/rc-car/vendor/ceedling/lib/ceedling/preprocessinator.rb:25:in `preprocess_test_and_invoke_test_mocks'
C:/Users/Tyler/projects/rc-car/vendor/ceedling/lib/ceedling/test_invoker.rb:73:in `block in setup_and_invoke'
C:/Users/Tyler/projects/rc-car/vendor/ceedling/lib/ceedling/test_invoker.rb:63:in `setup_and_invoke'
C:/Users/Tyler/projects/rc-car/vendor/ceedling/lib/ceedling/tasks_tests.rake:11:in `block (2 levels) in <top (required)>'
C:/Ruby24-x64/bin/ceedling:22:in `load'
C:/Ruby24-x64/bin/ceedling:22:in `<main>'
Tasks: TOP => default => test:all
(See full trace by running task with --trace)
ERROR: Ceedling Failed
Also tried using this block in place of the :compiler: section:
:tools:
:test_compiler:
:executable: avr-gcc #exists in system search path
:name: 'avr-gcc'
:arguments:
- -I"$": COLLECTION_PATHS_TEST_TOOLCHAIN_INCLUDE #expands to -I search paths
- -I"$": COLLECTION_PATHS_TEST_SUPPORT_SOURCE_INCLUDE_VENDOR #expands to -I search paths
- -D$: COLLECTION_DEFINES_TEST_AND_VENDOR #expands to all -D defined symbols
- --network-license #simple command line argument
- -optimize-level 4 #simple command line argument
- "#{`args.exe -m acme.prj`}" #in-line ruby sub to shell out & build string of arguments
- -c ${1} #source code input file (Ruby method call param list sub)
- -o ${2} #object file output (Ruby method call param list sub)
:test_linker:
:executable: C:/WinAVR-20100110\bin #absolute file path
:name: 'this probably isn't the right thing but I have no idea what to put here either...'
:arguments:
- ${1} #list of object files to link (Ruby method call param list sub)
- -l$-lib: #inline yaml array substitution to link in foo-lib and bar-lib
- foo
- bar
- -o ${2} #executable file output (Ruby method call param list sub)
Running Windows 10 targeting an ATMega328p and having issues compiling basic tests for AVR - it won't seem to use
avr-gcc
overgcc
, no matter what I change. I haveavr-gcc
installed and available on the command line. I installed WinAVR and avrdude as well.What am I doing wrong?
Here's my terminal output:
project.yml
Also tried using this block in place of the
:compiler:
section: