Debugging ESP8266

Sysprogs forums Forums VisualGDB Debugging ESP8266

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #6954
    mfkfx
    Participant

    Hello,

    when I try to load your basic HTTP-Example (IoT) into my ESP, the program does never hit a breakpoint.

    There is only a message in GDB-Window: “Warning: could not set a breakpoint on main. ‘Step into new instance’ will not work.”

    When using a program without flash (-> RAM), everything is working as expected.

    Can you help me?

    #6955
    support
    Keymaster

    Which board are you using? What happens if you then unplug the board and plug it back? Does the new program start normally, the old program start normally, or does nothing happen at all?

    #6964
    mfkfx
    Participant

    I have the nodemcu devkit.

    The board was not starting from Flash because I removed a low-resistive connection between GPIO15 and GND for testing purposes. Now i have inserted a 10k resistor, so the board will try starting from flash.
    Unfortunately I have a new problem: Received a SIGTRAP: Trace/breakpoint trap.

    Can you help me with that?

    Thank you very much!

    #6965
    mfkfx
    Participant

    Some additional Information: I am using a J-Link Edu as Debugging device. It makes no difference if I connect the ESPs reset Signal to nTRST (JTAG reset) or to RESET (System reset) of the J-Link.

    #6966
    support
    Keymaster

    Hi,

    Does the correct firmware start now if you manually restart the board? I.e. does the program happen during debugging only or does the programming fail?

    #6968
    mfkfx
    Participant

    Hello again,

    it seems the program does not start from flash. When I create the HTTP example, it looks like the flash programming is finished and the error message is appearing when the debugging starts.
    However, when I disconnect the debugger and reset the chip, no WLAN-AP does appear.

    Do I have to adapt the flash configuration parameters? What can I do to solve this?

    Regards

    #6970
    support
    Keymaster

    Hi,

    Yes, please try experimenting with the flash size, speed and mode. Unfortunately there is not much documentation available from Espressif, so it’s hard to say which exact settings will work with your board.

    Was the board working before with VisualGDB? Does it work with the bootloader now? Some users reported that that some of the boards come with very low-quality SPI FLASH that dies after less than 10 rewrite cycles.

    #7007
    mfkfx
    Participant

    Hello again,

    changing flash mode from qio to dio did the job 🙂

    One last question: Now I’m trying to send a simple text over UART.
    I added the “Peripheral Drivers (IoT)” in Properties -> Frameworks. Why can’t I use os_printf(“hello”)?
    There is a define is osapi.h:

    #define os_printf os_printf_plus

    The error is: ‘os_printf_plus’ was not declared in this scope.

    Do I have to add a library in Properties -> Makefile settings -> Library Directories ?

     

    Regards

    #7026
    support
    Keymaster

    Hi,

    We have provided a solution in this post.

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