Companies Home Search Profile

Embedded Rust on RISC-V Part 1

Focused View

Benix Samuel Vincent Theogaraj

2:43:24

0 View
  • 1 -Preamble.mp4
    07:29
  • 2 -Course Description.mp4
    04:42
  • 1 -Cargo, rustc & rustup commands and how to create a cargo library & binary crate.mp4
    12:30
  • 2 -Cargo Package and how to create a cargo package with multiple crates.mp4
    16:30
  • 3 -What is cargo workspace and how to manage project in cargo workspace.mp4
    08:22
  • 1 -What are attributes in rust.mp4
    01:59
  • 2 -What are inner and outer attributes.mp4
    06:32
  • 3 -Configure workspace for embedded rust with no standard library.mp4
    11:47
  • 4 -First successful build of embedded-rust for risc-v target.mp4
    10:13
  • 1 -Rename the executable, dump the objectssymbols in executable.mp4
    08:20
  • 2 -What are rustflags and how to use it to tweak compiler.mp4
    08:01
  • 3 -How to add custom linker file with rustflags.mp4
    06:11
  • 1 -Create boot.S with simple RISC-V boot code in assembly.mp4
    22:39
  • 1 -Section Introduction.mp4
    01:17
  • 2 -Struct, Impl, associated functions and methods in rust.mp4
    03:04
  • 3 -UART driver code in rust exported as a module from library crate.mp4
    19:09
  • 4 -How to add dependency on local library and use the uart driver to transmit data.mp4
    07:12
  • 5 -Demo.mp4
    07:27
  • Description


    Bootstrap RISC-V target

    What You'll Learn?


    • How to create a rust workspace ?
    • How to configure the rust toolchain for RISC-V?
    • How to mix RISC-V assembly with rust?
    • Code to bootstrap RISC-V target into embedded rust

    Who is this for?


  • Beginner embedded rust developers interested to run rust on RISC-V
  • What You Need to Know?


  • Knowledge on computer architecture and programming language
  • More details


    Description

    First and foremost, this course don't cover toolchain installation This course starts with building blocks needed to bootstrap RISC-V processor into rust and finishes by booting Hifive1-Rev B board into Embedded Rust. Regarding the code management, there are many ways to manage code in rust; this course adopts Cargo workspace.


    Section 1: Introduction

    • Introduction

    • Preamble

    • What is covered & what isn't

    • Resources & expectation


    Section 2: Cargo Workspace

    • Create Cargo workspace

    • Create a binary crate to build an executable

    • Create library crate to keep reusable code

    • Create Cargo.toml to manage dependencies


    Then this course jumps into the Embedded-rust & Cargo settings.

    Section 3: Embedded-rust and Cargo settings for RISC-V Embedded Rust target

    • What are attributes in Rust?

    • What is Embedded Rust?

    • Provide custom panic handler and entry function

    • The difference between Cargo toml file vs config file

    • How to configure Cargo Workspace to build for RISC-V instead of host?

    • How to pass additional flags to Rust compiler?

    • How to pass custom linker file for target (Hifive1-RevB board)?

    NOTE: This course don't cover how to write linker file. However, the linker file is shared as downloadable resource.


    Section 4: Commands to dissect ELF and RUSTFLAGS

    • Commands to extract information from ELF

    • RUSTFLAGS in rust to tweak compiler behaviour

    • How to add custom linker file with RUSTFLAGS


    With workspace & code management taken care, next is to add RISC-V boot up code in RISC-V assembly.

    Section 5: Simple RISC-V boot code   (Binary Crate)

    • How to add a assembly (.S) file?

    • Disable interrupts at boot time

    • Set the stack pointer to valid location

    • How to jump from RISC-V assembly to Embedded Rust entry function?

    • Build an executable with boot code in RISC-V assembly with entry & panic handler in Rust


    Section 6: UART Driver in Rust  (Library Crate)

    • Structs and Impls in Rust

    • Uart driver functions

    • Build an executable with boot code in RISC-V asm and UART driver in Rust.

    • Connect to Hifive1-RevB board with OpenOCD & GDB server

    • Load the executable into Hifive1-RevB

    • Read messages from serial out with serial tools

    NOTE: This section uses a OpenOCD script but don't discuss about the script content. However, the script is shared as downloadable resource. 


    Update on Dec 5, 2024:  Attached boot.S file on Section #5

    Who this course is for:

    • Beginner embedded rust developers interested to run rust on RISC-V

    User Reviews
    Rating
    0
    0
    0
    0
    0
    average 0
    Total votes0
    Focused display
    Category
    Benix Samuel Vincent Theogaraj
    Benix Samuel Vincent Theogaraj
    Instructor's Courses
    My journey on embedded systems  firmware & software started from Indian Institute of Technology, Madras with Analog Devices's Blackfin Digital Signal Processors and then got introduced to ARM and MIPS Processors during work at Cisco Systems and Samsung for real time operating systems development. My journey on RISC-V started three years ago as a RISC-V enthusiast and now developing embedded systems with RISC-V processors.
    Students take courses primarily to improve job-related skills.Some courses generate credit toward technical certification. Udemy has made a special effort to attract corporate trainers seeking to create coursework for employees of their company.
    • language english
    • Training sessions 18
    • duration 2:43:24
    • Release Date 2025/03/09

    Courses related to Rust