Giter VIP home page Giter VIP logo

samd10-uart-bootloader's Introduction

SAMD10 UART Bootloader

This project contains a simple uart based bootloader which can be used as a starting point for further experiments or dropped into production right away.

The bootloader is designed to allow easy in-system updates for SAMD10C/D MCUs.

Usage

Using this bootloader is simple:

  • Create your firmware, link it with the bootloader-variant of the linker script. (can be found here)
  • Upload the bootloader to your device using SWD.
  • When the bootloader detects that no firmware is programmed, it will wait for a firmware to be uploaded.
  • Upload your firmware using the upload.py tool.

Note that your user-firmware has to include a function to enter the bootloader, one is provided here

Hints:

  • The bootloader requires 16 bytes of memory at the beginning of the memory address space.
  • If you write a specific value (0xDEADBEEF) to the first 16 bytes and issue an NVIC_SystemReset(), the bootloader will wait for a new firmware to be uploaded.
  • Currently, there is no timeout implemented, which means if you are within the bootloader it won't exit automatically.
  • upload.py has lots of options, especially a strict verification you won't overwrite your bootloader.
  • You are able to use interrupts in your user firmware, as the bootloader will relocate the interrupt vector table accordingly.

Architecture

The source code can be found in main.c, it is based on the awesome mcu-starter-projects by Alex Taradov.

You can compile the project without any IDE installed, you will need arm-none-eabi-gcc and make. If you have anything in place, just type make and you're done.

The provided binaries are built with GCC 7.3, however older versions should be fine.

samd10-uart-bootloader's People

Contributors

martin31821 avatar

Stargazers

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

Watchers

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