Git Product home page Git Product logo

flash-algo's Introduction

RaspberryPi Pico RP2040 flash algorithm

This is a flash algorithm for the RP2040 chip, used in the Raspberry Pi Pico board. It implements the CMSIS-Pack ABI, so it's compatible with any tools that use it, including probe-rs.

Dependencies

Run the following to install the requirements:

cargo install cargo-binutils

The rust-toolchain file will get you the targets and components you need.

Building

Just run build.sh. It spits out the flash algo in the probe-rs YAML format:

flash-algo$ ./build.sh 
    instructions: sLUUIACIGUoBRguI...wRwAgcEc=
    pc_init: 0x00000000
    pc_uninit: 0x0000007c
    pc_program_page: 0x00000088
    pc_erase_sector: 0x00000084
    pc_erase_all: 0x00000080

Hacking

The algo module contains the FlashAlgo trait, and an algo! macro to generate the glue functions for a given struct implementing it. This is generic for all chips, so feel free to reuse it!

main.rs has the actual implementation for RP2040.

License

This thingy is licensed under either of

at your option.

flash-algo's People

Contributors

dirbaio avatar thejpster avatar asaffisher avatar flit avatar 9names avatar jannic avatar eolder 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.