Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check in PATH when running target program #961

Closed
arunisaac opened this issue Apr 1, 2022 · 4 comments
Closed

Check in PATH when running target program #961

arunisaac opened this issue Apr 1, 2022 · 4 comments

Comments

@arunisaac
Copy link

When running a target program, spike should look for that program in paths specified by the PATH environment variable as well.

Currently, when I run spike pk with both spike and pk being in PATH, I get the following error. When I run the same command with the absolute path to pk, it works fine.

$ spike pk ...
terminate called after throwing an instance of 'std::runtime_error'
  what():  could not open pk (did you misspell it? If VCS, did you forget +permissive/+permissive-off?)

Thanks!

@aswaterman
Copy link
Collaborator

I don't think this is a good idea. Your PATH should contain binaries you're interested in executing on your host machine, but pk is a binary you should only ever use in conjunction with a simulator.

@arunisaac
Copy link
Author

arunisaac commented Apr 1, 2022 via email

@aswaterman
Copy link
Collaborator

That is indeed an awkwardly long path. But perhaps this is a problem better solved by writing a shell script or an alias, rather than modifying Spike.

Also, is pk meant to be used exclusively with spike, or does it have a larger function elsewhere?

Among other things, it works with rocket-chip (https://github.com/chipsalliance/rocket-chip) and various FPGA and ASIC designs.

@arunisaac
Copy link
Author

arunisaac commented Apr 1, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants