mdebug

cortex m series debugger
git clone http://frotz.net/git/mdebug.git
Log | Files | Refs | README | LICENSE

README (2922B)


      1 
      2 ===========================================================================
      3                 mdebug - A debugger for Cortex-M MCUs
      4 ===========================================================================
      5 
      6 This is a debugger for Cortex-M MCUs using SWD (serial wire debug) and
      7 (optionally) SWO.  It provides basic standalone functionality including
      8 memory inspection and modification, processor halt, register inspection,
      9 single stepping, breakpoints, etc.  It also acts as a GDB agent, allowing
     10 GDB to control the target device.
     11 
     12 Previously it used a custom debug probe board (m3debug).  In its current
     13 iteration firmware is provided for the readily available (and much more
     14 powerful) LPC Link 2 probe board, which is available from Digikey for
     15 under $20:
     16 http://www.digikey.com/product-detail/en/OM13054,598/568-10930-ND/
     17 http://www.embeddedartists.com/products/lpcxpresso/lpclink2.php
     18 
     19 It provides flashing functionality via "flash agents" which are little
     20 programs downloaded to the target board RAM and then controlled by the
     21 debugger.  Currently agents are included for the lpc13xx, lpc15xx,
     22 stm32f4xx series MCUs and the lpclink2 board itself (lpc43xx + spifi).
     23 
     24 Recently it's seem the most testing against stm32f4xx and lpc43xx MCUs.
     25 It has previously been used successfully with lpc13xx, lpc15xx, and
     26 stm32f2xx MCUs.
     27 
     28 Firmware for the LPC Link 2 and installation instructions are in the
     29 firmware directory.  Firmware source code is part of the lk embedded
     30 kernel project (look in app/mdebug):
     31 https://github.com/travisg/lk
     32 https://github.com/travisg/lk/tree/master/app/mdebug
     33 
     34 Everything is either Apache 2 or BSD licensed, to allow for easy,
     35 no-strings-attached, inclusion in your own projects.  Share and enjoy!
     36 
     37 Features
     38 --------
     39 
     40 * simple standalone interactive debugger
     41 * GDB stub/remote integration (default port localhost:5555)
     42 * simple and efficient remoted SWD transaction protocol
     43 * pretty fast: 450KB/s download to target w/ 8MHz SWD clock
     44 * simple flash agents: easy to add support for a new MCU or memory device
     45 * integration with LK for multi-threaded GDB debugging
     46 * supports console-over-SWO, and console-commands-over-SWD (with LK)
     47 * host software runs on Linux or OSX (Windows support not far off)
     48 * only external dependency is libusb 1.0
     49 
     50 
     51 Included Third Party Software
     52 -----------------------------
     53 
     54 linenoise.[ch] 
     55   excellent tiny commandline editor (BSD license)
     56   https://github.com/antirez/linenoise
     57 
     58 
     59 Useful Documents
     60 ----------------
     61 
     62 ARM DDI0337E Cortex M3 r1p1 Technical Reference Manual
     63   Has useful details on SW-DP and debug peripherals that was removed
     64   in later versions of the TRM as "redundant" with other documents.
     65 
     66 
     67 Historical Notes
     68 ----------------
     69 
     70 This work is an extension of the older m3dev project, but only brings
     71 the debugger tools foward.  The embedded firmware stuff lives on in
     72 m3dev and the next-gen firmware is part of lk.
     73 
     74 https://github.com/swetland/m3dev