Debug doesn't work with Arduino UNO or Mega

Sysprogs forums Forums VisualGDB Debug doesn't work with Arduino UNO or Mega

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #28740

    Hello,

    I tried the blink example and I can compile it and run without the Debugger , but when I try to use the debugger I got the following error:

    **********

    Debugging Failed

    Visual GDB has encountered a problem while starting debugging.

    GDB session exited prematurely. Please verify that the project is built, the selected GDB binary exist and the working directory is specified correctly.

    **********

    I appreciate your help.

    #28744
    support
    Keymaster

    Hi,

    No problem. Please try creating a gdb log as shown here and attach it to the thread so that we could see what is going on.

    #28749

    Hi,
    <div>I think this is Log you asked me.</div>
    <div></div>
    <div>Initializing assemblies: 14 msec
    Registering factories: 157 msec
    Initializing VisualGDB 5.4.112.3309
    Checking fonts/colors: 12 msec
    Level 2 initialization: 1008 msec
    Arduino project is outdated due to C:\Users\Carlos\source\repos\<wbr />ArduinoProject2\Output\<wbr />Arduino_Uno\Debug\sketch\<wbr />ArduinoProject2.ino.cpp
    Arduino project is outdated due to C:\Users\Carlos\source\repos\<wbr />ArduinoProject2\Output\<wbr />Arduino_Uno\Debug\sketch\<wbr />ArduinoProject2.ino.cpp
    RenameHighlightSmartTaggerProv<wbr />ider: creating tagger for BuildOutput…
    Locating dependency paths for arduino:avr:uno: 0 msec
    ReportQueuedMessages()
    [+0] ReportQueuedMessages() – 1 queued messages
    [+6] ReportQueuedMessages()
    [+0] ReportQueuedMessages() – 1 queued messages
    [+1569] ReportQueuedMessages()
    [+0] ReportQueuedMessages() – 1 queued messages
    [+1] ReportQueuedMessages()
    [+0] ReportQueuedMessages() – 1 queued messages
    Launching gdbserver…
    ExecuteRawCommand(-gdb-<wbr />version, d)
    [+25] GDB command result:
    [+0] ExecuteRawCommand(version, e)
    [+0] Aborting commands: (True/True)
    [+0] ExecuteRawCommand(-list-<wbr />features, d)
    [+0] Aborting commands: (True/True)
    [+0] ExecuteRawCommand(-gdb-set disassembly-flavor intel, d)
    [+0] Aborting commands: (True/True)
    [+0] ExecuteRawCommand(-gdb-set print demangle off, d)
    [+0] Aborting commands: (True/True)
    [+75] ExecuteRawCommand(-gdb-set stop-on-solib-events 1, d)
    [+0] Aborting commands: (True/True)
    Unexpected exception: GDB session exited prematurely. Please verify that the project is built, the selected GDB binary exists and the working directory is specified correctly.
    —————— xi1+p ——————
    xi1+p: GDB session exited prematurely. Please verify that the project is built, the selected GDB binary exists and the working directory is specified correctly.
    at xi1.l()
    at rt1.c_2()
    at VisualGDB.GDBDebugEngine.j1(nc b, z a)
    Unexpected exception: GDB session exited prematurely. Please verify that the project is built, the selected GDB binary exists and the working directory is specified correctly.
    —————— xi1+p ——————
    xi1+p: GDB session exited prematurely. Please verify that the project is built, the selected GDB binary exists and the working directory is specified correctly.
    at xi1.l()
    at rt1.c_2()
    at VisualGDB.GDBDebugEngine.j1(nc b, z a)
    [+7963] ExecuteRawCommand(-gdb-exit, d)
    [+0] Aborting commands: (True/True)
    RenameHighlightSmartTaggerProv<wbr />ider: creating tagger for DebugOutput…</div>

    #28750
    support
    Keymaster

    Hi,

    Sorry, this doesn’t look like a gdb log. Please make sure you follow the instructions from the page linked in our previous reply and send us the gdb log described there and not any other logs.

    #28752

    Please send me the link of how to do a GDB log. It didn’t come in your emails.

    Regards,

     

     

    #28753
    support
    Keymaster

    No problem. The link was posted in our first reply in this thread.

    Either way, here it is again: https://visualgdb.com/support/logsubmit

    #28757

    Here is the log you asked:

    C:\Users\Carlos\Documents\ArduinoData\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7\bin\\avr-gdb –interpreter mi “C:/Users/Carlos/source/repos/ArduinoProject2/Output/Arduino_Uno/Debug/ArduinoProject2.ino.elf”
    [ 0 ms] -gdb-version

    #28758
    support
    Keymaster

    Thanks, this looks like gdb fails to initialize.

    Please try running the gdb executable shown in the log manually from the command prompt window and see if it’s being blocked by your antivirus or any other component.

    You can also try deleting the entire C:\Users\Carlos\Documents\ArduinoData folder and re-creating the project from scratch. This will re-install all the packages and tools, including the up-to-date version of avr-gdb.

    #28759

    I ran it using the option Program and Start without Debugging in Debug menu and It ran ok.

    Deleting and recreating the program doesn’t eliminate the error.

    Regards,

     

    Carlos

    #28760
    support
    Keymaster

    Most likely, you are using an incompatible combination of an Arduino core and a debug method. Please make sure you follow our AVR debugging tutorial to configure debugging of your board.

    If it doesn’t work, please share the screenshots of all the wizard pages with the choices you make while creating the project, and also the screenshots of all the settings pages where you change any settings so that we could check for common errors.

    #28761

    HI
    <div>avr-gdb doesn’t exist in folder C:\Users\Carlos\<wbr />Documents\ArduinoData\<wbr />packages\arduino\tools\avr-<wbr />gcc\7.3.0-atmel3.6.1-arduino7\<wbr />bin</div>
    <div>Regards,</div>
    <div></div>
    <div>Carlos</div>

    #28762

    When I tried to run the command line, you sent me,  I received the following error: avr-gdb is not recognized as an internal or external command

    I saw that avr-gdb is not in the folder :  “C:\Users\Carlos\Documents\ArduinoData\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7\bin”

    Regards,

     

    Carlos

     

    support wrote:

    Please try opening the Command Prompt window and run the following command:
    C:\Users\Carlos\Documents\Ardu<wbr />inoData\packages\arduino\tools<wbr />\avr-gcc\7.3.0-atmel3.6.1-<wbr />arduino7\bin\\avr-gdb –interpreter mi “C:/Users/Carlos/source/repos/<wbr />ArduinoProject2/Output/Arduino<wbr />_Uno/Debug/ArduinoProject2.<wbr />ino.elf”
    Then please share a screenshot of the output and screenshots of any error messages you get while trying to run it.

    #28790

    Support

    Please could you see bellow:

     

    When I tried to run the command line, you sent me,  I received the following error: avr-gdb is not recognized as an internal or external command

    I saw that avr-gdb is not in the folder :  “C:\Users\Carlos\Documents\ArduinoData\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7\bin”

    Regards,

     

    Carlos

    #28836

    Hi,
    Could you be so kind as to answer my question below?
    Thanks,

    avr-gdb doesn’t exist in folder C:\Users\Carlos\Documents\ArduinoData\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino7\bin
    How to install it and where can I download it?
    Regards,

    Carlos<div>How can I install it and where can I download it?</div>
    Regards,
    Carlos

Viewing 14 posts - 1 through 14 (of 14 total)
  • You must be logged in to reply to this topic.