Giter Club home page Giter Club logo

avrdude_autoreset_wrapper's Introduction

avrdude-autoreset-wrapper

Wrapper for avrdude performing automatic reset to bootloader in arduino usb devices like leonardo and lilypad usb

Version: 1.0
Date: 3.9.2018
Author: Javanaut

Based on arduino-leonardo-uploader from p1ne found here:
https://github.com/p1ne/arduino-leonardo-uploader

In arduino-leonardo-uploader user p1ne realized the brilliant idea to use WMIC to allocate the com port of a connected arduino device and its bootloader. I just added some generalization to the script in order to make it usuable with arduino devices other than leonardo. Consider the following license to the parts added from me:

THE BEER-WARE LICENSE (Revision 42):
[email protected] wrote this file. As long as you retain this notice you can do whatever you want with this stuff. If we meet some day, and you think this stuff is worth it, you can buy me a beer in return.

Todo:
Add device identifiers of remaining usb arduinos

Description

This wrapper enables avrdude to perform the necessary steps to bring the target device into bootloader mode. The autoreset feature is triggered by programmer id "avr109" enabling it for arduino types leonardo and lilypad usb. Other arduino devices using the same protocol are to be implemented yet. This should be easy as two lines has to be added per devices at marked locations in .bat file.

This wrapper is designed to work with Eclipse C++ IDE for Arduino 3.0 to remove the "butterfly_recv(): programmer is not responding" bug that occurs when a usb based arduino device using the avr109 protocol is to be programmed. Compiling + flashing on single click to Button "Launch in 'Run' mode" shall then be possible.

Mode of operation

Arguments passed to batch file are parsed and stored. WMIC is then used to check if a arduino avr109 device is present, reset the device and finding the bootloader port that appears after reset. The new port and stored arguments are then passed to avrdude to start the regular flashing process.

The wrapper needs at least the programmer id, com port and device id (partno) to work correctly.

In case another programmer id is passed the wrapper will behave transparent doing nothing but passing the arguments to avrdude.

Modifying Eclipse C++ IDE for Arduino 3.0

Locate the arduino base directory, per default this is:

C:\Users<Username>.arduinocdt

In this directory perform the following steps:

  1. Place .bat file here:

\packages\arduino\tools\avrdude<latest version>\bin

  1. Modify platform.txt located here:

\packages\arduino\hardware\avr<latest version>\platform.txt

#tools.avrdude.cmd.path={path}/bin/avrdude tools.avrdude.cmd.path={path}/bin/avrdude_wrapper.bat

  1. Restart Eclipse

avrdude_autoreset_wrapper's People

Contributors

p1ne avatar

Watchers

 avatar  avatar

Forkers

abc123me

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.