diff --git a/01_wait_forever/.vscode/settings.json b/01_wait_forever/.vscode/settings.json index f2fa6961..c520a512 100644 --- a/01_wait_forever/.vscode/settings.json +++ b/01_wait_forever/.vscode/settings.json @@ -1,10 +1,13 @@ { "editor.formatOnSave": true, - "rust.features": [ - "bsp_rpi3" - ], - "rust.all_targets": false, "editor.rulers": [ 100 ], -} \ No newline at end of file + "rust-analyzer.cargoFeatures.features": [ + "bsp_rpi3" + ], + "rust-analyzer.cargo-watch.allTargets": false, + "rust-analyzer.cargo-watch.arguments": [ + "--target=aarch64-unknown-none-softfloat" + ] +} diff --git a/02_runtime_init/.vscode/settings.json b/02_runtime_init/.vscode/settings.json index f2fa6961..c520a512 100644 --- a/02_runtime_init/.vscode/settings.json +++ b/02_runtime_init/.vscode/settings.json @@ -1,10 +1,13 @@ { "editor.formatOnSave": true, - "rust.features": [ - "bsp_rpi3" - ], - "rust.all_targets": false, "editor.rulers": [ 100 ], -} \ No newline at end of file + "rust-analyzer.cargoFeatures.features": [ + "bsp_rpi3" + ], + "rust-analyzer.cargo-watch.allTargets": false, + "rust-analyzer.cargo-watch.arguments": [ + "--target=aarch64-unknown-none-softfloat" + ] +} diff --git a/03_hacky_hello_world/.vscode/settings.json b/03_hacky_hello_world/.vscode/settings.json index f2fa6961..c520a512 100644 --- a/03_hacky_hello_world/.vscode/settings.json +++ b/03_hacky_hello_world/.vscode/settings.json @@ -1,10 +1,13 @@ { "editor.formatOnSave": true, - "rust.features": [ - "bsp_rpi3" - ], - "rust.all_targets": false, "editor.rulers": [ 100 ], -} \ No newline at end of file + "rust-analyzer.cargoFeatures.features": [ + "bsp_rpi3" + ], + "rust-analyzer.cargo-watch.allTargets": false, + "rust-analyzer.cargo-watch.arguments": [ + "--target=aarch64-unknown-none-softfloat" + ] +} diff --git a/04_zero_overhead_abstraction/.vscode/settings.json b/04_zero_overhead_abstraction/.vscode/settings.json index f2fa6961..c520a512 100644 --- a/04_zero_overhead_abstraction/.vscode/settings.json +++ b/04_zero_overhead_abstraction/.vscode/settings.json @@ -1,10 +1,13 @@ { "editor.formatOnSave": true, - "rust.features": [ - "bsp_rpi3" - ], - "rust.all_targets": false, "editor.rulers": [ 100 ], -} \ No newline at end of file + "rust-analyzer.cargoFeatures.features": [ + "bsp_rpi3" + ], + "rust-analyzer.cargo-watch.allTargets": false, + "rust-analyzer.cargo-watch.arguments": [ + "--target=aarch64-unknown-none-softfloat" + ] +} diff --git a/05_safe_globals/.vscode/settings.json b/05_safe_globals/.vscode/settings.json index f2fa6961..c520a512 100644 --- a/05_safe_globals/.vscode/settings.json +++ b/05_safe_globals/.vscode/settings.json @@ -1,10 +1,13 @@ { "editor.formatOnSave": true, - "rust.features": [ - "bsp_rpi3" - ], - "rust.all_targets": false, "editor.rulers": [ 100 ], -} \ No newline at end of file + "rust-analyzer.cargoFeatures.features": [ + "bsp_rpi3" + ], + "rust-analyzer.cargo-watch.allTargets": false, + "rust-analyzer.cargo-watch.arguments": [ + "--target=aarch64-unknown-none-softfloat" + ] +} diff --git a/06_drivers_gpio_uart/.vscode/settings.json b/06_drivers_gpio_uart/.vscode/settings.json index f2fa6961..c520a512 100644 --- a/06_drivers_gpio_uart/.vscode/settings.json +++ b/06_drivers_gpio_uart/.vscode/settings.json @@ -1,10 +1,13 @@ { "editor.formatOnSave": true, - "rust.features": [ - "bsp_rpi3" - ], - "rust.all_targets": false, "editor.rulers": [ 100 ], -} \ No newline at end of file + "rust-analyzer.cargoFeatures.features": [ + "bsp_rpi3" + ], + "rust-analyzer.cargo-watch.allTargets": false, + "rust-analyzer.cargo-watch.arguments": [ + "--target=aarch64-unknown-none-softfloat" + ] +} diff --git a/07_uart_chainloader/.vscode/settings.json b/07_uart_chainloader/.vscode/settings.json index f2fa6961..c520a512 100644 --- a/07_uart_chainloader/.vscode/settings.json +++ b/07_uart_chainloader/.vscode/settings.json @@ -1,10 +1,13 @@ { "editor.formatOnSave": true, - "rust.features": [ - "bsp_rpi3" - ], - "rust.all_targets": false, "editor.rulers": [ 100 ], -} \ No newline at end of file + "rust-analyzer.cargoFeatures.features": [ + "bsp_rpi3" + ], + "rust-analyzer.cargo-watch.allTargets": false, + "rust-analyzer.cargo-watch.arguments": [ + "--target=aarch64-unknown-none-softfloat" + ] +} diff --git a/08_timestamps/.vscode/settings.json b/08_timestamps/.vscode/settings.json index f2fa6961..c520a512 100644 --- a/08_timestamps/.vscode/settings.json +++ b/08_timestamps/.vscode/settings.json @@ -1,10 +1,13 @@ { "editor.formatOnSave": true, - "rust.features": [ - "bsp_rpi3" - ], - "rust.all_targets": false, "editor.rulers": [ 100 ], -} \ No newline at end of file + "rust-analyzer.cargoFeatures.features": [ + "bsp_rpi3" + ], + "rust-analyzer.cargo-watch.allTargets": false, + "rust-analyzer.cargo-watch.arguments": [ + "--target=aarch64-unknown-none-softfloat" + ] +} diff --git a/09_hw_debug_JTAG/.vscode/settings.json b/09_hw_debug_JTAG/.vscode/settings.json index f2fa6961..c520a512 100644 --- a/09_hw_debug_JTAG/.vscode/settings.json +++ b/09_hw_debug_JTAG/.vscode/settings.json @@ -1,10 +1,13 @@ { "editor.formatOnSave": true, - "rust.features": [ - "bsp_rpi3" - ], - "rust.all_targets": false, "editor.rulers": [ 100 ], -} \ No newline at end of file + "rust-analyzer.cargoFeatures.features": [ + "bsp_rpi3" + ], + "rust-analyzer.cargo-watch.allTargets": false, + "rust-analyzer.cargo-watch.arguments": [ + "--target=aarch64-unknown-none-softfloat" + ] +} diff --git a/10_privilege_level/.vscode/settings.json b/10_privilege_level/.vscode/settings.json index f2fa6961..c520a512 100644 --- a/10_privilege_level/.vscode/settings.json +++ b/10_privilege_level/.vscode/settings.json @@ -1,10 +1,13 @@ { "editor.formatOnSave": true, - "rust.features": [ - "bsp_rpi3" - ], - "rust.all_targets": false, "editor.rulers": [ 100 ], -} \ No newline at end of file + "rust-analyzer.cargoFeatures.features": [ + "bsp_rpi3" + ], + "rust-analyzer.cargo-watch.allTargets": false, + "rust-analyzer.cargo-watch.arguments": [ + "--target=aarch64-unknown-none-softfloat" + ] +} diff --git a/11_virtual_memory/.vscode/settings.json b/11_virtual_memory/.vscode/settings.json index f2fa6961..c520a512 100644 --- a/11_virtual_memory/.vscode/settings.json +++ b/11_virtual_memory/.vscode/settings.json @@ -1,10 +1,13 @@ { "editor.formatOnSave": true, - "rust.features": [ - "bsp_rpi3" - ], - "rust.all_targets": false, "editor.rulers": [ 100 ], -} \ No newline at end of file + "rust-analyzer.cargoFeatures.features": [ + "bsp_rpi3" + ], + "rust-analyzer.cargo-watch.allTargets": false, + "rust-analyzer.cargo-watch.arguments": [ + "--target=aarch64-unknown-none-softfloat" + ] +} diff --git a/12_cpu_exceptions_part1/.vscode/settings.json b/12_cpu_exceptions_part1/.vscode/settings.json index f2fa6961..c520a512 100644 --- a/12_cpu_exceptions_part1/.vscode/settings.json +++ b/12_cpu_exceptions_part1/.vscode/settings.json @@ -1,10 +1,13 @@ { "editor.formatOnSave": true, - "rust.features": [ - "bsp_rpi3" - ], - "rust.all_targets": false, "editor.rulers": [ 100 ], -} \ No newline at end of file + "rust-analyzer.cargoFeatures.features": [ + "bsp_rpi3" + ], + "rust-analyzer.cargo-watch.allTargets": false, + "rust-analyzer.cargo-watch.arguments": [ + "--target=aarch64-unknown-none-softfloat" + ] +} diff --git a/13_integrated_testing/.vscode/settings.json b/13_integrated_testing/.vscode/settings.json index f2fa6961..c520a512 100644 --- a/13_integrated_testing/.vscode/settings.json +++ b/13_integrated_testing/.vscode/settings.json @@ -1,10 +1,13 @@ { "editor.formatOnSave": true, - "rust.features": [ - "bsp_rpi3" - ], - "rust.all_targets": false, "editor.rulers": [ 100 ], -} \ No newline at end of file + "rust-analyzer.cargoFeatures.features": [ + "bsp_rpi3" + ], + "rust-analyzer.cargo-watch.allTargets": false, + "rust-analyzer.cargo-watch.arguments": [ + "--target=aarch64-unknown-none-softfloat" + ] +} diff --git a/README.md b/README.md index 292677b7..2928fa39 100644 --- a/README.md +++ b/README.md @@ -47,13 +47,12 @@ P.S.: In the future, Chinese :cn: versions of the tutorials will be maintained a written in a modular fashion which allows for easy porting to other CPU architectures and/or boards. - I would really love if someone takes a shot at a **RISC-V** implementation! -- For editing, I recommend [Visual Studio Code] with the [Rust Language Server] - extension. +- For editing, I recommend [Visual Studio Code] with [Rust Analyzer]. - In addition to the tutorial text, also check out the `make doc` command to browse the code with HTML goodness. [Visual Studio Code]: https://code.visualstudio.com -[Rust Language Server]: https://github.com/rust-lang/rls +[Rust Analyzer]: https://rust-analyzer.github.io ## 🚀 Ease of use @@ -86,12 +85,17 @@ curl https://sh.rustup.rs -sSf \ | \ sh -s -- \ --default-toolchain nightly-2019-12-20 \ - --component rust-src llvm-tools-preview rustfmt rls rust-analysis + --component rust-src llvm-tools-preview rustfmt source $HOME/.cargo/env cargo install cargo-xbuild cargo-binutils ``` +In case you use `Visual Studio Code`, I strongly recommend installing the +[Rust Analyzer extension] as well. + +[Rust Analyzer extension]: https://marketplace.visualstudio.com/items?itemName=matklad.rust-analyzer + ## 📟 USB Serial Output Since the kernel developed in the tutorials runs on the real hardware, it is @@ -133,3 +137,4 @@ at your option. Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions. + diff --git a/X1_JTAG_boot/.vscode/settings.json b/X1_JTAG_boot/.vscode/settings.json index f2fa6961..c520a512 100644 --- a/X1_JTAG_boot/.vscode/settings.json +++ b/X1_JTAG_boot/.vscode/settings.json @@ -1,10 +1,13 @@ { "editor.formatOnSave": true, - "rust.features": [ - "bsp_rpi3" - ], - "rust.all_targets": false, "editor.rulers": [ 100 ], -} \ No newline at end of file + "rust-analyzer.cargoFeatures.features": [ + "bsp_rpi3" + ], + "rust-analyzer.cargo-watch.allTargets": false, + "rust-analyzer.cargo-watch.arguments": [ + "--target=aarch64-unknown-none-softfloat" + ] +}