filmov
tv
Rust Embassy example tutorial with STM32 microcontroller.

Показать описание
Rust Embassy project for Embedded systems. Quick environment set up in Ubuntu with a Nucleo 64 board - STM32F103RB.
Using Visual Studio Code .
-----------------------------------------------------
0:40 # Async/Await for multitasking, TCP/UDP sockets for networking, and more features through other compatible crates.
1:00 # STM32F103RB, 64 PINS, ARM CORTEX M3.
1:30 # ST Link is what will show up in the devices list.
2:05 # MB1136 is the model of my board.
2:55 # List usb devices and filter by the vendor name, in my case link, command: "lsusb | grep -i link"
3:25 # We will need the tool "probe-rs" to flash the binary. "cargo install probe-rs-tools"
4:00 "probe-rs info --chip STM32F103RB"
4:20 To grant permissions: "ls /etc/udev/rules.d/ "
4:20 To list the folder: "ls /etc/udev/rules.d/ "
4:40 # You can copy the rule's file from the internet or create a new one, it is very simple.
5:47 These Ids should match with idVendor and idProduct in the file.
6:20 # Reload the rules: "sudo udevadm control --reload-rules && sudo udevadm trigger"
6:25 # Now we should have permissions: "probe-rs info --chip STM32F103RB", but there's another access error: "Error: Error during the access."
7:30 # I just fix the version number of the crate "embedded-hal" to the latest one.
7:45 # Note: You can also configure here a different runner instead of "probe-rs" if you wish.
8:00 # Probably "PC13" is not the correct GPIO for my device, because the example was written for another chip name.
8:30 "cargo run --bin blinky --release"
9:50 # Embassy provides this API with the structure "Output" which makes it simpler because we do not need to worry about programming the address of the register for the led's GPIO. We just need to provide the right GPIO's name.
10:15 # Notice that the user led is connected to PIN 21
10:40 # And PIN 21 corresponds to the name of the GPIO "PA5"
Using Visual Studio Code .
-----------------------------------------------------
0:40 # Async/Await for multitasking, TCP/UDP sockets for networking, and more features through other compatible crates.
1:00 # STM32F103RB, 64 PINS, ARM CORTEX M3.
1:30 # ST Link is what will show up in the devices list.
2:05 # MB1136 is the model of my board.
2:55 # List usb devices and filter by the vendor name, in my case link, command: "lsusb | grep -i link"
3:25 # We will need the tool "probe-rs" to flash the binary. "cargo install probe-rs-tools"
4:00 "probe-rs info --chip STM32F103RB"
4:20 To grant permissions: "ls /etc/udev/rules.d/ "
4:20 To list the folder: "ls /etc/udev/rules.d/ "
4:40 # You can copy the rule's file from the internet or create a new one, it is very simple.
5:47 These Ids should match with idVendor and idProduct in the file.
6:20 # Reload the rules: "sudo udevadm control --reload-rules && sudo udevadm trigger"
6:25 # Now we should have permissions: "probe-rs info --chip STM32F103RB", but there's another access error: "Error: Error during the access."
7:30 # I just fix the version number of the crate "embedded-hal" to the latest one.
7:45 # Note: You can also configure here a different runner instead of "probe-rs" if you wish.
8:00 # Probably "PC13" is not the correct GPIO for my device, because the example was written for another chip name.
8:30 "cargo run --bin blinky --release"
9:50 # Embassy provides this API with the structure "Output" which makes it simpler because we do not need to worry about programming the address of the register for the led's GPIO. We just need to provide the right GPIO's name.
10:15 # Notice that the user led is connected to PIN 21
10:40 # And PIN 21 corresponds to the name of the GPIO "PA5"
Комментарии