Git Product home page Git Product logo

saturn-v's Introduction

Saturn-V

A DFU Bootloader

for Cynthion and similar SAMD11 and SAMD21 boards

Based on opendime/DAFU/ and t2-firmware/boot/.

Compatible with DFU Utils and pyfwup.

Background

Saturn-V is the Device Firmware Upgrade (DFU) bootloader for Cynthion. It is used to load Apollo firmware over USB onto Cynthion's on-board debugger. Alternatively it may be used as a bootloader for other devices featuring a SAMD11 or SAMD21 microcontroller.

Saturn-V uses only 2 KiB of flash memory, leaving plenty of space for application firmware. Space optimization in Saturn-V was achieved using some of the tricks in SAMDx1-USB-DFU-Bootloader which is even smaller at 1 KiB but lacks features such as Microsoft-compatible descriptors.

Use

To invoke Saturn-V on Cynthion, hold down the PROGRAM button while connecting power or while pressing and releasing the RESET button. LED C will blink, indicating that Saturn-V is running. In this mode you can update Apollo with Apollo's make dfu command or use dfu-util or another DFU utility.

Building

Normally Saturn-V needs to be installed only once on a newly assembled board.

To compile for the latest Cynthion hardware revision, type:

$ cd saturn-v
$ make

Alternatively, use variables to specify the board and/or hardware revision:

$ cd saturn-v
$ make BOARD=cynthion BOARD_REVISION_MAJOR=1 BOARD_REVISION_MINOR=3

If you're not using the arm-none-eabi- toolchain, you'll need to specify your compiler prefix using the CROSS variable.

Once the bootloader has been built, use an SWD programmer to load the bootloader.elf file, or program bootloader.bin to the start of flash (address 0x00000000). If you're using the Black Magic Probe, this might look like:

$ arm-none-eabi-gdb -nx --batch \
    -ex 'target extended-remote /dev/ttyACM0' \
    -ex 'monitor swdp_scan' \
    -ex 'attach 1' \
    -ex 'monitor unlock_bootprot' \
    -ex 'load' \
    -ex 'monitor lock_bootprot 4' \
    -ex 'kill' \
    bootloader.elf

saturn-v's People

Contributors

ktemkin avatar martinling avatar mndza avatar mossmann avatar straithe avatar

Stargazers

 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  avatar  avatar  avatar

saturn-v's Issues

Release Saturn-V 1.1.1

Tasks

Release Saturn-V 1.0.0

This is the tracking issue for the first Saturn-V release.

Tasks not yet associated with an Issue or Pull Request

Issues

No tasks being tracked yet.

Review, merge or close outstanding pull requests

Incorrect serial number in device descriptor

The serial number in the USB device descriptor is meant to be a Base32 representation of the microcontroller's 128-bit serial number. The output should be 26 characters long, consisting of the letters 'A' through 'Z' and the numbers '2' through '7', following RFC 4648 section 6. Due to a bug, characters that should be numerals '2' through '7' are instead replaced by letters 'L' through 'Q'. For example, the serial number LYFRB6CXJJKFCIBAEAZC2BYG74 is incorrectly represented as LYFRBPCXJJKFCIBAEAZCLBYGQN.

It is possible though unlikely for a serial number mangled in this way to collide with another mangled serial number or with a correct serial number. In every case observed so far, the mangled serial number ends in QN which presumably should have been 74. This suggests that it will be easy to identify mangled serial numbers in practice, although this is not guaranteed according to the microcontroller documentation.

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.