Giter Site home page Giter Site logo

cargo-flash's Introduction

cargo-flash

crates.io documentation Actions Status chat

This crate provides a cargo subcommand to flash ELF binaries onto ARM chips.

As of writing this, flashing works for the nRF51822, nRF52832, nRF52840, STMF042, STMF429xI using a DAPLink or an ST-Link.

Installation

You can install this utility with cargo:

cargo install cargo-flash

Usage

You can use it like any cargo command would be used

cargo flash <args>

which will then build your binary and download the contents onto the connected target.

Examples

Flash the debug version of the current crate

cargo flash --chip nrf58122

Specifying manually what options should be used

cargo flash --release --chip nRF51822 --target thumbv6m-none-eabi --example gpio_hal_blinky

Use a custom chip definition from a non-builtin file

cargo flash --release --chip-description-path nRF51822.yaml --target thumbv6m-none-eabi --example gpio_hal_blinky

Manually selecting a chip

To manually select a chip, you can use the --chip <chip name> argument. The chip name is an identifier such as nRF51822 or STM32F042. Capitalization does not matter; Special characters do matter.

Specifying a chip family description file

You can add a temporary chip family description by using the --chip-description-path <chip description file path> or -c argument. You need to pass it the path to a valid yaml family description. All the targets of the family will then be added to the registry temporarily and will override existing variants with the same name. You can use this feature to tinker with a chip family description until it works and then submit it to upstream for inclusion.

Extracting a chip family description file from a CMSIS-Pack

You can extract the family description file by running target-gen on a .pack file with cargo run -- file.pack out_dir. You can obtain the pack from ARM for example. Their online registry is a good start :) You can also reference to an already unziped pack directory instead of the file.pack archive file.

Add more chip definitions

If you have a chip you want to flash, feel free to contribute to probe-rs.

cargo-flash's People

Contributors

jonas-schievink avatar rnestler avatar thalesfragoso avatar therealprof avatar tiwalun avatar yatekii avatar

Watchers

 avatar

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.