GithubHelp home page GithubHelp logo

dioannidis / debugwire-gdb-bridge Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ccrause/debugwire-gdb-bridge

0.0 1.0 0.0 6.7 MB

DebugWIRE server

License: Mozilla Public License 2.0

Pascal 100.00%

debugwire-gdb-bridge's Introduction

debugwire-gdb-bridge

Work in progress...

This is a Pascal implementation of the debugwire protocol for small AVR controllers such as attiny85 or atmega328P. It includes a gdb remote serial protocol implementation so that avr-gdb can communicate with the debugwire code to debug on chip code. The aim is to focus on features that would enable one to use Lazarus to both write code for and debug the generated code on compatible AVR microcontrollers.

Extensively tested on Linux with the following USB-serial converters: FTDI's FT232RL and CP2102. The CH340 USB-serial converter is also reported to work. Basically any USB-serial converter that supports custom baud rates and either the break serial command or can send a clean binary zero byte at low baud should work.

Based on the following sources:
http://www.ruemohr.org/docs/debugwire.html
https://github.com/dcwbrown/dwire-debug
https://github.com/mvirkkunen/dwprog
https://github.com/jbtronics/WireDebugger

TODO:

  • Add breakpoint manager for more than one breakpoint.
    • Execute stored instruction when continuing after break - SW BP disabled for testing.
    • When deleting a SW BP, restore original instruction (flash write). (disabled while testing)
    • During flash read/write check if inactive SW BP may still have BREAK opcode in flash - if so handle specific opcode in BP manager.
    • Put first BP in HW Done
    • Further BP in list, with corresponding opcode replaced with break (flash write). Store opcode in manager. Done
    • If HW BP deleted, keep HW BP open until next BP is set to minimize flash rewrites. Done
  • Scan (BreakResponse) candidate ports automatically - perhaps check port type and scan if a real serial port (hardware or usb) and can be opened exlusively. See this link for Windows and this link for Linux.
  • Add elf reader - long term, low priority.
  • Incorporate notes from https://www.embecosm.com/appnotes/ean4/embecosm-howto-rsp-server-ean4-issue-2.html#id3077923.
  • Add Windows support for serial functions and network socket. Not well tested yet...

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.