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

Error code when failed verification #17

Open
bicyclesonthemoon opened this issue May 21, 2020 · 1 comment
Open

Error code when failed verification #17

bicyclesonthemoon opened this issue May 21, 2020 · 1 comment
Assignees

Comments

@bicyclesonthemoon
Copy link
Contributor

One of the available commands is "-c", the verification.
If it is successful the return code is 0.
If it fails the return is code is 5.

The problem is that in case of failure there is always the same error code but actually there could be two different situations:

  1. It is not possible to perform the verification because for example the microcontroller does not respond or something like this.
  2. It is possible to perform the verification but the result is that the memory content does not match the expected hex file.

My proposition is that in case when verification is performed correctly but flash content doesn't match expectation the software should return a different error code than when verification could not be performed.

@msalau msalau self-assigned this Jul 28, 2020
@bicyclesonthemoon
Copy link
Contributor Author

I looked back to this topic.
I would be ready to implement this and prepare a pull request.
The only thing left unclear to me is what should be the code?

Currently the returned code is EIO.
Which is ok for the case where it failed to perform the verification.
But I would like to know what is the appropriate error code for the situation where it correctly verified that flash doesn't match.
I looked through the available error codes from errno.h but none seemed appropriate.

If I have the info, which code you would like to see here, I will be ready to prepare a pull request to this.

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

No branches or pull requests

2 participants