ESP8266 – Error on uploading Arduino sketch: upload.py Invalid parameters used

Sysprogs forums Forums VisualGDB ESP8266 – Error on uploading Arduino sketch: upload.py Invalid parameters used

Viewing 8 posts - 16 through 23 (of 23 total)
  • Author
    Posts
  • #25928
    support
    Keymaster

    Please follow our gdb stub debugging tutorial. It provides a very detailed explanation of all necessary configuration steps: https://visualgdb.com/tutorials/arduino/esp8266/

    #25929
    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

    #25930
    support
    Keymaster

    No problem, please share the screenshot of the Visual Studio window with the main sketch file open, the screenshot of the first page of VisualGDB Project Properties, the screenshots of SmarTTY window showing the output from the board at baud rates of 57600, 74880 and 115200 and we will help you understand what is going on and find the working settings.

    #25931
    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

    #25933
    support
    Keymaster

    No problem and thanks for the detailed description. It helped us pinpoint and fix the issue so that the GDBSTUB_BREAK_ON_INIT will now work as expected.

    Sorry for the false alarm, from the description we had, the problem looked like a missing flag somewhere in the settings and it was not possible for us to verify it without a screenshot (the call to gdbstub_init() would be highlighted differently based on the effective configuration). It turned out, the flag was specified, but then got lost inside the Arduino build logic.

    Please try this build, it will work out-of-the-box: VisualGDB-5.5.1.3274.msi

    #25934
    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

    #25935
    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

    #25944
    support
    Keymaster

    Strange. Please double-check that the <VisualGDB>\Arduino\arduino-builder.exe file has a size of 12186624 bytes.

    Please also try rebuilding the project and check that the call to gdbstub_do_break() from gdbstub_init() in gdbstub.c is not grayed out:

    Attachments:
    You must be logged in to view attached files.
Viewing 8 posts - 16 through 23 (of 23 total)
  • You must be logged in to reply to this topic.