From fc0075a381c3bf1aaa6623929dcb9d45c56bd72a Mon Sep 17 00:00:00 2001 From: "Jonathan Pallant (42 Technology)" Date: Tue, 28 Sep 2021 09:26:31 +0100 Subject: [PATCH] Addressing review comments. --- README.md | 43 ++++++++++++++++-------------- boards/adafruit_macropad/README.md | 2 +- boards/feather_rp2040/README.md | 2 +- boards/pico/README.md | 2 +- boards/pico_explorer/README.md | 2 +- boards/pro_micro_rp2040/README.md | 4 +-- rp2040-hal/README.md | 4 +-- rp2040-hal/examples/pwm_blink.rs | 2 +- 8 files changed, 32 insertions(+), 29 deletions(-) diff --git a/README.md b/README.md index b2af132..264d282 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@

rp-hal

- Rust support for the "Raspberry Pi Silicon" family of microcontrollers + Rust support for the "Raspberry Silicon" family of microcontrollers
Explore the API docs »
@@ -40,23 +40,26 @@ ## Getting Started -So, you want to program your Raspberry Pi Silicon, using the Rust programming -language. You've come to the right place! +So, you want to program your new Raspberry Silicon microcontroller, using the +Rust programming language. You've come to the right place! -This repository is `rp-hal` - a collection of high-level drivers for the RP2040 -and various associated boards, like the Raspberry Pi Pico and the Adafruit -Feather RP2040. +This repository is `rp-hal` - a collection of high-level drivers for the +Raspberry Silicon RP2040 micontroller and various associated boards, like the +Raspberry Pi Pico and the Adafruit Feather RP2040. -If you want to write an application for Raspberry Pi Silicon, check out our +If you want to write an application for Raspberry Silicon, check out our [RP2040 Project Template](https://github.com/rp-rs/rp2040-project-template). -If you want to write code that uses the Raspberry Pi Silicon PIO State Machines, check out [pio-rs](https://github.com/rp-rs/pio-rs). You can even compile PIO programs at run-time, on the RP2040 itself! +If you want to write code that uses the Raspberry Silicon PIO State Machines, +check out [pio-rs](https://github.com/rp-rs/pio-rs). You can even compile PIO +programs at run-time, on the RP2040 itself! If you want to try out some examples on one of our supported boards, check out the list of *Board Support Packages* below, and click through to see the various examples for each board. -Before trying any of the examples, please ensure you have the latest stable version of Rust installed, along with the right target support: +Before trying any of the examples, please ensure you have the latest stable +version of Rust installed, along with the right target support: ```sh rustup self update @@ -94,10 +97,10 @@ Each BSP includes some examples to show off the features of that particular boar [Embedded HAL]: https://github.com/rust-embedded/embedded-hal [Cargo Features]: https://doc.rust-lang.org/cargo/reference/features.html -### [rp2040-hal] - The HAL for the [Raspberry Pi Silicon RP2040] +### [rp2040-hal] - The HAL for the [Raspberry Silicon RP2040] You should include this crate in your project if you want to write a driver or -library that runs on the [Raspberry Pi Silicon RP2040], or if you are writing a Board +library that runs on the [Raspberry Silicon RP2040], or if you are writing a Board Support Package (see later on). The crate provides high-level drivers for the RP2040's internal peripherals, @@ -110,7 +113,7 @@ There are examples in this crate to show how to use various peripherals particular board. [rp2040-hal]: https://github.com/rp-rs/rp-hal/tree/main/rp2040-hal -[Raspberry Pi Silicon RP2040]: https://www.raspberrypi.org/products/rp2040/ +[Raspberry Silicon RP2040]: https://www.raspberrypi.org/products/rp2040/ ### [pico] - Board Support for the [Raspberry Pi Pico] @@ -195,12 +198,12 @@ the Arm ELF file to a UF2 format image. For boards with USB Device support like the Raspberry Pi Pico, we recommend you use the UF2 process. -The RP2040 contains a Cortex-M0+ processor, which implements the Thumb-2 format -of the ARMv6-M instruction set. There are no operating-specific features in the -binaries produced - they are for 'bare-metal' systems. For compatibilty with -other Arm code (e.g. as produced by GCC), Rust uses the *Arm -Embedded-Application Binary Interface* standard or EABI. Therefore, any Rust -code for the RP2040 should be compiled with the target `thumbv6m-none-eabi`. +The RP2040 contains two Cortex-M0+ processors, which execute Thumb-2 encoded +ARMv6-M instructions. There are no operating-specific features in the binaries +produced - they are for 'bare-metal' systems. For compatibilty with other Arm +code (e.g. as produced by GCC), Rust uses the *Arm Embedded-Application Binary +Interface* standard or EABI. Therefore, any Rust code for the RP2040 should be +compiled with the target *`thumbv6m-none-eabi`*. More details can be found in the [Project Template](https://github.com/rp-rs/rp2040-project-template). @@ -223,7 +226,7 @@ runner = "elf2uf2-rs -d" The `thumbv6m-none-eabi` target may be replaced by the all-Arm wildcard `'cfg(all(target_arch = "arm", target_os = "none"))'`. -*Step 3* - Boot your RP2040 into "USB Bootloder mode", typically by rebooting +*Step 3* - Boot your RP2040 into "USB Bootloader mode", typically by rebooting whilst holding some kind of "Boot Select" button. On Linux, you will also need to 'mount' the device, like you would a USB Thumb Drive. @@ -247,7 +250,7 @@ probe-rs can autodetect your debug probe, which can make it easier to use. Currently, probe-rs supports the slightly unusual debug hardware in the RP2040, but the last released probe-run tool (v0.2.6, as of September 2021), does not. However, there is a special version of probe-run for the RP2040 called -[probe-run-rs]. +[probe-run-rp](https://github.com/rp-rs/probe-run/tree/rp2040-support). *Step 1* - Install `probe-run-rp`: diff --git a/boards/adafruit_macropad/README.md b/boards/adafruit_macropad/README.md index dc2bdd9..b5875dd 100644 --- a/boards/adafruit_macropad/README.md +++ b/boards/adafruit_macropad/README.md @@ -9,7 +9,7 @@ RP2040 chip according to how it is connected up on the Feather. [adafruit_macropad]: https://github.com/rp-rs/rp-hal/tree/main/boards/adafruit_macropad [Adafruit Macropad]: https://www.adafruit.com/product/5128 [rp2040-hal]: https://github.com/rp-rs/rp-hal/tree/main/rp2040-hal -[Raspberry Pi Silicon RP2040]: https://www.raspberrypi.org/products/rp2040/ +[Raspberry Silicon RP2040]: https://www.raspberrypi.org/products/rp2040/ ## Using diff --git a/boards/feather_rp2040/README.md b/boards/feather_rp2040/README.md index 42833e1..76f9173 100644 --- a/boards/feather_rp2040/README.md +++ b/boards/feather_rp2040/README.md @@ -9,7 +9,7 @@ RP2040 chip according to how it is connected up on the Feather. [Adafruit Feather RP2040]: https://www.adafruit.com/product/4884 [feather_rp2040]: https://github.com/rp-rs/rp-hal/tree/main/boards/feather_rp2040 [rp2040-hal]: https://github.com/rp-rs/rp-hal/tree/main/rp2040-hal -[Raspberry Pi Silicon RP2040]: https://www.raspberrypi.org/products/rp2040/ +[Raspberry Silicon RP2040]: https://www.raspberrypi.org/products/rp2040/ ## Using diff --git a/boards/pico/README.md b/boards/pico/README.md index 2ab637d..5470fb4 100644 --- a/boards/pico/README.md +++ b/boards/pico/README.md @@ -9,7 +9,7 @@ RP2040 chip according to how it is connected up on the Pico. [Raspberry Pi Pico]: https://www.raspberrypi.org/products/raspberry-pi-pico/ [pico]: https://github.com/rp-rs/rp-hal/tree/main/boards/pico [rp2040-hal]: https://github.com/rp-rs/rp-hal/tree/main/rp2040-hal -[Raspberry Pi Silicon RP2040]: https://www.raspberrypi.org/products/rp2040/ +[Raspberry Silicon RP2040]: https://www.raspberrypi.org/products/rp2040/ ## Using diff --git a/boards/pico_explorer/README.md b/boards/pico_explorer/README.md index c9167d2..25e99e1 100644 --- a/boards/pico_explorer/README.md +++ b/boards/pico_explorer/README.md @@ -10,7 +10,7 @@ RP2040 chip according to how it is connected up on the Pico Explorer. [Pimoroni Pico Explorer]: https://shop.pimoroni.com/products/pico-explorer-base [pico_explorer]: https://github.com/rp-rs/rp-hal/tree/main/boards/pico_explorer [rp2040-hal]: https://github.com/rp-rs/rp-hal/tree/main/rp2040-hal -[Raspberry Pi Silicon RP2040]: https://www.raspberrypi.org/products/rp2040/ +[Raspberry Silicon RP2040]: https://www.raspberrypi.org/products/rp2040/ ## Using diff --git a/boards/pro_micro_rp2040/README.md b/boards/pro_micro_rp2040/README.md index 40ad916..60abd8c 100644 --- a/boards/pro_micro_rp2040/README.md +++ b/boards/pro_micro_rp2040/README.md @@ -1,7 +1,7 @@ # [pro_micro_rp2040] - Board Support for the [Sparkfun Pro Micro RP2040] You should include this crate if you are writing code that you want to run on -a [Sparkfun Pro Micro RP2040] - a smaller [RP2040][Raspberry Pi Silicon RP2040] board with USB-C and a WS2812B addressable LED. +a [Sparkfun Pro Micro RP2040] - a smaller [RP2040][Raspberry Silicon RP2040] board with USB-C and a WS2812B addressable LED. This crate includes the [rp2040-hal], but also configures each pin of the RP2040 chip according to how it is connected up on the Pro Micro RP2040. @@ -9,7 +9,7 @@ RP2040 chip according to how it is connected up on the Pro Micro RP2040. [Sparkfun Pro Micro RP2040]: https://www.sparkfun.com/products/18288 [pro_micro_rp2040]: https://github.com/rp-rs/rp-hal/tree/main/boards/pro_micro_rp2040 [rp2040-hal]: https://github.com/rp-rs/rp-hal/tree/main/rp2040-hal -[Raspberry Pi Silicon RP2040]: https://www.raspberrypi.org/products/rp2040/ +[Raspberry Silicon RP2040]: https://www.raspberrypi.org/products/rp2040/ ## Using diff --git a/rp2040-hal/README.md b/rp2040-hal/README.md index fef8602..bdc4e66 100644 --- a/rp2040-hal/README.md +++ b/rp2040-hal/README.md @@ -8,7 +8,7 @@

rp-hal

- High-level Rust drivers for the Raspberry Pi Silicon RP2040 Microcontroller + High-level Rust drivers for the Raspberry Silicon RP2040 Microcontroller
Explore the API docs »
@@ -47,7 +47,7 @@ ## Introduction This is the `rp2040-hal` package - a library crate of high-level Rust drivers -for the Raspberry Pi Silicon RP2040 microcontroller, along with a collection of +for the Raspberry Silicon RP2040 microcontroller, along with a collection of non-board specific example programs for you to study. You should use this crate in your application if you want to write code for the RP2040 microcontroller. The *HAL* in the name standards for *Hardware Abstraction Layer*, and comes from diff --git a/rp2040-hal/examples/pwm_blink.rs b/rp2040-hal/examples/pwm_blink.rs index 149ded0..ec81a68 100644 --- a/rp2040-hal/examples/pwm_blink.rs +++ b/rp2040-hal/examples/pwm_blink.rs @@ -20,7 +20,7 @@ use panic_halt as _; // Alias for our HAL crate use rp2040_hal as hal; -// Traits we need +// Some traits we need use embedded_hal::PwmPin; use embedded_time::rate::*; use rp2040_hal::clocks::Clock;