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

Book: Section 2: Blinking your first LED (draft) #4

Closed
japaric opened this issue Aug 10, 2018 · 6 comments
Closed

Book: Section 2: Blinking your first LED (draft) #4

japaric opened this issue Aug 10, 2018 · 6 comments
Assignees
Milestone

Comments

@japaric
Copy link
Member

japaric commented Aug 10, 2018

From @jamesmunns on July 10, 2018 9:32

This section covers the equivalent of getting "Hello World" working for an embedded target. Examples should start high level, and build back up towards that point.

Copied from original issue: rust-embedded/wg#117

@japaric
Copy link
Member Author

japaric commented Aug 21, 2018

Triage: Tthis section has no instructions. @jamesmunns could you add some? IIRC, we agreed on using cortex-m-rt as a base and covering how to write a program in two different ways: using a high level api (e.g. f3) crate and w/o external dependencies.

@japaric
Copy link
Member Author

japaric commented Aug 27, 2018

I think it would be good to start this section with instructions on how to build and debug a Cortex-M program running on QEMU since everyone should be able to run that without external hardware. Then we can move onto the discovery board.

@WojciechMigda
Copy link

@japaric , would this be of any help?
https://github.com/WojciechMigda/how-to-qemu-arm-gdb-gtest

@japaric
Copy link
Member Author

japaric commented Aug 29, 2018

@WojciechMigda Unfortunately, no. That's using QEMU userspace emulation (qemu-arm) and that can only run programs compiled for hosted environments like the arm-unknown-linux-gnueabi target; that can't execute (or won't properly execute) bare metal programs compiled for ARM Cortex-M.

What we have to use in this section is QEMU full system emulation (qemu-system-arm). That can emulate a Cortex-M3 core (the LM3S6965) so we can run programs compiled for the thumbv7m-none-eabi target on it. I have done some initial experiments with that in this repo and have recently confirmed that semihosting works so we can cover hello world (see examples/hello.rs in the cortex-m-quickstart repo) in this chapter.

@frafra
Copy link

frafra commented Aug 29, 2018

Just wanted to thank you for your great work. I am still learning Rust, I ordered the board you suggest, and I am eager to follow your tutorials. I hope I will be able to give something back to the community in the future. Thank you! 😃

@japaric
Copy link
Member Author

japaric commented Nov 20, 2018

This is pretty much done.

@japaric japaric closed this as completed Nov 20, 2018
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

4 participants