Code Monkey home page Code Monkey logo

dw-link's Introduction

dw-link

License: GPL v3 License: CCBY4.0 Commits since latest Hit Counter Build Status

This is an Arduino sketch that turns your Arduino ATmega328 board into a hardware debugger for the classic ATtinys and some small ATmegas, such as the ATmega328. The debugger can communicate using the debugWIRE protocol, which gives access to the on-chip debugging interface of the mentioned MCUs. Over its USB port, the hardware debugger communicates with an instance of the GNU debugger avr-gdb using the GDB remote serial protocol. This means that you can use the hardware debugger to debug your program on your development machine using avr-gdb or any IDE that integrates avr-gdb, e.g., PlatformIO or Eclipse, while your program is running on the target hardware (e.g. an ATtiny). And it is all platform independent, i.e., you can use it under macOS, Linux, or Windows.

Why is this good news? The current version of the Arduino IDE does not support debugging at all. Even the new version will not provide any debugging tools for the small AVR MCUs. So, the only way to debug programs is to use additional print statements and recompile, which is very cumbersome. With this sketch, you are provided with a tool that allows you to set breakpoints, to single-step, and to inspect and change variables. Hopefully, this will make debugging much more enjoyable and will save you a lot of valuable time.

If you are interested in the background and ongoing development of dw-link, visit my blog. In particular, the blogs tagged with dw-link will be interesting for you.

This repository contains the following directories:

  • dw-link: Contains the Arduino sketch that turns your Arduino board into a hardware debugger
  • examples: Contains a tiny Arduino sketch, a PlatformIO project, and a file you need to install in the Arduino packages
  • tests: Contains some test cases and a Python script for running them semi-automatically
  • docs: Contains the documentation, in particular the manual
  • pcb: Contains design data (Eagle and Gerber) for the (optional) adapter boards

Note that the debugger is an alpha release and may contain bugs. If you encounter behavior that you think is wrong, try to be as specific as possible so that I can reproduce the behavior. For that I need a description of the problem, the source code that leads to the behavior, the way one reproduces the problem, and the type of target chip you used. I have prepared an issue form for that purpose. Current issues, known bugs, and limitations are listed in Section 8 of the manual.

dw-link's People

Contributors

felias-fogg 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.