Rust Embedded Presented By: Nitin Saxena Software Consultant Knoldus Inc.
About Knoldus Knoldus is a technology consulting firm with focus on modernizing the digital systems at the pace your business demands. DevOps Functional. Reactive. Cloud Native
01 Introduction 02 What is Rust? Why Rust for Embedded? 03 What is an Embedded System 04 STM32F3-Discovery Board & it’s crates 05 Demo Our Agenda
Introduction ● Nowadays we all are surrounded by the small system which is making our day to day life easy and better. ● We are going to talk about this small system known as Embedded System and how Rust Programming is taking it further. ● Software embedded inside the small computer and this small computer perform multiple functions using its components. This whole system is an Embedded System. ● We will also work with hardware(microcontroller) with a Demo at last. LEARN NOW
c Rust Embedded System? Rust is a programming language but not like other languages like java python etc. The difference is rust is a system programming language, not an application whose syntax is much similar to c++ but guarantees more safety than this. LEARN NOW We are going to program our hardware using Rust Programming Language as we have multiple reasons for that - 1. Safety 2.Rust Community support. 3. Control over memory and performance. Why Rust for Embedded?
OUR MISSION An Embedded System is a microcontroller or microprocessor-based computer system that is used to perform certain specific operations or tasks. It can also be called as a computer hardware system which do have software embedded in it. What is an Embedded System??
Hardware Bus controller Read only memory or flash input/output devices 1 2 3 4 5 The Embedded System Micro-controller
c Where we use Embedded System? ● If you look around yourself you are all around with embedded systems. ● Modern cars. ● Mobile phones. ● Medical ● Gaming ● Sensors
STM32- Discovery Board
www.website.com What is an Microcontroller? Microcontroller A Micro-controller is considered a small computer or semi-computer that is used to perform some specific task of an embedded system. It is present on a single metal-oxide-semiconductor integrated circuit chip as shown below. So we are going to work on this particular micro-controller. STM32F303VCT6 DISCOVERY Board commonly known as F3.
01 A microcontroller 02 A number of LED’s, including the eight aligned in a “compass” formation 03 Two buttons 04 Two USB ports 05 Sensors(Accelerometer, Magnetometer, Gyroscope) Components on the Discovery Board
Now it’s time for the LEDs Game
Crates to use for LED Demo To work on the hardware we need to know about the crates we are going to use. These are the crates we have to include in our Cargo.toml. ● cortex-m ● cortex-m-rt ● panic-hal ● stm32f30x-hal
c The basic Code! ● Basic structure of the program. ● Why [no_std] and [no_main]? LEARN NOW
Great Product! Lorem ipsum Great collection of slides easy to edit. Great collection of slides Great Slides ● Rcc(Reset clock control) ● GPIO(general purpose input output) Control the Hardware Peripherals
Great Product! Lorem ipsum Great collection of slides easy to edit. Great collection of slides Great Slides Access the LEDs Pin’s on Port E ● To “on” the LED we have to access the pin of that particular LED. ● There are multiple ports and we can find about the port contains board LEDs from Board’s Manual. ● Port- E for stm32f3-Discovery Board. Access port e using “gpio” peripheral. ● Blink LED by providing register for mode(push/pull) and for output type(input/output)
www.website.com Make led on and off with delay set_high() and set_low() to on and off an led. Microcontroller 01 Delay to make LED blink. 02 Program neither end nor it return any value 03
OUR MISSION ● I mentioned that the STM32F3DISCOVERY actually has two microcontrollers. a. ST-LINK as programmer/debugger b. This ST-LINK is connected to the target microcontroller using a Serial Wire Debug (SWD) interface. ● As for OpenOCD, it's software that provides some services like a GDB server on top of USB devices OpenOcd & GDB Server
www.website.com Time for the exciting Demo
www.website.com Business Perspective ● Rust has been building up momentum. More and more organisations are looking to make use of it (including Microsoft). Several organisations in the embedded space are already using Rust. ● Rust takes the good parts of C and C++, and programming practices that enable good quality code and bakes it in from the outset. ● Rust also avoids bugs. Bugs like Memory Bugs and Concurrency Bugs. Which makes our program more better.
c References LEARN NOW https://blog.knoldus.com/blink-the-led s-of-stm32f3-discovery-board/ https://blog.knoldus.com/embedded-ru st-lets-start-with-stm32f3discovery/ https://blog.knoldus.com/discovery-bo ard/ https://blog.knoldus.com/embedded-wi th-rust/
Thank You! @SamarSaxena19 @iamsamar17 /mesamar97

