Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 2 of 2

Thread: Teensy GDBStub Debugging via Serial with VS Integration

  1. #1

    Teensy GDBStub Debugging via Serial with VS Integration

    Using the amazing GDBStub Library for Teensy 3/4 by Fernando Trias, you can now have the GDB experience on Teensy 3/4 without any additional hardware!

    With the Teensy servicing multiple Serial Ports you don't lose your Serial output or need extra hardware.

    This has been integrated into Visual Micro with the familiar menu options used for Serial and other Hardware Debugging in our latest release 20.06.18.2.
    Click image for larger version. 

Name:	TB_Teensy4x-GDBStub.png 
Views:	2 
Size:	2.5 KB 
ID:	20688

    All Standard GDB Features are readily available:
    Step by Step execution using breakpoints, with navigational Into / Over / Out functions as well
    Add breakpoints dynamically at runtime without rebuild / upload
    Conditional breakpoints
    Editable Watch / Local / Autos Windows
    Call Stack Tracing
    And More...

    Further Information and a Video Example of this GDB Stub in Action in Visual Micro are below:
    GDBStub Arduino Library for Teensy 3/4 by Fernando Trias

    Visual Micro VS Extension Website

    Visual Micro Documentation

    You Tube Video of Teensy GDB Stub Setup + Debugging in Action in Visual Micro

    Click image for larger version. 

Name:	Debug-Break-TEENSY4-GDBSTUB-VSOnly.jpg 
Views:	7 
Size:	119.0 KB 
ID:	20689

  2. #2
    Senior Member+ KurtE's Avatar
    Join Date
    Jan 2014
    Posts
    6,893
    Thanks,

    As I mentioned on thread up on VisualMicro(https://www.visualmicro.com/forums/Y...1593297620/0#9)
    This will come in handy to help debug some stuff including some hexapod code.

    The YouTube video helped understand setting this up.

    For awhile I was having difficulty figuring out how to get breakpoints set changed. But I believe now you can only change the breakpoints while already in the debugger and/or if you set a breakpoint and then recompile reconnect...

    So I added code that makes it easier for me with the hexapod code. I added simple command in my terminal monitor code as well as if I press the L3 button on my PS3 and if GDB is connected, I use the halt() macro and it breaks into the debugging. At which point I can now change the state of breakpoints, add new ones...

    So again thanks to both @ftria as well as VisualMicro, it is nice to have another option on how to debug stuff on a Teensy!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •