Closed Jonah-Foley closed 5 months ago
Either I'm misunderstanding something, or the answer is very simple. I hope for the latter, but expect the former.
All tool options are available on the command line automatically, so you can do fusesoc run --target=mytarget core --target=whateveryouwant
. Generally, you can find all tool options available for a target with fusesoc run --target=mytarget core --help
I should have clarified, I was not using the fusesoc
command to run my target directly. I had my own command line interface which took into a .core
file and internally created a Fusesoc
object which invoked the Edatool
. It seems the solution to my problem is to pass args to the underlying Edatool
via the backend_args
route. I hadnt come across that till now.
I have implemented my own
Edatool
, which has a number ofTOOL_OPTIONS
, i.e.I understand this allows me to write something like the following in my
.core
file:These options are then accessible within the
MyTool.setup()
method viaself.tool_options.get("target", "default")
.However, I then have a command line interface which goes
argparse -> fusesoc -> invoke my tool
, where i'd like to be able to set thetarget
option from the command line.I can set fusesoc flags from the command line invocation, so I can do something like:
however then
target
is a list, not a singular value making it prone usage error. This seems like a non ideal solution.Other solutions seem to not work because after the
edam
object is created all other arguments are thrown away - we therefore cannot pass anything into theEdaTool.setup()
method.So my question - is there any way to directly set the value of
target
via a command line invocation of the tool?