Simon@Visual Micro wrote on Jul 8
th, 2020 at 3:58pm:
Thanks for the information, yes the 2 comm port setup makes it a lot nicer.
I am still trying to work my way through some of this stuff, like the boards.txt overrides.
Also I thinking some of the issues I am running into is caused by the nature of the sketch I am trying to run. In particular, it uses USB Host code, in this case on T4.1. Also unclear at times what is best way to do things.
Example: I put code in for joystick that if I press L3 button, it tries to break me into GDB. I have tried both halt and the debug.setBreakpoint... Like:
#if defined(TEENSY_DEBUG_H)
if (debug.isGDBConnected()) {
DBGSerial.println(F("Trying to break in to GDB"));
debug.setBreakpoint(&loop);
}
else
#endif
And if I do this, once or twice it breaks in, usually by 3rd attempt it does not, although this last run appeared to allow it several times. Setting the breakpoint like this does not appear to leave a breakpoint in the spot (loop) like yours does as if I hit F5 it does not continue to break there. Also shows up different. Shows up with RED X with Exception Unhandled (Trace/Breakpoint Trap) versus your normal breakpoint. I can then set a normal breakpoint and it breaks each time I get to that location.
Also with the setBreakpoint... Sometimes if I hit F10 it steps fine and other times it appears to go into never never land.
But I maybe should also mention, that for example currently I have turned on debug printing in part of the USBHost code, in Bluetooth and Joystick code. And for example I am currently in a breakpoint and the Serial monitor continues to Spew out debug Serial prints from the Joystick and Bluetooth code, which is running due to Interrupts from the USB Host code. One of the last runs, it crashed out of the debugger:
Again still just learning my way around