Giter Site home page Giter Site logo

microsoft / llvm-lookup-tool Goto Github PK

View Code? Open in Web Editor NEW
8.0 5.0 5.0 19 KB

A command-line tool that returns LLVM Static Compiler arguments based on a common microcontroller, or MCU, board name such as "Arduino Uno".

License: MIT License

Python 100.00%

llvm-lookup-tool's Introduction

LLVM Lookup Tool

This command-line tool returns the LLVM Static Compiler arguments based on a common microcontroller, or MCU, board name such as "Arduino Uno".

More info

ELL offers a path for ML model to be complied for microcontrollers and single chip computers. One limitation of ELL is that very few devices are offered as built in targets, since ELL uses LLVM to compile the models just about any chip available can be targeted. However, LLVM is a tool designed for a highly technical audience and finding the attributes needed for the complier can be challenging and time consuming. This tool is designed to make it easier to use ELL for common MCUs.

The core of this project is a JSON database. This includes the common name for the board, a device id, and LLVM arguments needed for compiling.

Before using this tool, we recommend that you have some familiarity with ELL, python, and command line interfaces.

What is LLVM?

LLVM is a set of compiler and toolchain technologies. It's contains multiple components - front ends, intermediate representations, and back ends that span compilation. The LLVM IR Optimizer takes the source and using the single optimizer can target a range of hardware, defined by the arguments. More information can be found at the LLVM Github page.

How to use the lookup tool

Get the LLVM triple and attributes: python get_llvm.py --get "Board Name"

Search for an available board: python get_llvm.py --search "Board"

List all available boards: python get_llvm.py --list

Copy the LLVM arguments and save to input during compiling. Note that boards may have different numbers of attributes.

Please note that the LLVM lookup program is currently case sensitive. If you do not see the board you are looking for, check capitalization and spelling.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

Adding boards

Please help us add boards! To add your own or other favorite boards, fork this repo and make the relevant edits to the boards.json file, then submit a pull request indicating what boards you have added.

Where to find LLVM Arguments

Finding the LLVM triple and other attributes will depend on the hardware and firmware of your particular device. The LLVM triple is a string that includes the architecture of the MCU and the type of compiling (e.g. bare metal, GNU).

Here are some places to look:

llvm-lookup-tool's People

Contributors

adiazulay avatar jenfoxbot avatar microsoftopensource avatar shawncal avatar yaynoel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

llvm-lookup-tool's Issues

Running get_llvm.py without arg returns nothing

When running get_llvm.py without an argument, the program returns nothing. When running get_llvm.py with --list, program lists boards and then requests user to "Enter Board Name:".

Program should return "Enter Board Name" when run without an arg.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.