Skip to content
Snippets Groups Projects
Select Git revision
  • 4c975ecc0471aa4db9c20e47454702f576d7d3e2
  • master default protected
  • home_exam
  • wip
4 results

d7050e

Forked from Per Lindgren / D7050E
Source project has a limited visibility.
Name Last commit Last update
README.md

Are We Embedded Yet

D7018E - Special Studies in Embedded Systems

The course will be given as a self study course with a set of introductional seminars and accompanying mandatory assignments, followed by a larger assigmnent (project). The project can be carried out individually or in groups dependent on size. Grading will be individual, based on agreed requirements between the student and the teacher, showing understanding and abilities regarding (in order of introduction):

  1. The Rust ecosystem.

    Rustup (stable vs nightly), crates and toml files, cargo, rustc, llvm, gdb/lldb (and additional tooling rls, rustfmt, racer, xargo etc.) The Rust core and standard library. Building, bebugging/testing, documenting and publishing Rust applications and libraries.

  2. Simple applications in Rust

    Prmitive types, tupels, structs, enums, etc. Flow control and functions. Macro usage.

  3. Rust features

    Generics and polymorphism. Closures (and higher order functions). Iterators. Traits, definitions and implementations (derived and explicit). Marker traits. Type bounds.

  4. The Rust Memory Model

    Theoretical underpinning, as well as impact to both memory safatey and code generation. Exterior (inherited) and interior mutability (Cell). Move vs. copy semantics, relation to Clone and Copy traits. Lifetimes and scoping. Static lifetimes, and the relation to the Sync trait.

  5. Memory Safe Concurrency

    UnsafeCell, and synchronization in the RTFM model. Requirements for Stack Resource Policy (SRP) based single-core scheduling.

  6. Macros

    Macro_rules/matching and expansion. Procedural macros (macros 2.0). Overview of the Rust RTFM implementation.

  7. Building and debugginge embedded code in Rust

    Hardware abstractions using svd2rust (autogenerated from vendor provided SVD specifications). Compiling using xargo. Setting up openocd and gdb.

  8. Pre-processing Custom build.rs build scripts, and the RTFM Concurrent Reactive Component model.

Course Format

Please fill out the doodle so we can arrange for a first scheduled seminar. We will use telegram telegram in order to confirm the preferred date. On the first seminar we will schedule 10 sessions for covering the above topics.

Each topic will be accompanied by a set of small illustartive examles and assigments that each student should master (learning goals). On the following session, each student should prepare to discuss and demonstrate their solutions.

Lectures and assigments will be covered over a 4 week period, leaving time for a larger assignment/project.

Each project should be reported in terms of a git Rust crate, with sufficient documentation (readme.md) to build, and recreate the result.

There will be two presentation rounds (at end of LP2 and LP3). Students taking (too many other) courses during LP2 may choose to present their project at end of LP3 (instead of LP2). Presentations will be oral, where the student(s), will present and demonstrate their work.

Projects should be related to embedded programming, either on the target side (some application using the RTFM-core or CRC model), or on the host side, communicating with an embedded target running Rust RTFM. E.g., two groups can work together with building a system, e.g., with back-end processing of data collected by the embedded system, or proividing a front-end to the embedded system. Alternatively, host side project could relate the develpment of the RTFM-core/ RTFM-CRC frameworks or related tools (e.g. LLWM-KLEE as a backend for analysis of Rust code).

Resources

Students will carry out the assignemnts on their personal laptops (in case you don't have a working laptop we will try to lend you one). Tools used are available for linux and osx, but with a bit of trickery windows based installations should be possible (but you are on your own here). In case you don't run osx/linux native, virtual box or wmware is possible, though debugging of target MCUs are feasible it is a bit more tricky.

Embedded targets STM32F401RE (nucleo) will be made available to all students. You will need to get an mini-usb cable yourselves. If you prefer to work with some other ARM Cortex M processor, we will have a look at available support.