-
Notifications
You must be signed in to change notification settings - Fork 182
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
Improve quick start docs #172
Conversation
README.md
Outdated
|
||
![blue pill pinout](BluePillPinout.jpg "opt title") | ||
|
||
You will also need an [stlink](https://www.adafruit.com/product/2548) for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like a rebranded Chinesium ST-Link clone with pirated firmware (not sure how they can offer that on in the adafruit line). Can we recommend a genuine product instead (like the ST-Link V3 Mini) which is even cheaper, though quite a bit trickier to obtain, insteads?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alternatively we could recommend an open product or maybe hint to an official Nucleo board which happens to include an ST-Link so works out-of-the-box.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should use something compatible with blue pills since they seem pretty common in the rust community.
Recommending a better alternative to the weird stlink sounds like a good idea, got a link to one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any debug probe should be compatible with the blue pill. The question is only whether we want to stay with a native ST solution or recommend something else. The ST-Link v3 mini can be found here: https://www.st.com/en/development-tools/stlink-v3mini.html
```bash | ||
cargo build --target thumbv7m-none-eabi | ||
``` | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe also include a few words about putting that into a .cargo/config here? Can also do this as a follow up.
README.md
Outdated
- [.cargo/config](.cargo/config) | ||
- [memory.x](memory.x) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uhm, that really should go in the section above as it is required (or at least useful in case of the .cargo/config) to build the software.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea, that might be a good idea.
However, my point in ordering it like this is that the project successfully compiles after the cargo build line. If people get there and build fails, they have less things to check when debugging.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you don't have a memory.x
there's a good chance it will not compile or throw linker errors (depending on circumstances) so that should go before any attempts to compile it. .cargo/config
is a wash but would simplify the change for error in the naked cargo build
above.
I upgraded the text according to your comments |
README.md
Outdated
![blue pill pinout](BluePillPinout.jpg "opt title") | ||
|
||
You will also need a debug probe, for example an [stlink v3 | ||
mini](https://www.adafruit.com/product/2548) for programming and debugging. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrong link
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, fixed
Co-Authored-By: Daniel Egger <daniel@eggers-club.de>
README.md
Outdated
|
||
### Setting up your project | ||
|
||
Create a new rust project as you usually do with `cargo init`. The hello world |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Create a new rust project as you usually do with `cargo init`. The hello world | |
Create a new Rust project as you usually do with `cargo init`. The hello world |
README.md
Outdated
|
||
If all went well, it should detect your microcontroller and say `Info : | ||
stm32f1x.cpu: hardware has 6 breakpoints, 4 watchpoints`. Keep it running in | ||
the background |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the background | |
the background. |
Co-Authored-By: Daniel Egger <daniel@eggers-club.de>
Co-Authored-By: Daniel Egger <daniel@eggers-club.de>
I fixed the remaining issues and reworded the gdb section which sounded a bit strange after the updates. Mind giving it another look? @therealprof |
|
||
[dependencies.stm32f1xx-hal] | ||
version = "0.5.2" | ||
features = ["rt", "stm32f103"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
features = ["rt", "stm32f103", "medium"]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I recently helped a friend start using this and noticed some documentation problems which this hopefully fixes:
I also decided to remove some redundant text from lib.rs and link to README instead, just to avoid having some parts of the docs drift out of date.
Oh, and I fixed the docs.rs build, so this closes #154
The docs are very linux centric at the moment, but I have no idea what the process is like on windows.
cc @FredTheDino who ran into all these issues :)