Arduino GDBStub Debugging With Custom Serial

Continuing from our GDBStub Example before … We need to add in the “SoftwareSerial” Library and create our new SoftwareSerial object with our Rx,Tx pins specified now we add a #define to point to our SWSerial object remove the #ifdef _DEBUG now we want the code to run and replace all “Serial” with our new “USE_SERIAL” (just change USE_SERIAL if going back to “Serial” later) set a breakpoint if you dont already have one set and select your boards’ COM Port for upload/debug You can open the USB>Serial COM port easily anytime from vMicro>General>Monitor Alternative now we can Build & Upload our code to our board … and load the Debugger from Debug>Attach to Process The alternative serial monitor may not be open … But just open it as before and it will be next time… we can now watch our Serial Output … as we step through our code with the debugger …

Tags: , ,

There are no comments yet

Why not be the first

Leave a Reply

Your email address will not be published. Required fields are marked *