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

2.2 ~Hardware -- Conflicting info #293

Open
AlanSwenson opened this issue May 28, 2021 · 2 comments
Open

2.2 ~Hardware -- Conflicting info #293

AlanSwenson opened this issue May 28, 2021 · 2 comments

Comments

@AlanSwenson
Copy link
Contributor

in https://github.com/rust-embedded/book/blob/7349d173fa28a0bb834cf0264a05286620ef0923/src/start/hardware.md

is says :

In examples/hello.rs, make sure the debug::exit() call is commented out or removed. It is used only for running in QEMU.

but later on in the page it says :

Advancing the program with next should produce the same results as before.


(gdb) next
16          writeln!(stdout, "Hello, world!").unwrap();

(gdb) next
19          debug::exit(debug::EXIT_SUCCESS);

Which doesnt make sense to me if you removed it?

I will also add that when removing the debug line you will also need to remove the import of debug as well or it wont load onto the board. Ill be happy to submit a PR if you let me know which way is correct.

@skrapi
Copy link

skrapi commented Jul 9, 2021

I have also ran into this issue. Is there an alternative to using debug::exit(debug::EXIT_SUCCES) when you are running on real hardware?

@iFreilicht
Copy link

It also seems like that output is outdated in general. The line numbers don't match, and it should say hprintln, not writeln.

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

3 participants