Comments (6)
There might be a simple way to solve this, even though it's not the prettiest way. FuseSoC has support for running scripts at different stages. pre_run_scripts are executed before the simulation is run, so we could put in a script that checks for gelf.h.
Unfortunately, right now I think that only scripts in the top-level core is run, but that should be easy to fix, so that scripts from all the included cores are run.
If we get a lot of external dependencies, we should probably spend some effort to make a better mechanism for this, but I think this might actually be one of the only external requirements so we don't have to solve it in a completely generic way
from fusesoc.
This sounds like a good enough idea for now! If there is already a good mechanism that will work, no sense inventing a new one before we hit further problems, which probably will not happen any time soon.
I can see pre_run_scripts
was not implemented in any of the cores in the main repo, am I right? If you could implement the solution you mention I could document how the pre_run_scripts
section can be used for things like checking dependencies.
from fusesoc.
I have now made some updates to FuseSoC so that scripts are run for all cores in the dependency lists as well. Now we just need to add the following to elf-loader.core:
[scripts]
pre_run_scripts = check_for_libelf.sh
and add an executable script called check_for_libelf.sh with something like this in it:
echo #include <gelf.h> > test.c
echo void main(void) {} >> test.cgcc test.c || echo "Error: Missing libelf headers"
Not sure what is best practice to search for this, so I'm leaving the last part for someone else to implement.
Note that two more things should be improved as well
- This only applies to simulations. I realized that the scripts executed in the FPGA build flow are fetched from the system file. Need some refactoring here
- Need to break or warn on script exit code. Not sure about best practice here either. Perhaps 0 = success, >0 = warning, <0 = error or something like that. Love to get some input here as well.
from fusesoc.
FuseSoC now aborts on scripts that returns an exit code != 0. Now we just need add the scripts for the missing dependencies
from fusesoc.
Oh well. I added and pushed the scripts as well. Please try it out and close the issue if it works
from fusesoc.
Awesome! Works. Just fixed a little bug in #81
Closing this one.
from fusesoc.
Related Issues (20)
- Select stage to run in core file HOT 2
- parameters_append overwrite inherited parameters_append HOT 3
- fusesoc 2.x on windows: export files get removed due to /, \ mismatch HOT 5
- Weird behaviour when the target name is changed HOT 2
- `iverilog` `timescale` option interacts badly with `resetall`
- Can't install fusesoc on Ubuntu 16.04 HOT 2
- Adding block design files for vivado flow HOT 1
- Targets in dependencies HOT 1
- Not possible to run multiple builds in parallel
- Update cached remote core if patch file was changed
- Does fusesoc support VC SpyGlass? HOT 3
- Issues with Merge Keys HOT 1
- Environment variable behaviour changed between fusesoc 2.1 and 2.2 HOT 7
- unable to run fuseSOC in windows installation HOT 3
- inherited scripts are overwritten HOT 1
- unknow location for get_edatools from edalize HOT 1
- No messages from tool are printed when the tool exits successfully
- Set path to file at runtime form the command line or read it from a command
- 'gapi' has an undocumented 'cores' section
- Add support for vvp extended arguments HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fusesoc.