-
Notifications
You must be signed in to change notification settings - Fork 5
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
Command line for testing output of the plugin device #1
Comments
It should just be |
I tried "spike -m1 --extlib=/tmp/riscvtoolchain/lib/libspikedevices.so --device=sifive_uart /tmp/spike-devices/plugin_test", but nothing happened, and if I press Ctrl+C right after, it will be in spike debugging mode (I guess).
|
Okay, after I tried "spike --extlib=/home/zijianxie/riscvtoolchain/lib/libspikedevices.so --device=sifive_uart --isa=RV64GC --dtb /home/zijianxie/spike-devices/test.dtb /home/zijianxie/spike-devices/plugin_test" it printed "Found uart at 10000000"; which means spike could recognize the mmio device? Then how could I pass a string argument to the plugin device to test the store/load function? Since the original command of "--device=<P,B,A>; P -- Name of MMIO plugin, B -- Base memory addr. of the device, A -- String arguments to pass to the plugin" is no longer available in spike.cc. |
All I want to ask is how to access the device with memory load/store? Should I write an assembly file like they did in repo: https://github.com/vexingcodes/spike-plugin? Or I write a simple function C code to do that(after compilation)? |
You should write a test program, whether in C or assembly, and execute it. |
Any simple example (in C) for that would be appreciated. |
Ping :-) I am really struggling to put together a working code, could you by any chance provide a c or asm example? |
HI @jerryz123, can you please provide a sample test (C) example and a related LD script being used to compile it. |
I somehow figured this thing out hence documenting for beginners like me:
|
I used the test drive which posted in this repo: "https://github.com/vexingcodes/spike-plugin" to test the output
With this command line:
"spike -m1 --extlib=/tmp/riscvtoolchain/lib/libspikedevices.so --device=sifive_uart,0x10000000,argument /tmp/spike-devices/plugin_test"
but it reports:
"terminate called after throwing an instance of 'std::runtime_error'
what(): Plugin "sifive_uart,0x10000000,argument" not found in loaded extlibs.
Aborted (core dumped)"
Could you please show me the right way of testing the output? Thanks.
The text was updated successfully, but these errors were encountered: