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

Fix incorrect explanation #322

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

neilpate
Copy link
Contributor

@neilpate neilpate commented Jul 9, 2022

In the description of semihosting is explains that IO occurs on the host. This should be target surely?

@neilpate neilpate requested a review from a team as a code owner July 9, 2022 19:14
@rust-highfive
Copy link

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @therealprof (or someone else) soon.

Please see the contribution instructions for more information.

@rust-highfive rust-highfive added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-resources labels Jul 9, 2022
@hargoniX
Copy link
Member

hargoniX commented Jul 9, 2022

No, semihosting allows the target MCU to perform I/O using the host computer.

@neilpate
Copy link
Contributor Author

@hargoniX do you mean even the peripherals (like DAC etc) are emulated somehow on the host? That is what I interpreted by the statement that semihosting does all the IO on the host. If this is the case then that is really powerful!

@hargoniX
Copy link
Member

hargoniX commented Jul 11, 2022

No what the statemt means is that the microcontroller can use the IO capabilities of the host which is basically always just the host's printf so you can have debug prints, this does however make it super slow and we thus usually want to avoid it. State of the art in Embedded Rust is RTT.

@neilpate
Copy link
Contributor Author

Yes that is what I suspected, which is why I suggested the PR in the first place. It is confusing to say "Semihosting is a mechanism that lets embedded devices do I/O on the host and is" as this implies (to me at least) all the IO of the target.

@hargoniX
Copy link
Member

It can perform a certain set of I/O on the host machine as explained here: https://wiki.segger.com/Semihosting#Operations. While the explanation might be slightly misleading in the way you described your suggested change makes things worse because it claims something straight up wrong, semihosting is not used to perform IO on the target but on the host.

That being said in order to make sure it is understood properly in the text one could write "certain IO operations on the host" for example.

@neilpate
Copy link
Contributor Author

Thanks for the clarification @hargoniX. I understand now and will adjust the text accordingly if you don't mind?

@hargoniX
Copy link
Member

hargoniX commented Jul 12, 2022

Sure 👍, if you want you can also leave a link to the segger explanation, they are also the ones that came up with RTT so definitely a trusted source.

@stappersg
Copy link

I understand now and will adjust the text accordingly

Just do it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-resources
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants