Skip to content

[CFP] The LLVM embedded toolchain for Arm #17

Description

@smithp35

Title

The LLVM embedded toolchain for Arm

Author

Peter Smith, peter.smith@arm.com Arm

Distribution

A LLVM based toolchain for bare-metal embedded systems, initially focused on Cortex-M devices.

Abstract (optional)

For many years the GNU Arm Embedded toolchain has provided an open-source toolchain targeting embedded systems. The LLVM Embedded toolchain for Arm is a new open-source project with the goal of providing an LLVM based equivalent to the GNU Embedded toolchain. We would like the LLVM Embedded toolchain to lower the bar to entry of using LLVM in Embedded systems development. The project itself is a set of build scripts that combines tools and libraries from the llvm-project with the Newlib C-library to build the Toolchain from source. With the sample linker scripts it is simple to build and run a simple example that runs on the QEMU emulator. We have used, with a small enhancement, clang config files to approximate multilib and specs files for some hardware configurations. While sufficient for simple examples this will not scale well to the amount of Arm platforms that the GNU Arm Embedded Toolchain is able to support.

What's unique about the environment you package LLVM for? (optional)

The toolchain targets resource constrained devices in a freestanding environment. Targets need builds of libraries and custom linker scripts to match the memory model of the end device.

What makes your distribution of LLVM unique? (optional)

Packaging the LLVM tools and libraries with the newlib C library, with some built in configurations for common Cortex-M devices.

What might others learn from your experience? (optional)

Using configuration files in anger.
Using the bare-metal driver.
Integrating newlib

What could be improved in upstream LLVM to make working with it easier as a downstream packager? (optional)

Some areas that the toolchain needs to improve that we'd like to work with the community on.

  • Implementing multilib support in a way that can be upstreamed without hardcoding a library structure.
  • Handling configuration choices that the GNU Embedded toolchain uses GCC specs files for (semihosting, non-semihosting etc).
  • Supporting and testing more variants of compiler-rt for embedded A, R and M profile Arm CPUs.
  • Implementing CI for a toolchain targeting microcontrollers. Ideally in a form that can report to the LLVM Community. For example, build-bots that cross-compile compiler-rt and run tests in emulators.

Reminder that this is meant to be a 15 minute lightning talk; enough to pique
interests but follow up should be done after. Slides can always include links
to more info; we will ask that you send a PR to this repo with your slides when
they are ready.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions