Git Product home page Git Product logo

tinyuf2's Introduction

TinyUF2

Build Status License

TinyUF2 is an open source cross-platform UF2 bootloader based on the TinyUSB library.

Building

Checkout the code and sync submodules:

$ git clone https://github.com/arturo182/tinyuf2.git
$ cd tinyuf2
$ git submodule update --init --recursive

Specify the board you want to build for:

$ make BOARD=mimxrt1010_evk

Filesystem Structure

The filesystem is structured as follows;

        tinyuf2
           |
           +----hw                    Hardware specific files
           |    |
           |    +---bsp                 Board specific files
           |    |
           |    +---chip                Chip specific (multiple boards)
           |
           +----lib                   External supporting libraries
           |
           +----src                   tinyUF2 specific code

A board is selected by means of the BOARD option on the makefile command line. This references a particular hw/bsp/<BOARD> directory which then links to a specific chip and variant in the hw/chip/ directories. A new board is added under /hw/bsp/<BOARD>. It may optionally need a new chip or variant under the hw/chip directories or, more normally, it might need new pin options in hw/chip/<FAMILY>/<GROUP>/pinning_options.h.

Adding a new Board

You can add a new board by copying an existing one that is closest to it in the hw/ directory with something like cp -a hw/bsp/mimxrt1010_evk hw/bsp/newboard. Edit hw/bsp/newboard/board.mk to reference the appropriate hw/chip directory and the board_config.h file to adjust settings for the new board.

In general entries in hw/bsp/newboard/board.mk should reference existing pinning definitions in the relavent hw/chip directory rather than being created afresh.

Non-standard options

In general non-standard options are frowned upon because it changes the user experience of tinyUF2. However, on occasion these may be needed for specific reasons. The supported options are specified in hw/bsp/<BOARD>/board_config.h for a specific board. Not defining any of these options means sensible defaults will be applied;

  • USB_VID: Vendor ID for the board. Default is 0x239A, courtesy of Adafruit Industries.

  • USB_PID: PID for the board. Default is 0x0058 which is specifically defined as a generic tinyUF2 boot device. Do not select something else unless you've been allocated a new number by Adafruit.

  • VOLUME_LABEL: Volume Label for the tinyUF2 drive. Default is UF2BOOT.

  • BOARD_TAP_WAIT: How long to wait for double-tap entry into bootloader before performing regular boot. Default is 500mS.

  • BOARD_BLINK_INTERVAL: Blinking interval while in tinyUF2. Default is 500uS on/off.

  • BOARD_LED_ON_UF2_START: Should the LED be on or off at UF2 boot? Default is off.

tinyuf2's People

Contributors

arturo182 avatar kbeckmann avatar mubes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

tinyuf2's Issues

Object files from src/ should end up in board-specific build directories

When building for multiple boards, the object files from the shared sources src/ end up in the same directory, i.e. _build/src/.

I gave it a shot and tried to fix it, but can't come up with a simple solution. Creating this issue for visibility. For now, one has to remove _build before building for a different board, otherwise the usb descriptor etc will be reused from the previous build.

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.