gdbstub not starting

Sysprogs forums Forums VisualGDB gdbstub not starting

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #7087
    freeck
    Participant

     

     

    Hi there,

     

    Today I purchased the embedded version as it now includes a gdbstub for the esp8266. Unfortunately I encountered a problem.

    Following the steps as depicted in the tutorial http://visualgdb.com/tutorials/esp8266/gdbstub/   I could download the image, but after the download there is a time out. No response coming from the target.

    Perhaps it has something to do with the following report?? (I have payed and recieved a license).

    (gdb begin)
    Your trial has been extended until we finish validating your purchase.
    C:\SysGCC\xtensa-lx106-elf\bin\xtensa-lx106-elf-gdb.exe –interpreter mi M:\esp8266\EmbeddedProjectStub2\EmbeddedProjectStub2/Debug/EmbeddedProjectStub2.elf
    -list-features

     

    • This topic was modified 8 years, 6 months ago by freeck.
    • This topic was modified 8 years, 6 months ago by freeck.
    • This topic was modified 8 years, 6 months ago by freeck.
    #7091
    support
    Keymaster

    Hi,

    Can you reproduce this on a basic “Hello, World” project as well? Perhaps your oscillator frequency is different from the one ESP8266 expects and you need to change it in the code?

    Please also try changing the FLASH type from qio to dio and other types in VisualGDB Project Properties.

    #7097
    osnwt
    Participant

    I saw the same behavior, but do not remember exactly when and why. In the end I found it working, but with few issues. For instance, I was not able to run ANY RTOS-based examples at all (even w/o gdbstub), but IoT SDK-based ones worked.

    My suggestions:

    • First, try IoT SDK based Blink example, comment out any gpio references (gpio_init and gpio control in callback) since serial port uses the same pin as LED (on generic modules). So keep the pin for gdb.
    • Second, play with serial baud rate. It uses autobaud for serial downloader, and works well at 230400 for me as well as @ 74880 (74800). But gdbstub might not work with arbitrary baud rate. Try use 115200 or 74800.

    Still, expect few issues making things unusable at the moment. For example, if I put breakpoint in callback during run, the program stops and tick counter correctly displayed. Removing BP, continuing and setting BP again shows increased counter as expected. But if you keep BP there and press “Continue”, next stop will NOT change tick counter for unknown reason. If you set BP before program start, it will be zero forever. In disassembly I saw that register loads wrong counter var address (40*), but if you put &var in memory window, it uses real address (3F*). Somewhere on forums I saw that gdb disassembles xtensa code incorrectly. Maybe that’s it.

    Unfortunately, with JTAG I also had issues. Tried with FTDI-based JTAG (FOSS JTAG from OpenPilot based on FLOSS JTAG), and Segger J-Link V8. Works well in RAM, but with flash it saves code to flash but does not start program correctly. Pulling down GPIO15 and resetting starts program from flash and then BP works and shows data. I don’t yet know how to overcome this issue observed with both JTAG probes…

     

    #7098
    osnwt
    Participant

    PS to bazis: why there are two equal gdbstub baud rate fields in debug settins? One by default is 74800 (shouldn’t it be 74880?), another is 115200. The same labels, though.

    #7104
    support
    Keymaster

    Hi,

    Looks like there is some bug with stepping over instructions. We’ll follow up with Espressif on that and see if they could provide a solution.

    Have you connected the nRST pin with J-Link? When we tested it with ESP8266, it did not start roughly 1 time out of 10, but worked 90% of the time. Please also try lowering the JTAG speed and experimenting with the “Reset mode” setting.

    Regarding baud rates, this looks like a typo. The 115200 baud rate is the bootloader baud rate that indeed uses autobaud. Please also try changing the first one to 74880. We have updated the description and re-uploaded the toolchain. You can download the updated toolchain installer from http://gnutoolchains.com/esp8266.

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