Giter Site home page Giter Site logo

parmdhoot / pic16f1-usb-dfu-bootloader Goto Github PK

View Code? Open in Web Editor NEW

This project forked from majbthrd/pic16f1-usb-dfu-bootloader

0.0 0.0 0.0 360 KB

DFU protocol variant of Matt Sarnoff's PIC16F1-USB-Bootloader

Makefile 2.66% Assembly 4.18% C++ 0.52% C 92.64%

pic16f1-usb-dfu-bootloader's Introduction

USB DFU Bootloader for PIC16F1454/5/9

This bootloader has been tested with Linux, Windows, and MacOS.

Thank you to pidcodes for assigning a USB VID:PID.

Matt Sarnoff demonstrated what is possible with his excellent hand-optimized assembly 512 word USB Bootloader.

Its minimal size rightfully puts to shame existing C-code-based bootloaders such as mine.

This project takes the concept of Matt's bootloader, but overhauled the code to instead implement the industry-standard DFU protocol that is supported under multiple Operating Systems via existing tools such as dfu-util and webdfu.

This bootloader also has the added advantage of CRC-14 protection of the user application.

A list of commercial products that already use this bootloader is available on the wiki.

Usage

For MPLAB/XC8 compilation, the following options are needed:

--codeoffset=0x200
--rom=default,-0-1FF,-1F7F-1F7F

The utility provided in the ./tools/ subdirectory converts a .hex file into a CRC-14 protected binary image:

454hex2dfu foo.hex foo.dfu

Downloading can be accomplished with your DFU software of choice. For dfu-util, usage would be like so:

dfu-util -D write.dfu

Limitations

  • A PIC16F145x chip of silicon revision A5 or later is required due to an issue with writing to program memory on revision A2 parts. The value at address 0x8006 in configuration space should be 0x1005 or later. See the silicon errata document for more information.

  • The configuration words are hard-coded in the bootloader (see the __config lines in bootloader.asm); the downloaded app inherits these settings and cannot invoke different values.

License

The contents of this repository are released under a 3-clause BSD license.

pic16f1-usb-dfu-bootloader's People

Contributors

74hc595 avatar majbthrd avatar adrienluitot 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.