Is Rust Programming ready for embedded development?

  • 1.
    Rust Embedded Presented By:Nitin Saxena Software Consultant Knoldus Inc.
  • 2.
    About Knoldus Knoldus isa technology consulting firm with focus on modernizing the digital systems at the pace your business demands. DevOps Functional. Reactive. Cloud Native
  • 3.
    01 Introduction 02 Whatis Rust? Why Rust for Embedded? 03 What is an Embedded System 04 STM32F3-Discovery Board & it’s crates 05 Demo Our Agenda
  • 4.
    Introduction ● Nowadays weall are surrounded by the small system which is making our day to day life easy and better. ● We are going to talk about this small system known as Embedded System and how Rust Programming is taking it further. ● Software embedded inside the small computer and this small computer perform multiple functions using its components. This whole system is an Embedded System. ● We will also work with hardware(microcontroller) with a Demo at last. LEARN NOW
  • 5.
    c Rust Embedded System? Rust isa programming language but not like other languages like java python etc. The difference is rust is a system programming language, not an application whose syntax is much similar to c++ but guarantees more safety than this. LEARN NOW We are going to program our hardware using Rust Programming Language as we have multiple reasons for that - 1. Safety 2.Rust Community support. 3. Control over memory and performance. Why Rust for Embedded?
  • 6.
    OUR MISSION An EmbeddedSystem is a microcontroller or microprocessor-based computer system that is used to perform certain specific operations or tasks. It can also be called as a computer hardware system which do have software embedded in it. What is an Embedded System??
  • 7.
    Hardware Bus controller Read onlymemory or flash input/output devices 1 2 3 4 5 The Embedded System Micro-controller
  • 8.
    c Where we use Embedded System? ●If you look around yourself you are all around with embedded systems. ● Modern cars. ● Mobile phones. ● Medical ● Gaming ● Sensors
  • 9.
  • 10.
    www.website.com What is an Microcontroller? Microcontroller AMicro-controller is considered a small computer or semi-computer that is used to perform some specific task of an embedded system. It is present on a single metal-oxide-semiconductor integrated circuit chip as shown below. So we are going to work on this particular micro-controller. STM32F303VCT6 DISCOVERY Board commonly known as F3.
  • 11.
    01 A microcontroller 02A number of LED’s, including the eight aligned in a “compass” formation 03 Two buttons 04 Two USB ports 05 Sensors(Accelerometer, Magnetometer, Gyroscope) Components on the Discovery Board
  • 12.
    Now it’s timefor the LEDs Game
  • 13.
    Crates to usefor LED Demo To work on the hardware we need to know about the crates we are going to use. These are the crates we have to include in our Cargo.toml. ● cortex-m ● cortex-m-rt ● panic-hal ● stm32f30x-hal
  • 14.
    c The basic Code! ● Basicstructure of the program. ● Why [no_std] and [no_main]? LEARN NOW
  • 15.
    Great Product! Lorem ipsum Great collection of slideseasy to edit. Great collection of slides Great Slides ● Rcc(Reset clock control) ● GPIO(general purpose input output) Control the Hardware Peripherals
  • 16.
    Great Product! Lorem ipsum Great collection of slideseasy to edit. Great collection of slides Great Slides Access the LEDs Pin’s on Port E ● To “on” the LED we have to access the pin of that particular LED. ● There are multiple ports and we can find about the port contains board LEDs from Board’s Manual. ● Port- E for stm32f3-Discovery Board. Access port e using “gpio” peripheral. ● Blink LED by providing register for mode(push/pull) and for output type(input/output)
  • 17.
    www.website.com Make led onand off with delay set_high() and set_low() to on and off an led. Microcontroller 01 Delay to make LED blink. 02 Program neither end nor it return any value 03
  • 18.
    OUR MISSION ● Imentioned that the STM32F3DISCOVERY actually has two microcontrollers. a. ST-LINK as programmer/debugger b. This ST-LINK is connected to the target microcontroller using a Serial Wire Debug (SWD) interface. ● As for OpenOCD, it's software that provides some services like a GDB server on top of USB devices OpenOcd & GDB Server
  • 19.
  • 20.
    www.website.com Business Perspective ● Rusthas been building up momentum. More and more organisations are looking to make use of it (including Microsoft). Several organisations in the embedded space are already using Rust. ● Rust takes the good parts of C and C++, and programming practices that enable good quality code and bakes it in from the outset. ● Rust also avoids bugs. Bugs like Memory Bugs and Concurrency Bugs. Which makes our program more better.
  • 21.
  • 22.