RTOS SDK v. 1.5 compilation error

ukrsms
Posts: 6
Joined: Tue Oct 17, 2017 6:01 pm

RTOS SDK v. 1.5 compilation error

Postby ukrsms » Thu Nov 16, 2017 12:21 am

Hello

Till now I used SDK v 1.3 but today I decided to switch to 1.5 SDK. I downloaded SDK from here https://github.com/espressif/ESP8266_RTOS_SDK/tree/master and tried to compile it, but i got an error:

Code: Select all

c:/Espressif/xtensa-lx106-elf/bin/xtensa-lx106-elf-gcc -Lc:/Espressif/ESP8266_RTOS_SDK/lib -Lout/build -Trom0.ld -nostdlib -Wl,--no-check-sections -u call_user_start -Wl,-static -Wl,--start-group, out/build/app_app.a -lgcc -lhal -lphy -lpp -lmain -lssl -lnet80211 -lespconn -lwpa -lcrypto -lfreertos -lcirom -llwip -lminic -lpwm -lsmartconfig -Wl,--end-group -Wl,-Map,foo0.map -o out/build/app_0.out
c:/Espressif/ESP8266_RTOS_SDK/lib\libespconn.a(espconn_buf.o):(.text.ringbuf_memset+0xc): undefined reference to `os_memset'
c:/Espressif/ESP8266_RTOS_SDK/lib\libespconn.a(espconn_buf.o): In function `ringbuf_memset':
(.text.ringbuf_memset+0x6a): undefined reference to `os_memset'
collect2.exe: error: ld returned 1 exit status

I tried to find the os_memset function but it seems it is absent in the SDK.
I am puzzled with this because I believe that SKD could not be with an error inside. Could anyone say what could be wrong?

Her Majesty
Posts: 205
Joined: Mon Oct 27, 2014 11:09 am

Re: RTOS SDK v. 1.5 compilation error

Postby Her Majesty » Thu Nov 16, 2017 3:47 pm

Maybe use memset directly?

ukrsms
Posts: 6
Joined: Tue Oct 17, 2017 6:01 pm

Re: RTOS SDK v. 1.5 compilation error

Postby ukrsms » Thu Nov 16, 2017 4:59 pm

You meant I may use os_memset from within my code? I've checked, there is no call to the function, but I use memset in my code.
By the way, a compiler says it is called at libespconn.a(espconn_buf.o): In function `ringbuf_memset':

ukrsms
Posts: 6
Joined: Tue Oct 17, 2017 6:01 pm

Re: RTOS SDK v. 1.5 compilation error

Postby ukrsms » Fri Dec 01, 2017 1:21 am

I've studied the issue more deeply and found that the problem is connected with espconn lib.
If I do not use any espconn functions then project compiles without errors, but if there are some espconn functions in the code the mentioned error occurs.

For example, I've tested the issue on a simple code:

Code: Select all

#include "esp_common.h"


void upgrade_recon_cb(void *arg, sint8 errType)
{
   printf("Connection error: ");
}

void user_init(void)
{
   struct espconn *conn;
   espconn_regist_reconcb(conn, upgrade_recon_cb);
}
void user_rf_cal_sector_set(void)
{
}

and compilation finished with the errors:

Code: Select all

c:/Espressif/ESP8266_RTOS_SDK_1.5/lib\libespconn.a(espconn_buf.o):(.text.ringbuf_findchr+0x8): undefined reference to `memchr'
c:/Espressif/ESP8266_RTOS_SDK_1.5/lib\libespconn.a(espconn_buf.o): In function `ringbuf_findchr':
(.text.ringbuf_findchr+0x73): undefined reference to `memchr'
c:/Espressif/ESP8266_RTOS_SDK_1.5/lib\libespconn.a(espconn_buf.o):(.text.ringbuf_memset+0xc): undefined reference to `os_memset'
c:/Espressif/ESP8266_RTOS_SDK_1.5/lib\libespconn.a(espconn_buf.o): In function `ringbuf_memset':
(.text.ringbuf_memset+0x6a): undefined reference to `os_memset'
collect2.exe: error: ld returned 1 exit status
C:/Espressif/examples/esp_rtos_sdk_example_2/Makefile:198: recipe for target 'build/app.out' failed


P.S. I tried other espconn functions instead of espconn_regist_reconcb but the result was the same.
I'm confused with the issue because it is hard to believe that such an error is there in new SDK :?
Does anybody use RTOS_SDK_1.5 ?

Who is online

Users browsing this forum: Google [Bot] and 12 guests