cvalentin

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 18 total)
  • Author
    Posts
  • cvalentin
    Participant

    I just tested VisualGDB Build 3274. It still shows the same behaviour. Without gdbstub_do_break() after gdbstub_init() VisualGDB can’t connect because GDB is not waiting for a connection.

    This is the Arduino settings dialog:

    This is the completely stripped down working code:

    If I comment out gdbstub_do_break() GDB does not wait for a connection.
    Please let me know if you need more information to track down the problem.

    Regards,
    Christian

    cvalentin
    Participant

    I have to say thanks for the really fast and good support and the fast hotfixes you do. I really appreciate that!
    I will try the new version and keep you updated.

    Regards,
    Christian

    cvalentin
    Participant

    Hi,

    Got it working. I had to add the following include:
    #include <internal/gdbstub-entry.h>

    The setup() method looks like this, now:
    void setup()
    {
    pinMode(LED_BUILTIN, OUTPUT);
    gdbstub_init();
    gdbstub_do_break();
    }

    The gdbstub_do_break() does the trick. Without this line VisualGDB cannot connect to gdbstub. If I remove this line it looks like GDB is not active. After I have added this line and reset the ESP, the GDB string $T05#b9 appears after resetting the ESP.

    The preprocessor macro GDBSTUB_BREAK_ON_INIT=1 is set, so I don’t know why gdbstub_init() does not wait for a connection, only gdbstub_do_break() does this.

    You have a better insight in this. Do you know why I had to add this line? Is the gdbstub_init() implementation corrupt?

    Regards,
    Christian

    cvalentin
    Participant

    Hi,

    I know this page and tried everything. It is not working with VisualGDB, only with the other tool. So my assumption is that VisualGDB does something wrong.

    Regards,
    Christian

    cvalentin
    Participant

    The other tool also uses the GDB stub. I can step through the code. The other debug method you mentioned does not support stepping through code.
    It looks like that the GDB stub is not waiting for VisualGDB to connect. Shouldn’t the call to gdbstub_init() within the setup() method wait until VisualGDB has connected?

    It looks like this does not happen. The LED immediately starts blinking after uploading the code so the loop() method is entered without waiting for a GDB connection.

    Do you have any idea what I can check next?

    Regards,
    Christian

    cvalentin
    Participant

    It is a Wemos D1 mini board. Interestingly, it works flawlessly with VisualMicro and I can debug, but I bought a VisualGDB license, so it would be good, if this gets sorted out.

     

    Thanks,
    Christian

    cvalentin
    Participant

    If I reset the board, I see the following (Baud rate set to 74880):

    ets Jan 8 2013,rst cause:2, boot mode:(3,7)

    load 0x4010f000, len 1384, room 16
    tail 8
    chksum 0x2d
    csum 0x2d
    v8b899c12
    ~ld

    So it looks like the baud rate is OK, but no GDBStub output?

    cvalentin
    Participant

    Uploading the sketch does work now, but I cannot debug the code. I use the default blinking example which includes the gdbstub and calls gdbstub_init() in the setup method.

    After uploading the firmware VisualGDB tries to connect to the gdbstub but it does not work. After a timeout I get the following error message:
    Failed to connect to the gdb stub. Please check your settings.

    This is the detailed output of the error:

    -gdb-version
    =thread-group-added,id=”i1″
    ~”GNU gdb (GDB) 8.2.50.20180723-git\n”
    ~”Copyright (C) 2018 Free Software Foundation, Inc.\n”
    ~”License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html&gt;\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law.”
    License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html&gt;
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.
    ~”\nType \”show copying\” and \”show warranty\” for details.\n”
    ~”This GDB was configured as \”–host=i686-w64-mingw32 –target=xtensa-lx106-elf\”.\n”
    ~”Type \”show configuration\” for configuration details.\n”
    ~”For bug reporting instructions, please see:\n”
    ~”<http://www.gnu.org/software/gdb/bugs/&gt;.\n”
    ~”Find the GDB manual and other documentation resources online at:\n <http://www.gnu.org/software/gdb/documentation/&gt;.”
    Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/&gt;.
    ~”\n\n”
    ~”For help, type \”help\”.\n”
    ~”Type \”apropos word\” to search for commands related to \”word\”…\n”
    ~”Reading symbols from D:/Work/ESP8266/ArduinoProject1/Output/LOLIN_WEMOS__D1_R2___mini/Debug/ArduinoProject1.ino.elf…”
    ~”done.\n”
    ~”GNU gdb (GDB) 8.2.50.20180723-git\n”
    ~”Copyright (C) 2018 Free Software Foundation, Inc.\n”
    ~”License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html&gt;\nThis is free software: you are free to change and redistribute it.\nThere is NO WARRANTY, to the extent permitted by law.”
    License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html&gt;
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.
    ~”\nType \”show copying\” and \”show warranty\” for details.\n”
    ~”This GDB was configured as \”–host=i686-w64-mingw32 –target=xtensa-lx106-elf\”.\n”
    ~”Type \”show configuration\” for configuration details.\n”
    ~”For bug reporting instructions, please see:\n”
    ~”<http://www.gnu.org/software/gdb/bugs/&gt;.\n”
    ~”Find the GDB manual and other documentation resources online at:\n <http://www.gnu.org/software/gdb/documentation/&gt;.”
    Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/&gt;.
    ~”\n\n”
    ~”For help, type \”help\”.\n”
    ~”Type \”apropos word\” to search for commands related to \”word\”.\n”
    ^done
    -list-features
    ^done,features=[“frozen-varobjs”,”pending-breakpoints”,”thread-info”,”data-read-memory-bytes”,”breakpoint-notifications”,”ada-task-info”,”language-option”,”info-gdb-mi-command”,”undefined-command-error-code”,”exec-run-start-option”]
    -gdb-set disassembly-flavor intel
    ^error,msg=”No symbol \”disassembly\” in current context.”
    -gdb-set print demangle off
    ^done
    set serial baud 74880
    &”set serial baud 74880\n”
    =cmd-param-changed,param=”serial baud”,value=”74880″
    ^done
    target remote \\.\COM4
    &”target remote \\\\.\\COM4\n”
    ~”Remote debugging using \\\\.\\COM4\n”
    ~”Ignoring packet error, continuing…\n”
    &”warning: unrecognized item \”timeout\” in \”qSupported\” response\n”
    ~”Ignoring packet error, continuing…\n”
    &”Remote replied unexpectedly to ‘vMustReplyEmpty’: timeout\n”
    ^error,msg=”Remote replied unexpectedly to ‘vMustReplyEmpty’: timeout”
    -target-disconnect
    ^error,msg=”You can’t do that when your target is `exec'”
    -gdb-exit
    ^exit

     

    There still seems to be a problem. Please can you advice?

    Kind Regards,
    Christian

    cvalentin
    Participant

    Thanks very much for the really fast fix! I will try it today evening when I am at home back from work.

    Kind Regards,

    Christian

    cvalentin
    Participant

    Hi,

    I do the following steps:

    Step1:

    Step2:

    Step3:

    Step4:

    Step5:

    Step6:

    To program the flash, I use the following ContextMenu entry:

    Please can you check if you have the same issues with a WEMOS D1 mini board? What should I check next?

    Kind Regards,
    Christian

    cvalentin
    Participant

    I don’t have the Arduino IDE installed. I only use the VisualGDB Arduino packages. I have the following installed:

    ESP32 Arduino package: Version 1.0.3
    ESP8266 Arduino package: Version 2.5.2

    The problem also exist if I uninstall the ESP32 package.

    What can I check next?

    Kind Regards,
    Christian

    cvalentin
    Participant

    Is it possible to change the command line which VisualGDB uses to upload the sketch by myself or do you have to fix that on your side?

    Kind Regards,
    Christian

    cvalentin
    Participant

    Thanks very much, deleting the cache did the trick. I got the update from 1.0.1 => 1.0.3.

    Kind Regards,
    Christian

    cvalentin
    Participant

    Please could you re-check internally if the arduino esp32 package version 1.0.3 is really online? The package is still not visible in the package manager.

    cvalentin
    Participant

    Updates is completely empty. Maybe the updated list isn’t online, already?

Viewing 15 posts - 1 through 15 (of 18 total)