Robin Whittle
Member
Teensy 3.6 with $xx NXP LPC-Link3 debug probe & $0 MCUXpresso IDE with GCC, GDB etc.
I want to use GCC, GDB, C/C++ etc. with the Teensy 3.6. I think I have no need to use or learn about Arduino.
The first step is to modify the Teensy 3.6 (the 3.5 is the same) to expose the SDC and SDD Serial Wire Debug signals, so a suitable debug probe can be attached. This has been documented [1] and [2] and discussed on this forum, at least in [3].
The next step is to select a debug probe and IDE which works with standard GCC etc. NXP's MCUXpresso Eclipse-based IDE is $0 and has no code size limits [4]. (A $xxx Pro version has better trace support.) It seems that MCUXpresso works well with NXP's $xx LPC-Link3 debug probe [5]. (I don't have a Teensy or one of these debug probes yet, but they are on order.)
The list of supported devices for the LPC-Link3 debug does not include the Teensy 3.6's MK66FX1M0VMD19 (K66) microcontroller or anything like it, so I asked on the NXP MCUXpresso IDE forum whether it could be used with this K66 device:
https://community.nxp.com/thread/466997
Within hours Erich Styger replied that yes, it does work. He wrote an article about it [6].
I posted to replies to the NXP forum thread with further things I found out. This includes my suggestion for exposing the JTAG_TDO/TRACE_SWO signal on the Teensy 3.6, so it can be connected to the debug probe and used for tracing and the Serial Wire Viewer (SWV) transfer of data in real-time back to the IDE, via the debug probe. I think this can be done by soldering to a via. I suggest the the modification to the Teensy 3.6 to reset the little KL02Z chip could be done with conductive silver loaded epoxy and a strand of copper wire (such as one strand from ribbon cable) between its pins 15 and 3, since pin 3 connects to the DE pad on the underside. This would avoid exceedingly fine soldering to a KL02Z pin or removing this chip entirely.
Hopefully in a few weeks I will have it all working - and will write up my progress in that NXP forum thread.
[1] https://mcuoneclipse.com/2017/04/29/modifying-the-teensy-3-5-and-3-6-for-arm-swd-debugging/
[2] https://medium.com/@mattmatic/preparing-teensy-3-6-for-swd-b014b0ce2999
[3] https://forum.pjrc.com/threads/42728-Debugging-strategies
[4] https://www.nxp.com/support/develop...ools/mcuxpresso-software-and-tools:MCUXPRESSO
[5] https://www.nxp.com/products/proces...s/lpc1100-cortex-m0-plus-m0/lpc-link2:OM13054
[6] https://mcuoneclipse.com/2017/12/31...lipse-mcuxpresso-ide-and-cmsis-dap-lpc-link2/
I want to use GCC, GDB, C/C++ etc. with the Teensy 3.6. I think I have no need to use or learn about Arduino.
The first step is to modify the Teensy 3.6 (the 3.5 is the same) to expose the SDC and SDD Serial Wire Debug signals, so a suitable debug probe can be attached. This has been documented [1] and [2] and discussed on this forum, at least in [3].
The next step is to select a debug probe and IDE which works with standard GCC etc. NXP's MCUXpresso Eclipse-based IDE is $0 and has no code size limits [4]. (A $xxx Pro version has better trace support.) It seems that MCUXpresso works well with NXP's $xx LPC-Link3 debug probe [5]. (I don't have a Teensy or one of these debug probes yet, but they are on order.)
The list of supported devices for the LPC-Link3 debug does not include the Teensy 3.6's MK66FX1M0VMD19 (K66) microcontroller or anything like it, so I asked on the NXP MCUXpresso IDE forum whether it could be used with this K66 device:
https://community.nxp.com/thread/466997
Within hours Erich Styger replied that yes, it does work. He wrote an article about it [6].
I posted to replies to the NXP forum thread with further things I found out. This includes my suggestion for exposing the JTAG_TDO/TRACE_SWO signal on the Teensy 3.6, so it can be connected to the debug probe and used for tracing and the Serial Wire Viewer (SWV) transfer of data in real-time back to the IDE, via the debug probe. I think this can be done by soldering to a via. I suggest the the modification to the Teensy 3.6 to reset the little KL02Z chip could be done with conductive silver loaded epoxy and a strand of copper wire (such as one strand from ribbon cable) between its pins 15 and 3, since pin 3 connects to the DE pad on the underside. This would avoid exceedingly fine soldering to a KL02Z pin or removing this chip entirely.
Hopefully in a few weeks I will have it all working - and will write up my progress in that NXP forum thread.
[1] https://mcuoneclipse.com/2017/04/29/modifying-the-teensy-3-5-and-3-6-for-arm-swd-debugging/
[2] https://medium.com/@mattmatic/preparing-teensy-3-6-for-swd-b014b0ce2999
[3] https://forum.pjrc.com/threads/42728-Debugging-strategies
[4] https://www.nxp.com/support/develop...ools/mcuxpresso-software-and-tools:MCUXPRESSO
[5] https://www.nxp.com/products/proces...s/lpc1100-cortex-m0-plus-m0/lpc-link2:OM13054
[6] https://mcuoneclipse.com/2017/12/31...lipse-mcuxpresso-ide-and-cmsis-dap-lpc-link2/