Esp8266-12 FreeRTOS

Sysprogs forums Forums VisualGDB Esp8266-12 FreeRTOS

This topic contains 18 replies, has 2 voices, and was last updated by  support 2 months ago.

Viewing 15 posts - 1 through 15 (of 19 total)
  • Author
    Posts
  • #13155

    texas_72
    Participant

    Good morning
    I wanted to use the esp8266-12 FreeRTOS-based module with visualGDB on boot on the TX RX uart as I can. I used this form, with this mode with arduino ide without problems.

    Attachments:
    You must be logged in to view attached files.
    #13159

    support
    Keymaster

    Hi,

    Normally you should be able to do it by following the esp8266 gdb stub tutorial. If it doesn’t work, please let us know if the programming stage succeeds (progress bar showing programmed addresses) or whether the device never enters the bootloader mode.

    #13171

    texas_72
    Participant

    hi
    I followed the tutorial, the firmware is loaded on the esp-8266-12 but it does not go on the break point and ends in a debug timeout.

    Attachments:
    You must be logged in to view attached files.
    #13179

    support
    Keymaster

    Hi,

    Looks like the programming succeeds, but your board might be using a different clock frequency or different UART pin numbers. Please try changing the gdb stub baud rate to 115200 (or look up the correct value in the board documentation). You may also need to edit the gdb stub to use a different UART port.

    If you are not sure about the exact steps, please try using one of the boards directly supported by VisualGDB instead (e.g. Olimex mod-wifi-esp8266-dev).

    #13189

    texas_72
    Participant

    Hi
    I have analyzed the schemes of Olimex and ESP8266-12 and are similar. I tried all the configuration combinations, but the problem remained. I think it is a problem of writing / location of the flash because something strange happens, after programming, I do a reset and start flash mode I should see that the esp8266-12 runs the software that has been loaded, in reality it does not none of this, but continue sending strange characters quickly, on the uart. I have tried various examples also Blink iot, but nothing. The esp8266-12 works very well with arduino ide and therefore exclude module problems. I ask you for help to solve this problem.

    #13192

    support
    Keymaster

    Hi,

    Thanks for getting back to us. If the layout and the clock frequency are the same, the problem could be indeed caused by the incorrect FLASH setting (e.g. QIO vs DIO or frequency).

    Please try setting the lowest memory size and switching FLASH mode to DIO.

    #13232

    texas_72
    Participant

    Hi

    These are the messages that continue to exit the uart after a reset of the esp8266.

     

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

    load 0x40100000, len 31628, room 16
    tail 12
    chksum 0xe9
    ho 0 tail 12 room 4
    load 0x3ffe8000, len 944, room 12
    tail 4
    chksum 0xb3
    load 0x3ffe83b0, len 852, room 4
    tail 0
    chksum 0xb4
    csum 0xb4
    OS SDK ver: 1.5.0-dev(a8c4880) compiled @ Dec 8 2017 13:15:34
    rf_cal[0] !=0x05,is 0x00

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

    load 0x40100000, len 31628, room 16
    tail 12
    chksum 0xe9
    ho 0 tail 12 room 4
    load 0x3ffe8000, len 944, room 12
    tail 4
    chksum 0xb3
    load 0x3ffe83b0, len 852, room 4
    tail 0
    chksum 0xb4
    csum 0xb4
    OS SDK ver: 1.5.0-dev(a8c4880) compiled @ Dec 8 2017 13:15:34
    rf_cal[0] !=0x05,is 0x00

    #13233

    texas_72
    Participant

    Hi

    now seems to work with some changes as shown in the image, I do not know if they are improvable or sufficient …

    Now I have another problem on break points.

    Thanks

    Attachments:
    You must be logged in to view attached files.
    #13242

    support
    Keymaster

    Hi,

    Switching FLASH mode to “DIO” likely did the trick.

    Regarding the breakpoint issue, please attach a full GDB log as shown here so that we could help you diagnose this.

    #13252

    texas_72
    Participant

    Hi

    the problem of the break point was due to the path of the project folder that contained a space, so problem solved.
    Two questions:
    how many break points it supports;
    what do I have to do to escape gdbstub debug, if I want only program I tried with “program and start without debugging” but gdbstub is always loaded.
    I also found a problem on visuagdb properties in debug setting the list com port is empty i have to forcefully write the port name.

    Thanks

    #13254

    support
    Keymaster

    Hi,

    ESP8266 supports only one hardware breakpoint. If you would like to set more breakpoints, please try moving some of your functions to RAM by declaring them with ICACHE_FLASH_ATTR.

    If you don’t want to use the gdb stub, simply disable the call to gdbstub_init().

    Regarding the empty com port list, please try attaching a screenshot of this so that we could see what is going on.

    #13266

    texas_72
    Participant

    Hi

    here is the screenshot, everything works but the com is not displayed I had to write the COM48.

     

    • This reply was modified 2 months, 1 week ago by  texas_72.
    Attachments:
    You must be logged in to view attached files.
    #13270

    support
    Keymaster

    Hi,

    Please try clicking on “Debug using” and then select “USB Devices”. It should recognize your USB-to-COM bridge and let you select it there.

    #13280

    texas_72
    Participant

    Hi many thanks,

    I have two burnings concerning the compilation:

    1- I added the code for the wps connection

    #include “esp_common.h”
    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>
    #include “esp_wps.h”
    #include “freertos/timers.h”
    #include “freertos/FreeRTOS.h”
    #include “freertos/task.h”
    #include “freertos/queue.h”

    wifi_wps_disable ();
    wifi_wps_enable (WPS_TYPE_PBC);
    wifi_set_wps_cb (user_wps_status_cb);
    wifi_wps_start ();

    error undefined reference to ‘wifi_wps ……’

    2-I added the code to create a task timer that I need to run some
    work regularly, when I compile it gives me an error

    #include “esp_common.h”
    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>
    #include “esp_wps.h”
    #include “freertos/timers.h”
    #include “freertos/FreeRTOS.h”
    #include “freertos/task.h”
    #include “freertos/queue.h”

    xTimerHandle timer;

    void callback_timer (xTimerHandle xTimer)
    {
    }

    timer = xTimerCreate (“timer”, 5000 / portTICK_RATE_MS, pdTRUE, (void *) 0, & callback_timer);

    error invalid conversion from ‘const char *’ to ‘const signed char *’ [-fpermissive]

    Many thanks

     

    • This reply was modified 2 months, 1 week ago by  texas_72.
    Attachments:
    You must be logged in to view attached files.
    #13291

    support
    Keymaster

    Hi,

    The first issue looks like a missing library or a source file. Please try locating a library that defines the “wifi_wps_start” function and add it to your project as described here: http://visualgdb.com/support/linkerinputs/

    The second issue looks like you are trying to compile a snippet of a Plain C code in the C++ context. As this is a generic programming question not related to VisualGDB, please consider getting advice at StackOverflow instead. It has an extensive base of answers to common C/C++ issues.

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

You must be logged in to reply to this topic.