Avoiding Full Paths
Opened this issue · 1 comments
When I add constraints in chip.cfg, how do I avoid using full paths to files - for example if I am trying to add the file dummy-libc.c
which is in the support
directory to the compilation as input, how do I formulate the path to that file? I am using a build directory located at ../build
wrt the top level of the embench-iot directory. So far, I have tried:
cc_input_pattern = "dummy-libc.c"
cc_input_pattern = "support/dummy-libc.c"
cc_input_pattern = "../support/dummy-libc.c"
cc_input_pattern = "../embench-iot/support/dummy-libc.c"
cc_input_pattern = "../../embench-iot/supportdummy-libc.c"
cc_input_pattern = "embench-iot/support/dummy-libc.c"
All of these fail with the error: riscv64-unknown-elf-gcc: error: dummy-libc.c: No such file or directory
.
There's very likely something I am missing here - any ideas?
~Lyell
@lyellread Sorry for the slow reply. I think this is a weakness in the documentation. The patterns are used with Python 3.6 formatted strings, and intended to substitute the syntax needed for particular compilers. For example with GCC, input files are just supplied "as is", while output files are prepended by -o
. These would correspond to:
cc_input_pattern = '{0}'
cc_output_pattern = '-o {0}'
Does this help?