-
Notifications
You must be signed in to change notification settings - Fork 37
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
Semihosting and Unit testing #19
Comments
The riscvOVPsimPlus executable is a fixed virtual platform containing specific functionality. Part of this functionality is support for various test infrastructures and semihosting capabilities. What you are looking for is simple to realize using the OVP APIs (used to create riscvOVPsimPlus) but as it is a specifc custom feature is not included by the fixed virtual platform (riscvOVPsimPlus). |
@duncangraham-Imperas I have a very similar issue. If my target software terminates with a I found out about the option
which seems to be related with what we are trying to achieve. However adding Could you please provide some details on this option and how is is intended to be used? |
Looking at the implementation there appears to be some confusion on how this is implemented. I do not see that this is used in the PK semihosting. Instead if tracing is enabled, using strace argument, then the code provided to the call to exit is output. I will ask our engineering group to look into this to see if an update is required |
We see that although the parameter is available the code to display the exit code was not added to the PK semihost library. This has now been fixed and will be available in the next version of riscvOVPsim. |
@duncangraham-Imperas Thank you very much for getting this fixed! This makes running unit tests on OVPsim a lot easier. |
I am using CTest to run some unit tests on OVPsimPlus. Every unit test consists of an independent
.elf
and itsmain
returns 0 on success, and 1 on failure. Is there a way, using semihosting, to forward this return value to the OVPsimPlus executable, so that OVPsimPlus itself returns 0 on success and 1 on failure of the unit test? Currently, OVPsimPlus returns 0 regardless.The text was updated successfully, but these errors were encountered: