Giter Site home page Giter Site logo

jevinskie / frser-duino-teensy4 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from urjaman/frser-duino

0.0 1.0 0.0 104 KB

Reimplementation of serprog-duino based on the original flashrom serprog interfacing code (now libfrser). Tweaked to build for Teensy 4.x

License: GNU General Public License v2.0

C 71.58% Makefile 12.05% C++ 16.36%

frser-duino-teensy4's Introduction

frser-duino-teensy4

Alternative code to serprog-duino, ported to Teensy 4.1

Available targets (same as with serprog-duino):

  • ftdi, flash-ftdi:
    For the Arduinos with an FTDI
    compatible flashrom arguments: flashrom -p serprog:dev=/dev/ttyUSB0:2000000
    Other boards using an hardware USB<->Serial converter might work too.

  • u2, flash-u2:
    For the Arduino with a 8u2 or a 16u2
    compatible flashrom arguments: flashrom -p serprog:dev=/dev/ttyACM0:115200

Traditional targets:
make - builds
make program - "flashes"

These are by default effectively synonyms for u2 and flash-u2, except that "make" doesnt clean out the previous build if it sees no changes. You can change what the traditional targets do by either changing the defines at the beginning of the makefile, or using environment variables - for example:
BLBAUD=115200 SERIAL_DEV=/dev/ttyUSB1 make program

Note: the repository has a submodule, clone with --recursive.

About the various (broken) usb-serial converters

  • Arduino Uno with ATMega 8U2/16U2: their default firmware is quite broken,
    but the default settings works around it at 115200 (slowly).

    If you're willing to test, I have an alternative firmware for it:
    https://github.com/urjaman/fast-usbserial
    with that firmware you should be able to use it as if it was an FTDI, meaning with make ftdi and at 2Mbaud. This means that for this case it would be valid to say make ftdi; make flash-u2. The flash targets dont check what kind of binary they're flashing.
    (Note: My benchmarks say it is still slower than the FTDI.)

  • A "VISduino" named Uno R3 clone with with a CH340G:
    It is a cheap usb-serial converter chip, and if it in general works on your computer (google had reports of it not working with all usb chipsets) you can treat it like an FTDI with a maximum baudrate of 115200. Claims 2Mbaud but apparently doesnt have big enough buffers for operation at that speed.
    Commands would be (if you dont touch the defaults in Makefile):
    DFLAGS=-DFTDI make clean all and SERIAL_DEV=/dev/ttyUSB0 make program

Using an Arduino and an external usb-serial converter

If you have an Arduino without a FTDI chip, but you are lucky enough to have an extra usb-serial converter laying around, you can use it to speed up the flashing. Just connect the usb-serial converter with the RX(Pin 0), TX(Pin 1) and GND pins on your Arduino and use the instructions for the ftdi target from above.

frser-duino-teensy4's People

Contributors

urjaman avatar jevinskie avatar neuschaefer avatar tomvanveen avatar sudden6 avatar

Watchers

 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.