Skip to content

Tooling: Ideal developer experience #6

Description

@japaric

Building programs, written in C or Rust, "manually" for microcontrollers is quite complicated as it
involves several device specific files (e.g. linker scripts) and configuration (e.g. compiler flags).

This issue is about what the ideal experience would look like for embedded Rust developers. I think
it's informative to study first what the experience of C/C++ developers looks like:

Embedded C/C++ developers usually (always?) use an IDE and a SDK to make the process
straightforward. Here's how the process looks like for them (disclaimer: this is my vague
recollection)

  • User: Picks the target device (via a GUI)
    • The SDK generates the required linker scripts, chooses what flags to pass to gcc and also what
      libraries (the soft float variant or the hard float variant?) to link to.
  • User: Configure the device (via a GUI): e.g. pick the clock frequency
    • The SDK generates initialization code (crt0.o-ish stuff + configuration of clock, PLL, etc.)
      that runs before main.
  • User: Writes their program in a high level API
    • The SDK will compiles the right implementation of the high level API for the target device
  • User: Clicks "Build & Debug"
    • The SDK compiles the program, flashes the binary to the device and starts a debug session
    • Apart from the standard debug experience: step by step execution, breakpoints, disassembly,
      inspection of memory, etc. the SDK also provides "registers maps" that describe the contents of
      register in a human readable way: instead of hex-speak 0xdeadbeef, you get "the CEN bit of
      the CR register is set" but in a more graphical way.

I think those are, at a "minimum", the conveniences that SDKs provide. SDKs may also include an
OS/RTOS but that sort of escapes the realm of tooling.

What are other niceties that C SDKs provide? And how do you picture the ideal Rust developer
experience? Finally, how could we materialize all those conveniences using Cargo? We probably want
to spawn more issues about this last question.

Metadata

Metadata

Assignees

No one assigned

    Labels

    feb-2019-cleanupThese issues are proposed to be closed, as part of a cleanup of issues in February 2019microcontroller

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions