mdebug

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

README (2512B)


      1 Before you start
      2 ----------------
      3 
      4 You'll need to build the lpcboot and debugger tools by running make at
      5 the top level first.
      6 
      7 On Linux you may need to install docs/99-mdebug.rules in /etc/udev/rules.d
      8 in order to have access to the debugger firmware and bootloader firmware
      9 without being root.  This rules file allows group plugdev access, which
     10 covers users logged in on console (at least on Ubuntu)
     11 
     12 
     13 Installing lpcboot and mdebug on the LPC Link 2 board (first time)
     14 ------------------------------------------------------------------
     15 
     16 1. Remove jumper JP1 from lpclink2
     17 
     18 2. Connect lpclink2 to USB
     19 
     20 3. Download the "soft" bootloader via DFU
     21    (it is normal to get "dfu status: io error")
     22    $ ./bin/lpcboot dfu firmware/lpclink2-dfu.bin
     23 
     24 4. flash bootloader:
     25    $ ./bin/lpcboot flash:boot firmware/lpclink2-boot.bin
     26 
     27 5. flash mdebug firmware:
     28    $ ./bin/lpcboot flash firmware/lpclink2-mdebug.bin
     29 
     30 6. install jumper JP1 on lpclink2
     31 
     32 7. reboot the lpclink2:
     33    $ ./bin/lpcboot reboot
     34 
     35 8. LED should blink for ~3 seconds (bootloader) then start mdebug
     36 
     37 
     38 Upgrading mdebug firmware on the LPC Link 2 board (after initial install)
     39 -------------------------------------------------------------------------
     40 
     41 1. disconnect lpclink2 from USB
     42 
     43 2. $ ./bin/lpcboot flash firmware/lpclink2-mdebug.bin
     44 
     45 3. connect lpclink2 to USB
     46 
     47 4. If you get "flash failure", run the step #2 command again
     48    (without disconnecting and reconnecting the board)
     49 
     50 5. reboot back into the debugger firmware
     51    $ ./bin/lpcboot reboot
     52 
     53 
     54 Checking firmware version (debugger should show this on connect)
     55 ----------------------------------------------------------------
     56 
     57 usb: board id: LPCLINK2
     58 usb: build id: fw v0.91 (Jan 11 2016, 15:43:28)
     59 usb: protocol: 1.2
     60 usb: max data: 8192 byte rx buffer
     61 
     62 
     63 Connecting LPC Link 2 to debug target
     64 -------------------------------------
     65 
     66 You can use the 10pin cable with the J7 connector to hook up to a target
     67 board that uses ARM's standard SWD debug pinout.  If you want to supply
     68 3.3v to the target and operate at that voltage, *install* the JP2 jumper.
     69 If you want to operate at the board voltage sensed by the VREF pin on the
     70 10pin connector, *remote* the JP2 connector.
     71 
     72 You can use jumper wires from the 0.1" J6 header (see pinout below), but
     73 in this case there is no VREF pin available, so you must *install* the
     74 JP2 jumper and operate at 3.3v.
     75 
     76 
     77 J6 Header (pin 1 is furthest from J6 silkscreen)
     78 ------------------------------------------------
     79 1. 3V3
     80 2. SWDIO
     81 3. SWCLK
     82 4. SWO
     83 5.
     84 6.
     85 7.
     86 8. GND
     87 9.
     88