Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Modifying the Teensy 3.6 for Debugging

DZone's Guide to

Modifying the Teensy 3.6 for Debugging

Love Teensy's boards but don't love their lack of decent SWD debugging? Grab your solder, your MCUXpresso IDE, your LPC-Link2, and get started.

· IoT Zone ·
Free Resource

The Teensy boards are great, but they are not really useful for real development, as they lack proper SWD debugging. In “Modifying the Teensy 3.5 and 3.6 for ARM SWD Debugging,” I found a way to get SWD debugging working — at that time with Kinetis Design Studio and the Segger J-Link. This article is about how debug the Teensy with the free MCUXpresso IDE and the $20 NXP LPC-Link2 debug probe:

Teensy 3.6 with NXP LPC-Link2

Teensy 3.6 with NXP LPC-Link2

To debug the Teensy 3.5 or 3.6, you need:

First, modify the Teensy (some suggest it should be possible to pull down the reset line, but I had to completely remove the KL02Z from the Teensy) and solder the headers on the back side of the Teensy.

Then use the jumper wires to connect the Teensy with the SWD/JTAG adapter:

  • 3.3V to pin 1 (VTref)
  • Reset to pin 15 (RESET)
  • G to pin 4 (GND)
  • DE to pin 6 (GND)
  • DD to pin 7 (TMS)
  • DC to pin 9 (TCK)

The following pictures illustrate the connection:

Connections on the Teensy

Connections on the Teensy

Teensy 3.6 Connection Wires

Teensy 3.6 Connection Wires

Connections on Cortex SWD Adapter

Connections on Cortex SWD Adapter

Power the Teensy board and connect the LPC-Link2 to the SWD debug adapter. I’m using a custom 3D printed enclosure for my LPC-Link2:

LPC-Link2 with Teensy

LPC-Link2 with Teensy

Inside the MCUXpresso IDE, create a project for the MK66FX1M0VMD:

MK60FX1M0VMD18

MK60FX1M0VMD18

Build it, then debug. This works fine with the MCUXpresso IDE 10.1.0:

Debugging Teensy 3.6 with MCUXpresso IDE and LPC-Link2

Debugging Teensy 3.6 with MCUXpresso IDE and LPC-Link2

Summary

It is possible to debug the Teensy 3.5/3.6, but it requires hardware modification. Any SWD/JTAG debug probe can be used for this, including the NXP LPC-Link2 CMSIS-DAP probe.

Happy Teensing!

Topics:
iot ,teensy ,hardware modification ,swd debugging ,tutorial

Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}