Hello everyone, I tried to start debugging on arduino uno, but when I try to start debugging, I get this error: Failed to launch GDB: .pioinit: 13: Error in sourced command file:
Bogus trace status reply from target: timeout (from interpreter-exec console “source .pioinit”) What does this mean?
Whats the platformio.ini
and code? Do you want to use simavr
simulation + debugging or avr-stub for debugging on real hardware via the Serial
?
Hello, avr-stub
platformio.ini:
[env:uno]
platform = atmelavr
board = uno
framework = arduino
debug_port = COM7
debug_tool = avr-stub
lib_deps =
jdolinay/avr-debugger @ ~1.1
but how can you through the serial?
The avr-debugger
library basically opens a GDB server that responds to serial commands and is thus usable by avr-gdb
. As a drawback, you must not ever use Serial
in your own program, because you would be conflicting with the GDB logic of course.
Can you reproduce the minimal debug-a-blinky-sketch example for the Uno at the bottom of How to debug on Arduino mega 2560 - #2 by maxgerhardt?
Yes, when i delete command Serial.begin(9600), evrythings work.
But it throws me to another file and does not show the variable that I created
Here is the file to which it throws me.
https://imgur.com/a/kQNn4aA
Yes, this is correct. This is part of the Arduino core. If you do a step-into, you will get into your loop()
implementation.
Thank you very much, I’ll go think about how it works