Sysprogs forums › Forums › VisualGDB › Debug doesn't work with Arduino UNO or Mega
Tagged: Arduino Debug uno Mega
- This topic has 13 replies, 2 voices, and was last updated 4 years, 4 months ago by carlos@dobleausa.com.
-
AuthorPosts
-
July 15, 2020 at 07:32 #28740carlos@dobleausa.comParticipant
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.
July 16, 2020 at 07:37 #28744supportKeymasterHi,
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.
July 17, 2020 at 05:44 #28749carlos@dobleausa.comParticipantHi,
<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>July 17, 2020 at 08:20 #28750supportKeymasterHi,
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.
July 17, 2020 at 10:06 #28752carlos@dobleausa.comParticipantPlease send me the link of how to do a GDB log. It didn’t come in your emails.
Regards,
July 17, 2020 at 20:47 #28753supportKeymasterNo problem. The link was posted in our first reply in this thread.
Either way, here it is again: https://visualgdb.com/support/logsubmit
July 20, 2020 at 06:11 #28757carlos@dobleausa.comParticipantHere 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-versionJuly 20, 2020 at 07:59 #28758supportKeymasterThanks, 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.
July 20, 2020 at 10:07 #28759carlos@dobleausa.comParticipantI 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
July 20, 2020 at 10:14 #28760supportKeymasterMost 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.
July 20, 2020 at 10:53 #28761carlos@dobleausa.comParticipantHI
<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>July 20, 2020 at 12:15 #28762carlos@dobleausa.comParticipantWhen 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.July 27, 2020 at 07:39 #28790carlos@dobleausa.comParticipantSupport
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
August 1, 2020 at 07:40 #28836carlos@dobleausa.comParticipantHi,
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- This reply was modified 4 years, 4 months ago by carlos@dobleausa.com.
-
AuthorPosts
- You must be logged in to reply to this topic.