-
Notifications
You must be signed in to change notification settings - Fork 59
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
Getting Started chapter #181
base: esp-hal@1
Are you sure you want to change the base?
Getting Started chapter #181
Conversation
src/getting-started/toolchain.md
Outdated
The above command downloads the rust source code. `rust-src` contains things like the std-lib, core-lib and build-config files. | ||
Downloading the `rust-src` is important because of two reasons : | ||
- **Determinism** - You get the chance to inspect the internals of the core and std library. If you are building software that needs to be determinate, you may need to inspect the libraries that you are using. | ||
- **Building custom targets** - The `rustc` uses the `rust-src` to create the components of a new custom-target. If you are targeting a triple-target that is not yet supported by rust, it becomes essential to download the `rust-src`. |
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.
Not sure if this paragraph adds value, shall we just remove it?
This is automatically done when the project is generated via [`esp-generate`][esp-generate]. | ||
|
||
[esp-generate]: esp-generate.md | ||
|
||
|
||
## VS Code Extension |
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.
Shall I remove the debugging stuff? As there is an advanced/debugging chapter
5d624d7
to
e3c3798
Compare
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.
Thanks for the PR! Just skimmed quickly though the toolchain section so far, but left a handful of nitpicky comments :)
Will continue reviewing the remaining sections soon.
[rustup-book-windows]: https://rust-lang.github.io/rustup/installation/windows.html | ||
[rust-lang-org]: https://www.rust-lang.org/ | ||
|
||
### `RISC-V` Devices |
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.
### `RISC-V` Devices | |
### RISC-V Devices |
Don't think we need to use code blocks when mentioning RISC-V, personally.
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.
Then, we should update https://github.com/esp-rs/book/blob/main/rust-doc-style-guide.md#using-monospace. I dont have a hard opinion as long as we are consistent
|
||
### `RISC-V` Devices | ||
|
||
To build Rust applications for the Espressif chips based on `RISC-V` architecture, do the following: |
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.
To build Rust applications for the Espressif chips based on `RISC-V` architecture, do the following: | |
To build Rust applications for the Espressif chips based on RISC-V architecture, do the following: |
See above.
src/getting-started/toolchain.md
Outdated
|
||
The above command downloads the rust source code. `rust-src` contains things like the std-lib, core-lib and build-config files. | ||
Downloading the `rust-src` is important because of two reasons : | ||
- **Determinism** - You get the chance to inspect the internals of the core and std library. If you are building software that needs to be determinate, you may need to inspect the libraries that you are using. |
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.
- **Determinism** - You get the chance to inspect the internals of the core and std library. If you are building software that needs to be determinate, you may need to inspect the libraries that you are using. | |
- **Determinism** - You get the chance to inspect the internals of the core and std library. If you are building software that needs to be deterministic, you may need to inspect the libraries that you are using. |
src/getting-started/toolchain.md
Outdated
The above command downloads the rust source code. `rust-src` contains things like the std-lib, core-lib and build-config files. | ||
Downloading the `rust-src` is important because of two reasons : | ||
- **Determinism** - You get the chance to inspect the internals of the core and std library. If you are building software that needs to be determinate, you may need to inspect the libraries that you are using. | ||
- **Building custom targets** - The `rustc` uses the `rust-src` to create the components of a new custom-target. If you are targeting a triple-target that is not yet supported by rust, it becomes essential to download the `rust-src`. |
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.
- **Building custom targets** - The `rustc` uses the `rust-src` to create the components of a new custom-target. If you are targeting a triple-target that is not yet supported by rust, it becomes essential to download the `rust-src`. | |
- **Building custom targets** - The `rustc` uses the `rust-src` to create the components of a new custom-target. If you are targeting a triple-target that is not yet supported by Rust, it becomes essential to download the `rust-src`. |
I think it can probably be removed, but no strong feelings. If kept, we should capitalize Rust.
rustup target add riscv32imac-unknown-none-elf # For ESP32-C6 and ESP32-H2 | ||
``` | ||
|
||
Those targets are currently [Tier 2][rust-lang-book--platform-support-tier2]. Note the different flavors of `riscv32` target in Rust covering different [`RISC-V` extensions][wiki-riscv-standard-extensions]. |
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.
Those targets are currently [Tier 2][rust-lang-book--platform-support-tier2]. Note the different flavors of `riscv32` target in Rust covering different [`RISC-V` extensions][wiki-riscv-standard-extensions]. | |
Those targets are currently [Tier 2][rust-lang-book--platform-support-tier2]. Note the different flavors of `riscv32` target in Rust covering different [RISC-V extensions][wiki-riscv-standard-extensions]. |
To enable support for Espressif targets, `espup` installs: | ||
|
||
- [Espressif Rust fork][esp-rs/rust] with support for Espressif targets | ||
- `stable` toolchain with support for `RISC-V` targets |
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.
- `stable` toolchain with support for `RISC-V` targets | |
- `stable` toolchain with support for RISC-V targets |
|
||
- [Espressif Rust fork][esp-rs/rust] with support for Espressif targets | ||
- `stable` toolchain with support for `RISC-V` targets | ||
- `LLVM` [fork][llvm-github-fork] with support for `Xtensa` targets |
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.
- `LLVM` [fork][llvm-github-fork] with support for `Xtensa` targets | |
- LLVM [fork][llvm-github-fork] with support for Xtensa targets |
Don't need code blocks for LLVM either, IMO.
The forked compiler can coexist with the standard Rust compiler, allowing both to be installed on your system. The forked compiler is invoked when using any of the available [overriding methods][rustup-overrides]. | ||
|
||
> ⚠️ **Note**: We are actively working to upstream our forks. Below is the current status: | ||
> 1. `LLVM` fork: We've made significant progress recently. For details, refer to the [tracking issue][llvm-github-fork-upstream issue]. |
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.
> 1. `LLVM` fork: We've made significant progress recently. For details, refer to the [tracking issue][llvm-github-fork-upstream issue]. | |
> 1. LLVM fork: We've made significant progress recently. For details, refer to the [tracking issue][llvm-github-fork-upstream issue]. |
#### Other Installation Methods for `Xtensa` Targets | ||
|
||
- Using [`rust-build`][rust-build] installation scripts. This was the recommended way in the past, but now the installation scripts are feature frozen, and all new features will only be included in `espup`. See the repository README for instructions. | ||
- Building the Rust compiler with `Xtensa` support from source. This process is computationally expensive and can take one or more hours to complete depending on your system. It isn't recommended unless there is a major reason to go for this approach. Here is the repository to build it from source: [`esp-rs/rust` repository][esp-rs-rust]. |
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.
- Building the Rust compiler with `Xtensa` support from source. This process is computationally expensive and can take one or more hours to complete depending on your system. It isn't recommended unless there is a major reason to go for this approach. Here is the repository to build it from source: [`esp-rs/rust` repository][esp-rs-rust]. | |
- Building the Rust compiler with Xtensa support from source. This process is computationally expensive and can take one or more hours to complete depending on your system. It isn't recommended unless there is a major reason to go for this approach. Here is the repository to build it from source: [`esp-rs/rust` repository][esp-rs-rust]. |
No description provided.